Compilation fails with gcc:
src/ipc/ipc4/helper.c: In function 'ipc4_create_buffer':
src/ipc/ipc4/helper.c:210:41: error: variable 'sink_cfg' set but not used [-Werror=unused-but-set-variable]
210 | struct ipc4_base_module_cfg *src_cfg, *sink_cfg;
| ^~~~~~~~
cc1: all warnings being treated as errors
make[2]: *** [CMakeFiles/sof.dir/build.make:394: CMakeFiles/sof.dir/src/ipc/ipc4/helper.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:2042: CMakeFiles/sof.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
The DTS Codec can be conditionally added to the sof-adl-nau8825 topology
on those pipelines intended for headphone and speaker output.
Signed-off-by: Joe.Cheng <joe.cheng@xperi.com>
Allocate "struct zephyr_ll_pdata" in shared/coherent memory as it embeds
a "struct k_sem" object. Zephyr kernel code assumes the object to be in
cache coherent memory, so incorrect operation may result if condition is
not met.
Long test runs of all-core capture stress test on Intel cAVS2.5
platform show failures that are fixed with this change.
Discovered via runtime assert in zephyr/kernel/sched.c:pend() that
is hit without this patch.
BugLink: https://github.com/thesofproject/sof/issues/5556
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
For builds with no Hotword on DSP, generic dmic m4 is used.
RTNR is running on DMIC CORE ID 1. Hence adding the flag.
Signed-off-by: Jairaj Arava <jairaj.arava@intel.com>
No functional change.
Move some common testbench code into the topology parser and group
feature parsing by file name.
Add a tplg_ prefix to external APIs without a prefix, others with an
existing prefix to follow this change.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Calculates average and records the maximum execution cycles taken by
each execution round and prints the results out once every 1024 round,
e.g. roughly once per second with a typical 1ms tick configuration. The
output is mimicked from the Zephyr side scheduler output. There is a
Kconfig menu option under debug menu to disable this feature. Currently
the default is on.
Signed-off-by: Jyri Sarha <jyri.sarha@intel.com>
Return is copy_bytes is 0 before calling copy/writeback which will do
nothing anyway.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Remove the static variable that holds the total config size and use
the new field, new_cfg_size in struct module_data to store the size of
the config data.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Modify IDC payload size to be cache aligned and have size of 2 cache
lines.
Signed-off-by: Rafal Redzimski <rafal.f.redzimski@intel.com>
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
For zephyr case remove the dynamic allocation of per-core
idc elements since these are already statically allocated
in a form of idc array in zephyr/wrapper.c.
The payload pointer initialization need to use idc entries
which are returned by the get_idc() call.
Signed-off-by: Rafal Redzimski <rafal.f.redzimski@intel.com>
Due to a mistake, I was using the read API to get a pointer to the
place to write data. This commit corrects it.
Signed-off-by: Lionel Koenig <lionelk@google.com>
sof-ctl assumed the binary control were of size of a
multiple of unsigned integer.
This caused the control byte array to be truncated when the
size of the control was 6 bytes.
This change allow setting any size of control in binary form.
Using CSV will always end up with a number of unsigned integer size.
I tested this change using the Google RTC Audio processing with control
of size:
- 6 bytes,
- 2 bytes
- and 4 bytes.
Signed-off-by: Lionel Koenig <lionelk@google.com>
The original code was copied from ipc3 path but the wallclock usage
is different. In ipc4 path fw needs update it for each position update.
Signed-off-by: Rander Wang <rander.wang@intel.com>
Modify all codec implementations to copy the produced samples to the
output_buffer. Copy the produced samples from all output buffers in the
sink_buffer_list. Remove local_buff from struct processing_module as it
is no longer needed.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Add a helper function to copy from local buffer to the sink buffer. This
will be used to copy from all output buffers.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Add a sink_buffer_list to struct processing_module to support multiple
output buffers for modules. Allocate sink buffers for all sinks during
prepare and copy the produced samples from the output_buffers into the
respective sink buffers during copy.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Fix fw error found by windows audio setting test.
In ipc3 path, host driver sends ipc_hw_params message
to fw but in ipc4 path fw needs to build component
params from component config.
This patch add params function for volume.
Signed-off-by: Rander Wang <rander.wang@intel.com>
NO_AGGREGATION is never used now. Let's remove it.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Libin Yang <libin.yang@intel.com>
Fix FW error when changing progress bar in windows auido player.
For this case, pipeline is paused and reset and then paused and
started. FW reports a error that dma is still running when pipeline
is started.
Signed-off-by: Rander Wang <rander.wang@intel.com>
pipeline_comp_hw_params does 2 things, it fetches the hw_params from the
DAI and writes those parameters to buffers. The issue here is that we
walk from host to DAI, so any buffer we see along the way gets set with
uninitialized hw_params as we don't get the params till the end of the
walk. Typically this is not an issue in most pipelines that are linear
as the following call to pipeline_comp_params will overwrite any bad
values in the buffer params. Not good practice but not harmful. The
problem arises when components such as the demux or SRC which pass flags
into comp_verify_params receive these bad values. There are edge cases
as a result where the values are not cleared and the buffers end up with
bad data. The result is usually an xrun, in the case of identifying this
bug, the uncleared buffer had 4.6k channels.
Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
Multi-core configurations already use uncached memory for LLI. This
also makes sense to avoid having to manually synchronise cache. Force
LLI objects uncached.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
The number of retries is too small to successfully handle some
compound IPC messages (in particular setting pipeline state to running
in case of multi-core distributed pipeline).
Signed-off-by: Rafal Redzimski <rafal.f.redzimski@intel.com>
Access to objects, defined with a SHARED_DATA attribute should only
be performed, using the platform_shared_get() function at run-time or
using cache_to_uncache_init() at initialisation time.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Access to objects, defined with a SHARED_DATA attribute should only
be performed, using the platform_shared_get() function at run-time or
using cache_to_uncache_init() at initialisation time.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
cache_to_uncache_init() is needed to convert addresses from cached to
uncached aliases in a preprocessor-friendly way. Add it to all
platforms.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Access to objects, defined with a SHARED_DATA attribute should only
be performed, using the platform_shared_get() function.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Access to objects, defined with a SHARED_DATA attribute should only
be performed, using the platform_shared_get() function.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Access to objects, defined with a SHARED_DATA attribute should only
be performed, using the platform_shared_get() function.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
notify_data is a name of a structure, a field in a structure, a
static object and a local variable in several functions. Use a
different name to at least avoid conflicting static and local
variables.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Access to objects, defined with a SHARED_DATA attribute should only
be performed, using the platform_shared_get() function.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
mn is a name of a structure, a field in a structure, a static object
and a local variable in several functions. Use a different name to at
least avoid conflicting static and local variables.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
pipeline_posn is a name of a structure, a field in a structure, a
static object and a local variable in several functions. Use a
different name to at least avoid conflicting static and local
variables.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Shared objects are placed into a separate section to make sure they
don't share cache lines with core-local data. This must also be done
in single-core configurations because those configurations perform
uncached access and manage cache manually too.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Fix fw panic in ipc4 linux driver test. When dai
and host are in different pipelines, dai pipeline may be
prepared after host pipeline, in this case we can't get
dai position. The pipeline of copier component is set
when pipeline is prepared, now set it in initialization
function to avoid above case.
Signed-off-by: Rander Wang <rander.wang@intel.com>
Current RTNR version( 20220314 ) requires about 320KB heap memory, which is a little bit larger than previous versions.
Signed-off-by: Ming Jen Tai <mingjen_tai@realtek.com>
Move software configuration from Zephyr samples directory
to SOF platforms directory using Zephyr overlay mechanism.
How it works:
1. Gets zephyr board defconfig values
2. Applies Zephyr samples prj.conf values on top of it
3. Then applies our new overlay.conf on top of it
4. Final "summary" of Kconfig settings is written to autoconf.h header
Signed-off-by: Andrey Borisovich <andrey.borisovich@intel.com>
Remove the extra module_process() call when the init_done flag is not
set. Pass all the available bytes to the codec's process callback and
let it handle initialization and processing depending on the number of
bytes available.
Modify all codec implementations to perform init in their first process
callback so as to not break bisect.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Move the check for required data for each process callback into the
individual codec implementation. This is in preparation for removing
in_buff_size from struct module_processing_data eventually.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Progress bar of audio player disappears when it is dragged by
mouse. In this case pipeline is first paused then reset, paused
started again. Cd data is initialized when copier is created and
will not be initialized again after reset operation, so we can't
clear cd data in reset state, only reset stream position and used
dai or host.
Signed-off-by: Rander Wang <rander.wang@intel.com>