Commit Graph

11779 Commits

Author SHA1 Message Date
Baofeng Tian 7e3f4a2f21 copier: Add copier simd option
Add copier simd HIFI option, with this adding, developer
can select which HIFI version used for copier.

Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
2024-02-26 16:43:07 +00:00
Baofeng Tian 1cb8d8fb19 ASRC: add simd config for ASRC module
With simd config adding, user are able to choose simd
version for ASRC build.

Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
2024-02-26 16:43:07 +00:00
Guennadi Liakhovetski 0e29dc690d multicore: don't enable timer interrupts on secondary cores
Keep timer interrupt handling on the primary core, this avoids
secondary cores failing to handle timer interrupts immediately after
power on.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-02-26 16:13:39 +00:00
Guennadi Liakhovetski 49abf3f54c multicore: add a timeout when enabling secondary cores
Replace a potentially infinite loop with one, using a retry counter
to avoid lock ups.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-02-26 12:21:39 +00:00
Guennadi Liakhovetski 6795011794 ipc4: don't keep stale pointers, avoid double freeing
When freeing memory it's also good to clear the pointer to avoid
use-after-free or double-free bugs.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-02-26 12:21:39 +00:00
Guennadi Liakhovetski 081bcab6ef ipc: (cosmetic) use an existing variable
Use a local variable instead of calling ipc_get() again in
ipc_send_queued_msg().

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-02-26 12:21:39 +00:00
Guennadi Liakhovetski fec8e32e2f ace: don't re-define CONFIG_LOG*
CONFIG_LOG and CONFIG_LOG_MODE_DEFERRED are already defined in the
common prj.conf, no need to re-define them additionally in
architecture-specific configurations.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-02-26 12:21:39 +00:00
Seppo Ingalsuo a9a05e2b3a Tools: Tune: SRC: Update generator to produce similar as edited
This patch makes to SRC coefficients tables generator same changes
as done in recent git commits.

