Not all configurations need LLEXT, don't include LLEXT support in
such cases.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Fixes, needed for a recent Zephyr head plus a PR to fix
CONFIG_LLEXT=n builds.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
The load of MFCC fails with testbench due to missing call of
sys_comp_module_mfcc_interface_init() in common_test.c
testbench initialize.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This was OK a few months ago, but something in recent SOF has expanded
stack requirements and we now get overflows. Move to 12k stacks when
AEC is enabled.
Signed-off-by: Andy Ross <andyross@google.com>
Commit 296af86f4c ("Audio: RTNR: Convert to module API") missed a
spot: the "rtnr_printf()" function, which is a logging callback from
the vendor library, was still using the comp_rtnr driver struct even
though it was no longer initialized. This contained a NULL trace
context, which would panic on use.
(That would then lead to a fun glitch where the reentrantly-confused
trace code would then panic inside the tracing done by the panic
handler, clobbering the original trace info and reporting to the kenel
that the fault was in panic_dump()).
This would have been fine with the stub, which does not call
rtnr_print(), only the real library would blow up.
Fix is to use the trace context directly, as we don't have a component
pointer here.
Signed-off-by: Andy Ross <andyross@google.com>
Zephyr places .bss into a separate section element, still if it's
immediately adjacent to writable data we can merge and allocate them
together.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
We map memory pages for loaded modules dynamically and we're able to
set memory flags for write access or for code execution. This commit
takes advantage of the recently added section grouping and maps the
three module parts separately: executable code, read-only data and
writable data, including zero-initialised .bss. This also cleans up
references, pointing into module storage in IMR instead of the mapped
addresses.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
When an LLEXT module contains multiple Module Adapter instances,
their manifests are stored in an array in the .module section. Those
array entries contain per-instance information like module entry
points, names, UUIDs, but ELF information is common for all
instances. Store it in the first array entry to avoid confusion.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
When dynamically mapping memory, we need to update access flags
according to the type of the mapping.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
We need to face with reality that the pause/resume is a feature that is not
well tested (end users are using audio via audio servers and they don't
use pause/resume) causing constant issues with no real life benefit:
With IPC4 multiple pause/resume will make the delay reporting to be
exponentially shoot out, making the reported delay to be unusable.
Looks like suspend/resume with paused stream has been broken for a long
time and just got noticed (since it was not tested).
Add a new token to allow selected PCMs to advertise pause support and
keep it false by default.
The kernel side will allow ignoring the flag to keep the pause advertised
for continued testing while protecting accidental use of it by users.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://github.com/thesofproject/linux/issues/5035
When using xt-clang we cannot build shared objects, so we use '-r' to
link relocatable objects. But the decision shouldn't be made based on
the name of the compiler, but based on the selected LLEXT_BINARY_TYPE
option.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
It was clear that hard-coded section names aren't reliable enough but
they broke down way earlier than has been expected.
This patch replaces hard-coded sections with a loop, scanning all
sections and selecting them based on their flags and types.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
When using a clang Cadence toolchain to build SOF and LLEXT modules
we need to select a different LLEXT type than when using a Zephyr gcc
toolchain.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Update Zephyr baseline to 53ddff639562 . The location of generated
headers has changed, so modify the SOF build scripts to use the new
location.
Change affecting SOF build targets:
6509b8199b02 shell: add shell backend for audio DSP using shared memory window
5a7600bec60b soc: intel_adsp: tools: add shell support to cavstool.py
db00b813f043 soc: intel_adsp: tools: align code style in maps_regs()
44dd5a4da9c0 soc: intel_adsp: tools: fix ace20 fw load flow
fa798ce2d5be soc: intel_adsp: only implement FW_STATUS boot protocol for cavs
8fc76f1b6d16 soc: intel_adsp: tools: improve FW boot handling on ace1.x
024bd41efb65 llext: xtensa: add support for the xt-clang toolchain
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Everywhere, where IPC3 and IPC4 are distinguished in CMakeLists.txt
the only difference is the use of x_ipc3.c vs. x_ipc4.c. Instead of
duplicating all build instructions for IPC3 and IPC4 just define and
use a suffix variable.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
The NHLT binary is not needed in these audio processing development
and test topologies. With the current build options the NHLT would
work only with cAVS2.5 platforms (TGL). Without NHLT add these are
safe to use in all platforms where the NHLT blob is retrieved from
BIOS.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch adds use of dedicated pass-through functions to save
MCPS. The pass-through is used when ALSA beam control is to off.
The earlier pass-through mode was made with a minimum length set
channels filters for the FIR filter bank.
In TGL platform with 4 to 2 channels beamformer the patch
saves 18 MCPS, from 27 to 9 MCPS. With 2 to 2 channels beamformer
the patch saves 14 MCPS, from 16 to 2 MCPS.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
The check of cd->direction updates before calling the function
tdfb_direction_copy_emphasis() saves in TGL platform 2.9 MCPS.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
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>