Bump up Zephyr revision to fetch a Zephyr version that
contains the following patch:
1) 64ba1b221091c343f7cca79a7970981eb1ff3a35
("dts: nxp: imx93: add nodes for SAI3 and EDMA4")
This is required for the transition to Zephyr native drivers
on i.MX93.
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
The BT codec used by the IW416 chip expects FSYNC to be
asserted for only one BCLK. Also, FSYNC should be active HIGH.
As such, change from I2S protocol to DSP_A protocol since the
configurations made for this protocol inside the SAI driver
are more suited.
Also, by default, the BT codec drives data on BCLK rising
edge and samples it on falling edge. With the DSP_A protocol,
the SAI driver also has the same configuration, which is wrong
since we can't drive and sample on the same edge and cycle. As such,
invert BCLK polarity such that the SAI will drive on rising edge
and sample on falling edge.
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
8ULP has two supported BT HFP scenarios: NBS and WBS. For
NBS the frequency of FSYNC is 8k, while for WBS the frequency
of FSYNC is 16k. Since the BCLK is computed as:
Freq(BCLK) = TDM_SLOTS * TDM_SLOT_WIDTH * Freq(FSYNC)
then that means we're going to end up with two different BCLK
frequencies (one for each supported scenario).
Currently, what we do is pass the frequency of FSYNC
as a build argument, while keeping the frequency of BCLK
constant (set to 256000, which would be the same value as the
one used in WBS). This causes the following issues:
1) The Zephyr native SAI driver returns an error
when trying to commit the configuration because the
frequency of BCLK doesn't abide by the aforementioned
formula.
2) We end up consuming twice as many samples in a given
unit of time.
To fix these issues, use the aforementioned formula to compute
the frequency of BCLK.
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
Rename the `RATE` parameter to `FSYNC_RATE` in order to
remove ambiguity regarding what the parameter is.
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
KPB draining task is executed by low priority preemptible EDF thread.
The task accesses KPB sink buffer and calls comp_copy() for component
connected to sink. If LL thread preempts draining task that could result
in broken state of sink buffer or component connected to sink. This fix
prevents LL from preempting draining task in bad moment.
Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
The IDC message objects are stored to static "idc_work", so
the cache operations are unnecessary when pointers to these
messages are passed around.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
All topologies are built in parallel. The same name will lead
to file overrides. Therefore, correct to use the respective file
names properly.
Signed-off-by: Mac Chiang <mac.chiang@intel.com>
The CHAIN_DMA has been replaced with HDMI_USE_CHAIN_DMA, which was already
enabled by default on iDisplay HDAudio codec in hdmi-default.conf.
Signed-off-by: Mac Chiang <mac.chiang@intel.com>
- list_is_empty is required to properly check source list
- at this stage empty list is allowed since source bind might not
happen yet
Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
When Google RTC AEC is not ready to launch, it shouldn't be included
in production builds for Chromebook. This commit removes Google RTC
AEC from the current variants while making another copy with suffix
"-google-aec".
Signed-off-by: Pin-chih Lin <johnylin@google.com>
Contains following updates affecting SOF targets:
81658e67e7c0 dts: xtensa: intel_adsp: Remove ALH nodes from ACE 2.0 LNL DTS
4ea52bdd1297 soc: xtensa: intel: Update power status bitfields for LNL
a39a61015c59 dts: xtensa: intel: Reorder LNL power domains
64a81ffb23ba dts: xtensa: intel_adsp: ace15: Update power domain for hda link nodes
ff2dd7f25a99 dts: xtensa: intel: Reorder ACE 1.5 power domain nodes
315ee38b95a2 ADSP: don't use timer interrupts on secondary cores
e914c60ae156 boards: intel_adsp: fix dead link
010f39a409e0 soc: intel_adsp_cavs: store PS when power gating secondary core
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
The DRC component was not included to build. This change
avoids error and DSP panic in topology load.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Add a GitHub workflow entry to build with LLEXT enabled, using the
Zephyr toolchain.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
The DMAC has the same view of the address space as the HOST.
As such, the source and destination addresses need to be converted
to HOST-relative addresses before attempting to perform a DMA
transfer. This is only relevant for platforms for which the DSP
and HOST have different views of the address space (e.g: i.MX8ULP).
Also, if a platform doesn't define the `local_to_host` macro
(used for converting DSP local address to HOST-relative address)
we assume that the HOST and the DSP have the same view of the
address space. As such, we also add a definition of `local_to_host`
which will just return the passed address.
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
The declare_dynamic_module_adapter function has been moved from
module_adapter/module/modules.h to lib_manager and renamed to
lib_manager_prepare_module_adapter. It was and still is only used in
lib_manager.
Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
Moved pointer to module_interface from struct module_data to comp_driver
structure. The change is aimed at clearing the module_data structure of
fields intended for exclusive use by sof. All modules are eventually use
module interface so this pointer will be in comp_driver anyway.
Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
Memory region must first be mapped as writable to allow data to be placed
there. Then the target access flags are set, e.g. read-only and executable.
Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
Multicore is not working correctly for Intel cAVS2.5 in Zephyr
upstream and the fixing will take a longer time, so disable
this feature in nocodec configuration.
Link: https://github.com/thesofproject/sof/issues/8942
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
XTOS is going to be deprecated on i.MX8ULP so prevent
building it by removing it from the list of supported
platforms from `xtensa-build-all.sh`. This is needed for
switching to Zephyr native drivers.
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
XTOS is going to be deprecated on i.MX8ULP so remove it from
the gcc build test which uses SOF with XTOS.
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
This patch replaces pipeline mixout-gain-dai-copier-playback with
mixout-gain-efx-dai-copier-playback. The purpose is to allow
enhance of audio playback quality with equalizers (IIR and FIR)
and dynamic range control (DRC).
The components are programmed by default to passthrough for minimal
overhead. They can be activated via sof-ctl or UCM with ALSA controls.
- Post Mixer Analog Playback IIR Eq bytes
- Post Mixer Analog Playback FIR Eq bytes
- Post Mixer Analog Playback DRC bytes
- Post Mixer Analog Playback DRC switch
The recommendation is to keep headphone playback flat and enable
processing only when HDA output is in speaker mode.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Update Zephyr to newer baseline. Among other updates, this brings in
Zephyr commit "intel_adsp/ace: power: Lock interruption when power gate
fails" that fixes a frequent issue seen in SOF CI on Intel MTL
platforms.
Patches affecting SOF:
251f52cbceb8 list_hardware.py: sort rglob(SOC_YML) HWMv2 results
f91065b7c983 nxp: adsp: enable usage of DCACHE API
03a79d638773 llext: elf.h: fix sign of the `r_addend` field of struct elf32_rela
7eb1d3d57d2d llext: elf.h: fix wrong 32 bits length of elf64_rela fields
4ad9f9063848 llext.c: fix logging of 64 bits pointers
07426a800c74 intel_adsp/ace: power: Lock interruption when power gate fails
c15f029a7108 init.h: restore designated initializers in SYS_INIT_NAMED()
223e81b96888 soc: intel_adsp/ace: use CONFIG_XTENSA_MORE_SPIN_RELAX_NOPS
0a6e90b3b833 xtensa: make assembly-called functions static
3fa291690f32 xtensa: use CONFIG_PRIVILEGED_STACK_SIZE for stack size
Link: https://github.com/thesofproject/sof/issues/8908
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Disable CONFIG_WINSTREAM_CONSOLE in all Intel configs that enable SOF
mtrace for logging. Also disable CONFIG_LOG_BACKEND_ADSP that uses
winstream as backend. No need to have two memory window based logging
backends enabled at the same time.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.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>
Removed unused desc parameter from llext_manager_load_module and
llext_manager_unload_module functions.
Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
Added a const modifier to the ipc_config parameter passed to functions
lib_manager_allocate_module and llext_manager_allocate_module.
Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
To prevent unintentional modification of a loadable library manifest,
a const modifier has been added to all variables pointing to it.
Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
Instead of a pointer to a component driver and ipc config, the
lib_manager_free_module and llext_manager_free_module functions now gets
component id.
Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
Removed pointer to a library manifest from the parameters list of the
lib_manager_register_module function.
Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
The preload_page_count value from the loadable library manifest is used to
determine size of allocated memory buffer. If this value is smaller than
the manifest size, it will lead to memory corruption.
Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
Added a const modifier to the module manifest variable in the
lib_manager_store_library function to prevent it from being accidentally
modified.
Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
Add new file generated since commit cf9a444bfc ("toml: modularise TOML
configuration")
Optional because it's not generated for all platforms.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Replace infinite wait with a time-limited wait. In case a blocking
IDC message is not handled within IDC_TIMEOUT, return an error
instead of waiting. This allows to debug stuck core-to-core communication
easier.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
The mocking layer is an important debugging tool. It shouldn't be on
by default lest we accidentally build without the real feature.
Signed-off-by: Andy Ross <andyross@google.com>
Add the .dot file header/footer macros. These are benign if unused,
and it seems like most other devices have them defined.
Signed-off-by: Andy Ross <andyross@google.com>
AEC initialization is stack-hungry, needing ~6kb during
initialization. That happens under the IPC task, not a
component-local stack. So bump the default for all tasks as that's
the only way to make sure IPC gets it.
(Really this shouldn't be a platform choice, but that's where the
symbol exists)
Signed-off-by: Andy Ross <andyross@google.com>
Add HiFi3 & HiFi5 implementation of function cir_buf_copy.
Compared with generic C version, the HiFi3 version can save
about 3% cycles and HiFi5 version can save about 40% cycles.
Signed-off-by: Andrula Song <andrula.song@intel.com>
Use while (shorts > 0) instead of while (short) to reduce the forever
loop risk.
Use general instruction AE_MIN32 replace AE_MIN_32_signed which is an
internal proto intended for Xtensa compiler.
Signed-off-by: Andrula Song <andrula.song@intel.com>
Add HiFi5 implementation if function audio_stream_copy, compared
with HiFi3 version, the HiFi5 method can save about 29% cycles.
Signed-off-by: Andrula Song <andrula.song@intel.com>
The native SAI and ESAI drivers use a different handshake
encoding. As such, when using native Zephyr drivers use a
different function for decoding the channel from the handshake.
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
In the case of some DAIs, the DMA slot may be encoded
differently in the DAI configuration handshake. As such,
we can't count on the fact that the handshake itself can
be used as the DMA slot. To fix this, add a function which
parses the handshake and allows each DAI to use its own
encoding of the DMA slot inside the handshake.
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
Currently, the DAI component's state is not updated on
dai_trigger() operation, which leads to pipeline_comp_copy()
skipping the dai_copy() operation (since the DAI component
never transitions to the ACTIVE state). To fix this, add
a state transition in dai_comp_trigger_internal(). Also,
make sure not to trigger the DAI component if already in
the requested state.
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>