Commit Graph

11306 Commits

Author SHA1 Message Date
Mac Chiang 0e37018786 topology2: sof-mtl-rt713-rt1316: fix HDMI_IDs due to dai id mismatch
In non sdw-dmic case, dai incremental id without it, so correct
HDMI1/2/3_ID sequence from default 5,6,7 to 4,5,6.

Signed-off-by: Mac Chiang <mac.chiang@intel.com>
2023-11-03 16:32:10 +00:00
Jaska Uimonen d8fe013291 dai-zephyr: refactor dai params
Refactor dai params into more feasible functions and remove duplicate
code. No functional change.

Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
Signed-off-by: Rander Wang <rander.wang@intel.com>
2023-11-03 18:28:26 +02:00
Adrian Bonislawski 1c2a2e37ee platform: ace: watchdog: fix num cpus
This will fix num cpus and use runtime data to work
properly on diffrent HW configs

Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
2023-11-03 18:27:53 +02:00
Marc Herbert 9e080af371 app/sample.yml: add MTL and LNL to Zephyr CI
This will catch earlier compile-time regressions like this one:
https://github.com/zephyrproject-rtos/zephyr/pull/61166#issuecomment-1789717233

Zephyr commit 06cfbd4159fd ("drivers: power_domain: Introduce a gpio
monitor driver")

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-11-03 18:25:54 +02:00
Seppo Ingalsuo b90ae24a88 Tools: Tune: TDFB: Use more silent command line options
These command line options for Octave and Matlab are the
most silent with no graphical plot windows opening during
batch job.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-11-03 16:20:25 +00:00
Seppo Ingalsuo 66e5c2cead Tools: Tune: TDFB: Add howto instructions to generated tplg blobs
Set field export_howto to instruction that was used to create
the blob. The tplg2 .conf and tplg1 .m4 files will contain the
command in the beginning of file.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-11-03 16:20:25 +00:00
Rander Wang 195fed7866 mailbox: use uncached address to write sw regs
mailbox_sw_regs_write is used by dai to update llp node. In multi-core
test, the updated llp node is invisable to other cores although
dcache_writeback_region is used on both cavs & ace platforms. Now use
uncached address to write memory directly which is aligned with other
mailbox access functions.

Validated on cavs & ace platforms.

Signed-off-by: Rander Wang <rander.wang@intel.com>
2023-11-03 16:17:08 +00:00
Marc Herbert ba2cfe3daa app/stub*.conf: add CONFIG_SAMPLE_SMART_AMP=y
While one smart_amp C file does not compile, let's keep compile-checking
the other two.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-11-02 12:49:08 +02:00
Marc Herbert f485a88e8f Remove samples/smart_amp_test dependency on CAVS || ACE
Fixes commit f06da576cf ("smart_amp: add smart amplifier test
component") which added its COMP_TEST_SMART_AMP ancestor.

This code can compile without any hardware dependency;
`git show  ___ | grep include` does not show any.

This is useful for fuzzing etc.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-11-02 12:49:08 +02:00
Marc Herbert 09eae9beb4 Revert "samples: Fix zephyr config"
This reverts commit fbde1dccf8.

Now that CONFIG_SAMPLE_SMART_AMP has a hard, menu dependency on
CONFIG_SAMPLES, we don't need to encode Kconfig dependencies in CMake
any more.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-11-02 12:49:08 +02:00
Marc Herbert fd57885599 samples/Kconfig: fix dependency on top-level CONFIG_SAMPLES
Don't be creative with weird "visible if" syntax.  Simply don't include
sub-Kconfig when the top-level option is disabled.

This removes "backdoors" like:

  -DCONFIG_SAMPLE_SMART_AMP=y -DCONFIG_SAMPLES=n

"In Rome, do as the Romans do"

Fixes commit 03b80eaf44 ("audio: move test components into the
src/samples/audio dir")

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-11-02 12:49:08 +02:00
Marcin Szkudlinski f76d9828aa idc: bugfix - exit code was not passed to the caller
When executing a blocking operation on a remote core
it is expected that an exit code of the operation is
passed to the caller as if the operation was on the
same core

In fact, a result of message passing was returned,
so in most cases result was success, no matter what
operation result was

Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
2023-11-02 12:46:35 +02:00
Seppo Ingalsuo 16975a591b Tools: Topology2: Add sof-hda-benchmark-aria32-tgl build
This patch adds the aria test topologies build. Aria supports
only s32 format so the s16 and s24 versions build is left
out.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-11-01 21:08:59 +02:00
Seppo Ingalsuo 6d6637d608 Tools: Topology2: Add sof-hda-benchmark-gain16/24/32-tgl build
This patch adds test topologies build for gain component. Testing
of gain can be done with all supported s16/s24/s32 source and sink
formats. The topologies normally use only the s32 format
internally.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-11-01 21:08:59 +02:00
Seppo Ingalsuo 98e687edb4 Tools: Topology2: Add sof-hda-benchmark-multiband_drc16/24/32-tgl build
This patch adds the multiband-DRC test topologies build.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-11-01 21:08:59 +02:00
Seppo Ingalsuo 1e5e7edb26 Tools: Topology2: Add sof-hda-benchmark topologies for MTL
The create of component benchmark topologies is moved to
other included file from CMakeLists.txt.

The adding of new components with custom parameters for
multiple formats and platforms is simplified with nested
foreach loops. The previous topologies for TGL are now
built also for MTL.

Due to use of "IN ZIP_LISTS" with foreach, cmake requirement
is bumped to 3.17 for topology2.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-11-01 21:08:59 +02:00
Seppo Ingalsuo 2d27374086 Tools: Topology2: Include controls to multiband_drc class
The includes to define bytes and mixer controls classes are
needed in case no other class definition has included these.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-11-01 21:08:59 +02:00
Seppo Ingalsuo 2831afe345 Tools: Topology2: Easier controls create with bench_comp_generate.sh
This patch adds to benchmark topologies template .conf files
generator commented out control examples types for easier
ALSA controls create.

The controls include files are renamed since they may
contain all controls types and not just bytes.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-11-01 21:08:59 +02:00
Pin-chih Lin d4d0a0ca13 smart_amp: fix code and re-enable it on stub builds
Removes the misplaced code in smart_amp.c for the fix, then
re-enables CONFIG_COMP_SMART_AMP on building stub images.

Signed-off-by: Pin-chih Lin <johnylin@google.com>
2023-11-01 20:43:46 +02:00
Ranjani Sridharan d294036fd5 topology2: google-rtc-aec: adjust the IBS/OBS size based on process needs
Example: if a module has 2 input pins, one 16000/16/2, second 48000/16/2 and
one output pin 48000/32/4 and is designed to process 10ms data chunks:

in pin1 IBS should be 16(samples/1ms) * 2 bytes * 2 * 10(ms) = 640
in pin2 IBS should be 48(samples/1ms) * 2 bytes * 2 * 10(ms) = 1920
out pin1 OBS should be 48(samples/1ms) * 4 bytes * 4 * 10(ms) = 7680

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Yong Zhi <yong.zhi@intel.com>
2023-11-01 20:38:52 +02:00
Yong Zhi e62e333e50 rimage: mtl: Use DP scheduler for AEC module
Change domain_types to DP, and allow it to run all 3 cores.

Signed-off-by: Yong Zhi <yong.zhi@intel.com>
2023-10-31 20:35:12 +02:00
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