Commit Graph

11435 Commits

Author SHA1 Message Date
Chao Song e73cdf6805 topology2: Add sof-mtl-rt722-l0 support
This patch adds sof-mtl-rt722-l0.tplg, which is used
to support MTL RVP + RT722 EVB combination.

Headphone, speaker and DMIC functions are verified
with this topology.

Signed-off-by: Chao Song <chao.song@linux.intel.com>
2023-10-31 20:30:41 +02:00
Adrian Bonislawski 86497b46bf rimage: mtl/lnl: fix key slot setup based on imr type
Clean cherry-picks of two commits from separate rimage repo
https://github.com/thesofproject/rimage/commits/stable-v2.7

This will properly setup partition_usage field
and remove fixed 0x23 value from MTL toml

Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
(cherry picked from commit fbea59358d06ffa86645cdf4ce0996e352742eb5)

Second, squashed LNL commit:

config/lnl.toml: drop now invalid signed_pkg.partition_usage

Fixes commit fbea59358d06 ("rimage: mtl: fix key slot setup based on imr
type") which broke LNL compilation like this:

```
error: 1 unparsed keys left in 'signed_pkg'
error: key 'signed_pkg' parsing error
```

This commit does not change the final image (compared to before rimage
commit fbea59358d06) because the default value is now 0x20 + IMR type.

Fixes are normally submitted to the main branch first and then cherry
picked to stable branches. However MTL fbea59358d06 has been made in
stable-v2.7 first so the LNL change was also in stable-v2.7 first for
consistency.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
(cherry picked from commit 469102a8f6052ce6a374b870ea945a84d04c3b1a)
2023-10-31 15:05:50 +00:00
Marc Herbert 6458f48471 scripts/fuzz.sh: fix multiple issues with "stub" overlays
Fixes commit deed9a8808 ("scripts: fuzz: add support for build and
overlays")

The main issue was the way fuzz.sh was trying to parse the overlay
file. Drop that and just pass it as is to `west` and `cmake` instead,
they know what to do with it.

Also:

- Fix invalid syntax in stub_build_all_ipc4.conf
- Make fuzz.sh shellcheck-clean again. Always use shellcheck.
- Temporarily disable `CONFIG_COMP_SMART_AMP` in
  stub_build_all_ipc3.conf because `smart_amp.c` does not compile (in
  any configuration)

```
sof/src/audio/smart_amp/smart_amp.c:748:9: error:
   no member named 'in_channels' in 'struct smart_amp_data'
   sad->in_channels = audio_stream_get_channels(&source_buffer->stream);
```

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-10-31 14:23:26 +00:00
Adrian Warecki 3cb13e7c74 rimage: module: Fix section order in output image
Fixed the order in which sections are placed in the output firmware image
for platforms using a simple manifest.

Fixes: #8336

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
2023-10-31 13:59:55 +02:00
Chao Song 165e68fdaf topology2: Add sof-lnl-rt711-l0-rt1316-l23-rt714-l1 support
This patch adds sof-lnl-rt711-l0-rt1316-l23-rt714-l1.tplg,
which is used to support LNL RVP + AIOC4.1 codec board
combination.

Signed-off-by: Chao Song <chao.song@linux.intel.com>
2023-10-30 20:35:56 +02:00
Seppo Ingalsuo 369dac1a22 Trace: Rename UNUSED() macro to SOF_TRACE_UNUSED()
The xt-clang RI-2022.10 compiler headers define UNUSED. The
rename of the macro for trace fixes in testbench build this
error:

  In file included sof/tools/tplg_parser/pga.c:17:
  In file included sof/tools/tplg_parser/
  ../../src/include/sof/lib/uuid.h:11:
  In file included sof/tools/tplg_parser/
  ../../src/include/sof/common.h:105:
  /home/singalsu/work/current/sof/sof/tools/tplg_parser/
  ../../src/include/sof/trace/preproc.h:162:9: error:
  'UNUSED' macro redefined [-Werror,-Wmacro-redefined]
  #define UNUSED(arg1, ...) do { META_RECURSE(
  xtensa/XtDevTools/install/tools/RI-2022.10-linux/XtensaTools/
  xtensa-elf/include/xtensa/xtensa-types.h:60:9:
  note: previous definition is here
  #define UNUSED(x)       ((void)(x))

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-10-30 20:34:38 +02:00
Kai Vehmanen 1c729f43c8 west.yml: update Zephyr to 460c2167e4f3
Contains 600+ commits merged after 3.5.0 release, including following
directly affecting SOF targets:

76cb2a54f51f intel_adsp: Do not include device_runtime header
1fac5ed2a60b soc: xtensa/nxp_adsp: put guard in Kconfig.defconfig
f4cb487b79f9 modules: sof: Options only when module is available
02deea0e806a ace: alh: Only ACE1.5 has OSEL feature
f0326f72498c tests: dma_loopback: Intel ADSP ACE15 disable PM
adf6d0e3d80e soc: intel_adsp: lpsram enable retention mode
eeb4f2f76d6d soc: intel_adsp: hpsram enable retention mode
16f729214b50 soc: intel_adsp: lpsram init refactor
112611378f85 soc: intel_adsp: hpsram init refactor
cdd4d8470323 xtensa: add custom mem range check functions

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2023-10-30 10:23:47 +02:00
Yong Zhi 31140b132c topology2: cavs-rt5682 enable google rtc aec support
Enable Google ACE for for all sof-mtl-max98357a-rt5682 variants.

Signed-off-by: Yong Zhi <yong.zhi@intel.com>
2023-10-27 15:26:27 +03:00
Baofeng Tian e20009bc41 Topology2: condense passthrough tplg file audio format
Condense passthrough audio format with combined arrays.

Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
2023-10-27 14:33:31 +03:00
Baofeng Tian ae653d06a4 Topology2: condense src input format with combined array
Condense input format to combined array for src.

Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
2023-10-27 14:33:31 +03:00
Baofeng Tian b0abfe5e20 Topology2: condense tplg audio format for s32 format
Condense src format from s32 to multiple audio format.

Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
2023-10-27 14:33:31 +03:00
Baofeng Tian b814f307fb Topology2: condense src input format in tplg file
Condense src input audio format convert to 48k in tplg file.

Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
2023-10-27 14:33:31 +03:00
Baofeng Tian b8c52ecaf7 Topology2: condense output format in tplg file
Condense src 48k to other audio format with combined array format.

Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
2023-10-27 14:33:31 +03:00
Trevor Wu 4b0cb077f7 platform: mtk: fix memory allocation problem
Because the size of struct comp_buffer has increased, the current heap
layout for the basic use case is not enough.

Some use cases are experiencing out of memory issues,
c0 memory  src/lib/alloc.c:765  ERROR failed to alloc 0x180 bytes zone
0x4 caps 0x1 flags 0x0

To fix this issue, we increase the number of 512-byte heap blocks to 32.

Signed-off-by: Trevor Wu <trevor.wu@mediatek.com>
2023-10-27 13:57:02 +03:00
Trevor Wu 4624b3d7bd audio: module adapter: fix redefinition problem
When I was using xtensa to build mt8188 platform, I encountered an error:
'redefinition of i'. To fix the problem, I removed the declaration in
the for loop.

Signed-off-by: Trevor Wu <trevor.wu@mediatek.com>
2023-10-27 13:57:02 +03:00
Kai Vehmanen c6ba44228a topology1: remove Intel GLK/TGL/ADL/RPL topology definitions
These topologies are no longer supported by mainline firmware code for
these platforms. The stable-v2.2 branch continues to support these
targets with topology1. Also SOF main branch provides topology2 targets
for a subset of these configurations.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2023-10-27 12:31:35 +03:00
Seppo Ingalsuo 8ca07591c9 Tools: Test: Topology: Avoid dependence to platform/intel/bxt.m4
A simplified copy of previous bxt.m4 is made as local
platform/generic.m4 with SSP and other platform definitions
for test topologies build. It is included to test-all,
test-capture, and test-playback macros definitions.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-10-27 12:31:35 +03:00
Marc Herbert 20705ad4c1 rimage/toml_utils: fix signature and doxygen of parse_uuid()
Add missing `const` and warn that the endianness can't be relied on.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-10-26 17:09:17 +03:00
Marc Herbert c180e8cb95 rimage/toml_utils.c: remove uint32_t d0 shortcut in parse_uuid()
Fixes compilation failure with clang 15:

rimage/src/toml_utils.c:297:67: error: taking address of packed member
  'd0' of class or structure 'uuid_t' may result in an unaligned pointer
  value [-Werror,-Waddress-of-packed-member]
  sscanf(buf, "%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x", &id.d0,
                                                                   ^~~~

This also aligns indexes.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-10-26 17:09:17 +03:00
Marc Herbert a01fcc2f52 rimage/toml_utils.c: stop ignoring errors in parse_uuid()
assert() that sscanf returns the expected value.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-10-26 17:09:17 +03:00
Seppo Ingalsuo 613021b37f Tools: Topology2: Add widget class TDFB
This patch adds the class for the Time domain fixed beamformer
(TDFB) and example blobs for line arrays.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-10-26 17:08:45 +03:00
Seppo Ingalsuo d27d068245 Tools: Topology2: Add support for ALSA enum control
This patch adds to definitions in common.conf a new class "text"
to support the enum control values.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-10-26 17:08:45 +03:00
Fabiola Kwasowiec 90fef5afd2 src_lite: add module
Addition of SRC Lite module,
which only supports a subset of conversions
supported by the SRC module.

Purpose of SRC Lite module is memory optimization.
Code of SRC Lite is drastically reduced and requires
significantly less memory. When needed one of
defined conversions, driver can choose SRC Lite
module instead of SRC module to optimize memory utilization.

48 -> 16kHz
44.1 -> 16 kHz
32 -> 16 kHz
44.1 -> 48

Signed-off-by: Fabiola Kwasowiec <fabiola.kwasowiec@intel.com>
2023-10-26 17:08:29 +03:00
Andrula Song 5cc8a6dc14 Audio: Fix the default alignment setting
Set the default alignment value after buffer format is set
in audio_stream_set_params instead of in audio_stream_init
where the buffer format hasn't been set yet.

Signed-off-by: Andrula Song <andrula.song@intel.com>
2023-10-26 16:24:14 +03:00
Peter Ujfalusi a951579bb2 sof_ri_info: Decode the Signed package info extension
Print out some information from the Signed package info extension, the most
important information being is the partition_usage which is used to select
key slot to be used for verification.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
2023-10-25 20:39:47 +03:00
Jaroslaw Stelter 338e87f7e1 mtl: Fix KD topology tests failure
KD topology tests fail on MTL due to insufficient size of
heap memory. During creation of KD topologies with
4ch audio format, FW fails on memory allocation.
The patch increases HEAPMEM size.

Signed-off-by: Jaroslaw Stelter <Jaroslaw.Stelter@intel.com>
2023-10-25 16:49:09 +01:00
Jaroslaw Stelter 8be15f5469 lnl: Fix KD topology tests failure
KD topology tests fail on LNL due to insufficient size of
heap memory. During creation of KD topologies with
4ch audio format, FW fails on memory allocation.
The patch increases HEAPMEM size.

Signed-off-by: Jaroslaw Stelter <Jaroslaw.Stelter@intel.com>
2023-10-25 16:49:09 +01:00
Baofeng Tian 0ef4dfe15a Audio: aria: move aria header to aria module folder
There are two headers for aria, below action is taken:
1. move header file from include path to module path.
2. combine two headers to one header file.

Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
2023-10-25 15:56:49 +01:00
Marc Herbert 59a5bc7448 rebuild-testbench.sh: explain BUILD_TYPE=native in usage()
Explain what happens when running the script without any argument.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-10-25 16:09:17 +03:00
Marc Herbert bcdf037d2c rebuild-testbench.sh: drop no-op LDFLAGS=-Wl,-LE
It's not clear why `LDFLAGS=-Wl,-LE` was added in
commit 10d0b3b5e1 ("Scripts: Add xt-run build target for
rebuild-testbench.sh"). Maybe it was supposed to be `-Wl,-EL`?

Either way this flag has always been interpreted as adding the directory
`./E/` to the search library path, which obviously never had any
effect; proof below. So it can safely be removed.

Here's the proof:

```
mv ~/XCC/install/builds/RG-2017.8-linux/cavs2x_LX6HiFi3_2017_8/xtensa-elf/lib/libm.a .

./scripts/rebuild-testbench.sh -p tgl

  # Fails as expected
  # => XCC/install/tools/RG-2017.8-linux/XtensaTools/bin/xt-ld: cannot find -lm

cmake --build tools/testbench/build_xt_testbench/ -- testbench

  # Same again
  # => XCC/install/tools/RG-2017.8-linux/XtensaTools/bin/xt-ld: cannot find -lm

mkdir tools/testbench/build_xt_testbench/E/
cp libm.a  tools/testbench/build_xt_testbench/E/
cmake --build tools/testbench/build_xt_testbench/ -- testbench

  # => now compiles!
```

Remember: the best way to test software is always to break it.

Don't forget to fix XCC:

```
mv libm.a ~/XCC/install/builds/RG-2017.8-linux/cavs2x_LX6HiFi3_2017_8/xtensa-elf/lib/
```

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-10-25 16:09:17 +03:00
Marc Herbert d661616892 .github/zephyr: de-hardcode the remote name in the Windows build too
Fixes commit 4bc6488b24 (".github/zephyr: de-hardcode the name of the
zephyr remote")

(Yay for duplication)

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-10-25 13:36:22 +03:00
Tomasz Leman d449ff74d6 west.yml: update zephyr to v3.5.0
Updating zephyr version to v3.5.0 release.

Total of 352 commits.

Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
2023-10-25 10:58:47 +03:00
Serhiy Katsyuba 88b609ed07 ipc4: Add cross-core binding support
Implements binding of two pipelines from different cores so stream could
travel cross-core.

Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
2023-10-25 10:57:53 +03:00
Daniel Baluta f6c8706cfe drivers: imx: micfil: Change loglevel to info
There is no need to print an error at the beginning of a function.
The usual behavior should be to print an info.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2023-10-25 09:31:49 +02:00
Marc Herbert 1b1ec6c492 topology/cmake: skip all topologies when alsatplg < 1.2.5
Stop producing corrupted .tplg files when using `codec_consumer` (e.g.:
sof-imx8mp-btsco-dual-8ch.tplg, sof-imx8ulp-9x9-btsco-16k.tplg, ...)

Then we'll be able to finally search/replace "codec_master", see revert

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-10-24 20:32:28 +03:00
Marc Herbert d9fb722b64 topology/cmake: move alsatplg_version() one level up
We want to use it in topology1 too.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-10-24 20:32:28 +03:00
Kai Vehmanen f8a202aa92 app: boards: intel_adsp_ace20_lnl: drop DMA_DW_SUSPEND_DRAIN
The LNL board does not use DMA_DW driver, so the board
file should not set any build options specific to that
driver.

This fixes build warning:

--cut--
warning: DMA_DW_SUSPEND_DRAIN (defined at
drivers/dma/Kconfig.dw_common:27, drivers/dma/Kconfig.dw_common:27,
drivers/dma/Kconfig.dw_common:27) was assigned the value 'y' but got the
value 'n'.
---cut--

Link: https://github.com/thesofproject/sof/issues/8356
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2023-10-24 20:29:58 +03:00
Seppo Ingalsuo 3d040c7243 Tools: Testbench: Add Google RTC with mockup to testbench
This patch allows to load and run it in testbench.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-10-23 15:19:23 -07:00
Seppo Ingalsuo fc95621cd8 Audio: Google RTC audio processing: Mix all channels in mockup
With this change e.g. in all 2ch case all output channels are
mixed with matching microphone and reference channels. It helps
with testing to hear and see that the mockup works.

The mix is done for matching microphone, reference and output
channels indices. With e.g. less reference channels, the remaining
output channels are passed directly from microphone.

The mixed samples are saturated to avoid nasty sounding overflows.

Signed-off-by: Lionel Koenig <lionelk@google.com>
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-10-23 15:19:23 -07:00
Seppo Ingalsuo 763ed6d02b Audio: Convert Google RTC audio processing to module API
This patch converts the component to module API. The changes are:
- google_rtc_audio_processing_params() is changed to update
  sources and sink params from IPC4 init IPC. It's not used for
  IPC3 where module adapter handles params().
- The commands handling is fixed to handle via module adapter
  the IPC3 and IPC4 commands.
- The google_rtc_audio_processing_init() is updated to simpler
  module adapter client way.
- The google_rtc_audio_processing_prepare() is updated to set
  buffers parameters for IPC4 and find sources buffers for
  microphone and reference by index instead of buffer pointer.
  That simplifies the processing function with module adapter.
- The google_rtc_audio_processing_process() is updated from copy()
  to module adapter client way.
- google_rtc_audio_processing_get_attribute() is removed
- As overall change dev handle is changed to mod handle in nearly
  all functions.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-10-23 15:19:23 -07:00
Marc Herbert 92fa7952d0 .github/zephyr: time some fetch commands
GitHub conveniently times each step but to reduce step proliferation we
sometimes have multiple commands in a single step and lose the ability
to time download commands. Prefix them with `time` to restore the data.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-10-23 17:53:50 +03:00
Marc Herbert 4bc6488b24 .github/zephyr: de-hardcode the name of the zephyr remote
Fixes issue reported in stable-v2.7 #8353 which wants to use our own,
downstream Zephyr branch.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-10-23 17:53:50 +03:00
Marc Herbert 4495357f1e topology2/cmake: extract new function "alsatplg_version()" for re-use
We'll use this new function to require ALSA 1.2.5 and finally rename to
"codec_consumer" (see revert discussion #5192)

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-10-23 11:26:07 +01:00
Marc Herbert ec1cfd8f95 topology2/cmake: stricter if execute_process(alsatplg --version ...)
We want to fail if STATUS is not defined, the empty string, the FALSE
string or anything unexpected that it is not strictly equal to success
code "0".

Fixes commit 308a24a92b ("topology2: Add build support")

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-10-23 11:26:07 +01:00
Baofeng Tian 9e0f7eecec audio: eq_iir: create generic/ipc3/ipc4 source files for eq_iir
Create generic ipc3 ipc4 source files and move related code
into these source files.

Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
2023-10-20 14:57:24 +01:00
Baofeng Tian 0153f9f2fa audio: eq_iir: public common functions for ipc3 and ipc4
this is preparation for later ipc3 and ipc4 code split out
from eq_iir.c, these common functions will be used both by
ipc3 and ipc4.

Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
2023-10-20 14:57:24 +01:00
Baofeng Tian c1ba0949f7 audio: eq_iir: move iir structure definition to header file
this structure is common for both ipc3 and ipc4, move it
to header file.

Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
2023-10-20 14:57:24 +01:00
Baofeng Tian 9a9fa5d6fb audio: eq_iir: move iir header file to its own directory
move header file from include path to its directory path.

Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
2023-10-20 14:57:24 +01:00
Marc Herbert e114166983 Delete inherited tools/rimage/.gitignore
rimage is not so special that it needs its personalized .gitignore

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-10-20 12:28:42 +01:00
Seppo Ingalsuo 76754b52d0 App: Intel: Enable Aria build for TGL and TGL-H platforms
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-10-20 12:35:53 +03:00