As part of the 3rd part module API changes, change the signature of the
free op in the module interface API to pass the pointer to struct
processing_module instead of comp_dev. Also. modify the signature of the
module_free_all_memory() to pass struct processing_module pointer as
input.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
As part of the 3rd part module API changes, change the signature of the
reset op in the module interface API to pass the pointer to struct
processing_module instead of comp_dev.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
As part of the 3rd part module API changes, change the signature of the
prepare op in the module interface API to pass the pointer to struct
processing_module instead of comp_dev.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
As part of the 3rd part module API changes, change the signature of the
init op in the module interface API to pass the pointer to struct
processing_module instead of comp_dev.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Add a pointer to comp_dev in struct processing_module. This is a
temporary change that is needed for trace messages in the module
implementation. This should be removed when the trace API is updated to
not need the dev pointer.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
The malloc output is useful for debug only otherwise it can add more
noise to the trace output.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
This is the first step in running a full DSP topology on multiple testbench
"virtual" cores. Testbench will use threads to virtualise a emulate a core
allowing topologies with more than one core to run simultaneously.
This patch makes the following changes.
1) Adds and passes a topology testbench context to all APIs instead of
relying on some globals.
2) Splits the testbench up into small functions that have a single purpose.
3) Creates a thread for each pipeline which in turn share a virtual core.
4) Adds the command line options to enable testing different cores and
pipelines.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Split pipeline functionality into smaller action to support more
complex use cases. Provide more useful logging.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Add LL scheduler emulation for testbench pipelines. Each core is
implemented as a thread.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
This removes the "unknown" string and replaces with file and line.
Function is already in msg.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
SOF use sai6 on imx8ulp 9x9 board, use sai5 on imx8ulp board.
Modify for compatible with different imx8ulp boards.
Signed-off-by: Zhang Peng <peng.zhang_8@nxp.com>
DSP connects to sai5 on the normal imx8ulp board(15x15). But on the
imx8ulp 9x9 board, DSP connects to sai6, add resource sai6, preparing
to bring up sof on the imx8ulp 9x9 board.
Signed-off-by: Zhang Peng <peng.zhang_8@nxp.com>
Add EDMA_HS_GET/SET_DMAMUX_CFG macros to get/set dmamux rx/tx irq.
This is for preparing support different imx8ulp board.
Modify on imx8 platform to suit this change.
Signed-off-by: Zhang Peng <peng.zhang_8@nxp.com>
Use gcc typeof() to cast the output of ASSUME_ALIGNED() back into the
type of its argument. This lets the compiler report type mismatches.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Do not pass array arguments to ASSUME_ALIGNED() macro, pass a pointer
instead.
Then it is possible to make ASSUME_ALIGNED type safe.
When using -g0, gcc outputs are exactly the same before vs after this
commit.
Note it is still not possible to make the `cdata->data->data`
abomination type-safe because it is nesting non-standard zero-length
members. However that is a different issue; not ASSUME_ALIGNED's
problem. ASSUME_ALIGNED is apparently needed for some "normal" C code
too.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
This reverts commit 079ce95b98.
As explained in the comment that it modified, predicted in the #5159
discussion and reproduced in test #5290 /
https://github.com/thesofproject/sof/runs/4988844402, this commit broke
'CONFIG_TRACE=n'. Simple reproduction steps:
$ rm -rf zephyrproject/build-apl
$ echo 'CONFIG_TRACE=n' >> \
boards/xtensa/intel_adsp_cavs15/intel_adsp_cavs15_defconfig
$ sof/scripts/xtensa-build-zephyr.sh [ -p /path/to/zephyrproject ] apl
fw abi main version: 3.20.1
fw abi dbg version: 5.3.0
warning: can't find section .static_log_entries in zephyr/zephyr.elf
error: section .static_log_entries can't be found
error: unable to write dictionaries, -22
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Clear the init_done flag at reset to fix the problem with failure with a
subsequent playback.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Codec data is not allocated with module_allocate_memory(). So use rfree()
to free it.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Different platform uses different SSP MCLK frequency,
this patch applies different MCLK for different platform
for cavs-nocodec topology.
The MCLK frequencies are aligned with topology1.
Signed-off-by: Chao Song <chao.song@linux.intel.com>
In nocodec ipc4 test we have a new format
conversion : 32 bits container 16 bits valid sample bit
to itself. Just copy the source buffer to sink buffer.
Signed-off-by: Rander Wang <rander.wang@intel.com>
Processing continuous data. Asking a 8-byte aligned memory
to store volume gain 4 times, using 2-way or 4-way pipeline
operations of xtensa intrinsics. This method can reduce about
40% MCPS than the original one.
Signed-off-by: Andrula Song <xiaoyuan.song@intel.com>
The node id in copier config is built with group id
and codec id, we need to convert it to sof dai id.
Validated on windows
Signed-off-by: Rander Wang <rander.wang@intel.com>
Fixes incremental builds of topology2 that were missing ALSA_CONFIG_DIR.
This was making it impossible to troubleshoot alsatplg issues like #5249.
Now incremental builds fail or pass the same as builds from scratch.
Fixes commit 308a24a92b ("topology2: Add build support")
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
alsatplg accepts empty definitions -D "" so let's simplify
commit cb80023b22 ("topology2: fix build issues with no command line
definitions"); 10 lines shorter. The less CMake code the better.
Zero change, the build directory is bit for bit identical after this
commit.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Zephyr requires CMake 3.21 and SOF requires 3.13, see
commit a0acad3414 ("CMake: require version 3.13")
Fixes commit 4b2edf8eed ("zephyr: wrapper: complete zephyr support for
working audio")
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
This patch adds to defaults of switch statements error prints
and error values returns to properly error non-supported
things.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch limits file read from reading more than e.g. 48 frames
at time when scheduled every 1 ms for 48 kHz audio. It helps
the testbench to execute copy() operations similarly as in real
firmware and not process multiple periods of data in the same
pipeline copy. Some components contain internal limiting for data
processing amount but most do not.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
The file component new() sets function to s32. It's better to
initialize to default function that just errors if called.
The stream pointer is retrieved from buffer. There is no need to
apply twice list_first_item() function. The sample width is set
with get_sample_bytes(). The switch case for frame_fmt is changed
to use stream. It avoids an error to use 16 bit file write to
consume data from 32 bit buffer. This happens because ipc value is
from topology while stream format is from command line override. Only
the text file output becomes incorrect.
The comp_data struct contained unnecessary fields such as period_bytes,
frame_bytes, and frame_fmt.
The patch also contains some switch-case code cleanup for more compact
code and look.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch replaces the sample by sample fread() and fwrite()
operations with max length block reads and writes without
circular wrap. Both binary and text format read and write
functions are replaced with more compact versions.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>