Commit Graph

12407 Commits

Author SHA1 Message Date
Eddy Hsu 175a97ec6b comp: ctc: add ctc binary control.
Add binary controls of Google CTC component to load different configs.

Signed-off-by: Eddy Hsu <eddyhsu@google.com>
2024-09-10 15:30:25 +01:00
Curtis Malainey 01c9ce9eda posix: align mailboxes
Using unaligned mailboxes with UBSAN causes fuzzing failures with
aligned data structures

Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
2024-09-10 15:26:14 +01:00
Kai Vehmanen 19ea950b61 platform: intel: ace: remove redundant definitions from memory.h
Platforms that can only be built with Zephyr, can directly use
Zephyr cached/uncached functions in memory.h. It turns out the SRAM
address and size definitions were only needed for these duplicate
cache operations, so they can be removed as well.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2024-09-10 13:57:13 +03:00
Seppo Ingalsuo 1a27843e4b Audio: Multiband-DRC: Fix paths after move of scripts
The paths to topology and sof-ctl blobs are updated. The paths
to other setup scripts (common, crossover, drc, eq) are set with
a new helper function multiband_drc_paths.m.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2024-09-10 12:06:37 +03:00
Seppo Ingalsuo fce09fc56b Audio: Multiband-DRC: Move blob configuration scripts to module directory
To consolidate the audio moves the scripts are moved to the same
directory as the module. This first step only moves the files.
The next steps rename the scripts and fix possible issue to
directories move.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2024-09-10 12:06:37 +03:00
Guennadi Liakhovetski 8c75f80f96 llext: add missing modules to LNL overlay
LNL modules overlay is missing eq_iir and mixin_mixout entries, add
them there.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-09-10 09:23:24 +03:00
Guennadi Liakhovetski 9f48037505 llext: automatically calculate module addresses
Currently LLEXT module starting addresses are hard-coded in their
respective CMakeLists.txt files. This is very wasteful, since it's
unknown in what order modules are loaded, inflexible and not easily
extendible to other platforms. Switch to calculating addresses
automatically based on a single per-platform Kconfig value.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-09-10 09:23:24 +03:00
Guennadi Liakhovetski dfee44d7cd llext: add a convenience Kconfig option to build LLEXT modules
Add a Kconfig option that can be used to flip all LLEXT-supporting
code to a modular build. Use that global flag for smart-amp-test,
mixin-mixout and eq-iir.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-09-10 09:23:24 +03:00
Seppo Ingalsuo 2950246415 Tools: Test: Audio: Add to process_test.m option to show plots
This change replaces 6th argument with show_plots. If it is
set to 1, the plots are not hidden. If set to 2, also the
temporary sound files are not deleted that is useful for
debugging.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2024-09-09 12:39:44 +03:00
Seppo Ingalsuo 85b8ab64ac Tools: Test: Audio: Fixes for process_test.m for moved files
The full process test fails due to changed paths of Octave
module setup scripts.

The path EQ blob decoder has changed after the EQ tool was moved
under the module. Also the SOF ABI version retrieve function
path need to be set to tune/common to use the generic function
instead of the first version that was made for EQ export.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2024-09-09 12:39:44 +03:00
Marc Herbert 76c976f8b3 app: drop "overlay" from the name of a few extra configs
Zephyr does not call extra configs "overlays", it uses overlays only for
Device Tree.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2024-09-09 10:16:39 +01:00
Marc Herbert ffe80eb0e6 xtensa-build-zephyr.py: cosmetic: rename "overlays" variable
The Zephyr documentation uses the term "overlay" for Device Tree, not
for Kconfig.

This commit does not change the wrongly named --overlay option not to
break anything but it stops that wrong name from leaking all over the
code. Also tweak the --help text.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2024-09-09 10:16:39 +01:00
Marcin Szkudlinski 0df649af2a fix: remove reference to comp_buffer form sink/src based mod
When using sink/src API and DP processing, there are no
comp_buffer based buffers on inputs and outputs
There must not be any usage of comp_buffer in the module

