The dmic-wov.conf file implements the WOV feature. The connection is
DMIC ------> KPB ------------------------------> host_copier
| ^
| |
|----> micsel ----> wov ------> virtual_widget
The DMIC and KPB is on DAI ppl.
The host_copier is on Host ppl.
The micsel, wov and virtual is on wov ppl.
The connection between host_copier and virtual_widget is a
virtual connection. The virtual_widget doesn't exist in the FW.
Signed-off-by: Libin Yang <libin.yang@intel.com>
wov-detect pipeline contains a micsel component, a wov component
and a virtual component. micsel component accepts 2 channels audio data and
output 1 channel audio data to the wov component. wov's keyword is a clap.
The virtual component is only used by the driver, and the FW will not
know that there is a virtual component in the pipeline. The virtual
component is used to connect the pipeline to a host copier pipeline
as per drivers requirement.
Signed-off-by: Libin Yang <libin.yang@intel.com>
Add the kpb component support. kpb component is used to transfer
the data to the proper pipeline based on the WOV component events.
Signed-off-by: Libin Yang <libin.yang@intel.com>
Add the audio channel selection component support.
In case 1 output channel is selected, the component provides
the selected channel on output. In case 2 or 4 channels are selected on
output, the component works in a passthrough mode.
Signed-off-by: Libin Yang <libin.yang@intel.com>
The token payload_with_output_fmt is process module specific,
so set it as a process module token.
Signed-off-by: Chao Song <chao.song@linux.intel.com>
Signed-off-by: Libin Yang <libin.yang@intel.com>
Fix address space conflicts caused by bf7aa04890 ("mixout: Convert
component to use the module adapter")
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Fix address space mismatch, caused by 133eecb132 ("module_adapter: Add
APIs for coherent module source info access").
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Allocating objects, intended for use with the coherent API must use
specific flags and align allocation size on a cache-line size
boundary. To rid users of these details integrate allocation and
freeing into coherent_init*() and coherent_free*() respectively.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
This patch fixes D3 issue - now platform enters and wakes up from
D3 correctly on first iteration. This had been achieved using Zephyr
cpu function call that redirects D3 flow to power down assembly code
sending IPC response to host just before powering down.
Signed-off-by: Andrey Borisovich <andrey.borisovich@intel.com>
Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
Zepych update: total of 73 commits.
Changes include adding power domains to DMA interfaces and allowing to
skip context save during d3.
Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
Preventing d0i3 state during IPC processing in case if a host previously
allowed for power state transitions. Transition can occur only in the
Idle thread and this lock acts as a safeguard in case of the remaining
threads to be non active (e.g. waiting for a semaphore).
The advantage of this solution is that we do not risk bypassing the
prevent. PM state lock (get and put) require that their calls be
balanced. One more put or get will result with hard to debug error. For
example we can end up with permanent prevent on power gating.
Original code introduced here: ae4e037b0
Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
The generic module_set_configuration function returns 0 early when
the coming config size is 0. In aspect of DTS module, receiving 0
from module_set_configuration call means either config is obtained
succesfully or no config (size is 0). The present code doesn't
handle the latter case.
This commit handles the case in DTS module by early return.
Signed-off-by: Pin-chih Lin <johnylin@google.com>
In DTS module m4 file, the default control bytes used to have a
12-byte redundant param {0x0000, 0x000c, 0x0000}, the param id is
0 (the first 4-byte).
For DTS SDK version >= 1.0.8, error is reported while getting the
param with id=0.
This commit removes the redundant param from default control bytes.
Signed-off-by: Pin-chih Lin <johnylin@google.com>
Due to allocation failures, or invalid content in dictionary,
"params" entries in "struct proc_ldc_entry" may be NULL.
In print_entry_params(), the NULL entries may be passed
as arguments to fprintf(). While e.g. glibc handles these without
error, this is not guaranteed behaviour and may result in segfault
on some platforms.
Fix the issue by aborting program if allocation fails and
explicitly handling the cases when asprintf_entry_text returns
NULL.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Until now, one dma channel could be stopped multiple times without any
problems. From commit af6d827b64 on zephyr it is required that the start
and stop calls be perfectly balanced.
Zephyr device power manager stores an internal counter. Counter is
incremented if device is used and decremented on device release. In this
case when we call dma_start() and dma_stop().
If dma_stop() is called more times than dma_start() power manager will
reaport a error -EALREADY.
Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
Github allows to store build artifacts for 90 days after the build.
Somebody might want to examine the output of the build, now can
easily download everything that job produces.
In example, compile_commands.json file contains all compilation
commands in verbose that are not visible in the build log
by default.
Signed-off-by: Andrey Borisovich <andrey.borisovich@intel.com>
Recently new feature had been introduced to Github actions
"concurrency" that allows to define a name for a group of workflows
that will cause old workflow to stop if the new one had been created
and the group name matches.
This improves usage of resources in SOF project by cancelling
running workflows when pushes to pull requests are done frequently
before old jobs are completed.
Signed-off-by: Andrey Borisovich <andrey.borisovich@intel.com>
Zephyr workflow had been added new build-windows job.
It makes sense to rename old "build" job yo "build-linux"
for consistency.
Signed-off-by: Andrey Borisovich <andrey.borisovich@intel.com>
During testing of Windows CI workflow on windows-latest turned out
that github action console has issues rendering python
anytree.RenderTree graph with default style of
anytree.render.ContStyle (continuous vertical and horizontal lines).
Tests on local machines in cmd, pwershell and msys shells
proves, that all shells can render the graph (while powershell
does not do this correctly and graph is malformed).
Changing graph style to ASCII resolves the issue with Github actions.
Signed-off-by: Andrey Borisovich <andrey.borisovich@intel.com>
With IPC4 only two 32-bit values are copied from the host in the
common part, anything beyond that must be copied separately. Those
two values are stored in a global msg_data.msg_in object. Therefore
always when reading from it only up to 8 bytes should be read. In
most cases it is also the case, because the target object has the
same size, but in case of SOF_IPC4_MOD_INIT_INSTANCE this isn't the
case, there special care must be taken.
Also remove a redundant NULL check where NULL cannot appear.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
localtime() can return NULL in error cases. Check the return value
before dereferencing it.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Fix a case of a possible array overflow, detected by static code
analysis.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Finish the job that commit 5b29dae9c8 ("logger: Create global
convert_config variable to avoid spaghetti code.") started but did not
complete, leaving a confusing mix of globals and locals.
This confuses some static analyzer complaining that stack values are
being returned, see #6858 and #6738. This is a false positive because
convert's() stack lifespan is practically the same as a global but let's
simplify things anyway.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Finish the job that commit 5b29dae9c8 ("logger: Create global
convert_config variable to avoid spaghetti code.") started but did not
finish, leaving behind a supposedly "global" variable that is actually a
confusing global pointer to a struct local to the main() function.
This confuses some static analyzer complaining that stack values are
being returned, see #6858 and #6738. This is a false positive
because the main()'s stack lifespan is the same as a global but let's
simplify things anyway.
Also stop using 'extern' in .c files, use a proper .h file instead.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
sof-logger -u 115200 -d /lib/firmware/sof-foo.ldc
Leads to silent failure as a NULL is passed to open(). Add
explicit error handling for this case.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
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>