IADK processing module interface uses uint32_t return code
while cSOF is using int type. This patch checks return value
from processing() method and returns -ENODATA in case of
failure.
Signed-off-by: Jaroslaw Stelter <Jaroslaw.Stelter@intel.com>
Copier missed ibs(384)/obs(192) case, and eq-iir missed
ibs(384)/obs(384) case, adding it to current CPC config for mtl.
Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
The pipelines for PCM0 and PCM1 only support S32_LE audio
format. Fix the PCM capability descriptions to match the actual
pipeline definitions. This allows to run test suites that enumerate
all support PCMs and their formats.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
After https://github.com/thesofproject/sof/pull/8594 been merged, sources
and sinks are now setup on .bind() and .unbind(). Previously they were
setup in .prepare(). However, there were code left in
module_adapter_reset() which clears sources and sinks arrays. That broke
some tests: modules which use source/sink API stopped working correctly
after pipeline reset.
Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
The mixer control for switch is added to widget definition
of drc.conf.
In cavs-mixin-mixout-efx-hda.conf the existing control name
is changed to have "bytes" similarly as multiband-drc has. The
switch control is added for the widget to implement the switch.
The controls definitions files in benchmark topologies are replaced
to new format from current .conf generator script. The bytes control
is same as before, and the mixer control for switch is added.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch adds to DRC component in IPC4 mode a control to
switch processing on/off. The control is useful for DRC
pipeline that is used for both headphone (unprocessed) and
speaker (processed). It also allows the user to switch off
DRC processing if desired.
If a blob has enable set to false the processing cannot be
enabled with the switch control. If the blob enables processing,
the user space can control processing on or off.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Split TOML configuration files into platform and module parts. Use
the C preprocessor to merge them back together.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Previously when channel remapping was supported processing was done
iterating by frames. After channel remapping was removed processing
was changed to iterate by samples, however, for some reason the code
still uses confusing "frame" variables.
Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
Previously we had "normal" and "channel remapping" modes. Since channel
remapping mode was removed, "normal" is the only supported mode, no need
to prepend names with "normal".
Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
Mute channel functionality was previously used as part of channel
remapping feature. Since that feature was removed some time ago mute
channel functionality is no longer used and is just a leftover from not
fully completed cleanup.
Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
DP may produce a huge chunk of output data (i.e. 10 LL
cycles), and the following module should be able to
consume it in 1 cycle chunks, one by one
unfortunately LL modules are designed to drain input
buffer
That leads to issues when DP provide huge data portion
FIX: copy only the following module's IBS in each LL cycle
Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
Update Zephyr to bring in total of 169 commits, including
the following related to SOF targets:
dab6f665ca77 xtensa: fix build errors with cache functions
039e5ef1b813 intel_adsp: remove rimage sign() from `west flash`
c7e3ccd51ad4 drivers: dma: intel_adsp_gpdma: fix issue with stop and PM refcounts
Link: https://github.com/thesofproject/sof/issues/8503
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
lets assume DP with 10ms period (a.k.a a deadline).
It starts and finishes earlier, i.e. in 2ms providing 10ms of data
LL starts consuming data in 1ms chunks and will drain
10ms buffer in 10ms, expecting a new portion of data on 11th ms
BUT - the DP module deadline is still 10ms,
regardless if it had finished earlier and it is completely fine
that processing in next cycle takes full 10ms - as long as it
fits into the deadline.
It may lead to underruns:
LL1 (1ms) ---> DP (10ms) -->LL2 (1ms)
ticks 0..9 -> LL1 is producing 1ms data portions,
DP is waiting, LL2 is waiting
tick 10 - DP has enough data to run, it starts processing
tick 12 - DP finishes earlier, LL2 starts consuming,
LL1 is producing data
ticks 13-19 LL1 is producing data,
LL2 is consuming data (both in 1ms chunks)
tick 20 - DP starts processing a new portion of 10ms data,
having 10ms to finish
!!!! but LL2 has already consumed 8ms !!!!
tick 22 - LL2 is consuming the last 1ms data chunk
tick 23 - DP is still processing, LL2 has no data to process
!!! UNDERRUN !!!!
tick 19 - DP finishes properly in a deadline time
Solution: even if DP finishes before its deadline,
the data must be held till deadline time, so LL2 may
start processing no earlier than tick 20
Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
The IADK libraries should support source/sink interface. This patch
changes IADK adapter part to implement source/sink interface.
Signed-off-by: Jaroslaw Stelter <Jaroslaw.Stelter@intel.com>
These three functions are called by external modules and its prototype
is not defined with inline, also these functions are not performance
critical function, no need inline.
Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
This is a clean up, purpose is declutter headers, toml files,
Readme.md etc per module basis, since today everything is scattered
in current code base.
Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
This patch adds generation of a blob that applies about
10 dB gain with compression and additional post gain of
3 dB for strong loudness boost effect.
The drc_gen_coefs.m script is changed to display
the master linear gain as decibels to help achieve
suitable gain when setting parameters.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch updates the generator script example_drc.m with added
information how the blobs were created.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
These blobs are useful in setting DRC in runtime to
pass-through or strong compression mode to evaluate
performance.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This blob exercises fully the features of DRC and is
therefore useful for performance evaluation in all
operation regions.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This blob exercises fully the features of DRC and is
therefore good for testbench runs to evaluate performance
in all operation regions.
The pipeline pipe-drc-playback.m4 is used only with testbench
so it is safe to change to use this blob.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Put the data availability checks behind a build option (new option
CONFIG_DAI_VERBOSE_GLITCH_WARNINGS). In normal conditions, the DAI copy
should never be called in a condition when there is no data to be
copied. The audio interface is running and needs a constant stream of
audio samples, so there is no remedy for not having data. In practise,
most of the DAIs have a small buffer and can survive transient small
gaps in data flow.
The existing code has warning level logs for this condition. This is
very useful for debug, as many common problems in firmware (and DSP
topologies) show up as delays observed in the DAI copy logic. For
product use, printing the warnings may make the situation worse by
increasing the DSP load at a time when it has just missed a deadline.
To allow for both debug and to avoid these checks in product
builds, move the related checks behind a separate build option.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
The default firmware file path is standardized among vendors as follows:
IPC3
/lib/firmware/VENDOR/sof/
├── community
│ └── sof-PLAT.ri
├── dbgkey
│ └── sof-PLAT.ri
└── sof-PLAT.ri
IPC4
/lib/firmware/VENDOR/sof-ipc4/
└── PLAT
├── community
│ └── sof-PLAT.ri
├── dbgkey
│ └── sof-PLAT.ri
└── sof-PLAT.ri\n
Currently the binaries created by the build can only be used for direct
deployment on IPC3 platforms but if one builds different vendor firmwares
the files have to be manually picked and sorted out.
We have two flags: --fw-naming and --use-platform-subdir which can be
played with but still not going to produce deployable build.
Introduce a new flag: --deployable-build
With the flag specified all other modificators are going to be ignored and
the build will do the 'right thing' to create a directory structure which
can be deployed as it is to the target's firmware directory.
To achieve this several changes needed:
PlatformConfig:
- drop the name member and replace it with a vendor string
- add a flag to indicate IPC4 platforms
Later a new option can be added if needed for platforms which can be
IPC3 or IPC4
Ignore fw-naming and use-platform-subdir in case of deployable build. The
options will be reset to their default in case they are changed.
symlink_or_copy extended to handle relative symlinks when the target and
link is not under the same directory.
The --deployable-build is disabled by default, it has to be enabled to
create deployable build for now.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Print platform alias information to reduce the need for guessing when
trying to figure out what platform supports what platform.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
The following aliases are missing:
tgl: adl-n, rpl
tgl-h: rpl-s
mtl: arl
Update the aliases list accordingly.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
We want to catch warnings like the incompatible pointer warning fixed by
3f572b8cb6 ("Audio: ASRC: Fix the IPC3 incompatible pointer type")
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
This patch adds build of hda-generic development topologies to
test IGO NR component with all s16/s24/s32 formats.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
It may happen that a demux is configured to write to a buffer in a
stopped pipeline (consider echo cancellation when the mic is not in
use: the output reference stream has nowhere to go). This doesn't
work in the tree currently; the general pipeline design is to try to
turn on pipes that are required, but that's incomplete for the case
(again, echo cancellation) where the pipelines are oriented in
different directions and in any case is undesirable as a microphone
stream shouldn't be required to be active for playback to work.
Instead, detect the situation at PRE_START time, configure the output
buffers overrun_permitted (as there may not be a reader), and drop the
unconfigured streams dynamically at process() time, as the target
pipeline may be started up at arbitrary moments. When it starts,
we'll begin emitting output at the first process callback as desired.
Signed-off-by: Andy Ross <andyross@google.com>
This patch enables clock gating in configurations of a ace platforms.
With CONFIG_ADSP_IDLE_CLOCK_GATING enabled clock gating is always
enabled during WAITI.
Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>