this commit changes a forgotten reference to comp_buffer

Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
2024-09-09 11:14:35 +03:00
Mac Chiang 7fc758be43 topology2: Add cs42l43 and cs35l56 support on ADL/RPL, MTL/ARL, LNL
The ADL, ARL, LNL hardware board configurations are below:
ARL has the same dsp generiation as MTL. So set platform = mtl.

SoundWire#
  ├── link 0: cs42l43 Audio Jack and DMICs/Bridge to amplifiers.
      | |     -> sof-rpl-cs42l43-l0.tplg
      │ │     -> sof-mtl-cs42l43-l0.tplg
      │ │     -> sof-arl-cs42l43-l0.tplg
      │ │     -> sof-lnl-cs42l43-l0.tplg
      │ │
      │ ├── link 2: cs35l56 Left and Right Amplifier.
      │	            -> sof-arl-cs42l43-l0-cs35l56-l2.tplg
      │
      ├──── link 2: cs35l56 Right/Rightx2 Amplifier.
      ├──── link 3: cs35l56 Left/Leftx2 Amplifier.
                    -> sof-adl-cs42l43-l0-cs35l56-l23.tplg
                    -> sof-arl-cs42l43-l0-cs35l56-l23.tplg
                    -> sof-lnl-cs42l43-l0-cs35l56-l23.tplg

SoundWire#
  ├── link 2: cs42l43 Audio Jack and DMICs.
      │       -> sof-arl-cs42l43-l2.tplg
      │ 
      ├──── link 3: cs35l56 Left and Right Amplifier.
                    -> sof-arl-cs42l43-l2-cs35l56-l3.tplg

Signed-off-by: Mac Chiang <mac.chiang@intel.com>
2024-09-09 11:13:38 +03:00
Mac Chiang ae69f5cd26 topology2: update flags for alignment
PLATFORM=tgl, can safely removed as it is not included in cavs-sdw and
does not affect the soundwire configurations.

Remove SDW_FMT_24 flag because it has become the fixed format for
soundwire configurations.

SDW_AMP_FEEDBACK is currently used for debugging purposes. So set false
to disable it.

Signed-off-by: Mac Chiang <mac.chiang@intel.com>
2024-09-09 11:13:38 +03:00
Iuliana Prodan 0a6107e127 module_adapter: add mixer component for initialization
Add mixer component in module_adapter initialization function
otherwise, for IPC3, we get the following error:
"module_adapter_init_data() unsupported comp type 6".

Fixes: 0f4a246df1 ("module_adapter: fix switch case for spec parsing")

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2024-09-09 09:33:46 +03:00
Curtis Malainey f383b0ffab fuzz: add argument to support other sanitizers
Allows for switching out zephyr configs for other sanitizers

Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
2024-09-06 21:27:05 +03:00
Kai Vehmanen 7ec73c72f6 .github/zephyr: do not create tarballs in github builds
Github artifact store allows to download packages already,
so no need to create tarballs in these builds. Also this avoids
problems comparing Windows and Linux builds as due to handling
of symbolic links, the resulting tarball are not comparable.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2024-09-06 09:28:16 -07:00
Kai Vehmanen c8163bb58b xtensa-build-zephyr.py: create /lib/firmware tarball
With addition of loadable modules, SOF firmware installation depends
much more on symbolic links. Add a step to build script to create a
tarball of the installed firmware binaries in the build-staging-sof
tree. The created tarball (e.g. build-sof-staging/sof/sof.tar.gz)
provides a ready structure that can be unpacked to e.g. /lib/firmware on
Linux target machines.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2024-09-06 09:28:16 -07:00
Guennadi Liakhovetski a02f367651 llext: fix multi-core use cases
MOD_INIT_INSTANCE IPCs can be processed on different cores, different
cores can use the same modules. Make shared data uncached.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-09-06 14:32:44 +01:00
Tomasz Leman f9575cd2bb audio: base_fw: Implement IPC4_DMA_CONTROL message handling
This patch introduces handling for the IPC4_DMA_CONTROL message type in
the base firmware. The implementation includes a new function
`basefw_vendor_dma_control` to process the DMA Control configuration for
any DAI type.

