Commit Graph

287 Commits

Author SHA1 Message Date
Tomasz Lauda 9815f99d04 timer: different handling of TIMER3 for cAVS
Different handling of TIMER3 for cAVS platforms.
Now we are operating on irq masks on core level,
not on the timer level. It gives us opportunity
to implement multicore work queue.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2018-09-25 15:34:33 +02:00
Tomasz Lauda c2fce8fd1c clk: remove clock microseconds handling
Removes clock microseconds handling for scheduling
and work queue. In case of some clocks it is causing
too much of a drift in cycles. We still pass every
delay in microseconds, but handle it as milliseconds.
Microseconds are needed to get delays less then 1 ms.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2018-09-25 15:34:02 +02:00
Tomasz Lauda ffa13fcc4d interrupt: add possibility for manual irq unmasking
Adds possibility for interrupt handler to decide,
whether it wants to manually handle unmasking irq
or have it done automatically.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2018-09-20 17:00:35 +02:00
Liam Girdwood e4e3cb131c
Merge pull request #388 from mmaka1/hda-get-free
dma: hda: get-free-size simplified
2018-09-18 13:50:37 +01:00
Marcin Maka 49f2175731 dma: hda: get-free-size simplified
Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
2018-09-18 11:45:11 +02:00
Rander Wang edef72f314 dma: fix dma issue on BYT
It is caused by the change of removing dai waiting after stop.
dma should not be stopped in dai_comp_trigger if HW LLI is not
enable. At this time DMA is still working and it can't be stopped
DMA engine would stop the channel automatically after each transfer.
So just query channel status to stop dma on BYT

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
2018-09-18 16:25:01 +08:00
Rander Wang 9ebd1bce88 dw-dma: refine dw_dma_stop to clear done bit in all lli
The initialization of lli should be out of loop

Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
2018-09-13 16:15:47 +08:00
Bartosz Kokoszko 1d2c681d8d drivers: apl-ssp: handling bclk idle state
Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
2018-09-10 16:02:48 +02:00
Liam Girdwood d582a36fd0
Merge pull request #340 from tlauda/topic/cache_fixes
memory: cavs: cache fixes
2018-09-10 14:14:36 +01:00
Tomasz Lauda 4d1c566c3c memory: cavs: cache fixes
We need to writeback clock data, because it's used
in work queue. Also we need to writeback bss in order
to share static pointers with slave cores.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2018-09-10 11:05:53 +02:00
Marcin Maka fee9f9656d dma: hda: playback preload phase synced with logical buffer state
Removed dma/dsp race condition that happened within preload phase.

Min buffer size set to entire buffer to avoid dma and dsp
pointers misalignmen in case the period size is not multiple
of the hda dma burst size.

Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
2018-09-08 17:34:10 +02:00
Liam Girdwood d27ec1ddb0
Merge pull request #284 from tlauda/topic/dai_remove_wait
dai: remove wait on stop
2018-09-06 09:32:37 +01:00
Tomasz Lauda 344085d995 dai: remove wait on stop
Removes wait on stop, as it's not needed.
Also this change fixes problems with sending IPC as
wait function lowers interrupt level, while IPCs are
now executed on irq task level.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2018-09-03 13:55:04 +02:00
Tomasz Lauda 992f081136 ssp: cavs: make sure that SSP FIFO is empty
This patch implements delay before SSP stop
to make sure, that for transmitting the FIFO is empty
and for receiving the FIFO provides the real status.
Also it clears transmit underrun.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2018-09-03 13:53:05 +02:00
Janusz Jankowski c0f156b2ba icl: initial support
Added icelake platform to platforms.
Updated rimage to support icelake.
Updated autoconf and automake files.

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2018-08-31 19:52:48 +02:00
Janusz Jankowski 56cda383c2 drivers: refactor: move timer from platform to drivers
+ Indents for 'CHECK: Alignment should match open parenthesis'

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2018-08-31 14:10:37 +02:00
Janusz Jankowski b164895386 drivers: refactor: move clk from platform to drivers
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2018-08-31 14:10:37 +02:00
Janusz Jankowski 0d6425e614 drivers: refactor: move interrupt from platform to drivers
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2018-08-31 14:10:37 +02:00
Janusz Jankowski b67c535301 drivers: refactor: create <vendor>/<family> filetree
Split files into appropriate folders.
Added makefiles to not break build.
Fixed checkpatch errors in dw-dma and baytrail/ssp.

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2018-08-31 14:10:37 +02:00
Seppo Ingalsuo 38af5ef4de DMIC: Handle possible null pointers from rzalloc()
This patch adds the missing handling of null pointers for the case
if memory allocation would fail.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2018-08-31 14:48:01 +03:00
Liam Girdwood 5d469b42a7 Merge remote-tracking branch 'gh/next' into next-master2 2018-08-29 16:42:29 +01:00
Marcin Maka 0c5a0a04f8 lib: work: using precise wallclk for 1ms schedule on cavs
Apl wallclk freq is 19.2 which gives about 10.5% inaccuracy
when timeouts are computed in usec. This temporary w/a
uses ticks/msec to compute msec timeouts.

Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
2018-08-28 14:05:10 +02:00
Marcin Maka 033220b69f cnl: hda: fixed missing dai-ops to re-enable cnl compilation.
Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
2018-08-28 13:37:51 +02:00
Marcin Maka f96878a8f4 dai: support for hda cyclic mode dai added
There are no buffer completion int's, so work queue timers are
used by hda-dma in cyclic mode.
Buffer segment completion programming removed.

