Commit Graph

3979 Commits

Author SHA1 Message Date
Tomasz Lauda 6d3d5bcdad cpu: fix cache misalignment
Fixes cache misalignment of active_cores_mask value.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-10-23 09:47:16 +02:00
Guido Roncarolo 6cab99c729 drivers: imx: edma: fix bytes copied at each iteration
The number of bytes copied at each ieration must
match half the total size copied as we have an
interrupt at HALF and MAJOR loop

Signed-off-by: Guido Roncarolo <guido.roncarolo@nxp.com>
Signed-off-by: Jerome Laclavere <jerome.laclavere@nxp.com>
2019-10-23 10:08:22 +03:00
Guido Roncarolo d781385a91 drivers: imx: edma: translate burst size in bytes
burst_size represents the FIFO width in words, translate it
into bytes to have homogeneous quantities

Signed-off-by: Guido Roncarolo <guido.roncarolo@nxp.com>
2019-10-23 10:08:22 +03:00
Marcin Rajwa 8b059f6566 kpb: make draining algorithm more secure
This patch slightly modifies draining speed algorithm.
Instead of copying half the buffer each period we
copy two periods. This slightly decreases draining
speed but avoids XRUNs in rare cases.

Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
2019-10-22 20:33:41 +02:00
Paul Olaru 47b3050b3d sof: Fix compile errors when traces are disabled.
Signed-off-by: Paul Olaru <paul.olaru@nxp.com>
2019-10-22 20:27:55 +02:00
Ranjani Sridharan d01f1629be topology:cml/glk: name the graphs appropriately
Fix the copy/paste errors in naming the keyword-detect
pipeline connections for CML and GLK.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2019-10-22 20:26:58 +02:00
Ranjani Sridharan 4fa588e676 topology: sof-glk-da7219-kwd: fix compilation error
remove the extra closing bracket to remove the compilation error
ALSA lib parser.c:219:(tplg_parse_config) error: unknown section )

ALSA lib parser.c:219:(tplg_parse_config) error: unknown section
pipe-sof-apl-keyword-detect

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2019-10-22 20:26:58 +02:00
Tomasz Lauda 9d5a82e78a ll_schedule: fix race condition for multicore scheduling
Fixes race condition in low latency scheduler when multiple cores
are processing tasks on the same scheduling domain. Task's start
time is updated based on last_tick right after the task is finished.
Last_tick can be updated in the meantime by other core in the situation,
where it starts handling interrupt later, but finishes its tasks
earlier.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-10-22 13:25:33 +02:00
Seppo Ingalsuo 1dbd14b30d Testbench: Improve test begin and end marker tones find
Chirp test signals confused the test signal begin marker position
seek and caused false test fails. The test stimulus may produce
stronger cross correlation level than the actual marker. Also
the check omitted that the cross correlation max could be negative
so the test was changed into power domain and use first/last
cross correlation peak above threshold as test begin/end position.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2019-10-21 21:20:11 +02:00
Seppo Ingalsuo 0324516ec3 Testbench: SRC: Relax gain test tolerance
Gain of SRC varies by 1 dB due built-in attenuation in the filter
coefficients. It was added to avoid signal overshoots to distort
with some challenging music content. When a converter consists of
two filters in series the attenuation duplicates. While SRC is
missing the gain compensation the test criteria needs to be relaxed.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2019-10-21 21:20:11 +02:00
Jakub Dabek bf11710734 memory: Fix DEBUG_HEAP build
Unify function naming to fix DEBUG_HEAP build

Signed-off-by: Jakub Dabek <jakub.dabek@intel.com>
2019-10-21 19:50:46 +02:00
Paul Olaru 3cec2101da platform: imx: Increase system runtime heap size
The introduction of the DMA multi channel domain made it so the cascaded
interrupt handling fails to allocate memory from this heap. Increasing
the size of the system runtime heap will allow the registering of
cascaded interrupts (and in particular the EDMA interrupt within the DMA
scheduling domain) to continue.

On this platform we have 8MB of total memory. Allocating 24kB instead of
12kB for the system runtime heap does not cause any noticeable change
besides removing the memory allocation failures.

Signed-off-by: Paul Olaru <paul.olaru@nxp.com>
2019-10-21 17:49:11 +03:00
Jakub Dabek 0234df5b4a buffer: Add alignment setting for DMA buffers.
Add seeting of alignment for DMA buffer that is required by
Hardware configuration.

Signed-off-by: Jakub Dabek <jakub.dabek@intel.com>
2019-10-21 12:07:03 +02:00
Jakub Dabek b63f559bb4 memory: removed hp buffer heap
Merged hp buffer heap with normal buffer heap.
Since current buffer heap was actually using hp memory and it served
no purpose to have two heaps.
Removed extern capabilities and merged other capabiliteis to
buffer heap. Currently none of those buffer heaps supports extern.