The `basefw_dma_control` function has been added to handle the
IPC4_DMA_CONTROL message. It ensures the message is atomic and contains
all necessary information before casting the data buffer to the
`ipc4_dma_control` structure and processing it. The function also calls
`basefw_vendor_dma_control` to apply the DMA Control configuration to
the hardware.

The `basefw_set_large_config` function in `src/audio/base_fw.c` has been
updated to call `basefw_dma_control` when an IPC4_DMA_CONTROL message is
received. If the `dai_config_update` operation is not implemented by the
DAI driver, the function will return `-ENOSYS`.

This change allows the base firmware to initialize or modify DMA gateway
configurations dynamically, improving the flexibility of DMA management
in response to IPC messages.

Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
2024-09-06 13:36:42 +03:00
Tomasz Leman 55ae14549d lib: dai: Expose Zephyr DAI device retrieval function
This patch exposes the function to retrieve a pointer to the Zephyr
device structure for a DAI of a given type and index. Previously, the
function `dai_get_zephyr_device` was static and only usable within
`dai.c`. By introducing `dai_get_device`, other parts of the SOF
codebase can now access the Zephyr DAI device pointers, facilitating
integration with Zephyr native DAI drivers.

Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
2024-09-06 13:36:42 +03:00
Seppo Ingalsuo 828b450c4d Scripts: Add testbench build for Intel PTL platform DSP
This patch adds to "scripts/rebuild-testbench.sh -p ptl" option
to test processing components with PTL ACE3.0 DSP build.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2024-09-06 12:31:47 +03:00
Seppo Ingalsuo 7683707944 Scripts: Cleanup set_xtensa_params.sh
This script is used to get detailed build parameters for
testbench-xt version build. The PLATFORM is in most cases
the same as the platform name in build command line so it
can be set as default. Only the cases when the name
is different need to be preserved.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2024-09-06 12:31:47 +03:00
Jyri Sarha 9152b87a4d tools: debug_stream.py: debug_stream record receiving and decoding
Python implementation for receiving and decoding debug-stream records
from debug window slot transportation. Opens SOF debugfs file
"debug_stream" reads and decodes the records from the circular buffer
documented in soc_debug_window_slot.h. This initial version only knows
of DEBUG_STREAM_RECORD_ID_THREAD_INFO records.

Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
2024-09-06 12:28:58 +03:00
Jyri Sarha 8f4672f669 debug: debug_stream_thread_info: Thread info records over debug stream
Implementation for collecting Thread stack and CPU usage statistic from
Zephyr core and send the info and debug_stream records. The records
encoding is defined and documented in debug_stream_thread_info.c
source file.

Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
2024-09-06 12:28:58 +03:00
Jyri Sarha fdfddff696 debug: debug_stream_slot: Debug slot transportation for debug_stream
Implementation for debug stream transportation over debug window
slot. The protocol details are documented in debug_stream_slot.h
header.

Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
2024-09-06 12:28:58 +03:00
Jyri Sarha f40a490cdb debug: debug_stream: Add debug stream record and stream header definition
This commit adds definition for abstract debug stream record and
stream header. The header file contains the necessary documentation.

Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
2024-09-06 12:28:58 +03:00
Marc Herbert 46f0eeab69 xtensa/config/core.h: provide UINT32_C() not just for __ZEPHYR__
xt-clang uses UINT32_C() without importing it.  Commit ef38a0c265
("arch: xtensa: core.h: Add define for UINT32_C") added it but only for
__ZEPHYR__, add it unconditionally.