W/A to observed work queue timer inaccuracy applied.

Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
2018-08-24 13:56:09 +02:00
Marcin Maka 7cdcf034d1 dma: fixed writebacks when operating via L1 on dma buffer in L2 mem
Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
2018-08-23 15:25:22 +02:00
Tomasz Lauda 2943342b83 dw-dma: allocate lli on runtime heap
Allocates linked list item on runtime heap instead of
buffer heap.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2018-08-23 10:42:23 +02:00
Bartosz Kokoszko 10fcb2036d drivers: apl-ssp: refinement in DSP_A and I2S mode.
In order to get one bclk delay between frame sync and
data I only set FSRT flag in sspsp register. There is
no need to set SSPSP_STRDLY bits.

Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
2018-08-21 12:16:36 +02:00
Tomasz Lauda b104a5dfdf dw-dma: refactor interrupt registration and unregistration
Changes flow of dw-dma interrupt registration and unregistration:
Now it is possible for slave cores to register for dw-dma handler.
Also registration happens before start and not on FW load
during probing. This way we are not wasting runtime heap memory
and also it will allow us to dynamically change execution core
for certain pipelines.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2018-08-20 12:08:31 +02:00
Bartosz Kokoszko 5562fa3d48 drivers: apl-ssp: handle tdm mode in ssp
I've added tdm support in ssp. Tdm mode has
padding at the end of each slot. Tdm mode is
enabled by tdm_per_slot_padding flag in
sof_ipc_dai_ssp_params struct.

Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
2018-08-13 10:59:08 +02:00
Bartosz Kokoszko 9fe51a4b58 drivers: apl-ssp: code optimization for DSP_A/B
The only difference between DSP_A and DSP_B modes
is FSRT bit in sspsp register and start delay
set to 1 in DSP_A mode.

Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
2018-08-13 10:52:06 +02:00
Tomasz Lauda 5ad0d56fb5 dw-dma: fix compilation for BYT, BDW and HSW
Fixes GCC compilation for BYT, BDW and HSW.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2018-08-06 10:29:37 +02:00
Liam Girdwood ae793d26e6
Merge pull request #189 from tlauda/topic/dai_xrun
dai: stop DMA unconditionally on xrun
2018-08-04 18:19:19 +01:00
Liam Girdwood 5092190b0c
Merge pull request #193 from kakulesza/fix-hda-dma-config-dgmbs-align-bits
hda-dma fix: align DGMBS value to 32 bytes
2018-08-04 18:03:54 +01:00
Kamil Kulesza 1bf52dbe6d hda-dma fix: align DGMBS value to 32 bytes
APL/CNL:
If DSP Gateway Minimum Buffer Size (DGMBS) is not aligned to 32 bytes they occur
glitches in output signal (the buffer will be overwritten during work). It can
be observed during playback in following configuration:
- 8Khz 16bits 1 channel
- 24kHz 16bits 1 channel

Signed-off-by: Kamil Kulesza <kamil.kulesza@linux.intel.com>
2018-08-03 12:54:13 +02:00
Tomasz Lauda b970243586 dai: stop DMA unconditionally on xrun
Stops DMA unconditionally on xrun without waiting.
Data flush is not needed as pipeline will go through
prepare and restart anyway. Waiting here during xrun
recovery with multiple tasks running causes interrupt
stack overflow. Waiti instruction lowers irq level to
0, which allows to run multiple scheduled tasks in the
same time on the same irq level and ends in DSP panic.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2018-08-03 09:56:15 +02:00
Bartosz Kokoszko effa56f518 apl-ssp: setting additional bits in ssp registers
Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
2018-08-01 11:53:54 +02:00
Pierre Bossart e693d94780
Merge pull request #181 from plbossart/fix/mdivc
apl-ssp: do not override common MDIVCTRL register
2018-07-31 21:10:15 -07:00
Pierre-Louis Bossart 383d89d0a9 apl-ssp: do not override common MDIVCTRL register
When we use different clock sources for different SSPs, we need to
make sure the mdivc register is not overwritten by IPC
configuration. Move to read-modify-write mode (assuming a zero-value
on reset)

Tested on GeminiLake with SSP2 derived from 19.2MHz XTAL and SSP1
derived from 24.576 MHz PLL.