Signed-off-by: Jakub Dabek <jakub.dabek@intel.com>
2019-10-21 12:07:03 +02:00
Guido Roncarolo 3d5d314626 drivers: imx: edma: fix accessing register logic
channel must not be accessed when status *is* INIT
Fixes: 61b0b58

Signed-off-by: Guido Roncarolo <guido.roncarolo@nxp.com>
2019-10-18 17:15:19 +03:00
Marcin Rajwa b717e0a0a1 host: fix wrong trace value
This patch fixes the trace message which logs always zero
value.

Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
2019-10-18 13:48:22 +02:00
Seppo Ingalsuo 81cc31b4ab Topology: Add topology to test capture SRC
This patch adds topology sof-apl-src-dmic.m4 to test capture SRC.
The topology instantiates SRCs for 48 -> 8-48 kHz and 16 -> 8-48 kHz
capture. The volume component in pipeline handles PCM format
conversion from the fixed S32_LE DMIC DAI format. Also the bugs in
the earlier non-used pipeline macro are fixed.

The macro pipe-src-capture.m4 is renamed to pipe-src-volume-capture.m4
since it contains a volume component. A new macro pipe-src-capture.m4
is created to provide pipeline building block without volume.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2019-10-17 15:43:31 +02:00
Seppo Ingalsuo f4084551e5 SRC: Report properly the non-supported rates combination error
The earlier error message was hard to understand and could be
mistaken as internal fail. A redundant trace message about block
sizes is removed because the block sizes are set in each copy()
in current SRC version.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2019-10-17 15:43:31 +02:00
Seppo Ingalsuo 703e8269f3 SRC: Fix sink and source PCM formats handling in prepare()
This patch avoids wrong configuration for PCM format and audio
corruption in capture pipelines usage if the pipeline requires
format conversion.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2019-10-17 15:43:31 +02:00
Pierre-Louis Bossart 5a9233033e topology: add rt711 to TGL RVP configuration
Now rt711 is in SDW mode and rt1308 is in I2S mode on TGL RVP

Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2019-10-17 13:53:48 +02:00
Tomasz Lauda 6b22503e54 ipc: check whether pipeline id is already taken
When new pipeline is created we need to also verify whether
given pipeline id is already taken.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-10-17 13:39:41 +02:00
Tomasz Lauda 99c16a69e3 ipc: rename ipc_get_comp function
Renames ipc_get_comp function to ipc_get_comp_by_id.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-10-17 13:39:41 +02:00
Tomasz Lauda 089de0f6ab platform: remove unused PLATFORM_HOST_FINISH_TIMEOUT
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-10-17 13:39:11 +02:00
Tomasz Lauda d3ca5cb1c0 platform: remove unused PLATFORM_HOST_FINISH_DELAY
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-10-17 13:39:11 +02:00
Tomasz Lauda 276463d6dc platform: rename and move PLATFORM_HOST_DMA_TIMEOUT
Renames PLATFORM_HOST_DMA_TIMEOUT to HDA_DMA_TIMEOUT and
moves to hda-dma, where it belongs.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-10-17 13:39:11 +02:00
Tomasz Lauda 9b535ce1a2 platform: rename PLATFORM_DMA_TIMEOUT and move to dw-dma header
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-10-17 13:39:11 +02:00
Tomasz Lauda 19db14e55f platform: remove PLATFORM_SCHED_CLOCK
Removes PLATFORM_SCHED_CLOCK definition as it's the same
as PLATFORM_DEFAULT_CLOCK.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-10-17 13:39:11 +02:00
Tomasz Lauda a12d58d170 platform: rename and move PLATFORM_HOST_DMA_MASK
Renames PLATFORM_HOST_DMA_MASK to PLATFORM_DW_DMA_HOST_MASK
and moves to dw-dma header, where it belongs.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-10-17 13:39:11 +02:00
Tomasz Lauda 66f937dd52 platform: remove unused MAX_PRELOAD_SIZE
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-10-17 13:39:11 +02:00
Tomasz Lauda 557e3b7609 platform: remove unused PLATFORM_SCHEDULE_COST
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-10-17 13:39:11 +02:00
Jakub Dabek 089ddcc2b2 memory: fix DEBUG_HEAP build
Fixed issue with DEBUG_HEAP configuration not building correctly.

Signed-off-by: Jakub Dabek <jakub.dabek@intel.com>
2019-10-17 13:35:22 +02:00
Janusz Jankowski ed9989ebbe pipeline: check task init result
In case of unsuccessful scheduler task init, the pipeline
task init should also fail.

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-10-17 12:53:35 +02:00
Guido Roncarolo 54127b0374 drivers: imx: sai: add one word to FIFO
FIFO should be pre-filled with one word as per RM
recommendation after TRCE has been anabled