Provide an alternative, assembly-compatible definition apparently needed
by XTOS ACP 7.0 compiled with xt-clang.

For C code, simply include <stdint.h>

Longer and convoluted story in #9413.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2024-09-06 10:43:14 +03:00
Curtis Malainey 54bb3e4d01 ipc3: move pointer assignments to after validation
UBSAN is complaining about the pointers being overflown given we haven't
checked the parameters. Move it behind the code that protects this to
satisfy the sanitizer.

Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
2024-09-05 17:42:54 +03:00
Curtis Malainey 53adb48cfa ipc3: catch ext_data_length overflows
If ext_data_length is > UINT32_MAX - sizeof(struct sof_ipc_comp) then it
will overflow the 32bit pointer in the second half of this error check
therefore bypassing the check.

Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
2024-09-05 17:42:54 +03:00
Kai Vehmanen 0741e1eb00 boards: ace30: enable SOF log level at INF level
Re-enable normal INFO level log output for ace30_ptl target.
Move the limited log level setting to FPGA overlay.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2024-09-05 16:22:40 +03:00
Kai Vehmanen 56ca0e6d99 west.yml: update Zephyr to 689d1edee1d5
Total of 191 commits, including following affecting SOF build
targets:

 81977f2bff2e drivers: dma: intel_adsp_hda: fix intel_adsp_hda_unused() check
 9fd2e119445e drivers: dma: intel-adsp-hda: Report total_copied bytes on ACE2/3
 dd50ff558537 llext: add dependencies
 c5e305fce6c4 llext: fix flag evaluation for section grouping
 a8db637ead17 llext: export a symbol needed for immediate logging
 fe609dd8e8e1 llext: look for symbols in other LLEXT objects too
 19ccec6a0390 llext: use EXPORT_SYMBOL() universally
 bd09a5c73921 llext: make EXPORT_SYMBOL() universal
 92a7c772d90b llext: remove an unused variable
 4902f189ae00 dts: xtensa: intel_adsp: Set soft-off state as disabled
 b9a4900c3002 drivers: dma: intel_adsp_hda: change L1 exit defaults

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2024-09-05 14:26:12 +03:00
Marc Herbert b2f79a0c3d intel_adsp_ace15_mtpm.conf: replace blanket _STUBS with focused RTC MOCK
CONFIG_COMP_STUBS=y was enabled in #8722 / commit 8e34109e10 ("AEC:
Enable Google AEC with Mock compliation").

CONFIG_COMP_STUBS indirectly enables
CONFIG_GOOGLE_RTC_AUDIO_PROCESSING_MOCK which was the desired
effect. However it also automatically and silently "mocks" all other 3rd
party modules which is not desirable. So, replace it with the more
focused `CONFIG_GOOGLE_RTC_AUDIO_PROCESSING_MOCK`. `src/audio/Kconfig`
says "CONFIG_STUBS: This should only be used in testing environments
like fuzzers or CI."

Official sof-bin releases include `google_rtc_audio_processing_mock.c`
because the CI that uses it can't use extra CONFIGS. That's another
topic for another day, see #9410.

build-mtl/zephyr.strip is identical before versus after this commit.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2024-09-04 08:58:58 -07:00
Marc Herbert ff57b7917f .github/ipc_fuzzer: use new -i 3 and -i 4 fuzz.sh options
Stop hardcoding -DCONFIG_IPC_MAJOR_x=y and use the new -3 and -4 fuzz.sh
CLI flags.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2024-09-02 16:48:32 +01:00
Marc Herbert 2a23f3be21 Add new `fuzz_*features.conf` files to add more CONFIG_ when fuzzing
The goal of these new files is to:
1. Fuzz more code
2. Reduce the configuration gap between fuzzed SOF and the real thing.

