Add DMA_DOMAIN variable and based on this we set
SCHEDULE_DOMAIN to SCHEDULE_TIME_DOMAIN_DMA, otherwise
is SCHEDULE_TIME_DOMAIN_TIMER.
Now, only i.MX8MP is using SCHEDULE_TIME_DOMAIN_DMA.
Therefore the DMA_DOMAIN is added only for 8MP topologies.
Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
__udivdi3 isn't defined on LP64, don't export it.
Fixes: a306792a68 ("llext: add missing symbol exports")
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
This patch defines e.g. for sof-hda-generic-2ch.tplg DMIC0 only
stereo formats as s16/24/32. Similarly for e.g. sof-hda-generic-4ch.tplg
only four channels formats are defined.
The reduction of input formats options avoids the issue with kernel
that it possibly selects invalid channels count for DMIC0 DAI when
the channels count in connected pipelines varies due to processing
components.
The output formats are reduced similarly since copier always has
the same input and output channels count.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
The tplg1 blobs are still used with IPC3 testbench test pipelines.
The updated script example_drc.m exports the blob used for DRC
test with name "speaker_default" so, the blob file name to include
to test pipeline is changed. The blob content is same as before.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
A DRC blob for capture dmic_default is created. It boosts the capture
by 10 dB when the signal level is low.
The name of speaker blob is changed to speaker_default. The name with
endpoint name first helps to organize them e.g. in UCMv2 blobs data
directories.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Query the list of available devices and use the NPU if available,
otherwise compile the model for the CPU.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
The code in tdfb_params() was incorrect for a component that can
have different number of channels in source and sink. The update
of sink format can it worst case crash the successive component
in pipeline if the source channels count has changed from the
value the component has been initialized for.
The channels count need to be retrieved from input and output pins
information in extended IPC4 base config. To get the extension the
rimage toml files need to add for TDFB component the line
init_config = "1".
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Fast-forward Zephyr by 700+ commits including following patches
affecting SOF build targets:
ae082064ffa5 drivers: dai: sai: write some data into TX FIFO before start
0ca7ef78bc50 soc: intel_adsp: tools: merge cavstool.py and acetool.py code
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
For some reason the sof-mtl-rt712-l0 topology was not created despite
being listed in the kernel, and we now need the rt712 VB support with
an additional SmartMic path.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Fast-forward Zephyr by around 300 patches, including following
affecting SOF build targets:
soc/intel_adsp: ipc: initialize semaphore in driver init
drivers: dai: ssp: fix MN_MDIVCTRL_M_DIV_ENABLE for ACE+ platform
drivers: dai: intel: ssp: Only setup mclk/bclk when it is needed by role
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
This patch adds s16/s24/s32 format test topologies for the
time domain fixed beamformer component.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Some components like mixin-mixout implement multiple modules
internally. They should be handled by LLEXT as a single ELF object,
including for use-counting. But at the SOF level they implement
multiple module adapter drivers.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
If module_adapter_new() fails in lib_manager_module_create(),
lib_manager_free_module() must be called to free allocated resources.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Export additional symbols, needed for modules like eq_iir and
mixin-mixout.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
west.configuration.get() already returns a string, no need to call
'str()' on it again.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Zephyr now provides a convenient cmake API for LLEXT modules, update
SOF to use it by defining common cmake functions.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Add 3 macros to simplify LLEXT module implementation and use them in
mixin-mixout and eq_iir. Only two of them can be used in
smart_amp_test_ipc4.c so far, because it's also used for LMDK-style
module building.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
When compiled with '-std=c99' or newer 'typeof' is unavailable and
'__typeof__' should be used instead [1].
[1] https://gcc.gnu.org/onlinedocs/gcc/Alternate-Keywords.html
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
This commit refactors the memory power management register access to use
the HPSRAM_REGS and LPSRAM_REGS macros instead of direct io_reg_read calls.
Signed-off-by: Damian Nikodem <damian.nikodem@intel.com>
Dp queues are no longer kept as a list of objects,
remove unused list maintenance code and data
Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
Instead of creating dp_queue in module adapter, use shadow
buffering provided by comp_bufer
It simplifies the code and makes it more race-resistant
Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
Connection between LL and DP component is implemented bu using
double buffering - between comp_buffer and DP component there's
additional "shadow" dp_queue
Currently shadow buffers are created in module adapter in "prepare"
handler and freed in "reset" handler. It may lead to races when there
are bind/unbind operation between a components in separate pipelienes,
especially when one of the pipelines is already running
The commit makes shadow dp_queue to be a part of comp_buffer. When
shadow is created, it replaces source or sink interface of audio_stream
allowing the module connected to it using all properties of dp_queue,
like lockless cross-core connection.
Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
as agreed some time ago, parts of structures
that should not be modified or accessed directly
("private") should be marked with _ prefix
https://github.com/thesofproject/sof/issues/8100
Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
The check of cd->ipc_config.base.audio_fmt.depth results to
select S32_LE format processing function for SRC when the format
is S24_LE. The check need to be done for valid_bit_depth instead.
The S32_LE function appears to work but any sample that exceeds
the range -2^23 .. +2^23-1 is overflow for S24_le. Also the use
of S24_LE processing core will improve the signal-to-noise ratio.
Reported-by: Tomasz Leman <tomasz.m.leman@intel.com>
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Suppress the existing 'deep buffering' feature in the case of Cadence
encoders. This prevents the encoder output stream from being expanded
with (inappropriate) all-zeros leading data.
Signed-off-by: Tomasz Lissowski <tomasz.lissowski@intel.com>
Convert LNL to a modular TOML layout. Many modules have different
configurations for different platforms. In this version we put them
all in respective TOML files directly. If desired, they can be later
extracted into per-platform files. This can be done on a per-module
basis, in which case individual commits will be small.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
This patch allows the kernel to choose 16 bit format if the DMIC
NHLT is missing the recommended 32 bit mode blob. The 24 bits is
also in theory possible so it is added for completeness.
The DAI copier is converting the output format for internal pipelines
into S32_LE format, so the other operation is not impacted. For systems
with 32 bit DMIC NHLT there is no impact.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Always use a "raw string" for regular expressions, otherwise the
backslash is used to start Unicode escape sequences.
Fixes hopefully harmless error:
```
scripts/llext_link_helper.py:38: SyntaxWarning: invalid escape sequence '\.'
p = re.compile('(^lib|\.so$)')
```
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Clarify documentation of SAMPLE_TYPE_MSB_INTEGER sample type
value and fix documentation of SAMPLE_TYPE_LSB_INTEGER. These
definitions are often confused with integer endianness, which is
not related. Clarify this better.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Upstream Zephyr moved the LLVM fuzzer entry point out of the arch
layer and made it an app responsibility, so we broke. Add back the
support here that got removed.
Fixes#9101
Signed-off-by: Andy Ross <andyross@google.com>
Two configurations for sof-mtl-rt713-l0-rt1318-l12-rt1713-l3 and
sof-mtl-rt713-l0-rt1318-l1-rt1713-l3.
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
In commit 14c4e86757 ("audio: base_fw: add platform layer to IPC4
hw_config data"), the platform specific code was moved to platform
layer.
This commit implements a lighter weight abstraction for the moved
code. Instead of using the platform layer, the Intel specific vendor
code is added directly in base_fw_intel.c and guarded by a Kconfig.
All other IPC4 build targets will use an empty implementation.
This avoids the need to add a platform definition for all IPC4 targets.
The common implementation in base_fw.c is sufficient to cover all
mandatory functionality required e.g. by the upstream SOF Linux driver's
IPC4 implementation.
The interfaces are renamed to refer to "vendor" instead of "platform",
to avoid any confusion with the platform layer with the new
implementation.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Install loadable LLEXT modules into the deployment tree and
create symbolic links for them.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
When building smart-amp-test as a module, we also need to
preprocess its TOML configuration file. Add it to cmake.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
To be able to build and sign multiple modules within one build we
need to unify name generation. For signing we invoke something like
west sign -i smart_amp_test
which means, that the west sign utility must be able to locate the
module binary directory and recognise files in it using only that
input file name. It will then create signed llext images inside those
binary directories too, so that deployment scripts can find and
recognise them there. We unify the naming as
${MODULE}_llext - for the binary directory,
${MODULE}.so - ELF file for signing in that directory
${MODULE}.llext - final signed extension
llext.uuid - a file with a list of UUIDs, provided by this extension
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
When installing modular components we need to create UUID-based soft
links. Create a separate file with a list of UUIDs to assist in that.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>