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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
... 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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>