Note that the topology needs to ensure compatibility between the
different settings, in the future we'll need a true clock driver which
will check for incompatibilities.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2018-07-31 19:17:30 -05:00
Liam Girdwood 4d5e072835
Merge pull request #169 from xiulipan/llifix
dw-dma: save lli_current on dma stop
2018-07-30 11:57:14 +01:00
Pan Xiuli 62de51385e dw-dma: save lli_current on dma stop
need to save lli_current when we stop when using none hw lli.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2018-07-30 17:38:25 +08:00
Liam Girdwood f0fd22dd7e
Merge pull request #159 from zhigang-wu/topic/capture-noise
byt:ssp:porting the patch dcc61498f to clear fifo.
2018-07-30 08:25:39 +01:00
Liam Girdwood 3ea7004fb6
Merge pull request #156 from singalsu/fix_dmic_ipc_typo_proposal
DMIC: Fix mistake in comment and add check for supported word lengths
2018-07-30 07:53:02 +01:00
Liam Girdwood e3420cffc9
Merge pull request #145 from zhigang-wu/topic/test
define the ssp fifo depth macro to be generic
2018-07-30 07:45:18 +01:00
Seppo Ingalsuo 4e06d57767 DMIC: Fix mistake in comment and add check for supported word lengths
This patch fixes the mistake in uapi/ipc.h text comments that falsely
claims that 24 bit data is supported. The supported PCM formats are
16 and 32 bits only. A check is added to DMIC set config function
to return error if anything else is requested.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2018-07-27 12:06:20 +03:00
Wu Zhigang 3d3313dd98 byt:ssp:porting the patch dcc61498f to clear fifo.
porting the patch dcc61498f on byt platform,
to clear out the stale samples in ssp's FIFO.

Signed-off-by: Wu Zhigang <zhigang.wu@linux.intel.com>
2018-07-27 14:44:07 +08:00
Wu Zhigang a35bcd5ced ssp:replace the constant value with macro
replace the constant value with macro to be more generic.

Signed-off-by: Wu Zhigang <zhigang.wu@linux.intel.com>
2018-07-27 09:23:28 +08:00
Slawomir Blauciak 6a6cdf71a3 drivers: i2s frame clock slave mode
Signed-off-by: Slawomir Blauciak <slawomir.blauciak@linux.intel.com>
2018-07-26 10:04:40 +02:00
Liam Girdwood 6088b7b898
Merge pull request #140 from xiulipan/daiindex
dai index alignment
2018-07-24 09:53:16 +01:00
Tomasz Lauda 148ecfe4d4 dw-dma: use done bit for linked list transfers
Changes settings of GPDMA linked lists transfers
to use done bit to let the DMA know, that the next
data block is ready to be sent/received. This way
we are sure, that there will be no additional data
transferred between receiving interrupt and disabling
GPDMA channel.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2018-07-23 17:42:39 +02:00
Pan Xiuli e68b10ffd6 ipc: make dai index name unified
dai_get function only need type and index, make index filed unified to
dai_index to avoid misleading in sof_ipc_dai_config and sof_ipc_dai_config.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2018-07-23 16:53:47 +08:00
Tomasz Lauda 1151570701 dw-dma: use ll_current on dma start
On starting GPDMA we should use current link list item.
That way every start will continue from the right buffer,
not causing data corruption due to writing to the same
period as Host DMA.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2018-07-20 15:58:12 +02:00
Tomasz Lauda dcc61498f3 ssp: clear out FIFO stale samples
Reads SSP FIFO to clear out stale samples.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2018-07-17 11:43:00 +02:00
Tomasz Lauda 27a3db1e04 hda-dma: wait for L1 exit instead of buffer full
Changes waiting condition for Host Output DMA start.
Let's wait for L1 exit instead of buffer full.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2018-07-13 15:36:39 +02:00
Liam Girdwood a48ceddc82
Merge pull request #67 from jajanusz/extraflags
autotools: replace user variables with automake variables
2018-07-09 23:40:53 +01:00
Tomasz Lauda 9a376372a4 hda-dma: wait for buffer full after starting render
Host DMA should wait for buffer full after starting render
to avoid empty samples at the beginning. Temporary solution
until DMA unified flow will be implemented.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2018-07-09 11:30:38 +02:00
Janusz Jankowski 17c929ebf6 autotools: replace user variables with automake variables
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2018-07-06 13:58:47 +02:00
Tomasz Lauda 4fd4aa1cfa core: fix wrong inclusion of core-isa.h
Moves inclusion of PLATFORM_INCDIR before SOF_INCDIR.
This temporarily fixes wrong inclusion of core-isa.h from
xtensa-root directory during build with gcc. It's the best
solution for now, because that unwanted header comes from
Xtensa Newlib C library, which will take much more time to change.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2018-06-25 13:36:50 +02:00
Liam Girdwood 7c281d3d89
Merge pull request #4 from thesofproject/cavs_common
Cavs common
2018-06-21 12:39:20 +01:00
Seppo Ingalsuo be4bf56169 DMIC: Set DAI parameters from topology parameters instead of hardwired
This patch enables the 1, 2, and 4ch topologies usage with S32_LE and
S16_LE sample formats. The DMA burst length is also changed to maximum
(8) to fully utilize the DMIC FIFO.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2018-06-21 11:32:37 +01:00
Liam Girdwood 9459cc0534
Merge branch 'master' into cavs_common 2018-06-21 08:09:57 +01:00
Tomasz Lauda 14ca1fa3d5 pm_runtime: add runtime power management initial implementation
This patch adds initial empty implementation of runtime power management.
It is based on linux kernel implementation and will be developed
in the future.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2018-06-20 15:18:09 +02:00
Seppo Ingalsuo fa48a05c15 DMIC: Use gain ramp and delayed filters unmute in start sequence
The loud DC thump sound plus the impulse like noises in the beginning of
capture can be mitigated with the gain ramp and muted filters start.
The gain ramp rate and CIC and FIR unmute delays parameters can be
adjusted from dmic.h header file.

