Before the introduced optimization in
commit <95f6f88be705> ipc: Simplication of the ipc_get_ppl_comp function
this function first walks a list of components looking for dai,
then it again walks the list looking for a component which
connecting two pipelines. Optimization changed the behavior,
and the first matching dai or connector was returned. This
patch reverts to the previous behavior. Pipelines connector
is only returned if no dai is found.
Fixes#6003
Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
add hifi version implementation of apply_attenuation, using xtensa
instructions can save about 74% cycles than the original one.
Signed-off-by: Andrula Song <xiaoyuan.song@intel.com>
Adds possibility to connect single mixin to multiple
mixouts. This allows for all possible mixin/mixout
topologies.
Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
Add sram window structure to update window info
to host.
configure dma descriptor base and count during firmware bootup.
Signed-off-by: Balakishorepati <balaKishore.pati@amd.com>
RT1316 is exposed by the machine driver as having an echo reference,
so the indices are different from the regular ones.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Somehow we assumed that all ADL platforms support BT_OFFLOAD. Wrong,
this is only valid for Chromebooks and needs to be set externally in
the CMakeFiles definitions.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
HP Omen 16 devices have an amplifier on link3, add the required
configuration macro.
BugLink: https://github.com/thesofproject/linux/issues/3727
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
With the module conversion the parameter 'dev' of most function changed to
'mod', update the doxygen comment to generate correct information.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
New algorithm for calculating the pipeline latency based on
the number of buffered data blocks between the first and last
component.
Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
Created new function comp_get_base_module_cfg which allows
to get component's base configuration. This function is still
access a component's private data in ugly way but it allows
solve this issue easier in the future.
Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
The ipc_get_ppl_comp function has been simplified by removing
the duplicate loop. Now the component list is only reviewed once
and both conditions are checked simultaneously.
Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
Declare node_id in ipc4_copier_gateway_cfg structure as aproprietary type.
This change makes easier to reference the node_id field. Thanks to it,
you don't have to wonder what type the value should be casted. It make our
work easier and minimize the risk of a mistake.
Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
The counting of processed data has been moved from a component
device structure to the components private data. Added a new
function for reading it.
Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
The counting of processed data has been moved from a component
device structure to the components private data. Added a new
function for reading it.
Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
I have added a new function to the component's api that allows
to read the total number of processed data by it.
Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
Removed from the dai_data structure the unused field start_position.
The assigned value was never used.
Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
Removed unused dai_pos and dai_pos_blks fields from dai_data
structure. No pointer was assigned to dai_pos.
Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
Generate 2 files for 1 and 2ch cases.
These topologies can be used by setting
options snd-sof-pci tplg_filename=<file>
in /etc/modprobe.d/alsa-base.conf
BugLink: https://github.com/thesofproject/sof/issues/5989
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
There are multiple cases where we cannot detect that PDM1 is used
instead of the default PDM0.
BugLink: https://github.com/thesofproject/sof/issues/5989
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
This will significantly speed up CI in some cases.
Fixes commit ffdf001eee ("xtensa-build-zephyr.py: clone zephyr with
--depth 5")
When I added --depth 5 to git clone in that commit I naively assumed git
fetch would "inherit" that. I think it does but only when fetching an
_existing_ (and shallow) branch, not when fetching something new.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Remove the assumption that the AEC reference was coming from a DEMUX.
It now uses the fact that the AEC reference comes from another pipeline
in order to detect it is the reference signal.
Signed-off-by: Lionel Koenig <lionelk@google.com>
To track the docker images, need to keep all the hashes of the projects
builts in the image. Log git tree information to
/home/sof/work/sof_git_hash.txt in the docker image.
Signed-off-by: Fred Oh <fred.oh@linux.intel.com>
This fixes the sof-docs build and stops producing a dai-drivers-api.html
garbage that randomly mixed the two .h files.
```
Warning: Duplicate target detected:
group__sof__dai__drivers_1ga8c720c310f408b2f97ce014562d6a910
sof-docs/api/dai-drivers-api.rst:4: WARNING: Duplicate ID:
"group__sof__dai__drivers_1ga8c720c310f408b2f97ce014562d6a910".
sof-docs/api/dai-drivers-api.rst:4: WARNING: Duplicate explicit target name:
"group__sof__dai__drivers_1ga8c720c310f408b2f97ce014562d6a910".
sof/sof-docs/api/dai-drivers-api.rst:6: WARNING:
Duplicate declaration, const struct device* dai::drv
```
(Temporarily?) fixes commit 015ec63c4d ("zephyr: add glue code to
use zephyr dai drivers") that introduced a lot of duplication with
dai-zephyr.h. See more details at
https://github.com/thesofproject/sof/pull/5731#issuecomment-1175630147
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Fixes doxygen warning:
warning: Included by graph for 'src.h' not generated, too many
nodes (111), threshold is 50. Consider increasing DOT_GRAPH_MAX_NODES.
This code is generated and pollutes doxygen output anyway.
Temporary, manual solution until the `\cond` directive is also generated
by the sof/tools/tune/src/*export*.m script(s)
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Fixes doxygen warning:
warning: Include graph for 'src_ipc4_int32_table.h' not generated, too
many nodes (89), threshold is 50. Consider increasing
DOT_GRAPH_MAX_NODES.
This code is generated and pollutes doxygen output anyway.
Temporary, manual solution until the `\cond` directive is also generated
by the sof/tools/tune/src/*export*.m script(s)
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
This should upgrade doxygen from version 1.8.17 to 1.9.1
This will hopefully provide FAIL_ON_WARNINGS and fix issues like
https://github.com/doxygen/doxygen/issues/7970
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
There are some restrictions when --fw-naming is set to 'AVS' for the
sake of providing reasonable FW outputs that make sense.
Restriction 1: When argument fw_naming is set as AVS, IPC4 ipc version
will be automatically chosen.
This is because --fw-naming 'AVS' is added for supporting IPC4 SOF build by
nature.
Restriction 2: When argument fw_naming is set as AVS, using platform
subdirectories will be automatically chosen.
The reason is that the platform subdirectories actually belong to the
"AVS" naming scheme, we must enable using platform subdirectories when
building FW in AVS naming convention.
This also ensure that we can tell firmwares of different platforms apart
by organizing them in different subdirectories.
Signed-off-by: Xiaoyun Wu(Iris) <xiaoyun.wu@intel.com>
Add argument option --fw-naming for specifying FW output with its
filename set with AVS style(filename as dsp_basefw.bin specifically)
OR SOF style(filename as sof-{platform}.ri). SOF style is by default.
This will be useful when building SOF+Zephyr IPC4 FW, because
dsp_basefw.bin will be loaded by default when snd_sof_pci parameter
ipc_type is set to 1 (which indicates running IPC4 mode).
Signed-off-by: Iris Wu <xiaoyun.wu@intel.com>
From time to time sof-docs regressions are introduced in sof.git. This
introduces a random and sometimes long delay between when the regression
is introduced and when it is found. A recent example is
https://github.com/thesofproject/sof/pull/5731#issuecomment-1175630147
where the doxygen comments were duplicated. Doxygen alone did not mind,
then the sof-docs build failed much later which took multiple people a
lot of time to understand and bisect.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Optimize the read frags of copier module in function
apply_attenuation. By using the optimized function
audio_stream_samples_without_wrap_s32, we can reduce
the address judgment and save about 60% MCPS.
Signed-off-by: Andrula Song <xiaoyuan.song@intel.com>
Quoting https://github.com/zephyrproject-rtos/zephyr/pull/46880#pullrequestreview-1020096140
> No complaints about the code here. Just a general comment:
> I do worry that as cavstool grows features (first to add the test
> integration support, now the new client/server architecture) that
> we're obscuring the core code that does the loading behind a big
> facade of other stuff that also has to be run In Just The Right Way to
> make things work. That impedes development flow. It might be time to
> split the code up so that a minimal "just run this file please" tool
> can continue to be maintained.`
Long story short: `cavstool.py` is likely to be split in the future.
To be readi-er, copy the entire `zephyr/soc/xtensa/intel_adsp/tools/`
directory.
Copying the entire directory also copies scripts that will never be used
on a test device like `cavstool_client.py`. They're small Python script
sso we don't care: keep it simple.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
When the host pipeline and DAI pipelines have the same scheduling
period, the host pipeline will be prioritized over the DAI pipeline when
the scheduler picks a task to execute after receiving a pipeline trigger
IPC.
But in the case that the host pipeline's scheduling period is larger
than that of DAI pipeline, the DAI pipeline task will likely get
executed before the host pipeline gets the chance to execute the trigger
command. And when this happens, the state of the aborted flag is
insufficient to determine if the pipeline task should be kept running or
completed. For example, consider the mixer based pipelines in the
nocodec topology:
PCM0 (pipeline 11, 1ms period) ---> Volume -----|
V
Mixer (Pipeline 1, 1ms)----> SSP0
^
PCM3 (pipeline 7, 10ms period ) ---> Volume -----|
When PCM 3 is started and the START trigger completes, the aborted flag
for pipelines 7 iand pipeline 1 will be reset. And when PCM 3 is paused,
the PAUSE trigger is scheduled for both the pipelines 7 and 1. But since
pipeline 1 has a lower latency requirement than pipeline 7, it gets
scheduled first and because it is not the host pipeline, the trigger is
not executed and the aborted flag is not set, the task gets completed and
a subsequent release for PCM 3 ends up in an IPC timeout.
To fix this, add a new flag called pending to the pipeline trigger that
can be set when a pipeline trigger is scheduled for a pipeline. This flag
must be cleared when the first component in the pipeline executes it's
trigger op. This flag combined with the aborted flag are sufficient to
prevent the IPC timeouts for the cases where the DAI pipeline task executes
ahead of the host pipeline when the trigger has not been executed yet.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Consider the mixer-based pipeline in the nocodec topologies:
PCM0 (pipeline 11) ---> Volume -----|
V
Mixer (Pipeline 1)----> SSP0
^
PCM3 (pipeline 7) ---> Volume -----|
When PCM0 is started it triggers pipelines 7 and 1. When PCM3 is
started followed by PCM0, it will trigger pipelines 11 and 1. But since
pipeline 1 is already is started, it's aborted flag will be set.
But the aborted flag is never cleared for pipeline 1 because it is
not the host pipeline.
Fix this, by clearing the aborted flag for non-host pipelines in
pipeline_task_cmd()
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
We should set num_audio_formats in pipelines when we remove the
default value from gain.conf.
Otherwise, we will see below error with cavs-mixin-mixout-hda-2ch-tgl.tplg
tplg: ready widget id 2 pipe 1 type 6 name : gain.1.1 stream none
Fixes: 773a05a3 ('topology2: add S24LE support')
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Instead of acquiring and releasing buffers locally multiple times,
do that once for .copy() and .prepare() methods.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Instead of acquiring and releasing buffers locally multiple times,
do that once for .copy() and .prepare() methods.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>