Commit Graph

11341 Commits

Author SHA1 Message Date
Adrian Warecki 581cfdf3cc lmdk: Enable linking with standard libraries
Changed linker options to enable linking with libgcc and libc. This change
is required to allow use compiler builtins functions (like __divdi3) and
dynamic memory allocation functions.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
2023-11-09 11:28:30 +02:00
Adrian Warecki ad2123dd42 lmdk: Add support for dynamic memory allocation by a loadable modules
This commit adds a necessary symbols in the linker script which allows use
a memory allocation functions from libc (malloc, calloc, etc.) in loadable
modules.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
2023-11-09 11:28:30 +02:00
Adrian Warecki 1b3403a4a9 lmdk: Update rimage include path
As rimage was moved to sof repository it is necessary to update path to
rimage include directory in lmdk build system.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
2023-11-09 11:28:30 +02:00
Adrian Warecki 294a4b94b1 lmdk: Switch to a clang compiler
Changed the compiler used to build loadable modules to clang. It has been
used for a long time to build sof. The latest xtensa toolchain no longer
has xcc compiler.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
2023-11-09 11:28:30 +02:00
Seppo Ingalsuo 304dfd792e Tools: Topology2: Remove bytes control from cavs-nocodec-rtcaec.conf
It was confirmed that the IPC4 version of Google RTC AEC
is not using the bytes control, so it can be safely removed
from topology.

This fixes topologies build error:

ALSA lib conf.c:838:(get_char_skip_comments)
Cannot access file include/components/google-rtc-aec/rtc-aec-blob.conf

Fixes: 	64fcebbd64
	("Tools: Topology2: Add nocodec topology to test google-rtc-aec")

Fixes:	#8357

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-11-09 11:22:19 +02:00
Yong Zhi 4986e3135d topology2: cavs-mixin-mixout-ssp: Use macros for pipeline IDs
Use macros for pipeline IDs for better maintainability.

Signed-off-by: Yong Zhi <yong.zhi@intel.com>
2023-11-09 11:21:47 +02:00
Ranjani Sridharan d4b27bfa8b audio: google_rtc_audio_processing: Extract audio formats from base config extn
The reference audio format should be extracted from the base config
extension and set the buffer format based on the queue ID. The current
code works only by accident when the input and reference capture use the
same format.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-11-09 11:21:18 +02:00
Marc Herbert 008815dd54 tools/test/topology: mass replace codec_master -> codec_provider
This removes a lot of warning noise and may help spot other warnings
like `ALSA lib ops.c:48:(lookup_ops) wrong kcontrol ops value string ''`
and others.

