Commit Graph

11318 Commits

Author SHA1 Message Date
Zhang Peng 61ccb4c8da scripts: zephyr: Add support to build sof for imx8ulp
Add support to build sof for imx8ulp

Signed-off-by: Zhang Peng <peng.zhang_8@nxp.com>
2023-11-06 09:34:37 +01:00
Zhang Peng 8447952438 zephyr: build: add support for imx8ulp
Build SOF with Zephyr for i.MX8ULP platform.

Signed-off-by: Zhang Peng <peng.zhang_8@nxp.com>
2023-11-06 09:34:37 +01:00
Zhang Peng 06ead2e016 zephyr: imx8ulp: init cascade interrupt
Although imx8ulp have no cascade interrupt, we also need do interrupt
init to disable cascade interrupt.

Signed-off-by: Zhang Peng <peng.zhang_8@nxp.com>
2023-11-06 09:34:37 +01:00
Zhang Peng abfa4c4f3b zephyr: imx8ulp: use zephyr utilities when enabled
Use the Zephyr sys/util.h when Zephyr RTOS is used.

While here, remove sof/lib/cpu.h which is not used.

Signed-off-by: Zhang Peng <peng.zhang_8@nxp.com>
2023-11-06 09:34:37 +01:00
Marc Herbert 216be694c2 samples: change smart_amp_test prefix `smart_amp_` to `smart_amp_test_`
Avoids conflicts with the "real" smart_amp.c when the "stub" compilation
check enables everything and compiles everything.

Also makes `git grep smart_thing` a bit more convenient in some cases.

Only the IPC3 sample clashed because the real code does not use
MODULE_ADAPTER(). Pre-emptively rename the IPC4 sample too for
consistency and in case the real code changes its mind later.

Only global symbols are renamed; no need to git churn private symbols.

Fixes commit ba2cfe3daa ("app/stub*.conf: add
CONFIG_SAMPLE_SMART_AMP=y") which clashed with commit
d4d0a0ca13 ("smart_amp: fix code and re-enable it on stub builds")

CI did not detect the clash because these two commits were merged at the
same time.

In case anyone is interested, the CI "fix" to prevent this type of race
is a GitHub feature called "merge queue" (resp. "merge train" in Gitlab,
"commit queue" in the older Chrome infrastructure, etc.)  It would be a
heavy lift, overkill for the small size and concurrency of the sof git
repo and how rarely these accidents happen (a couple times/year)

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-11-06 10:26:38 +02:00
Seppo Ingalsuo a6d65ee6dc Tools: Topology1: Change ASRC mode to synchronous in pipeline macro
This pipeline PCM -> ASRC -> DAI is used only in testbench test
topologies usage. None of the normal topologies build in SOF
use it. Since testbench can't support without failure the DAI
timestamps, the asynchronous mode is disabled. This allows
to test ASRC objective audio quality similarly as normal SRC.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-11-03 16:59:59 +00:00
Seppo Ingalsuo 1b9681e00f Tools: Test: Audio: Add possibility to test ASRC with src_test.m
The same tests can be applied for ASRC in sychronous mode. This
patch allows to pass component name as last argument. Use it
this way:

src_test(32, 32, 44100, 48000, 0, 1, 'asrc');

or

src_test(32, 32, 44100, 48000, 0, 1, 'src');
src_test(32, 32, 44100, 48000, 0, 1);

To run ASRC or SRC. See "help src_test" output for all
test options.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-11-03 16:59:59 +00:00
Baofeng Tian d2fccbdf33 audio: copier: move copier generic header file to copier folder
This header file is referred by external modules, add relative
path for external module usage.

Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
2023-11-03 18:56:13 +02:00
Baofeng Tian dbd89a62f7 Audio: copier: move copier related header to copier folder
These headers mostly only used by copier itself, move to
copier folder will make this folder cover all related code.

Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
2023-11-03 18:56:13 +02:00
Joe Cheng 244df9feda topology2: dts: add DTS playback pipeline
Add cavs-mixin-mixin-mixout-eqiir-dts-ssp.conf to support EQ IIR + DTS
processing on rt5682

Co-developed-by: Mac Chiang <mac.chiang@intel.com>
Signed-off-by: Mac Chiang <mac.chiang@intel.com>
Signed-off-by: Joe Cheng <joe.cheng@xperi.com>
2023-11-03 18:33:00 +02:00
Joe Cheng 04130acffc topology2: dts: move playback pipeline to independent topology
In order to adopt more different playback pipelines, refer to
sof-hda-generic.conf and move playback pipeline in cavs-rt5682.conf to
cavs-mixin-mixout-ssp.conf.

Co-developed-by: Mac Chiang <mac.chiang@intel.com>
Signed-off-by: Mac Chiang <mac.chiang@intel.com>
Signed-off-by: Joe Cheng <joe.cheng@xperi.com>
2023-11-03 18:33:00 +02:00
Joe Cheng 473c7a798c topology2 : dts : add DTS component and pipeline
This commit adds DTS componenet and pipeline for topology2.
1. DTS component
2. A new pipeline to support EQ IIR + DTS processing

dts_spk.conf includes the parameters for DTS SDK V1.1.3

Co-developed-by: Mac Chiang <mac.chiang@intel.com>
Signed-off-by: Mac Chiang <mac.chiang@intel.com>
Signed-off-by: Joe Cheng <joe.cheng@xperi.com>
2023-11-03 18:33:00 +02:00
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