Convert the mixout module to use the module adapter. The
bind/unbind/get_attribute ops in the mixout module have been moved to the
module_adapter ops and is functionally the same as with the comp_drv
ops.
The struct mixout_data struct has been simplified to contain 2 fields as
the source info table has been moved to struct processing_module and
rename the consumed_yet_not_produced_frames field in struct mixout_data
to pending_frames.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Initialize the hw_params to 0 before passing it to the individual
components in the pipeline.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
The check for status counts for modules with multiple sources is only
applicable for IPC3.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
When module_reset() returns a non-zero value, print an error if needed
and return immediately.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Define the bind/unbind comp driver ops for the module_adapter which will
be used to update the source device pointers in the source_info table.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Add module_source_info_acquire/release() for coherent access to the
module's source_info data.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Introduce struct module_source_info that will be used to keep track of
all the source modules that are bound to a module. Also, add a new
field, source_info in struct processing_module to save the source
information for each module.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
On my system this brings the install_platform() duration down from about
3 seconds to less than 1 second.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
This patch adds to development topologies build of minimal topologies
sof-apl-pcm512x-drc.tplg and sof-apl-pcm512x-mdrc.tplg for testing.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
When dev->state == requested_state in comp_set_state then
COMP_STATUS_STATE_ALREADY_SET (status 1) is returned.
Then the pipeline trigger is aborted and status 1 is returned
to the pipeline_task_cmd function (status 1 in this function means
PPL_STATUS_PATH_STOP). Finally, the status of the pipeline
does not change and the IPC response returns success.
which causes errors with subsequent changes in the pipeline state
(INVALID_IPC_REQUEST)
Signed-off-by: Kwasowiec, Fabiola <fabiola.kwasowiec@intel.com>
In the lib_manager_dma_deinit() function proper checks
for dma_ext structure fields must be added to avoid
calling dma api with uninitialized parameters.
Signed-off-by: Jaroslaw Stelter <Jaroslaw.Stelter@intel.com>
Use a local variable in ipc4_get_buffer() to simplify it and remove
redundant code.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
This is a theoretical case of an invalid pipeline status, handle it
correctly.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
If the main context variable is NULL, it cannot be used to print an
error message. Since this actually should never happen, use an
assertion similar to other similar cases in the file.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
The create_dai() function can return an uninitialised value. Fix it
by reducing the scope of the variable.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
In user-space tools, memory allocations can reasonably be expected to
always succeed. Make this assumption explicit by adding error handling
after calloc.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
In user-space tools, memory allocations can reasonably be expected to
always succeed. Make this assumption explicit by adding error handling
after malloc.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
A pipeline that contains a selector cannot be run before the pipeline
that is connected to the selector because an error is returned.
The order of the run pipelines should not matter for functionality.
Signed-off-by: Kwasowiec, Fabiola <fabiola.kwasowiec@intel.com>
In theory a failure from this script should immediately stop the show
and no one should then use the staging directory.
In practice we cannot make sure, especially not with shell scripts. So
make sure no previous build of a requested platform is left behind.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
lib-manager allocated memory for library modules with a cached alias
and explicitly synchronises cache in it (apparently superfluously).
Add cache address space annotations as needed.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
src_info, as returned by find_mixout_source_info(), is a part of
mixed_data_info which is explicitly cached. Annotate src_info to be
the same.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
cache_to_uncache() and uncache_to_cache() must be inline functions
with proper argument annotations. Fix ACE definitions by alanogy with
cAVS.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Cached addresses aren't used to access the hardware in mailbox.h,
they don't need to be volatile.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
This upgrade was already performed for other jobs in commit
f71eb15818 (".github/workflows: upgrade actions/checkout@v2 -> v3")
and everything went fine. Finish the job and get rid of the last
warnings in the daily tests (example:
https://github.com/thesofproject/sof/actions/runs/3709176785)
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
The dai_index needs to be mapped similarly as in kernel. The SSP
type was handled correctly in the function but not DMIC.
Signed-off-by: Jaska Uimonen <jaska.uimonen@linux.intel.com>
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Smart amp test module read config from ipc msg and convert ipc4 settings
to ipc3. It is a dummy module used for smart amplifier validation.
Signed-off-by: Chao Song <chao.song@linux.intel.com>
Signed-off-by: Rander Wang <rander.wang@intel.com>
It uses spin lock to support mutex.
Suggested-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Suggested-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Signed-off-by: Rander Wang <rander.wang@intel.com>
CMake 3.21 changed the order object files are passed the linker. This
breaks build reproducibility.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Partial revert of commit 687c6f305e (".github: workflow: removed
legacy RTOS platforms from Zephyr build") that was a bit too
"enthousiastic".
When someone breaks the Zephyr+IPC3 build we'd like to: 1. notice, 2.
tell whether it's Intel-specific, IMX-specific or not specific.
This is a one-line change and unlike testing, building is "free".
It can be removed in a second when/if that becomes a burden.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
The list is getting too long and the "checks" box in the Github User
Interface is small.
Fixes commit 543acc124d (".github/workflows: add tgl-h IPC4 build")
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
It is not used so it can be deleted. There is no measurable
performance impact from this change.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
As a small improvement for 2-stage converters like 44.1 to 48 kHz
the s1_blk_in and s2_blk_out can be calculated once after the if
statement.
There is no measurable MCPS improvement from this change.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
There is no need for the if statement since the pointer data
always wraps at this code location if the next loop is executed.
Next FIR calculate will start with new data pointer value, so
potentially wrong pointer value when n2 equals zero does not matter.
This patch saves in CML gcc build 2%, or 2.0 MCPS from 46.2 to 45.3
MCPS in stereo 44.1 kHz to 48 kHz conversion.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Add back the mailbox_sw_reg_write inline function
to fix build error of mt8188.
sof/src/platform/mt8188/include/platform/platform.h: In function ‘platform_panic’:
sof/src/platform/mt8188/include/platform/platform.h:69: warning: implicit declaration of function ‘mailbox_sw_reg_write’
Signed-off-by: Tinghan Shen <tinghan.shen@mediatek.com>
Since Xtensa provides intrinsics for multi-way load/store
and using those instructions can reduce more cycles than
the function we using now, so there is a HiFi3 audio_stream
_copy implementation.
Signed-off-by: Andrula Song <xiaoyuan.song@intel.com>
.config is not deterministic because it has absolute paths in comments
and its order seems hard to predict. configs.c has the same information
generated in a determistic way.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Make sure any forward slashes in strings are immediately converted to
OS-dependent directory separators.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
The module operates on arrays whose size is based
on SOF_IPC_MAX_CHANNELS. Added check if the number
of channels given in the configuration does not exceed
the number of maximum supported channels.
Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
Add support for modules with multiple sources such as the mixer.
Expand the scope of the simple_copy flag in struct processing_module to
include components that have multiple input buffers but only a single
output buffer and do not need any deep-buffering.
Make changes to the prepare, copy and trigger callbacks in the
module_adapter ops to add support for handling multiple input buffers.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Add a new field, no_pause in struct processing_module which will be set
by modules that do not support pause, ex: mixer.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>