Commit Graph

11368 Commits

Author SHA1 Message Date
Bard Liao ba98117818 topology2: sdw-amp-generic: add SDW_AMP_FMT_24 flag
To indicate the SoundWire amp need to use 24 bit format.

I use a flag instead of a macro like $SDW_AMP_FMT to set valid_bit_depth
because bit_depth and valid_bit_depth may not be the same.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
2023-11-15 14:29:00 +02:00
Bard Liao 2541e55f2f topology2: Use SAMPLE_TYPE_MSB_INTEGER for ALH copier
MSB_INTEGER is required for ALH copier.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
2023-11-15 14:29:00 +02:00
Joe Cheng a8db157b9a app: overlays: Add DTS support to MTL
This patch adds DTS_CODEC for IPC4 Intel platform builds.

Since EQ IIR + DTS is the combination we use to support customer, adding
EQ IIR here to ensure it's enabled.

Signed-off-by: Joe Cheng <joe.cheng@xperi.com>
2023-11-14 08:20:54 -08:00
Joe Cheng 98d492ab94 zephyr : import dts library
Importing DTS library here to ensure DTS library is built into SOF
firmware as a static library.

Signed-off-by: Joe Cheng <joe.cheng@xperi.com>
2023-11-14 08:20:54 -08:00
Joe Cheng f36af19124 audio : dts : add DTS support for MTL
Add DTS init function

Signed-off-by: Joe Cheng <joe.cheng@xperi.com>
2023-11-14 08:20:54 -08:00
Joe Cheng 032d73ee49 dts : update DTS version to V1.1.3
MTL support is added in DTS V1.1.3.

Signed-off-by: Joe Cheng <joe.cheng@xperi.com>
2023-11-14 08:20:54 -08:00
Joe Cheng 5aac660e02 dts : add more error logs in set_configuration()
Add more error logs to identify potential problem in set_configuration()

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-14 08:20:54 -08:00
Joe Cheng 0a19e7f74b dts : fix set_configuration() fail on MTL
md->state is set in IPC3, not in IPC4.

set_configuration() would fail on MTL because md->state is not set.

Add macro CONFIG_IPC_MAJOR_3 to avoid this problem.

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-14 08:20:54 -08:00
Joe Cheng a9ef2b2bf2 dts : add LOG_MODULE_REGISTER()
It would build fail without LOG_MODULE_REGISTER.

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-14 08:20:54 -08:00
Serhiy Katsyuba 56a6d0d3e0 dai-zephyr: Do not skip dma_reload() when sink if full
If sink is full and so no bytes were copied, reload DMA anyway as
otherwise xrun may happen if reload is skipped for a long time.

Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
2023-11-14 17:04:49 +02:00
Ranjani Sridharan 529277f3f2 topology2: mixout-gain-efx-mbdrc-dai-copier-playback: Use index in routes
The old notation is not very readable.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-11-13 16:17:41 +02:00
Ranjani Sridharan f23f1232a6 topology2: mixout-gain-efx-dai-copier-playback: Use index explicitly in routes
The old notation to leave out pipeline ID is not very readable.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-11-13 16:17:41 +02:00
Marcin Szkudlinski 0c91f05e69 sink_src: add ipc4 update format functions
sink/src API must grow to provide similar functionality
to comp_buffers.

This commit adds 2 helpers for IPC4 format set

Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
2023-11-13 10:01:04 +02:00
BANDA MADHU dc6770d8ba platform: amd: Add support for One Shot DMA configuration
Support for One Shot DMA configuration for AMD Platforms.

Signed-off-by: BANDA MADHU <Madhu.Banda@amd.com>
2023-11-13 10:00:10 +02:00
Laurentiu Mihalcea 925a48668b app: boards: Add overlays for i.MX8QM and i.MX8QXP
This commit is needed because the current Linux kernel
version used in our internal testing doesn't
contain the patches that enable MU2's power.
As such, to avoid failures in the internal tests,
disable the CCM and LPUART2 IPs.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2023-11-13 09:57:58 +02:00
Laurentiu Mihalcea 4da19a9c1d manifest: west.yml: Bump up Zephyr revision
Bump up Zephyr revision to contain the i.MX8QM and
i.MX8QXP patches that introduce support for the
serial interface.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2023-11-13 09:57:58 +02:00
Seppo Ingalsuo 9eae757947 Tools: Testbench: Fix ASRC component load
Before the fix the comp->core in ipc_comp_new() is garbage
and the check for maximum core count fails. The pointer to
struct asrc should be passed instead of address of pointer.