Note: The logarithmic ramp length is now hardwired to 300 us for the 1 ms
update rate via macro LOGRAMP_GM in dmic.c. A larger value will shorten the
ramp. It will be replaced later by topology passed ramp characteristic.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2018-06-20 11:18:22 +01:00
Seppo Ingalsuo 06570f27a2 DMIC: Bug fix for HW version 2 IPM setup
Depending on HW configuration for two PDM controllers or less the
IPM bit field value calculation need to be done like for HW version 1.
The new style IPM bit field value calculation is used for three or four
PDM controllers.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2018-06-20 11:18:22 +01:00
Seppo Ingalsuo 24ee043938 DMIC: Rename HW version 2 bitfield to follow specification
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2018-06-20 11:18:22 +01:00
Seppo Ingalsuo f886d3d6d3 DMIC: Set TH and BFTH bit fields via the variables in HW version 2 code
This aligns the HW versions 1 and 2 code and avoids a build error about
unused variables.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2018-06-20 11:18:22 +01:00
Seppo Ingalsuo b2200bfe27 DMIC: Bug fix for IPM value calculation for HW version 2
The IPM bit field should be set to the number of used stereo controllers.
This patch fixes the issue that pdm[0] got counted twice.

Signed-off-by: Sathish K. Kuttan <sathish.k.kuttan@intel.com>
2018-06-20 11:18:22 +01:00
Pierre-Louis Bossart 9c4e0e9963 byt-ssp: minor changes to test slave mode
Comment out SDO tristating which gets in the way of test tools and
clarify comment for ETDS.

I2S and DSP modes seem to generate correct waveforms. Tested with one
Up2 board in master mode and one MinnowBoard Turbot in slave, with the
SDO/SDI lines samples with Logic Pro.

Only CBM_CFM mode was tested.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2018-06-19 11:17:27 +01:00
Pierre-Louis Bossart 4cd3b70350 byt-ssp: fix frame sync polarity for DSP modes
Now that these modes work, fix the polarity to align with
ALSA/ASoC expectations

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2018-06-19 11:17:27 +01:00
Pierre-Louis Bossart 05e1c26166 byt-ssp: fixes for DSP modes
For some reason SSCR3 fixes prevent DSP_A and DSP_B from working:
DMAs don't start and an IPC error is eventually thrown.

Fall back to reset value (recommended in data sheet), this fix
lets DMA go on in DSP_a and DSP_B modes.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2018-06-19 11:17:27 +01:00
Pierre-Louis Bossart 32bcaaf383 apl-ssp: fix MCLK and BCLK source selection
The existing code does not provide support for the full flexibility of
the hardaware: MCLK and BCLK can be independentely divided from Xtal
or Audio cardinal clock. Add the ability to support different sources
and dividers.