Signed-off-by: Guido Roncarolo <guido.roncarolo@nxp.com>
2019-10-17 13:03:45 +03:00
Tomasz Lauda 063ecded7f src: fix frames calculation for capture stream
Fixes source_frames and sink_frames calculation for SRC
in the capture pipeline.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-10-17 11:28:34 +02:00
Tomasz Lauda 844526abdf ipc: return an error on dai not found
Returns an error, when there is no DAI component
connected to the DAI index specified by DAI config
IPC.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-10-17 11:22:51 +02:00
Guido Roncarolo 830ecf323c drivers: imx: edma: parameterize iteration size on FIFO size
various interfaces e.g. SAI or ESAI have different
FIFO size: EDMA has to take into account this when
programming the iteration size

Signed-off-by: Guido Roncarolo <guido.roncarolo@nxp.com>
Signed-off-by: Jerome Laclavere <jerome.laclavere@nxp.com>
2019-10-17 11:28:10 +03:00
Guido Roncarolo 61b0b58865 drivers: imx: edma: avoid accessing register for non ready channels
avoid accessing registers for EDMA channels that are not
started to prevent crash

Signed-off-by: Guido Roncarolo <guido.roncarolo@nxp.com>
Signed-off-by: Jerome Laclavere <jerome.laclavere@nxp.com>
2019-10-17 11:28:10 +03:00
Janusz Jankowski 6154b59e3b tigerlake: increase system runtime heap size
Update memory.h to have similar capabilities to other platforms,
that were updated when dynamic DMA channels were introduced.
Previous values were not enough for some topologies.

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-10-17 07:06:02 +02:00
Zhang Peng 0d54df1dbc drivers: cavs: dmic: Remove dmic_read/write/update_bits functions
Remove dmic_read/write/update_bits functions, instead by dai_read/
write/update_bits functions.

Signed-off-by: Zhang Peng <peng_zhang_8@nxp.com>
2019-10-16 16:52:16 +03:00
Tomasz Lauda 6fa4e4c8ae topology: cavs: switch all pipelines to timer scheduling
Switches all pipelines for cAVS platforms to timer scheduling.
This way we limit the number of interrupt levels processed
in the system. Timer, IPC and IDC are already on level 2 and
DMAs are on level 5.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-10-16 14:16:18 +02:00
Tomasz Lauda 16d1ca7c41 topology: sof-cml-demux-rt5682-max98357a: fix PCM and PIPELINE ids
Fixes ids for PCM and PIPELINE.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-10-16 10:54:47 +02:00
Tomasz Lauda ac27df9e70 topology: sof-cml-demux-rt5682: fix SSP index for CML
Builds CML demux topology with the correct SSP index.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-10-16 10:54:47 +02:00
Tomasz Lauda 5f539d9448 dai: fix rare case of xrun on release
Adds new start_position field based on which we assess whether
we should throw an xrun. It fixes rare cases of xruns on release
with timer scheduled pipelines.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-10-16 10:27:21 +02:00
Tomasz Lauda 6f26cfd8c4 dai: verify if DMA channel exists in dai_prepare
Checks if DMA channel exists in dai_prepare. This way we will
avoid exception in case DAI config hasn't been called before.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-10-16 10:26:36 +02:00
Tomasz Lauda 3fc0e27b06 topology: sof-icl-rt711-rt1308-rt715-hdmi: use 3 periods for ALH
Changes ICL topology to use 3 periods for buffer connected to ALH DAI.
This topology has been forgotten, when such changes were done.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-10-16 10:26:20 +02:00
Tomasz Lauda a53e12b8ea topology: cml: fix errors in topologies
Fixes SSP format and used pipeline macro in CML topologies.

Fixes: cfe81f5127 ("topology: cml: cnl: use 3 periods for SSP, DMIC and ALH DAIs")

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-10-16 09:57:22 +02:00
Tomasz Lauda 95a7c02041 topology: pipe-src-volume-playback: fix number of periods
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-10-16 09:57:22 +02:00
Lech Betlej b5982a46aa cnl: Access to HPSRAM power gating status register - macro updated
Macro modified for SRAM segments > 0 fixed by register offset
update to a proper value.

Signed-off-by: Lech Betlej <lech.betlej@linux.intel.com>
2019-10-15 13:10:13 +02:00
Pan Xiuli 947238ded8 rimage: keys: add new 3k key
New platforms like TigerLake will need 3k RSA key for signing.
Generate new keys for SOF public key.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2019-10-15 13:09:54 +02:00
Lech Betlej 79393f7c3e lib: Make sure shifted quantity is treated as 64bit type
Append type to constants in order to make sure they are
treated as 64 bit integers.

Signed-off-by: Lech Betlej <lech.betlej@linux.intel.com>
2019-10-15 12:37:35 +03:00