Now that commit 1b1ec6c492 ("topology/cmake: skip all topologies when
alsatplg < 1.2.5") enforces alsatplg version >= 1.2.5, it is finally safe
to do this!

I compared the generated .tplg files before/after this commit and
they're bit for bit identical. Tested with  alsatplg v2.6.1 from
Ubuntu 22.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-11-09 11:20:09 +02:00
Marc Herbert 884dad565b tools/topology1: mass replace codec_master -> codec_provider
This removes a lot of warning noise and may help spot other warnings
like `ALSA lib ops.c:48:(lookup_ops) wrong kcontrol ops value string ''`
and others.

Now that commit 1b1ec6c492 ("topology/cmake: skip all topologies when
alsatplg < 1.2.5") enforces alsatplg version >= 1.2.5, it is finally safe
to do this!

I compared the generated .tplg files before/after this commit and
they're bit for bit identical. Tested with both alsatplg v2.6.1 from
Ubuntu 22 and version 1.2.9 from the SOF docker container.

Note this is a much smaller commit than the reverted
commit f50b6fe0ad ("topologies: switch all .m4 files to codec_provider
and codec_consumer") because most topologies v1 have been removed from
the main branch. Most topologies v1 are now only in stable-v2.2 where
the warning spam is still a problem :-(

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-11-09 11:20:09 +02:00
Rander Wang b7858e8af1 zephyr: cavs: add secondary core context save support
Register pm_state_notifier to set ready_flag for secondary core when it
is powered up for second time after first fw boot. We can remove
CONFIG_ADSP_IMR_CONTEXT_SAVE check for cavs platform for this feature.

Signed-off-by: Rander Wang <rander.wang@intel.com>
2023-11-09 11:17:43 +02:00
Kai Vehmanen 1bfeb887c5 west.yml: update Zephyr to 26002b060708
Contains 500+ commits, including following directly affecting
SOF targets:

0a6fc6f70a25 soc: intel_adsp: cavs: fix dts memory address format
4b02bbc3297f cmake: xtensa: update xtensa SoC to use SOC_LINKER_SCRIPT variable
8bccb645aae8 boards: intel_adsp: fix board flashing
a4b9692155a3 soc: intel_adsp/cavs: add secondary dsp context save support
0891448ac908 soc: intel_adsp: don't enable interrupt before k_cpu_idle
c73e67018d0a power_domain_intel_adsp.c: revert recent INIT_PRIORITY change
385ceb714537 soc: xtensa: nxp_adsp: rt595: move .noinit

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2023-11-09 11:17:09 +02:00
Marc Herbert 1bd9e0d2c7 cmake/zephyr: decentralize src/ipc/
Adding all source files in a single, giant zephyr/CMakeLists.txt is
inconvenient and does not scale.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-11-08 16:53:28 +00:00
Marc Herbert ef563ebfe3 cmake/zephyr: decentralize src/init/
Adding all source files in a single, giant zephyr/CMakeLists.txt is
inconvenient and does not scale.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-11-08 16:53:28 +00:00
Seppo Ingalsuo ad655446fd Tools: Testbench: Remove -Wl,-EL to avoid build fail with xt-clang
The linker option to indicate little endian is unused and the
warning causes build fail:

clang-10clang-10: : errorerror: : -Wl,-EL: 'linker' input unused
[-Werror,-Wunused-command-line-argument]-Wl,-EL: 'linker' input unused
[-Werror,-Wunused-command-line-argument]

clang-10: error: -Wl,-EL: 'linker' input unused
[-Werror,-Wunused-command-line-argument]
clang-10: error: -Wl,-EL: 'linker' input unused
[-Werror,-Wunused-command-line-argument]
gmake[2]: *** [CMakeFiles/testbench.dir/build.make:76:
CMakeFiles/testbench.dir/testbench.c.o] Error 1

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-11-08 16:39:29 +00:00
Seppo Ingalsuo bb5d82b1fe Tools: tplg_parser: Remove -Wl,-EL to avoid build fail with xt-clang
The linker option to indicate little-endian is not needed. It causes
build fail:

clang-10: errorclang-10: : -Wl,-EL: 'linker' input unused
[-Werror,-Wunused-command-line-argument]
error: -Wl,-EL: 'linker' input unused
[-Werror,-Wunused-command-line-argument]
clang-10: error: -Wl,-EL: 'linker' input unused
[-Werror,-Wunused-command-line-argument]
clang-10: clang-10error: : error: -Wl,-EL: 'linker' input unused
[-Werror,-Wunused-command-line-argument]
-Wl,-EL: 'linker' input unused [-Werror,-Wunused-command-line-argument]
gmake[5]: *** [CMakeFiles/sof_tplg_parser.dir/build.make:90:
CMakeFiles/sof_tplg_parser.dir/process.c.o] Error 1

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-11-08 16:39:29 +00:00
Seppo Ingalsuo 3f2096c6b9 Tools: Testbench: Avoid warning about fallthrough and fix return code
The build of testbench fails at /* fallthrough */ with xt-clang
build for MTL since warnings are treated in tesbench build as
errors. The re-arrange of default and 'h' fixes also return
of -EINVAL in default case for unknown option.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-11-08 16:39:29 +00:00
Seppo Ingalsuo 2006297ee2 Scripts: Testbench: Add xt-testbench build for MTL with xt-clang
Build for MTL needs other compiler xt-clang, so the COMPILER is
set by default to xt-xcc and changed for MTL in set_xtensa_params.sh
where also core and tools version is defined.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-11-08 16:39:29 +00:00
Iuliana Prodan b9bd2303bd topology: imx: fix tdm slot width value
Set correct TDM slot width to 32 bits.

The error has been discovered after commit
0ba64e98ec ("SAI: use topology params").
We start using the tdm_slot_width from topology,
rather than hardcoded in code.


Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2023-11-08 15:02:19 +01:00
Jaroslaw Stelter 414d880429 ipc: ipcv4: Add remote free of components
For delete pipeline operation this patch adds deletion of
modules added to given pipeline but executed on different
core. This case could appear only for DP processing modules.

Signed-off-by: Jaroslaw Stelter <Jaroslaw.Stelter@intel.com>
2023-11-08 14:34:35 +02:00
Jaroslaw Stelter 253e09feb8 idc: ipv4: Add idc_comp_free operation
New IDC request idc_comp_free() is required to delete
component located on different core than the pipline to which
the module belongs.

Signed-off-by: Jaroslaw Stelter <Jaroslaw.Stelter@intel.com>
2023-11-08 14:34:35 +02:00
Jaroslaw Stelter df71b4e073 ipc: Add remote component search by pipeline idc
By default ipc_get_comp_by_ppl_id() routine omits component
from core different that the one where pipeline is working.
However with introduction of DP modules such situation can happen.
In some flows we need to find modules that belongs to given pipeline
but are scheduled on different core. This modifications will allow to
select when include such modules in the search.

Signed-off-by: Jaroslaw Stelter <Jaroslaw.Stelter@intel.com>
2023-11-08 14:34:35 +02:00
Yong Zhi 49377e8c9e topology2: google-rtc-aec: expose DP module core_id for overriding
RTC_AEC module is using DP and rest of pipeline is LL and both can
run on different cores.

For the purpose to assign DP module individually on secondary core,
now add a new macro GOOGLE_AEC_DP_CORE_ID.

Signed-off-by: Yong Zhi <yong.zhi@intel.com>
2023-11-07 14:48:38 +00:00
Zhang Peng f8a9591370 app: boards: Add imx8ulp conf to support imx8ulp config
Add conf file for imx8ulp: nxp_adsp_imx8ulp.conf

Signed-off-by: Zhang Peng <peng.zhang_8@nxp.com>
2023-11-06 09:34:37 +01:00
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