The optimized processing functions are handled other way,
so these processing set functions were never used for the
purpose of selecting different code versions.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
The memset() is unnecessary because the same cd->out clear
is done in function tdfb_core().
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Even with the cryptographic salt, the ability to match a download with
the corresponding build log is still useful.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Delete per-platform, "build-sof-staging/sof/intel/sof-ipc4-lib/mtl/"
directories every time just like we've always done it for
"build-sof-staging/sof/intel/sof-ipc4/mtl/". This is especially
important considering the new LLEXT complexity, symbolic links etc.
There is no way the build can be smart enough and extend "incremental"
builds to the staging directory.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Reset the llext.uuid file so it does not start with content from the
previous build.
Fixes LLEXT incremental builds which apparently never worked (some
people like it slow?)
Fixes commit 05e69e1bb9 ("llext: update to use add_llext_target()")
and the ones before that.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Fixed a problem with generic implementation
of function vol_passthrough_s16_to_s16.
Corrected Pointer Types. Variables x and y are
treated as int16_t pointers since we are dealing with 16-bit samples.
That was tested in test:
test_01_09_peakvol_quality[44100Hz_16in16bit_1ch-0]
Signed-off-by: Grzegorz Bernat <grzegorzx.bernat@intel.com>
Add a new overlay to enable logging via winstream backend. This is
alternative memory window based logging backend that typically
uses memory window 3 as transport. The backend is directly
using Zephyr winstream protocol, and has no dependency to SOF
IPC definitions.
One client is available in Zephyr upstream at:
zephyr/soc/intel/intel_adsp/tools/cavstool.py
Note: winstream backend is not supported by Linux SOF driver.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
The previous memory mapping function did not work properly if the buffer
size exceeded the memory page size. In this case the size of the region to
be checked passed to the sys_bitarray_is_region_cleared function was zero,
causing the function to always return false. As a result, the allocator
stated that a page was already mapped for a given address and did not map
it. This led to a cpu exception when trying to access the allocated buffer.
The function responsible for unmapping memory had a similar problem.
Additionally, the size of the freed area was incorrectly determined and
an incorrect offset was passed to the sys_bitarray_is_region_cleared
function.
New functions have been created to map and unmap memory pages for allocated
buffers. It don't need allocation of temporary array and manipulation of
memblocks bitarray.
Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
A macro was used to statically initialize the vmh_list list head. This
allowed to resign from calling a function whose only task was to initialize
the list header. This function was removed as no needed anymore.
Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
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>