Defines for normal src and src_lite were not separated correctly. Added new
variables so those values can be different depending on the type of src
being used. Those are assigned in prepare function in a new src.c file,
similarly to src_lite.c
Signed-off-by: Tobiasz Dryjanski <tobiaszx.dryjanski@intel.com>
Renaming src.c, as this filename will have a different purpose. File
src_common.c will contain common functions for all src types.
Signed-off-by: Tobiasz Dryjanski <tobiaszx.dryjanski@intel.com>
The imx-related macro logic from `interrupt_get_irq` can be
simplified. Now that `CONFIG_IMX93_A55` selects `CONFIG_IMX`,
`interrupt_get_irq` should return the INTID for all imx platforms
except for imx8m, which is yet to be transitioned to zephyr
native drivers.
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
i.MX93 is an IMX platform so its config (i.e: `CONFIG_IMX93_A55`)
should also select `CONFIG_IMX`.
Additionally, xtensa-based imx platforms have the heap
placed in the ".heap_mem" section, while arm-based imx
platforms have the heap placed inside the .bss section.
As such, fix the macro-based logic inside `zephyr/lib/alloc.c`
to account for this.
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
Adds a set of conversion functions that perform both format conversion
and channel remapping. These are required to swap channels for the device
posture feature.
Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
Add support for LLEXT building to drc. Since multiband DRC calls
functions from DRC, we cannot so far build it if DRC is configured as
a module. In the future it should be possible to build both as
modules and to export symbols between them.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Under windows the Python interpreter has to be called explicitly.
Without it an attempt to execute a Python script fails silently.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Suggested-by: Marc Herbert <marc.herbert@intel.com>
This flag enables changes to new pipeline structure,
known as pipeline2_0
It is required for certain new features, like DP_SCHEDULER.
The changes are incremental and at the moment pipeline 2.0
is fully backward compatible with legacy platforms, however
it generates some overhead in data and code, so it is useful to
turn if off if not needed
Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
dp_queue was created as a buffer to handle
special needs for DP modules.
However, in pipeline2.0 there will be more usecases
for it - as in fact it is a lockless cross-core
cached ring buffer.
This commit does rename dp_queue to more adequate name
It also moves the file to "buffers" directory, a place
for all implementations of buffers in pipeline 2.0
The commit, however, does not change names of structures
because git/github does not handle complex changes like
rename and modification correctly
Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
Strip out all the literall UUID management from existing C code (the
API itself still works for any out-of-tree or test code users) and
exclusively use the new, much simpler, SOF_DEFINE_REG_UUID() macro
which sources IDs from the registry by name.
Signed-off-by: Andy Ross <andyross@google.com>
Add a very simple uuid-registry.txt file containing all known UUIDs in
the tree, use it to generate a C header (the script validates it in
the process) that can then be used for a simplified
SOF_DEFINE_REG_UUID() mechanism that avoids the risk and temptation
temptation of components incorrectly implementing UUIDs.
The intent is that in the longer term, this file can be used by other
downstream tooling (manifest and topology generation) to more easily
reference known IDs by name in a way that avoids duplication and
error.
Signed-off-by: Andy Ross <andyross@google.com>
Zephyr has a similar trick to the .static_uuids trick SOF had been
playing that works in a (mostly) portable way and has some nice
features like runtime FOREACH iteration.
Use that for the UUID table, allowing it to be linked in globally in
Zephyr builds in a uniform way.
Also includes some general cleanup to try to reduce the amount of
backslashery required to express the various macros.
Signed-off-by: Andy Ross <andyross@google.com>
Complete the unification of the diverged UUID APIs with a big rename.
Call it "DEFINE" instead of "DECLARE" since this is in fact a C struct
definition and not just a declaration of a type or extern symbol.
Signed-off-by: Andy Ross <andyross@google.com>
The sof-logger/smex tools and the .ldc formats are all dead code in
Zephyr builds. The logging/trace macros don't emit the correct
metadata anymore, using Zephry logging instead (and I don't think they
ever did?), and the resulting .ldc files are degenerate containing
just the header and the records for component UUIDs, which nothing
uses.
Save a few milliseconds of build time and a few bytes of output, and
free up the evolution path by not having to support legacy tools.
Signed-off-by: Andy Ross <andyross@google.com>
One of the benefits and common ways to use the Zephyr shell
subsystem is definition of application specific commands.
This commit adds the initial SOF custom command,
"sof test_inject_sched_gap". This new command allows to inject
scheduling gaps into low-latency timer scheduler execution,
using the domain_block() SOF interface. Optional argument
can be used to specify duration of the block in micro seconds.
The intent is to stress test a SOF configuration and test how
the system behaves when audio pipeline is briefly starved.
Example log of what is observed when test_inkect_sched_gap is
run:
[ 0.052431] <inf> ll_schedule: zephyr_domain_thread_fn: ll core 0 timer avg 3674, max 4326, overruns 0
[ 0.052831] <inf> ll_schedule: zephyr_domain_thread_fn: ll core 0 timer avg 3673, max 4318, overruns 0
~$
~$ sof test_inject_sched_gap 12000
[ 0.052968] <inf> ll_schedule: zephyr_domain_block: Blocking LL scheduler
[ 0.052973] <inf> ll_schedule: zephyr_domain_unblock: Unblocking LL scheduler
[ 0.052973] <inf> host_comp: host_get_copy_bytes_normal: comp:1 0x10004 no bytes to copy, available samples: 0, free_samples: 384
[ 0.053231] <inf> ll_schedule: zephyr_domain_thread_fn: ll core 0 timer avg 4074, max 437230, overruns 1
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Patch adds PTL configuration basing on MTL
DMIC depends on PM_DEVICE_RUNTIME and PM_DEVICE_POWER_DOMIAN settings.
To effectively enable DMIC these flags must be set.
Additionally DMIC Ownership bit is not supported on ACE 2.0 and ACE 3.0.
Therefore CONFIG_DAI_DMIC_HAS_OWNERSHIP is switched off.
Signed-off-by: Jakub Dabek <jakub.dabek@intel.com>
PTL has CONFIG_PM disabled. SOF should still build without
this configuration flag. This patch fixes the compilation issue.
Signed-off-by: Jaroslaw Stelter <Jaroslaw.Stelter@intel.com>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Switch to Zephyr native drivers and timer domain. This
includes:
1) Switching all imx8ulp topologies to timer domain.
2) Disabling Zephyr DMA domain
3) Various interrupt-related fixes via Kconfig-related
ifdef logic.
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
This commit includes all necessary changes for switching
to timer domain and Zephyr native drivers on imx8 and imx8x.
This consists of:
1) Switching all imx8 topologies to timer domain.
2) Disabling Zephyr DMA domain
3) Various interrupt-related fixes via Kconfig-related
ifdef logic.
This commit includes all necessary changes for switching
to native Zephyr drivers on imx8/imx8x.
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
Some of the IPC4 HW_CONFIG fields are platform specific and cannot be
filled with generic code.
Handle this functionality by separating platform specific parts of
base_fw to a new base_fw_platform.h interface. Move out existing code
for Intel cAVS and ACE platforms. Add a new stub implementation for
posix platform. This posix stub can be also used as a starting point
when adding IPC4 support to new platforms.
This platform construct can be later used to move out other
vendor and platform data out from base_fw.c.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
For Zephyr builds, only definition needed from platform/drivers/idc.h
was prototype for idc_send_msg(). There's no need to keep the platform
layer just for this, so add the definition to rtos/idc.h for Zephyr
builds, and remove the platform/drivers/idc.h for all Intel platforms.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
The interrupt.h interface is no longer used by any Intel platform
as all drivers have been replaced with native Zephyr drivers, so these
definitions are no longer needed.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Introduces telemetry structure into debug memory window. Adds
systick_info which counts execution time of LL tasks. DP tasks are not
supported yet.
Signed-off-by: Tobiasz Dryjanski <tobiaszx.dryjanski@intel.com>
Contains the following squashed SOF commits:
nxp: imx8ulp: change SOC name to MIMX8UD7
zephyr: CMakeLists.txt use new `CONFIG_SOC_C` for 8ULP
cmake: update configs for NXP ADSP
and the following Zephyr patches affecting SOF:
951763939034 nxp: imx8ulp: change SOC name to MIMX8UD7
b8214b673970 dts: xtensa: nxp_imx8: add SAI1 node
a0e32f07ef76 dts: intel_adsp: ace: update host dma copy alignment
3fde2c50c6ef tracing: add intel ADSP memory window backend
6b9d01f995c7 intel_adsp/ace: power: No pending transaction before power gate
6ea749de5283 arch: rename arch_start_cpu() to arch_cpu_start()
b69d2486fee6 kernel: rename Z_KERNEL_STACK_BUFFER to K_KERNEL_STACK_BUFFER
1f55be8b42df nxp: imx8: change CONFIG_SOC_<name> to match the value
688fbb53aeb2 intel_adsp: ace: Fix sparse error
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
Starting with this commit, i.MX93 now uses the timer domain
in conjunction with the Zephyr native drivers.
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
With the switch to HWMv2, `CONFIG_SOC_SERIES_MIMX9_A55`
has been renamed to `CONFIG_SOC_MIMX9352_A55` so make sure
we also use the correct name when fetching the driver structure
associated with 93's DMACs.
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
Since the EDMA and HOST DMA nodes have been introduced to
the i.MX93 overlay, add entries in the dma array which will
create a struct dma for each of these DMACs.
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
Convert the smart-amp-test in its IPC4 version to a loadable LLEXT
module. Use an overlay configuration to select between monolithic and
modular builds.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Switch back to main Zephyr repository and commit f9f44b6dcdd.
This includes following squashed SOF commits that are
needed to adapt to HWMv2 changes in Zephyr:
zephyr: app: scripts: intel_adsp: change board names to HWMv2
zephyr: sof: update board name for HWMv2
zephyr: intel_adsp: Change ACE SoC name to HWMv2
app: boards: imx93: updates for zephyr hwmv2
Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
z_soc_uncached_ptr() / z_soc_cached_ptr() have been removed from
Zephyr and replaced with sys_cache_uncached_ptr_get() and
sys_cache_cached_ptr_get() respectively.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
This changes the secondary core power up routine to use the newly
introduced k_smp_cpu_start() and k_smp_cpu_resume(). This removes
the need to mirror part of the SMP start up code from Zephyr, and
no longer need to call into Zephyr private kernel code.
West update includes :
eefaeee061c8 kernel: smp: introduce k_smp_cpu_resume
042cb6ac4e00 soc: intel_adsp: enable DfTTS-based time stamping
on ACE platforms
6a0b1da158a4 soc: intel_adsp: call framework callback function for restore
e7217925c93e ace: use a 'switch' statement in pm_state_set()
c99a604bbf2c ace: remove superfluous variable initialisation
a0ac2faf9bde intel_adsp: ace: enable power domain
4204ca9bcb3f ace: fix DSP panic during startup (fixes c3a6274bf5e4)
d4b0273ab0c4 cmake: sparse.template: add COMMAND_ERROR_IS_FATAL
ca12fd13c6d3 xtensa: intel_adsp: fix a cache handling error
0ee1e28a2f5f xtensa: polish doxygen and add to missing doc
035c8d8ceb4b xtensa: remove sys_define_gpr_with_alias()
a64eec6aaeec xtensa: remove XTENSA_ERR_NORET
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Signed-off-by: Rander Wang <rander.wang@intel.com>
[guennadi.liakhovetski@linux.intel.com: update Zephyr hversion]
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>