Commit Graph

11534 Commits

Author SHA1 Message Date
Guennadi Liakhovetski 7b5d1bbe39 test: add boot-time ztest-based testing
Add a ZTEST test-suite to run SOF boot-time self-tests at the time of
the first FW_GEN_MSG IPC.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2023-12-08 15:29:06 +02:00
Daniel Baluta a41f26d085 west.yml: update Zephyr to efc32081893d
Update Zephyr to pull in imx8ulp support. This includes following zephyr
commits:

- cfb68f827202 ("boards: xtensa: adsp: add support for imx8ulp board")
- a9a0c28282c3 ("dts/xtensa/nxp: Add dtsi for imx8ulp")
- 4b33c65f7108 ("soc: xtensa: adsp: add support for NXP ADSP for i.MX8ULP")
- efc32081893d ("west: sign: add support for NXP i.MX8ULP board")

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2023-12-07 21:35:26 +02:00
Jaroslaw Stelter d467eee4ca module: sink: source: Prevent division by zero issue
This patch prevents division by zero, when
source_get_frame_bytes() routine returns 0.

This change fixes issue https://github.com/thesofproject/sof/issues/8414.
The problem happens due to race condition during pipeline pause operation.
The exact failure mechanism require additional debug, but checking
frame_bytes value before division prevents exceptions.

Signed-off-by: Jaroslaw Stelter <Jaroslaw.Stelter@intel.com>
2023-12-07 17:06:07 +02:00
Ievgen Ganakov 60d1cad528 copier: dmic: use gateway config
Use previously saved gateway config instead of ipc config to retrieve
correct DMIC DMA config data and configure DMA channel.

Signed-off-by: Ievgen Ganakov <ievgen.ganakov@intel.com>
2023-12-07 13:42:41 +02:00
Ievgen Ganakov 2fdec46869 copier: ssp: use gateway config
Use previously saved gateway config instead of ipc config to retrieve
correct SSP DMA config data and configure DMA channel.

Signed-off-by: Ievgen Ganakov <ievgen.ganakov@intel.com>
2023-12-07 13:42:41 +02:00
Ievgen Ganakov 8b08e79e36 copier: store gateway config in copier_data
Calculate actual size of copier module gateway config. Copy
and store it in copier_data. It needs to be available even
after copier is created e.g. during SET_PIPELINE_STATE IPC
when dai_config_dma_channel() is called second time and
DMA config is used to assign dma_channel_id value.

Signed-off-by: Ievgen Ganakov <ievgen.ganakov@intel.com>
2023-12-07 13:42:41 +02:00
Yong Zhi 79f914e8ab sof-ctl: minor update for help text
The option -s is also needed for binary input file.