The M/N dividers remain bypassed since they introduce an irregular
duty-cycle for the BCLK, which isn't desirable if the BCLK is used as
a reference by an external device.  With this patch MCLK can be
divided by at most a factor of 8 which is reasonable for all
(additional factors are possible but haven't been tested)

The MCLK1 output was tested on a GeminiLake hardware, confirming that
the register configuration set according to the spec do result in an
observable clock.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2018-06-19 11:17:27 +01:00
Pierre-Louis Bossart c7ff4c1b19 ssp: rename clk_id as mclk_id, remove dead code
clk_id was never used so remove all the related code.
However since we need an identifier for the mclk
reclaim it with a name change.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2018-06-19 11:17:27 +01:00
Ranjani Sridharan 48d2a1c551 dmic: fix size while copying DMIC params
The size argument for memcpy should be sizeof struct
sof_ipc_dai_dmic_params.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2018-06-14 18:53:43 +01:00
Ranjani Sridharan af3acc8b7f dma: introduce parameter to store the number of channels draining
This patch adds the num_channels_busy member to the dma structure
which will be helpful in determining DMAC to be allocated
to users based on the number of channels draining. This is help
provide a primitive level of QoS and prevent DMAC overuse.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2018-06-12 08:30:37 +01:00
Ranjani Sridharan 9a786e7193 dma: update platform DMAC definitions with the supported dev types, dir and capabilities
This patch updates the platform DMAC definitions to include information
about the supported dev types, copy directions and capabilities.

It also replaces the copy_dir enum with a bitmask and adds
the copy capabilities and dev type bitmasks.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2018-06-12 08:30:37 +01:00
Rander Wang 54d265e7ec SSP: refine ssp stop function
merge commit 72e63a467f ("apl-ssp: change and wrap status
transition into ssp_stop")

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
2018-06-05 10:28:39 +01:00
Rander Wang 1ea2941cda SSP: refine ssp config function
(1)Remove unused code
(2)Refine comments
(3)Refine master & slave mode setting
(4)Refine Frame polarity setting

Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
2018-06-05 10:28:39 +01:00
Rander Wang 933f275d43 BDW: refine ssp start function
Set Tx|Rx Enable for starting playback|capture

Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
2018-06-04 10:16:23 +01:00
Rander Wang 5af786cfc8 BDW: init HW registers at setup time
Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
2018-06-04 10:15:13 +01:00
Rander Wang fdd6bcc1b9 SSP: refine padding bit setting on Broadwell
merge commit 36f23c6cc3 ("apl-ssp: fix padding bit issues in
I2S/LEFT_J mode") and refine it on Broadwell.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
2018-06-01 09:52:42 +01:00
Ranjani Sridharan c02e34fdfc DMIC: configure DMIC with parameters from ipc instead of hardcoded params
This patch makes the following changes to configure DMIC from ipc params:

1. remove redundant hdr member item from struct sof_ipc_dai_dmic_params
2. Rename number_of_pdm_controllers member in the above structure
to num_pdm_active to be more representative of the active pdm count.
3. Add an "id" member to struct sof_ipc_dai_dmic_pdm_ctrl
4. Remove hardcoded config params from DMIC set_config function
and use ipc params instead.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2018-06-01 09:50:22 +01:00
Seppo Ingalsuo 48a61423f6 SSP: Add trace print for config->format value into ssp_set_config()
This patch adds the trace information to BYT and APL platforms type
SSP drivers. The traced value helps to determine the configured serial
bus format.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2018-05-29 17:37:01 +02:00
Seppo Ingalsuo 2979baa3e5 DMIC: Add robustness against erroneous configuration parameters
This patch ensures that modes matching request returns immediately if
the results length would exceed the allocated length. The caller function
will issue an error in such case.

Also the possibility of using array pdm[] in the IPM helper function
as uninitialized is avoided by initializing it with zeros.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2018-05-24 12:08:47 +02:00
Pan Xiuli 610f4c7180 APL: dw-dma: fix interrupt clear
Interrupt clear will clear all interrupt bit. If two channel is enabled
and when pause/resume one of stream, the two interrupts may happen at
same time and one of them will be wrongly cleared.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2018-05-21 11:19:12 +01:00
Wu Zhigang e3b10cd9c7 SOF: FIX: adjust the SSC3's TFT/RFT field in SSP
Actually I did not have full confidence about this patch.
if someone can help do more test, that would be better.
before this, do not accept this patch.

Incorrect TFT/RFT will cause DMA IRQ happened too frequently.
the interval will be less than 1ms, which will cause XRUN easily.

The old code will has this issue in TDM4-s32le test.

Signed-off-by: Wu Zhigang <zhigang.wu@linux.intel.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2018-05-18 08:56:56 +01:00
Seppo Ingalsuo 2ebe1ab13e DMIC: DMIC: Add dmic.c to drivers Makefile.am
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2018-05-17 14:44:38 +01:00
Seppo Ingalsuo fdc0cf9451 DMIC: Add PDM microphones (DMIC) support to DAI
This patch adds the DMIC audio capture driver for SOF DAI component use.
The DMIC feature allows to directly attach one to (typically) four PDM
digital microphones into Intel SoC without a separate codec IC. This is
supported by APL and most successor platforms.

Corresponding patches are needed for kernel driver and topology to enable
this feature.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2018-05-17 14:20:20 +01:00
Liam Girdwood 7c5dd8cfdf Merge remote-tracking branch 'sof/master' 2018-05-14 15:12:38 +02:00
Liam Girdwood cafe43e3d8 ssp: hsw: Initial HSW SSP driver (WiP)
Needs completion.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-05-13 20:50:38 +02:00
Rander Wang a083b39783 cnl-dma: remove special dma code for cnl
These code is for CNL for it is not supported that two HW IPs share
one irq pin. Now it is resolved in new algorithm, so delete it.

Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
2018-05-10 21:35:32 +01:00
Keyon Jie 09b97dccba byt-ssp: fix status transition for ssp_stop
This fix the regression(line missed when copying) introduced by
commit 0d6e17ed99ea 'byt-ssp: change and wrap status transition
into ssp_stop'.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
Tested-by: Zhang Keqiao <keqiao.zhang@linux.intel.com>
2018-05-09 19:36:59 +01:00
Keyon Jie 0b6e17ed99 byt-ssp: change and wrap status transition into ssp_stop
This will remove manual status change, wrap them into ssp_stop(),
where the status transition is protect by spin_lock.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2018-05-08 16:01:48 +01:00
Keyon Jie 72e63a467f apl-ssp: change and wrap status transition into ssp_stop
This will remove manual status change, wrap them into ssp_stop(),
where the status transition is protect by spin_lock.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2018-05-08 16:01:48 +01:00
Pierre-Louis Bossart 29d4e8b126 apl-ssp: use macros instead of hard-coded shifts/masks
Missed those definitions in previous patch, fix.

Suggested-by: Keyon Jie <yang.jie@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2018-04-13 19:49:12 +01:00
Pierre-Louis Bossart 0cc866fde1 apl-ssp: allow for 19.2 MHz SSP reference
Don't hard-code MCLK source on ApolloLake, use settings provided over
IPC to select 24.576 MHz PLL or 19.2 MHz XTAL oscillator.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2018-04-13 15:45:15 +01:00
Pierre-Louis Bossart 36f23c6cc3 apl-ssp: fix padding bit issues in I2S/LEFT_J mode
The current code doesn't work for I2S/LEFT_J when the slot width and
number of valid bits don't match (e.g. 24 bit data in 32-bit slot).

In I2S/LEFT_J mode, the padding is not at the end of the frame but
at the end of each slot, and is evenly distributed between the two
left and right phases.

Fix by using DMYSTOP for I2S/LEFT_J, and only program SSPSP2 for DSP_A
and DSP_B modes

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2018-04-13 15:44:55 +01:00
Pierre-Louis Bossart 6900f4d094 uapi: ipc: move sample_valid_bits to SSP definitions
This field doesn't mean anything for DMIC or HDaudio, move it
where it makes sense (I2S/TDM modes)

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2018-04-05 15:21:45 +01:00
Pierre-Louis Bossart e7fd644c5e uapi: ipc: start moving SSP-specific fields into ssp structure
sample_valid_bits remains in main structure for now since it is
handled with a generic dai token.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2018-04-05 15:21:45 +01:00
Pierre-Louis Bossart fbcbe586d0 uapi: ipc: remove zero-length array for DAI IPC
Making this dynamic doesn't really save much memory and makes the
code more complex for no good reason

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2018-04-05 15:21:45 +01:00
Pierre-Louis Bossart 7579429eb6 uapi: ipc: align SSP IPC with kernel
Rename fields to follow topology definitions
Add placeholder for new fields for quirks and associated pdata
No functionality change

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2018-04-05 15:21:45 +01:00
Pierre-Louis Bossart 81708a5d2a sof: global replacement of 'reef' by 'sof'
Let's remove reef to avoid confusion/legacy.
no functionality change but the name of generated files
will change so targets and install scripts will need
to be updated

There should be only one occurrence of "Reef" left in
rimage/file_format.h, left as is for backwards compatibility.
This may be changed separately at a later point.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2018-04-05 15:10:14 +01:00
Liam Girdwood 15a613f1f1 drivers: ssp: rename ssp.c to byt-ssp.c
Make way for hsw-ssp.c and make it easier to differentiate ssp drivers.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-04-04 15:35:57 +01:00
Pan Xiuli e1c903bd6f dw-dma: recover dma status when release
Resume pause will re-start DMA, which will cause the DMA status diff
from buffer COMP. Add a release function to recover the status mainily
for LLI now.

This patch fixes pause/resume noise issues.

Tested-by: Keyon Jie <yang.jie@linux.intel.com>
Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2018-03-30 10:34:30 +01:00
Tomasz Lauda 98d3a838cb cnl: dw-dma: Verify dma not NULL
Check if returned DMA is not NULL.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2018-03-29 13:43:42 +01:00
Liam Girdwood 7ec3a7cb65 core: comp: Add component trigger API call.
Add a new component API for performing atomic stream state change
operations. This leave the cmd API for non atomic usage.

This patch also does some renaming to use _trigger() instead of _cmd().

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Tested-By: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2018-03-29 09:29:15 +01:00
Ranjani Sridharan 210989dffe trace: core: add trace_error_value() and update users
This patch adds a new trace feature to send any error states/values
after the trace messages to mbox and modifes users of trace_value()
to use trace_error_value().

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2018-03-26 08:38:16 +01:00
Rander Wang 7e58038e8d cnl & apl: ssp: fix a typo for SOF failed with pulseAudio
Refine ssp setting, set SSRSA to stop capture, set SSTSA to
stop playback
2018-03-22 10:45:52 +00:00
Tomasz Lauda ecf43dd9da cnl: ssp: revert hardcoding TFT and RFT
This patch reverts hardcoding TFT and RFT values to 8.
They are now properly calculated below.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2018-03-21 09:47:57 +00:00
Tomasz Lauda 4c1d449543 cnl: ssp: fix ssp settings
We change ssp settings in order to properly transmit and receive data:
1. Use frame end padding instead of dummy stop bits.
   This way alignment bits will be transmitted at the end of whole frame instead of every slot.
2. Disable receive without transmit mode.
3. Do not change the source for MCLK.
4. DSP_A format shouldn't have start delay.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2018-03-21 09:47:37 +00:00
Yan Wang 75ac44f663 Disable high frequent trace message in dw_dma_irq_handler().
It will cause DMA trace local buffer overflow and unnecessary.

Signed-off-by: Yan Wang <yan.wang@linux.intel.com>
2018-03-20 16:48:07 +00:00
Pan Xiuli c0025344ed dw-dma: Fix channel status for CNL
At the end of the DMA, we need to set the channel status into
parapre, otherwise next dma start will fail.
This will fix CNL pause resume issues.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2018-03-20 16:47:24 +00:00
Yan Wang a3fab58d59 Use tracev instead of trace for some high frequent traces on APL/CNL.
DMA trace itself uses DMA copying which will cause some DMA copying
related traces are called recursively.
So use tracev to avoid this.

Signed-off-by: Yan Wang <yan.wang@linux.intel.com>
2018-03-19 09:02:26 +00:00
Tomasz Lauda 3542fc3c7d cnl: fix multiple streams
DMA channel should only be stopped, when corresponding interrupt is triggered.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2018-03-16 10:00:31 +00:00
Keyon Jie cc54f1313d apl-ssp: fix capture double speed issue
Previously TFT and RFT are set to 0s which means we are using
threshold level 1, where interrupt asserts for every valid bits
of each slot(e.g. for s16_le capture, interrupts assert for
each 16 bits), but DMAC will treat it as notification of one
full sample(e.g. 32 bits for s16_le stereo) and read those all
bits, this will lead to capture with double speed at format
s16_le stereo.

Here add handle for FIFO trigger Threshold level, set them to
bytes for each full sample(active_slots * valid_bits / 8), and
the issue is fixed.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2018-03-15 14:08:50 +00:00
Pan Xiuli 9ec70bb523 dw-dma: Fix channel status
At the end of the DMA, we need to set the channel status into
parapre, otherwise next dma start will fail.
This will fix APL pause resume issues.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>

--
Test with:
Mininow max rt5651 and GP-MRB nocodec
SOF master: 728f1ff3e3
SOF-Tool master: 5b5bbe31e6
https://github.com/plbossart/sound/tree/topic/sof-v4.14:
fe5e29155127a717ba5ae454b4bdde99afa67723
2018-03-14 09:53:18 +00:00
Rander Wang cc421f6716 cnl: dma: refine dma interrupt processing on cnl
On cnl, all the dma share the same interrupt pin, so
all the dma controller need to be checked in interrupt
function.
2018-03-13 12:32:34 +00:00
Pierre-Louis Bossart 26c291b88e ssp: fix inverted_frame handling for BYT and APL/CNL
inverted_frame variable should only be set in the _IF
cases

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2018-03-09 15:30:30 +00:00
Keyon Jie a92debe638 apl-ssp: fix for I2S/DSP_A/DSP_B/LEFT_J modes
Clean up SSPSP bits to make SSP output follow ALSA ASoC definition
of all I2S/DSP_A/DSP_B/LEFT_J modes.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2018-03-09 15:30:09 +00:00
Pierre-Louis Bossart cddc466c6b dw-dma: simplify conditional statement
detected with sonarcloud: fix pointer test and avoid
redundant evaluation of lli as always true.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2018-03-09 08:33:51 +00:00
Keyon Jie 728f1ff3e3 dma: change dma transfer type to enum.
Change to use enum for dma transfer type.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2018-03-07 11:31:50 +00:00
Keyon Jie 3e24ac8e9f hda-dma: fix src_width and dest_width for 32 bit container case
The src_width and dest_width are configured already in Bytes,
here fix it, otherwise 24/32 bit copying with hda-dma may have
problem.

Reported-by: Zhigang Wu <zhigang.wu@linux.intel.com>
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2018-03-07 11:01:10 +00:00
Rander Wang 680798071e cnl: ssp: fix DSP_B setting in ssp
set ssp according to DSP_B spec

Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
2018-03-07 09:35:50 +00:00
Rander Wang 0857b21acb cnl: dma: refine dma probe
Probe each dma individually
2018-03-07 09:33:34 +00:00
Keyon Jie 77ed88aa4a hda-dma: fix configure direction wrong issue
The directions configured in sg_elem are actually dma transfer type,
not playback/capture direction, here correct them.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2018-03-06 21:41:50 +00:00
Liam Girdwood 1f6aee5a39 memory: allocator: Remove RFLAGS_NONE/USED and use caps
Dont use RFLAGS_NONE, but use the new memory capabilities flags instead.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-03-05 14:49:35 +00:00
Rander Wang f8126f09e4 cnl: dma: fix playback failed at second time
Stop dma at the end of playback, or next time dma
is not available for playback
2018-03-02 09:03:27 +00:00
Tomasz Lauda 34eee5e585 cnl: Add missing host and link DMA init
CONFIG_DMA_GW is set for Cannonlake, so add host and link initialization to avoid FW crash.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2018-02-22 16:49:22 +00:00
Liam Girdwood 511d8c0b97 hda: dma: minor cleanup of newlines
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-02-13 14:32:03 +00:00
Liam Girdwood b0f8e5d5c2 dma: dw-dma: use 32 bit words for non peripheral copies.
DW-DMA is more optimal using 32bit data size when transferring between
memories. Set configuration to always use 32 bit mode for non peripheral
copies from memory to memory.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-02-09 12:29:08 +00:00
Keyon Jie 1532dfdad4 apl-ssp: use external clock for APL at the moment
We only enable external Audio Cardinal 24.576MHz clock for SSP
at the moment.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2018-02-09 12:23:35 +00:00
Rander Wang 1edc69c7c0 dma: dw-dma: refine GPDMA on CNL
All GPDMA share the same irq on cannonlake, this is different with
appololake.The change is:probe GPDMA array when initilized, set the
array to the irq function; check the interrupt status of GPDMA array
in irq function, process the correct GPDMA that produces interrupt.

Signed-off-by: Rander Wang <rander.wang@intel.com>
2018-02-09 08:49:07 +00:00
Keyon Jie c610c64299 dma: hda dma: Add HDA host and link DMA driver
Add a host and link DMA driver for Intel HDA DMA gateway.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2018-02-08 17:00:37 +00:00
Keyon Jie 616f1e57ef dw-dma: enable DW_USE_HW_LLI mode for APL/CNL.
Fix the dma not stop issue for using Hardware Link List mode.
Only enable it for APL/CNL at the moment.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2018-02-08 17:00:36 +00:00
Liam Girdwood e9027fb0ad core: dma: add return value to DMA set callback.
Let clients know if they can expect a callback from DMA.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2018-02-08 16:45:58 +00:00
Liam Girdwood 8ae350fc4a core: dma: add requested channel to dma_channel_get()
Allow clients to request a particular DMA channel if supported by the DMA
driver and it's available. If requested channel is not supported by DMAC
then return another channel. If requested channel is not free then we
return an error.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2018-02-08 16:45:43 +00:00
Rander Wang 4502765ebe ssp: add ssp support for APL and CNL
Now it supports I2S & TDM4 master mode and no MN devide used.
For 19.2M clock, 16bit 48K stream maybe need to pack to 20bit
48K.
2018-02-08 16:41:21 +00:00
Keyon Jie dde493c45b dw-dma: fix hardware link list mode
For hardware link list mode, we also need to configure address
and config registers for the first link list, here fix it.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2018-02-06 15:06:23 +00:00
Keyon Jie eea19e6578 dw-dma: add support for interrupt per channel
On Apollolake, the interrupt number for different channels of
the same controller are different, here add implementation of
it: register interrupt handler for each channel, and don't
need check channel in its specific handler anymore.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2018-02-06 15:06:12 +00:00
Liam Girdwood 2b5507232e drv: dw-dma: Add support for apollolake and cannonlake platforms.
Apollolake and Cannonlake have some register differences in DW-DMA HW.
Add macros to support those differences.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-01-23 16:15:51 +00:00
Liam Girdwood 42460843ad platform: byt: move DW-DMA specific headers into DMA driver.
Lets keep all the DW-DMA register/bits in one place.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-01-23 16:15:51 +00:00
Liam Girdwood ab15603984 dma: dw-dma: Add register macros macro for haswell and broadwell
Haswell and Broadwell have some differences with some DMA registers.
Add macros for these bits.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-01-22 12:25:12 +00:00
Keyon Jie 9b8e0e5fd7 dw-dma: set msize according to burst_elems setting
For memory to memory copy(burst_elems initialized to be 0),
we set msize to default value 3, that is 2 ^ 3 = 8 items for
each burst transaction.

For DMA copying which related to peripheral device(source or
destination), we will use the configured burst_elems, which
usually means the number of data items, e.g. slot number for
SSP dai fifos.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2017-12-19 11:14:26 +00:00
Liam Girdwood ae8bd6059e dw-dma: trace: make sure all trace error are unique
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-12-17 12:33:23 +00:00
Liam Girdwood b408ad4c88 dma: dw: write back linked list descriptors
The DMA linked list descriptors must be written back from cache so that
the DMA engine can read them.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-12-09 21:29:49 +00:00
Liam Girdwood d78ff93a78 dma: dw-dma: dont use hard coded transfer size.
Use transfer size in SG config structure instead of hard coded values.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-11-17 15:57:50 +00:00
Liam Girdwood e6b9594d79 dma: dw-dma: release spinlock in error path
Currently not released on any configuration errors.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-11-17 15:57:50 +00:00
Pierre-Louis Bossart b8fd49af3a ssp: clean-up register setup
Clean-up register configurations for SSCR0..5, SSPSP, SFIFOTT

The results are ok in I2S and LEFT_J 24 bits
Tested with RT5645 and DA7212

TODO:
1. fix 16 bit issue (right channel lost)
2. test DSP modes
3. connect SSP and DMA watermarks

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2017-11-15 20:35:20 +00:00
Pierre-Louis Bossart 95a7e13fa2 dma: dw: reorder register definitions by sequential address
Cosmetic change, for some reason the register definition was not
sequential as in the data sheet

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2017-11-10 15:30:24 +00:00
Pierre-Louis Bossart df1de7a0a4 sof: protect macro parameters
Make sure all macro parameters are protected with parentheses to avoid
unintended expansion issues

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2017-11-10 15:30:24 +00:00
Keyon Jie 69f3029c8a dw-dma: fix element might be used uninitialized issue
The dma_sg_elem might be used uninitialized if the callback
function forget to do that.

Here adding initialization to fix that.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2017-11-10 15:30:24 +00:00
Liam Girdwood aa66a3a52e cht: fix SSP IRQ sharing
SSP 0,1,2 on CHT share the same physical IRQ as SSP 3,4,5 respectively.
Fix this so that all SSPs IRQs are supported.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-11-02 19:57:14 +00:00