See the fuzz_features.conf header for more details.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2024-09-02 16:48:32 +01:00
Marc Herbert 8a99c58906 fuzz.sh: add -i3 and -i4; shortcuts for -DCONFIG_IPC_MAJOR_$i=y
Only a shortcut for now but allow more IPC version-dependent logic
later.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2024-09-02 16:48:32 +01:00
Marcin Szkudlinski c72778f904 buf: missing dp_queue rename to ring_buffer
one variable have been forgotten during renaming
dp_queue to ring_buffer

Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
2024-09-02 16:47:40 +01:00
Marcin Szkudlinski 4786d6ffeb buf: make comp_buffer use sof_audio_buffer base
comp_buffer is a legacy buffer, but currently is widely
used in SOF.

During transition to pipeline2.0 there's a need that comp_buffer
expose a common API, as any other buffer

Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
2024-09-02 16:47:40 +01:00
Marcin Szkudlinski a2813a79bd buf: rename buffer.c to comp_buffer.c and move to buffers
comp_buffer, implemented in buffer.c file, should
be kept in the buffers directory, together with all
buffers
Also it has been renamed to comp_buffer.c

Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
2024-09-02 16:47:40 +01:00
Marcin Szkudlinski 051009b8b7 buf: introduce ops instead of a single free function
in struct audio_buffer there was only one virtual method
(free). There are probably more coming, so an ops structure
is introduced.

ring buffer which uses audio buffer as a base must adjust,
including using of an audio_buffer_init procedure, what implies
using audio_stream_params located in audio_buffer

Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
2024-09-02 16:47:40 +01:00
Marcin Szkudlinski d23f8e81d9 buf: add secondary buffer support to struct audio_buffer
secondary buffer mechanism is a feature independent of a buffer
implementation, therefore it should be located in a base class for
all buffers

this commit intentionally is not removing the same feature from
comp_buffer nor trying to use it anywhere

Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
2024-09-02 16:47:40 +01:00
Marcin Szkudlinski be02062341 bug: missed fixes when CONFIG_INCOHERENT=0
cache operations are pointless when architecture is
coherent

Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
2024-09-02 16:47:40 +01:00
Seppo Ingalsuo 7ed55e5b15 Audio: DCblock: Tune: Prefix top level functions with sof_
This patch renames with prefix sof_ all the top level functions
for dcblock blobs design.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2024-09-02 13:32:56 +01:00
Seppo Ingalsuo a9702cc168 Audio: DCblock: Fix blob export paths after move
The paths for exported blobs for topology and for sof-ctl need
to be fixed after directory move.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2024-09-02 13:32:56 +01:00
Seppo Ingalsuo b647d9a29e Audio: DCblock: Fix search path to common functions
A function dcblock_paths.m is added to handle add and remove
of path.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2024-09-02 13:32:56 +01:00
Seppo Ingalsuo 82252055c0 Audio: DCblock: Tune: Move dcblock setup scripts to module directory
The change is done to consolidate the files belonging to the
module. This patch only moves the files to a new location.
Successive patches address the issues caused by this move.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2024-09-02 13:32:56 +01:00
Seppo Ingalsuo fcf3d65f03 Audio: Crossover: Prefix top level functions names with sof_
The names are changed to avoid any collisions with multiple
Octave or Matlab paths enabled.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2024-09-02 11:28:58 +01:00
Seppo Ingalsuo 4bac61ca32 Audio: Crossover: Fix paths after scripts move
The paths to topology and sof-ctl blobs are updated. The paths
to other setup scripts (common, eq) are set with a new helper
function crossover_paths.m.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2024-09-02 11:28:58 +01:00
Seppo Ingalsuo 80c621aeff Audio: Crossover: Move blob configuration scripts to module directory
To consolidate the audio moves the scripts are moved to the same
directory as the module. This first step only moves the files.
The next steps rename the scripts and fix possible issue to
directories move.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2024-09-02 11:28:58 +01:00