Fixes:	d9f9340e1a
	("tplg_parser: split out testbench logic and partition
	features per file.")

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-11-10 16:27:37 +00:00
Andrula Song 00e7bc0cc0 Audio: ASRC: convert ASRC to module API.
Convert ASRC to module API and support ASRC IPC3 test
with test bench.

Signed-off-by: Andrula Song <andrula.song@intel.com>
2023-11-10 17:44:58 +02:00
Andrula Song 399bc38d8c Audio: Module adapter: Add trigger ops
Add trigger ops in module_interface.

Signed-off-by: Andrula Song <andrula.song@intel.com>
2023-11-10 17:44:58 +02:00
Andrula Song 4bfa7aa551 Audio: ASRC: Add IPC4 DAI timestamp ops
Add IPC4 DAI timestamp ops for ASRC.

Signed-off-by: Andrula Song <andrula.song@intel.com>
2023-11-10 17:44:58 +02:00
Rander Wang 547132bc5d topology2: merge multi-core test into nocodec topology
The multi-core topology was created since multi-core feature had a few
bugs at that time so it was for validation test. Now this feature works
fine so merge it into nocodec topology then it will be tested by
github CI. And we don't need to maintain a dedicated multi-core topology.

Signed-off-by: Rander Wang <rander.wang@intel.com>
2023-11-10 12:33:43 +02:00
Daniel Baluta 1a8b1bf60c schedule: zephyr_dma_domain: Do not use a registered channel
Current implementation only checks if a channel is used with
current interrupt. But that channel might have been registered
with another interrupt earlier.

So, we need a way to skip channels already used. For this, we iterate
over all registered interrupts and check existing registered channels.

This fixes scenarios where running:

$ arecord -Dhw:0,0 -f S32 -c 2 -r 48000 -t raw |
aplay -Dhw:0,0 -f S32_LE -c 2 -r 48000

will result in an I/O error.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2023-11-10 10:10:16 +02:00
Guennadi Liakhovetski b7d7fb0ed2 schedule: cancel a task before freeing it
When a chain DMA stream is the only one running, stopping it
currently takes 100ms. The reason is that the chain DMA driver is
trying to stop the task directly from the IPC context instead of
letting the task exit on its next scheduling event. The IPC thread is
indeed trying to wait on a semaphore for the task to exit, but that
doesn't work either, because zephyr_domain_unregister() terminates
the thread before it signals the semaphore. To fix this we swap the
order and signal the semaphore before terminating the thread.

Link: https://github.com/thesofproject/sof/issues/8445
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2023-11-09 16:39:44 +02:00
Adrian Warecki 3bd9991121 lmdk: Instruct linker to keep .buildinfo section
At the beginning of the .text section there must be a structure containing
information about the version of the api used by the library. It's absence
will cause sof to interpret a random literal as a version and incorrectly
load a library.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
2023-11-09 11:28:30 +02:00
Adrian Warecki 0c2069c2c3 lmdk: Remove content of the .module section from final module image
The .module section contains the module manifest read by rimage. It should
not be included in the final loadable module image. Flags of this section
are now modified using objcopy to ignore it by rimage.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
2023-11-09 11:28:30 +02:00
Adrian Warecki d0931d3af5 lmdk: Remove align of .rodata section
The .data and .rodata sections are placed by rimage into one segment of
a resulting firmware image. So aligning the .rodata section to the page
boundary is just a waste of memory.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
2023-11-09 11:28:30 +02:00
Adrian Warecki cb64c68bcd rimage: manifest: Ignore lack of .bss section for a loadable modules
Loadable libraries do not need to have a .bss section. After this change,
its absence will be ignored when generating a image of the loadable module.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
2023-11-09 11:28:30 +02:00
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