Signed-off-by: Yong Zhi <yong.zhi@intel.com>
2023-12-07 13:29:40 +02:00
Marc Herbert ced949e8da ipc/cmake: use the new add_local_sources() indirection layer
In the review of commit 1bd9e0d2c7 ("cmake/zephyr: decentralize
src/ipc/"), Andy recommended "maybe work around this by adding yet
another layer of indirection". I rejected the idea at the time because
the level of duplication in the ipc/ directory was small. Then I looked
at the bigger math/ subdirectory and I realized in #8548 that such an
indirection layer is actually required for bigger and/or more complex
cases. So I added that layer of indirection in commit
330d73eec1 ("cmake: a few new add_local_sources[_ifdef]()
compatibility macros")

Now that we have it, we might as well use it and perform small
simplifications in ipc/cmake.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-12-07 10:40:53 +00:00
Andrula Song 6563320273 zephyr/cmake: Fix the FIR math lib c files including errors
Fix the mistake of FIR lib files, we should include FIR math
lib .c files base on CONFIG_MATH_FIR instead of CONFIG_COMP_FIR.

Signed-off-by: Andrula Song <andrula.song@intel.com>
2023-12-06 14:27:54 +02:00
Baofeng Tian b7dc3ba467 Audio: up_down_mixer: move up_down_mixer header files to module folder
This is a clean up, purpose is de-cluster headers, toml files,
Readme.md etc per module basis, since today everything is scattered
in current code base.

Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
2023-12-05 16:49:27 +00:00
Baofeng Tian a0ce6c82ea Audio:mixin_mixout: move mixin_mixouot header file to module folder
This is a clean up, purpose is de-cluster headers, toml files,
Readme.md etc per module basis, since today everything is scattered
in current code base.

Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
2023-12-05 16:34:36 +00:00
Marc Herbert 8fa93b1c86 xtensa-build-all.sh: stop copy/paste/diverge set_xtensa_param.sh
... source it instead.

We still have duplication with xtensa-build-zephyr.py for now but this
gets at least rid of bash duplication.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-12-05 17:29:37 +02:00
Marc Herbert 44d9acb72d set_xtensa_params.sh: add missing LNL, ACP_6_3 and vangogh
This adds support for:

   ./scripts/rebuild-testbench.sh -p lnl

Also clean-up, re-order and add comments to set_xtensa_params.sh

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-12-05 17:29:37 +02:00
Marc Herbert afa02db05b coherent.h: assert(sizeof(struct coherent) <= DCACHE_LINE_SIZE)
Supersedes the "best effort" use of `packed`, being removed by #8528

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-12-05 16:36:46 +02:00
Peter Ujfalusi cff6a6b6f3 topology2: Enable ChainDMA for HDMI links unconditionally
Make the HDMI_USE_CHAIN_DMA set to true by default as enabling it for every
configuration just does not scale.

The generic HDA topologies enabled this for all IPC4 platforms already.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
2023-12-05 11:11:39 +02:00
Peter Ujfalusi cf473b5aa7 topology2: Rename USE_CHAIN_DMA to HDMI_USE_CHAIN_DMA
In practice all HDA links (on LNL SDW/SSP/DMIC also) can use ChainDMA, but
the flag is used to enable this only for display links.

Rename the flag to be precise about this.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
2023-12-05 11:11:39 +02:00
Ranjani Sridharan f4113c61b2 audio: component: Expose cmd op for library build
This is needed to fix the compilation failure with the plugin as it uses
the component_driver for the alsa and shm modules. This will be removed
once these modules are updated to use the module interface.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-12-05 11:10:49 +02:00
Ranjani Sridharan e65eb8500c tools: plugin: Fix hybrid pipeline support
Fix the pcm handle name and the params to fix playback/capture with
hybrid host-dsp pipeline.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-12-05 11:10:49 +02:00
Ranjani Sridharan c0a26427bb copier: Compilation fixes for SOF plugin
Fixes for compilcation errors when building with CONFIG_LIBRARY is set
and CONFIG_IPC4_GATEWAY is unset.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-12-05 11:10:49 +02:00
Baofeng Tian e72056769c Audio: dcblock: split dcblock with ipc3 and ipc4 specific code
Split dcblock with ipc3 and ipc4 specific code.

Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
2023-12-04 20:56:25 +02:00
Baofeng Tian 777ee7beab Audio: dcblock: move dcblock header file to module folder
Move dcblock header file to module folder.

Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
2023-12-04 20:56:25 +02:00
Baofeng Tian f93f7d423f Audio: multiband drc: split out ipc3 and ipc4 specific code
Split out ipc3 and ipc4 specific code from mulitband_drc.c.

Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
2023-12-04 10:43:35 +02:00
Baofeng Tian 565aad16a3 Audio: multiband_drc: refine two static inline functions
Move one inlined function to header file, for the second functions,
it was called 4 times in current module and not time critical, no
need inline.

Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
2023-12-04 10:43:35 +02:00
Baofeng Tian e406e1e40c Audio: multiband_drc: move multiband drc header to module folder
Move header file from include path to module inside folder.

Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
2023-12-04 10:43:35 +02:00
Marc Herbert 6328ed6a53 .github/zephyr: add -Werror to LP64 compilation
Now that all 64bits warnings have just been fixed, let's keep that build
clean.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-12-04 10:42:57 +02:00
Adrian Warecki e36b77c380 rimage: manifest: Improved handling of empty RODATA segment
If the RODATA segment does not contain any data, its type is marked as
empty. Cleared the readonly flag because this segment also contains .data
sections.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
2023-12-04 10:42:34 +02:00
Adrian Warecki c9fb8d48d5 rimage: module: Fix calculation of segment size in file
If a given output segment type did not contain any input section
(was empty), its size was incorrectly calculated as 1 and then rounded to
the page size (4096). This resulted in an unnecessary segment in a output
file.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
2023-12-04 10:42:34 +02:00
Mac Chiang 872d9fd199 topology2: sof-mtl-rt5650: enable dts playback
enable dts pipeline on rt5650 speaker(I2S0) and headphone(I2S1).

Signed-off-by: Mac Chiang <mac.chiang@intel.com>
2023-12-04 10:41:40 +02:00
Marc Herbert fb229b9cc1 .github/tools.tml: add build of SOF ALSA plugin
Add new GitHub workflow that builds SOF ALSA plugin

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-12-01 13:09:19 -08:00
Marc Herbert 50c224a2c7 tools/plugin/README.md: add -GNinja. Remove stale -DPLUGIN_IPC4
Add instructions to build sof_ep and parser_ep first to avoid dependency
issue and race condition.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-12-01 13:09:19 -08:00
Guennadi Liakhovetski ac750edf05 volume: remove superfluous cache invalidation
IPC configuration data caches are already invalidated in
ipc4_set_large_config_module_instance(), no need to imvalidate them
additionally in the volume driver.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2023-12-01 21:24:04 +02:00
Guennadi Liakhovetski fa03f05858 module-adapter: remove .cmd() from IPC4
struct comp_ops::cmd() is only used for IPC3, remove it and
comp_cmd() from the IPC4 version.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2023-12-01 21:24:04 +02:00
Joe Cheng ce4acfd171 audio: dts: move dts code to standalone folder
This was suggested in PR#8389. Since the module uses
module_interface, it doesn't have to put it under module_adaper/module/.
Move dts codes from src/audo/module_adapter/module/ to src/audio/codec.

Signed-off-by: Joe Cheng <joe.cheng@xperi.com>
2023-12-01 16:20:29 +02:00
Joe Cheng 9dfe9c1ef6 module_adapter: dts: update the path to include DTS header files
Update the path to include DTS header files from
third_party/include/. This action was requested in PR#8379.

Signed-off-by: Joe Cheng <joe.cheng@xperi.com>
2023-12-01 16:20:29 +02:00
Joe Cheng 089435e008 module_adapter: dts: import DTS library from third_party
Update the path to import DTS library from third_party/lib/ instead of
src/audio/module_adapter/lib/release/.
This action was requested in PR#8379.

Signed-off-by: Joe Cheng <joe.cheng@xperi.com>
2023-12-01 16:20:29 +02:00
Laurentiu Mihalcea a8ad6ebfc8 Cast pointers to size_t instead of uint32_t when printing
On 64-bit platforms such as i.MX93 the pointers are 64-bit.
As such, casting them to uint32_t leads to compilation warnings
such as:

"cast to pointer from integer of different size"

To fix this, cast to size_t which, on 32-bit platforms
is 32-bit and 64-bit on 64-bit platforms. Printing will
be done via "%zx".

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2023-11-30 20:43:01 +02:00
Laurentiu Mihalcea a945ec45e7 imx93_a55: memory.h: Add ULL suffix on MU_BASE's definition
Currently, the imx_mu_write() and imx_mu_read() functions
cast MU_BASE's value to a pointer. On 64-bit platforms
such as i.MX93 this leads to compilation warnings because
the value of MU_BASE is 32-bit while the pointers are
64-bit. As such, to solve this, add the ULL suffix to the
definition of MU_BASE to make it 64-bit.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2023-11-30 20:43:01 +02:00
Laurentiu Mihalcea faf725aba0 Use %zu format for printing size_t variables
Currently, building SOF on a 64-bit platform (i.e: i.MX93)
leads to compilation warnings such as:

"format '%d' expects argument of type 'int', but argument
5 has type 'long unsigned int'"

This is because size_t is 64-bit on 64-bit platforms. As such,
to get rid of these compilation warnings, use the %zu specifier
when printing a size_t variable.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2023-11-30 20:43:01 +02:00
Adrian Warecki 347e8353a4 up_down_mixer: Remove dummy prepare and reset methods
The prepare, reset and free methods are now optional in module adapter.
Removed unnecessary prepare and reset methods.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
2023-11-30 20:19:44 +02:00
Adrian Warecki ae21a31d5b module_adapter: Make free, reset and prepare methods optional
Simple modules may not need to provide free, reset and prepare functions.
To avoid having to provide dummy methods, added an if to check if a module
implemented these methods.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
2023-11-30 20:19:44 +02:00
Curtis Malainey 285c090a10 topology: Add support for buffer flags
Flags have been a part of IPC3 for ages, add support for them in the topology.

Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
2023-11-30 10:16:59 +02:00
barry.jan 5cf1c9c0d6 topology: Add Waves codec to MT8188 topology
Modify sof-mt8188-mt6359 topology so Waves codec can be added
to playback in case 'WAVES' is defined.

Signed-off-by: barry.jan <barry.jan@waves.com>
2023-11-29 16:33:19 +00:00
Marc Herbert 2ce1f9ea34 math/cmake: use new macro add_local_sources_ifdef()
This makes the code shorter and will help with #8260

Zero functional change.

Do not use it when Zephyr use is not conditional.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-11-29 14:52:36 +00:00
Marc Herbert b53f2b08d8 module/cmake: simplify thanks to the new add_local_sources() macro
Leverage the previous commit.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-11-29 14:52:36 +00:00
Marc Herbert 330d73eec1 cmake: a few new add_local_sources[_ifdef]() compatibility macros
For reducing CMake duplication and centralization, see #8260

Not used yet.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-11-29 14:52:36 +00:00
Marc Herbert 98d5efc3a7 zephyr/cmake: remove now unused SOF_IPC_PATH variable
Fixes commit 1bd9e0d2c7 ("cmake/zephyr: decentralize src/ipc/")

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-11-29 14:52:36 +00:00
Yong Zhi 5d8e03db6b audio: google_rtc_audio_processing: fixup removed struct member
This is fixup for a62b7cf1c3

error: 'struct comp_buffer' has no member named 'id'

Signed-off-by: Yong Zhi <yong.zhi@intel.com>
2023-11-29 14:26:08 +00:00
Daniel Baluta 0c3ae5ae3c audio: drc_hifi4: Fix compilation warnings
This fixes following compilation warnings:

repos/sof/src/audio/drc/drc_hifi4.c: In function ‘drc_delay_input_sample_s16’:
repos/sof/src/audio/drc/drc_hifi4.c:580: warning: assignment from incompatible pointer type
repos/sof/src/audio/drc/drc_hifi4.c:581: warning: assignment from incompatible pointer type
repos/sof/src/audio/drc/drc_hifi4.c: In function ‘drc_delay_input_sample_s32’:
repos/sof/src/audio/drc/drc_hifi4.c:718: warning: assignment from incompatible pointer type
repos/sof/src/audio/drc/drc_hifi4.c:719: warning: assignment from incompatible pointer type

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2023-11-29 14:25:23 +00:00
Daniel Baluta a4a3b3aed9 include: sof: common.h Fix compilation error
Commit 16d126a36f ("audio: Header files cleanup") removed
rtos/panic.h include but this is still needed.

Otherwise, we get the following compilation error:

/work/repos/sof/src/lib/lib.c: In function ‘memset’:
/work/repos/sof/src/lib/lib.c:31: warning: implicit declaration of function ‘sof_panic’

Fixes: 16d126a36f ("audio: Header files cleanup")
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2023-11-29 14:25:23 +00:00
Adrian Warecki 2b4e484427 rimage: module: Use file name in error message in module_write_whole_elf
By oversight, the error message did not use the file name passed as a
parameter to the module_write_whole_elf function.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
2023-11-28 17:05:27 +02:00