Commit Graph

11388 Commits

Author SHA1 Message Date
Baofeng Tian 85a15e5a06 Topology2: fix 22khz obs setting
22050Hz obs also need a separate setting, this was missed when first
create this file, now move it to the group with obs setting.

Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
2023-11-17 12:47:40 +02:00
Baofeng Tian f60dd1818f audio: tdfb: rename some macros to avoid repeat definition
Add prefix SOF_TDFB to macros to avoid repeat definition.

Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
2023-11-17 12:05:58 +02:00
Baofeng Tian 03a4c38a3d audio: tdfb: split ipc3 and ipc4 specific code
Split out ipc3 and ipc4 specific code from tdfb module, also
refined header files for new source file.

Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
2023-11-17 12:05:58 +02:00
Baofeng Tian 81824ea76b audio: tdfb: move tdfb header file to tdfb module folder
Move it from include path to tdfb module folder.

Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
2023-11-17 12:05:58 +02:00
Guennadi Liakhovetski 20e7e319b0 idc: (cosmetic) simplify idc_msg_status_get()
Simplify the return statement in idc_msg_status_get() and remove 2
excessive empty lines.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2023-11-16 19:33:25 +02:00
Guennadi Liakhovetski f8e3609a30 module-adapter: (cosmetic) simplify return
Use "return 0" where the value of "ret" is known.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2023-11-16 19:33:25 +02:00
Guennadi Liakhovetski 983ac1a958 chain-dma: (cosmetic) remove a superfluous space
Use a single space.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2023-11-16 19:33:25 +02:00
Baofeng Tian 81398b0f89 audio: eq_fir: simplify eq fir set parameters
Simplify set parameters, also add source buffer parameter setting.

Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
2023-11-16 16:43:50 +02:00
Baofeng Tian 5e40ac7c90 Audio: eq_fir: move out eq_fir ipc3 and ipc4 specific code
Move out ipc3 and ipc4 specific code to corresponding source file.
Also, move some common functions to header file.

Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
2023-11-16 16:43:50 +02:00
Baofeng Tian df00e71416 audio: eq_fir: move eq fir header to its own directory
This is part of eq_fir code reorganize, move headers to
its own directory.

Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
2023-11-16 16:43:50 +02:00
Seppo Ingalsuo 2ab6fe528d Tools: Topology2: Add sof-hda-benchmark-rtnr16/24/32-<platform>
This patch adds build of hda-generic development topologies to
test RTNR component with all s16/s24/s32 formats.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-11-16 15:59:10 +02:00
Seppo Ingalsuo 0e787e60c4 Tools: Topology2: Add widget class RTNR
This patch allows to build topologies to use the RTNR
component. Two bytes control blobs are converted from
topology1 to IPC4 format.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-11-16 15:59:10 +02:00
maruthi machani f217130a53 dma: dma channel null condition check
dma channel null condition check for pipelines
without using any of the specified dma channels.

Signed-off-by: maruthi machani <maruthi.machani@amd.corp-partner.google.com>
2023-11-15 14:30:31 +02:00
maruthi machani 8862f8863a topology1: amd: topology support for soundwire
topology support for soundwire

Signed-off-by: maruthi machani <maruthi.machani@amd.corp-partner.google.com>
2023-11-15 14:30:31 +02:00
maruthi machani 9dad60d0d9 platform: amd: enabling support for sound wire
Enabling sound wire support for amd platform

Signed-off-by: maruthi machani <maruthi.machani@amd.corp-partner.google.com>
2023-11-15 14:30:31 +02:00
maruthi machani 3858532c76 driver:amd:enabling support for sound wire
Enabling sound wire support for amd platform

Signed-off-by: maruthi machani <maruthi.machani@amd.corp-partner.google.com>
2023-11-15 14:30:31 +02:00
Bard Liao f56559c059 topology2: add sof-mtl-cs42l43-l0-cs35l56-l12.tplg
Add cs42l43 + cs35l56 topology for MTL.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
2023-11-15 14:29:00 +02:00
Bard Liao 488c488b01 topology2: add sof-tgl-cs42l43-l3-cs35l56-l01 support
Add topology2 support for cs42l43 + cs35l56.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
2023-11-15 14:29:00 +02:00
Bard Liao ba65fb61ed topology2: sdw-jack-generic: add SDW_JACK_FMT_24 flag
To indicate the SoundWire jack need to use 24 bit format.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
2023-11-15 14:29:00 +02:00
Bard Liao a83db6b428 topology2: sdw-jack-generic: cleanup: use tab instead of space
Use tab instead of space.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
2023-11-15 14:29:00 +02:00
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