commit 88fdb10e52 ("audio: src: rename sample rate converter
coefficient folder name") moved coefficients files location to
src/audio/src/coefs.

commit 90fef5afd2 ("src_lite: add module") removed include of
src.h from upper level due to another src-lite version.

'commit 7f4e6aed74 ("src: make coefficients constant")
added const to struct src_stage.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2024-02-23 13:13:28 +00:00
Andrula Song 97a50e3243 Audio: Fix the kconfig error of mixin_mixout.
Fixes the commit f4d043724d ("Audio: Move components related config
to subfolder").

Due to a copy/paste error, the content of mixin_mixout/Kconfig has
been a copy of aria/Kconfig. This patch fixes the copy/paste error,
and adds IPC version dependence for COMP_MIXER and COMP_MIXIN_MIXOUT.

Signed-off-by: Andrula Song <andrula.song@intel.com>
2024-02-23 11:46:15 +00:00
Laurentiu Mihalcea 9831a9ded7 audio: dai-zephyr: reset DMA buffer cursors on TRIGGER_RELEASE
On NXP platforms, stopping the DMAC and then re-configuring it
leads to the internal DMA buffer cursors being reset. Leaving the
SOF DMA buffer cursors in the same state means the DMA driver
and SOF may potentially end up with two different views of the
same buffer (from the cursors' point of view). This in, turn,
may lead to the DAI consuming stale data because of the values of
"free" and "pending" queried from dma_reload() stopping
dai_common_copy() from copying new data. To fix this, reset the
read and write cursors of the DMA buffer from SOF side. This
way, both SOF and the DMA driver will have the same initial
view of the DMA buffer cursors.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-02-23 11:29:51 +02:00
Iuliana Prodan 3ab82dceb2 topology2: add topology for imx8MP
Add playback topology for i.MX8MP with wm8960 codec

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2024-02-21 14:10:27 +02:00
Iuliana Prodan b3989330f9 topology2: add SAI as dai_type
Add SAI as dai_type for dai-copier component.

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2024-02-21 14:10:27 +02:00
Iuliana Prodan cc29b337d0 topology2: add SAI DAI class
Add SAI DAI class definition, SAI DAI objects can be
instantiated as:

Object.Dai.SAI."N" {
    direction		"duplex"
    dai_name		"NoCodec-0"
    id 			0
    Object.hw_config."0" {
	    mclk_freq	12288000
	    bclk_freq	3072000
	    tdm_slot_width	32
    }
    Object.dai."playback" {
	    period_source_count	2
	    period_sink_count	0
    }
    Object.dai."capture" {
	    period_source_count	0
	    period_sink_count	2
    }
}

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2024-02-21 14:10:27 +02:00
Iuliana Prodan f3533bcd42 topology2: move gain-playback/capture pipelines out of cavs
Move gain-playback/capture pipelines out of cavs folder
since these can used by others.

Update cavs topologies to fix compilation by adding
include/pipelines as searchdir.

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2024-02-21 14:10:27 +02:00
Iuliana Prodan c105d89031 topology2: move common_definitions to common folder
Move common_definitions.conf to common folder since this
will be used by other companies to define their topologies.

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2024-02-21 14:10:27 +02:00
Laurentiu Mihalcea 3681e099de audio: host-zephyr: Allocate DMA block configuration on heap
Currently, the DMA block configuration (struct dma_block_config)
is placed on the stack during host_common_params(). Later on,
host_copy_one_shot() tries to re-configure the DMAC driver
using the same block configuration that's located in a stack
frame that's no longer valid. As such, allocate a DMA
block configuration on the heap during host_common_params()
which can be used later on (e.g: during host_copy_one_shot())
to reconfigure the DMAC.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-02-20 09:52:44 +02:00
Johny Lin 1233a220b1 overlays: dts: use prebuilt library for production
DTS codec targets the integration on sof-mtl-rt5650-dts.tplg. The
firmware build config should not set COMP_STUBS. At the same time the
config GOOGLE_RTC_PROCESSING_MOCK should be enabled as since its
libraries are still WIP.

Signed-off-by: Pin-chih Lin <johnylin@google.com>
2024-02-19 14:32:12 +00:00
Adrian Warecki 5acb38d889 lmdk: dummy: Remove unused api version definitions
The API version used by the module is defined in the module api version
header file. The definitions in CMakeLists.txt are no longer needed.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
2024-02-19 14:31:09 +00:00
Adrian Warecki f991b7d957 module: Extend module error code definitions
Ported additional error code definitions from iadk module API.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
2024-02-19 14:31:09 +00:00
Marc Herbert 4bdefd7e0a zephyr/docker-build.sh: explain why we autodetect with FindZephyr-sdk
Pure comment change, no code change.

Kudos to Stephanos Ioannidis for patiently explaining this to me on
Discord.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2024-02-19 14:20:07 +00:00
Laurentiu Mihalcea ac4cf6175f scripts: xtensa-build-all: remove imx8/imx8x
To prepare for XTOS deprecation and switch to Zephyr native
drivers on imx8/imx8x, remove the ability to build SOF
with XTOS on them.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-02-16 21:48:10 +02:00
Laurentiu Mihalcea a3701fea01 script: test-repro-build: change imx8 with AMD's rmb
XTOS is going to be deprecated on all NXP's platforms so
replace imx8 with AMD's rmb so that the CI test can be kept.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-02-16 21:48:10 +02:00
Laurentiu Mihalcea fccb097ddd installer: replace imx8 with imx8m
XTOS is going to be deprecated on imx8/imx8x so replace
imx8 with imx8m.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-02-16 21:48:10 +02:00
Laurentiu Mihalcea 1519efbfff workflow: remove imx8/imx8x platforms from QEMU boot test
XTOS will be deprecated on imx8/imx8x and these platforms
will be moved to native Zephyr so remove them from the
QEMU boot test which uses SOF with XTOS.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-02-16 21:48:10 +02:00
Ranjani Sridharan 48462a47bd tools: plugin: README: Add instructions for testing noise suppression
Fix the stale instruction for install and add the steps for setting up
OpenVino/OpenCV to test the noise suppression model from the open model
zoo repository.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2024-02-16 21:45:27 +02:00
Ranjani Sridharan e9352299db topology2: sof-plugin: Add noise suppression module to the capture path
Add the conf file for the OpenVino noise suppression module and
introduce the module in the capture path in the plugin topology when
noise suppression is enabled. ATM, only 16K capture is supported by the
model, so change the input/output rates for the host/dai modules in the
plugin capture pipeline.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2024-02-16 21:45:27 +02:00
Ranjani Sridharan 06b3e329da tools: plugin: modules: Introduce the OpenVino noise suppression module
Introduce a new module that performs noise suppression. The module loads
the noise suppression model using the OpenVino Runtime plugin, processes
the input samples to produce output samples with clean speech.
CUrrently, the module is hard-coded to compile the model to be run on
the CPU only and will be extended for other devices like the NPU in the
future.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2024-02-16 21:45:27 +02:00
Ranjani Sridharan 3540548b95 src: panic: Modify the signature of __panic()
Make the filename argument be a const char * to avoid the following
warning with c++ compliation:
warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2024-02-16 21:45:27 +02:00
Ranjani Sridharan de2d39514f tools: plugin: 50-sof: Add new config for 16KHz stereo 16-bit format
This will be needed for the plugin voice PCM in preparation to add the
noise suppression module in the host pipeline.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2024-02-16 21:45:27 +02:00
Ranjani Sridharan 850e1d3eb3 tools: plugin: Fix prepare/free widgets for capture
Set the host widget correctly and use the capture specific functions
during prepare/free.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2024-02-16 21:45:27 +02:00
Ranjani Sridharan 47a17d7fcf tools: plugin: tplg: Fix ibs/obs for all widgets
Set both ibs/obs to be based on the ALSA period_size to make sure that the
intermediate buffers are large enough.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2024-02-16 21:45:27 +02:00
Ranjani Sridharan 4feebf2a5c tools: plugin: tplg: Fix parsing of process widgets
For now, only process widgets that don't need the basecfg extension are
supported.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2024-02-16 21:45:27 +02:00
Ranjani Sridharan 61fdc16240 tools: plugin: pcm: Add missing return
Add the missing return in the hw_free callback.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2024-02-16 21:45:27 +02:00
Ranjani Sridharan dfd8ffa069 audio: audio_stream: Explicitly cast to enum
To prevent the following with C++ compilation.
error: invalid conversion from ‘uint32_t’ {aka ‘unsigned int’} to ‘sof_ipc_frame’ [-fpermissive]

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2024-02-16 21:45:27 +02:00
Jaroslaw Stelter 438b11bab2 lib: alloc: k_panic is not required in failure case
For rballoc_allign() call when caps are not correct it is
enough to return error. k_panic() call is not required here.
Previous change exposed this issue:
https://github.com/thesofproject/sof/issues/8832,
but it is sufficient to log error and return NULL at this point.

Signed-off-by: Jaroslaw Stelter <Jaroslaw.Stelter@intel.com>
2024-02-14 14:56:39 +00:00
Adrian Bonislawski af80acccc6 logger: convert: fix variable type for negative value
time_precision variable can be used as -1

Fixes commit ff9343aa4a ("logger: convert: Fix compile time error with
newer toolchain")

Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
2024-02-13 17:20:49 +00:00
Iuliana Prodan a6700afea1 topology1: imx8ulp: overwrite CHANNELS_MIN
On 8ULP SAI is connected to BT which supports
only 1 channel for both playback and record.

Fixes: aaff352314 ('topology1: pipe-volume-capture.m4: Set minimum number of channels to 2')

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2024-02-12 20:07:47 +02:00
Marcin Szkudlinski 7c0c8a400c dp: delayed start should apply to the first DP cycle only
When DP start, copy from DP to LL should be delayed till first
DP deadline time.

In current implementation the cycle counter is set at every
DP scheduler trigger. If DP is - for any reason - scheduled
again before its deadline passes, the counter will be set again
and copying delay time will be too long. In extreme situation
(i.e. if OBS is set to long value when IBS is short - in this case
DP will proceed a short data chunks with a long deadline), it may
lead to permanent stuck in processing.

Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
2024-02-12 18:09:48 +02:00
Marcin Szkudlinski 8b99003733 dp: add an error message in DP/LL copying
In case of theoretically impossible event of LL-DP
copy failure, an error message should be issued

Message is better than assert - as stated this should
never happen, but if it happens its better to have a
glitch + message than a crash

Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
2024-02-12 18:09:48 +02:00
Peter Ujfalusi 557e581ca8 board: intel_adsp_ace15_mtpm: Drop CONFIG_DMA_DW_SUSPEND_DRAIN
The purpose of CONFIG_DMA_DW_SUSPEND_DRAIN is to empty the FIFO before
disabling the channel by draining it.
Since the peripheral is disabled before the DMA
(CONFIG_COMP_DAI_STOP_TRIGGER_ORDER_REVERSE is not selected), the DMA will
not be able to do that causing drain timeout.

The stop is used in two cases:
Stream stop:
the content of the FIFO does not matter as we stop the stream.

Pause/resume:
On pause the DMA is suspended (DW_CFGL_SUSPEND bit set)
On resume the DMA is stopped, re-configured and then started again instead
of resuming

The peripheral is started after the DMA stop and start.

Leftover audio data might cause audio glitch on resume, it is probably
better to disable the draining.

Note: if we want to have draining enabled we need to select the
CONFIG_COMP_DAI_STOP_TRIGGER_ORDER_REVERSE at the same time to force the
DMA to be stopped before the DAI.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
2024-02-09 19:25:40 +02:00
Peter Ujfalusi bdf2143d88 audio: dai-zephyr: Fix config option string for reversed trigger
The correct config to use for ifdef for reversing the stop trigger order
is CONFIG_COMP_DAI_STOP_TRIGGER_ORDER_REVERSE

Fixes: a6a80ec97a ("dai-zephyr: Fix the ordering of DAI and DMA triggers")
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
2024-02-09 19:25:40 +02:00
Brent Lu 5c3a1caec3 topology2: dmic-generic: rename volume switch
The volume switch of gain widget is renamed as 'Dmic0 Capture Volume'
for backward compatibility.

Signed-off-by: Brent Lu <brent.lu@intel.com>
2024-02-08 16:58:21 +00:00
Brent Lu 33e23766ff topology2: dmic-generic: add switch for LED control
Add a mute switch to gain widget for DMIC. Also register this switch
as MIC mute LED mixer control on Linux side.

Signed-off-by: Brent Lu <brent.lu@intel.com>
2024-02-08 16:58:21 +00:00
Brent Lu b2d1f09da5 topology2: gain: add mixer switch for mute control
Add a switch to gain widget for mute control. It could also be used
as MIC/SPK mute LED control purpose.

Signed-off-by: Brent Lu <brent.lu@intel.com>
2024-02-08 16:58:21 +00:00
Brent Lu f9bcf61b9a audio: volume: support switch control
Implement function to support SOF_IPC4_SWITCH_CONTROL_PARAM_ID in
set_configuration callback. Linux side could use this switch control
to mute/unmute a gain widget.

Signed-off-by: Brent Lu <brent.lu@intel.com>
2024-02-08 16:58:21 +00:00
Kalva, DineshKumar a25c70e183 amd: enable probe functionality config for AMD/Renoir platform.
Enable probe functionality config for AMD/Renoir platform.

Signed-off-by: Kalva, DineshKumar <dineshkumar.kalva@amd.com>
2024-02-08 16:04:18 +00:00
Kalva, DineshKumar cdd9863718 amd: initialization of dma descriptors for probe functionality for AMD/Renoir platform.
Initialization of dma descriptors for probe functionality
for AMD/Renoir platform.

Signed-off-by: Kalva, DineshKumar <dineshkumar.kalva@amd.com>
2024-02-08 16:04:18 +00:00
Marcin Szkudlinski 8e34109e10 AEC: Enable Google AEC with Mock compliation
Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
2024-02-08 11:48:20 +00:00
Marcin Szkudlinski b3d569a523 AEC: convert aec to use sink/src interface
This commit changes AEC to use sink/src interface
and makes it to be a DP module

it also enables optional usage of 32bit AEC API

Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
2024-02-08 11:48:20 +00:00
Marc Herbert e04289d6a9 scripts/fuzz.sh: add a -p "pristine" flag that deletes build-fuzz/
It's slower but safer when changing some parameters.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2024-02-07 12:50:08 +00:00