Commit Graph

2307 Commits

Author SHA1 Message Date
Maciej Strozek eea7b51fd6 topology2: cavs-cs42l43: Add topology for cs42l43/cs35l56 on MTL
The layout is configured as:
    - Link0: CS42L43 Jack and mics
    - Link2: 2x CS35L56 Speaker (amps 3 and 4, right)
    - Link3: 2x CS35L56 Speaker (amps 1 and 2, left)

Signed-off-by: Maciej Strozek <mstrozek@opensource.cirrus.com>
2024-01-26 01:10:26 +02:00
Pierre-Louis Bossart 6a2eba11dd topology2: enable HDMI for all MTL topologies
Remove the temporary workaround and add HDMI on all MeteorLake
products. If this breaks stuff, well we need to fix hit ASAP.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2024-01-25 18:09:29 +02:00
Marc Herbert ff9343aa4a logger: convert: Fix compile time error with newer toolchain
Using Compiler version: aarch64-poky-linux-gcc (GCC) 13.2.0
we get the following error:

tools/logger/convert.c: In function 'convert':
tools/logger/convert.c:357:34: error: '%*s' directive output between 4294967264 and 4294967284 bytes exceeds 'INT_MAX' [-Werror=format-overflow=]
|   357 |                 fprintf(out_fd, "%*s(us)%*s  ", -ts_width, " TIMESTAMP", ts_width, "DELTA");
|       |                                  ^~~                       ~~~~~~~~~~~~
| In file included from /opt/builds/OBNand/build/tmp/work/armv8a-poky-linux/sof-tools/2.8.0/recipe-sysroot/usr/include/stdio.h:964,
|                  from /opt/builds/OBNand/build/tmp/work/armv8a-poky-linux/sof-tools/2.8.0/git/tools/logger/convert.h:13,
|                  from /opt/builds/OBNand/build/tmp/work/armv8a-poky-linux/sof-tools/2.8.0/git/tools/logger/convert.c:21:
| In function 'fprintf',

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2024-01-25 10:35:10 +02:00
Peter Ujfalusi c27eda7edb topology2: production: cav2.5: Add sof-adl-rt711-l0-rt1316-l13-rt714-l2
The sof-adl-rt711-l0-rt1316-l13-rt714-l2 similar to
sof-adl-rt711-l0-rt1308-l12-rt715-l3 with the SDW DMIC on different link.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
2024-01-24 16:46:01 +00:00
Peter Ujfalusi 10e87fd8f1 topology2: production: cav2.5: Add sof-adl-rt711-l0-rt1308-l12-rt715-l3
The sof-adl-rt711-l0-rt1308-l12-rt715-l3 is identical configuration as
sof-tgl-rt711-rt1308-rt715

At the same time update the comments for better organization.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
2024-01-24 16:46:01 +00:00
Peter Ujfalusi d0232e7286 topology2: production: cav2.5: Remove NHLT blob from SDW DMIC topologies
NHLT blob is not needed in for DMIC on SDW bus.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
2024-01-24 16:46:01 +00:00
Peter Ujfalusi b05eded22d topology2: Tidy up the production target name as topology2_prod
The target name for the production should have been more precise as it
ended up:
ninja -C tools/build_tools/ help
topology2_dev: phony
...
topology2_dev_sof-tgl-nocodec: phony
topology2_dev_sof-tgl-nocodec-crossover-2way: phony
...
topology2_prod: phony
...
topology2_sof-hda-generic: phony
topology2_sof-hda-generic-2ch: phony
...

Change it to be consistent:
topology2_dev: phony
...
topology2_dev_sof-tgl-nocodec: phony
topology2_dev_sof-tgl-nocodec-crossover-2way: phony
...
topology2_prod: phony
...
topology2_prod_sof-hda-generic: phony
topology2_prod_sof-hda-generic-2ch: phony
...

No functional change.

Suggested-by: Marc Herbert <marc.herbert@intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
2024-01-24 15:13:11 +00:00
Peter Ujfalusi 65e4c1f8b5 topology2: Merge avs-tplg and sof-ace-tplg under production directory
Merge the avs-tplg and sof-ace-tplg under a common production directory.

After a successful build CMake will copy the topology files to a target
directory from where they can be copied to DUT/release:

$ tree tools/build_tools/topology/topology2/target
tools/build_tools/topology/topology2/target
├── development
│   ├── cavs-sdw-hdmi.tplg
│   ├── cavs-sdw-src-gain-mixin.tplg
        ...
│   ├── sof-tgl-nocodec-rtcaec.tplg
│   └── sof-tgl-nocodec.tplg
├── sof-ace-tplg -> sof-ipc4-tplg
└── sof-ipc4-tplg
    ├── sof-adl-rt711-4ch.tplg
    ├── sof-adl-rt711-l0-rt1316-l12-rt714-l3.tplg
        ...
    ├── sof-tgl-rt712.tplg
    └── sof-tgl-rt715-rt711-rt1308-mono.tplg

The sof-hda-generic-2/4ch.tplg will be generated without embedded NHLT as
it is not used under normal circumstance.
Two flavor of the generic topology is generated for CAVS2.5 and ACE1/2 with
included NHLT binary in case it is used by existing users, but it is
unlikely.

As noted in the documentation, on the deployed system a symlink is needed
for ACE1/2 platforms for backwards compatibility:
sof-ace-tplg -> sof-ipc4-tplg

Link: https://github.com/thesofproject/sof-docs/blob/master/getting_started/intel_debug/introduction.rst#2-topology-file
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
2024-01-22 10:38:49 +08:00
Seppo Ingalsuo 7b5475b0af Tools: Rimage: Config: Add IGO NR component for TGL, MTL, LNL platforms
This patch enables to load the component in the changed platforms.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2024-01-18 16:39:29 +00:00
Seppo Ingalsuo d47385b384 Tools: Testbench: Build IGO_NR with stub for testbench
This allows to build and load IGO NR stub version to testbench.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2024-01-18 16:39:29 +00:00
Seppo Ingalsuo 14237ed126 Tools: Rimage: Add RTNR component to TGL, MTL, and LNL platforms
This patch allows load of RTNR component with these platforms.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2024-01-17 13:19:40 +00:00
Seppo Ingalsuo ac900459b3 Tools: Testbench: Add build of RTNR component to testbench
This patch enables RTNR (with stubs) to be built and loaded
to testbench.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2024-01-17 13:19:40 +00:00
Yong Zhi 40f6de58da sof_ri_info: fix imr size for cnl
Fix the typo for 8MB imr size.

Signed-off-by: Yong Zhi <yong.zhi@intel.com>
2024-01-17 11:57:45 +02:00
Adrian Warecki 6c188298b9 rimage: loadable_modules: Set correct image type
The image header contains a bitfield with flags specifying a image type.
This commit sets correct image type depending on whether firmware or
a loadable module is being signed.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
2024-01-12 17:52:53 +02:00
Chao Song 16d788efed Topology2: Add sof-lnl-rt722-l0
This patch adds the topology for LNL RVP with rt722
multiple function codec.

Signed-off-by: Chao Song <chao.song@linux.intel.com>
2024-01-11 12:38:28 +00:00
Andrula Song 3a78701fb0 Tools: Topology2: Add sof-hda-benchmark-src_lite16/24/32-<platform>
This patch adds build of hda-generic development topologies to
test SRC LITE component with all s16/s24/s32 formats

Signed-off-by: Andrula Song <andrula.song@intel.com>
2024-01-09 15:09:37 +00:00
Andrula Song 04a0553d67 Tools: Topology2: Add widget class SRC LITE
This patch allows to build topologies to use the SRC LITE
component.

Signed-off-by: Andrula Song <andrula.song@intel.com>
2024-01-09 15:09:37 +00:00
Peter Ujfalusi 4bb48758ad topology2: Remove redundant DEEPBUFFER_FW_DMA_MS=100 settings
The default for DEEPBUFFER_FW_DMA_MS is 100, remove the
DEEPBUFFER_FW_DMA_MS parameter set for individual topologies when the value
set is also 100

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
2024-01-08 14:19:50 +00:00
Peter Ujfalusi 80f283de0c topology2: Mark DeepBuffer D0I3 compatible by default
The DeepBuffer stream is D0I3 compatible for some time now on all IPC4
platforms, The CAVS2.5 topologies just did not got updated.

Swap the default for the DEEPBUFFER_D0I3_COMPATIBLE to true.
New, experimental platforms can change this if needed until the feature is
verified.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
2024-01-08 14:19:50 +00:00
Andrula Song dae9214e37 Topology: Topology2: Add sof-hda-benchmark-src24/16-<platform>
This patch adds build of hda-generic development topologies to
test SRC component with s24/16 format.

Signed-off-by: Andrula Song <andrula.song@intel.com>
2024-01-08 10:47:30 +02:00
Andrula Song 344778384a Tools: Topology2: Add more specific src format .conf files
Add more s24 and s16 format src .conf files. These files
have the similar function as s32 files.

Signed-off-by: Andrula Song <andrula.song@intel.com>
2024-01-08 10:47:30 +02:00
Chao Song 874eda7ca8 Topology2: Add sof-lnl-rt712-l2-rt1712-l3 topology
This patch adds the topology for LNL RVP with rt712
multiple function codec.

Signed-off-by: Chao Song <chao.song@linux.intel.com>
2024-01-05 13:15:49 +02:00
Andrula Song 1c33c4e1b7 Topology: Topology2: Add sof-hda-benchmark-src32-<platform>
This patch adds build of hda-generic development topologies to
test SRC component with s32 format.

Signed-off-by: Andrula Song <andrula.song@intel.com>
2024-01-04 15:31:26 +00:00
Yong Zhi 1f3cf75a1b topology2: cavs-rt5682: Assign RTC_AEC to secondary core
Run RTC_AEC module on core 2 to balance workloads.

Signed-off-by: Yong Zhi <yong.zhi@intel.com>
2024-01-04 15:27:16 +02:00
Kai Vehmanen a9bd8245d2 topology2: cavs-nocodec-bt: fix PCM0 and PCM1 capabilities
The pipelines for PCM0 and PCM1 only support S32_LE audio
format. Fix the PCM capability descriptions to match the actual
pipeline definitions. This allows to run test suites that enumerate
all support PCMs and their formats.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2023-12-22 11:36:39 +02:00
Seppo Ingalsuo dabf0a672e Tools: Topology2: Add switch control to topologies with DRC
The mixer control for switch is added to widget definition
of drc.conf.

In cavs-mixin-mixout-efx-hda.conf the existing control name
is changed to have "bytes" similarly as multiband-drc has. The
switch control is added for the widget to implement the switch.

The controls definitions files in benchmark topologies are replaced
to new format from current .conf generator script. The bytes control
is same as before, and the mixer control for switch is added.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-12-21 13:12:42 +00:00
Guennadi Liakhovetski cf9a444bfc toml: modularise TOML configuration
Split TOML configuration files into platform and module parts. Use
the C preprocessor to merge them back together.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2023-12-21 13:07:13 +00:00
Andrula Song 7ec22d80ea Tools: Topology: Fix the topology2 ASRC UUID
Correcting the UUID in asrc.conf to match with firmware.

Signed-off-by: Andrula Song <andrula.song@intel.com>
2023-12-20 14:58:58 +00:00
Seppo Ingalsuo 3d083e7ca7 Tools: Tune: DRC: Add calculation of blob for speaker processing
This patch adds generation of a blob that applies about
10 dB gain with compression and additional post gain of
3 dB for strong loudness boost effect.

The drc_gen_coefs.m script is changed to display
the master linear gain as decibels to help achieve
suitable gain when setting parameters.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-12-19 17:18:44 +00:00
Seppo Ingalsuo 18f170352d Tools: Tune: DRC: Add information how to create topology blobs
This patch updates the generator script example_drc.m with added
information how the blobs were created.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-12-19 17:18:44 +00:00
Seppo Ingalsuo 4baa131628 Tools: sof-ctl: Add DRC blobs for testing
These blobs are useful in setting DRC in runtime to
pass-through or strong compression mode to evaluate
performance.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-12-19 17:18:44 +00:00
Seppo Ingalsuo 895450ec6f Tools: Topology2: Update comments in DRC configuration blobs
Add descriptive comments how these blobs for DRC were
created.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-12-19 17:18:44 +00:00
Seppo Ingalsuo b2b6f099d2 Tools: Topology2: DRC: Add blob for speaker processing
This blob exercises fully the features of DRC and is
therefore useful for performance evaluation in all
operation regions.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-12-19 17:18:44 +00:00
Seppo Ingalsuo 6eed29c74f Tools: Topology1: Add speaker DRC blob for testbench run
This blob exercises fully the features of DRC and is
therefore good for testbench runs to evaluate performance
in all operation regions.

The pipeline pipe-drc-playback.m4 is used only with testbench
so it is safe to change to use this blob.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-12-19 17:18:44 +00:00
Balamurugan C fc860826a8 topology2:cavs-es83x6: Add support to Es8326 codec + HDMI-in capture
Add Es8326 codec support and HDMI-in capture via I2S.

Signed-off-by: Balamurugan C <balamurugan.c@intel.com>
2023-12-19 17:03:57 +00:00
Marc Herbert 27e5f40b9a rebuild-testbench.sh: error when unknown arguments are passed
Silently discarding user input is really bad.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-12-19 16:54:45 +00:00
Seppo Ingalsuo e5da161264 Tools: Topology2: Add sof-hda-benchmark-rtnr16/24/32-<platform>
This patch adds build of hda-generic development topologies to
test IGO NR component with all s16/s24/s32 formats.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-12-19 17:41:02 +02:00
Seppo Ingalsuo 8df176a7bb Tools: Topology2: Add widget class IGO NR
This patch allows to build topologies to use the IGO NR
component.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-12-19 17:41:02 +02:00
Laurentiu Mihalcea aaff352314 topology1: pipe-volume-capture.m4: Set minimum number of channels to 2
Currently, the minimum number of channels for the capture PCM
is set to the same value as the maximum number. This restricts
the number of channels supported by the PCM to the maximum number.
This is wrong if we want to allow arecord to work with multiple channel
values. As such, follow the example of "pipe-volume-playback.m4" and
introduce a new macro: LOCAL_CHANNELS_MIN. This will be set to
"CHANNELS_MIN" if said macro is defined, otherwise it will be set to
2.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2023-12-13 15:26:16 +02:00
Marc Herbert ded019bd46 xtensa-build-zephyr.py: remove IPC3/IPC4 "cavs" switch
Rename:
- tgl-cavs.toml   to tgl.toml
- tgl-h-cavs.toml to tgl-h.toml

Remove the IPC3/IPC4 switch added by commit 6f71808e3e
("xtensa-build-zephyr.py: add ipc4 build support for tgl")

This brings back consistency which is required for the .toml
split (#8490)

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-12-12 23:50:40 +02:00
Marc Herbert 79e5080175 rimage: remove obsolete, IPC3 tgl.toml and tgl-h.toml
The main branch hasn't supported IPC3 for tgl for a long time.

Follow-up to commit a17c2823d3 ("xtensa-build-zephyr: remove ipc
option")

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-12-12 23:50:40 +02:00
Jyri Sarha f064c029cc topology2: pipeline: Remove rate attribute and rate and channels values
Remove the rest of channels and rate attribute values from pipeline
instamces and remove rate attribute definition from
pipeline-common.conf. There was no channels attribute definition in
pipeline-common.conf, not to mention *_min and *_max attributes.

Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
2023-12-12 20:18:02 +02:00
Jyri Sarha d6999c590e topology2: pipelines/cavs: Remove channels and rate pipeline attribute values
This commit removes all defined values for rate, rate_min, rate_max,
channels, channels_min, and channels_max, from all pipeline
definitions under include/pipelines/cavs. The commit also removes them
from the usage examples in the comments.

The removed pipeline level attribute values are obsolete.

Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
2023-12-12 20:18:02 +02:00
Adrian Bonislawski fd61ed6151 rimage: elf: fixed error handling from file operation
Fixes error handling

Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
2023-12-11 17:03:31 +02:00
Adrian Bonislawski e30fedc992 rimage: file_simple: remove dead code
remove logically dead code

Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
2023-12-11 17:03:31 +02:00
Adrian Bonislawski 17c226b683 rimage: ext_manifest: check fwrite status
Check fwrite status for error

Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
2023-12-11 17:03:31 +02:00
Adrian Bonislawski 0f72917521 rimage: ext_manifest: fix fwrite arguments
this will fix parameter order to: size, count

Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
2023-12-11 17:03:31 +02:00
Adrian Warecki 7a63f66961 rimage: Introduce ALIGN_UP macro
Created ALIGN_UP macro to simplify calculations.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
2023-12-11 12:38:39 +02:00
Adrian Warecki e91f077a52 rimage: manifest: Use DIV_ROUND_UP macro
Used DIV_ROUND_UP macro to calculate page count.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
2023-12-11 12:38:39 +02:00
Adrian Warecki d8113fabc9 rimage: Limit input module count to module array size
Added limit of a number of input modules provided in a command line to the
maximum number of supported modules (size of module array / MAX_MODULES)

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
2023-12-11 12:38:39 +02:00
Yong Zhi a108c5e940 topology2: Remove pcm cap attributes
Remove the attributes that do not belong to Pipeline class.
There are no changes to compiled binary.

Signed-off-by: Yong Zhi <yong.zhi@intel.com>
2023-12-11 12:13:21 +02:00
Yong Zhi cdd1c91608 topology2: google-rtc-aec: Add Byte control
Add binary controls for AEC tuning data with
max size set to 2048.

Signed-off-by: Yong Zhi <yong.zhi@intel.com>
2023-12-08 15:29:31 +02:00
Yong Zhi 79f914e8ab sof-ctl: minor update for help text
The option -s is also needed for binary input file.

Signed-off-by: Yong Zhi <yong.zhi@intel.com>
2023-12-07 13:29:40 +02:00
Peter Ujfalusi cff6a6b6f3 topology2: Enable ChainDMA for HDMI links unconditionally
Make the HDMI_USE_CHAIN_DMA set to true by default as enabling it for every
configuration just does not scale.

The generic HDA topologies enabled this for all IPC4 platforms already.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
2023-12-05 11:11:39 +02:00
Peter Ujfalusi cf473b5aa7 topology2: Rename USE_CHAIN_DMA to HDMI_USE_CHAIN_DMA
In practice all HDA links (on LNL SDW/SSP/DMIC also) can use ChainDMA, but
the flag is used to enable this only for display links.

Rename the flag to be precise about this.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
2023-12-05 11:11:39 +02:00
Ranjani Sridharan e65eb8500c tools: plugin: Fix hybrid pipeline support
Fix the pcm handle name and the params to fix playback/capture with
hybrid host-dsp pipeline.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-12-05 11:10:49 +02:00
Adrian Warecki e36b77c380 rimage: manifest: Improved handling of empty RODATA segment
If the RODATA segment does not contain any data, its type is marked as
empty. Cleared the readonly flag because this segment also contains .data
sections.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
2023-12-04 10:42:34 +02:00
Adrian Warecki c9fb8d48d5 rimage: module: Fix calculation of segment size in file
If a given output segment type did not contain any input section
(was empty), its size was incorrectly calculated as 1 and then rounded to
the page size (4096). This resulted in an unnecessary segment in a output
file.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
2023-12-04 10:42:34 +02:00
Mac Chiang 872d9fd199 topology2: sof-mtl-rt5650: enable dts playback
enable dts pipeline on rt5650 speaker(I2S0) and headphone(I2S1).

Signed-off-by: Mac Chiang <mac.chiang@intel.com>
2023-12-04 10:41:40 +02:00
Marc Herbert 50c224a2c7 tools/plugin/README.md: add -GNinja. Remove stale -DPLUGIN_IPC4
Add instructions to build sof_ep and parser_ep first to avoid dependency
issue and race condition.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-12-01 13:09:19 -08:00
Curtis Malainey 285c090a10 topology: Add support for buffer flags
Flags have been a part of IPC3 for ages, add support for them in the topology.

Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
2023-11-30 10:16:59 +02:00
barry.jan 5cf1c9c0d6 topology: Add Waves codec to MT8188 topology
Modify sof-mt8188-mt6359 topology so Waves codec can be added
to playback in case 'WAVES' is defined.

Signed-off-by: barry.jan <barry.jan@waves.com>
2023-11-29 16:33:19 +00:00
Adrian Warecki 2b4e484427 rimage: module: Use file name in error message in module_write_whole_elf
By oversight, the error message did not use the file name passed as a
parameter to the module_write_whole_elf function.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
2023-11-28 17:05:27 +02:00
Adrian Warecki 2b23146df6 rimage: elf_file: Fix elf_free behavior on unopened elf file
If more modules are provided in a command line than defined in a toml file,
the program outputs an error message. It frees the module structures
even though they have not been opened before. This resulted in an error
when trying to close a file that was not previously open. Added a check to
ensure that a file has been opened before trying to close it.
Error handling in the elf_open function has been simplified.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
2023-11-28 17:05:27 +02:00
Ranjani Sridharan 48324bd3f4 tools: plugin: alsa: Remove calls to buffer_acquire/release
These dont exist anymore.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-11-22 09:41:50 +02:00
Seppo Ingalsuo 980b9884f7 Tools: Test: Audio: Remove unused argument from src_test.m
In function test_run_src() the second argument "t" is not used
so it can be safely removed.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-11-20 15:43:51 +00:00
Michal Bukowski ae31a28741 rimage: mtl: add cadence module entry
Added entry allows to enable cadence codec module.

Signed-off-by: Michal Bukowski <michal.bukowski@intel.com>
2023-11-20 15:27:53 +00:00
Yong Zhi 8b1a01f976 topology2: cavs-rt5682: Add Deep buffer PCM on amps
Add deep buffer PCM35 on amps for sof-mtl-max98357a-rt5682 tplg.

Signed-off-by: Yong Zhi <yong.zhi@intel.com>
2023-11-17 13:12:32 +00:00
Yong Zhi 6a0e9b1eb4 topology2: deep-buffer: Add second instance
Add 2nd deepbuff PCM as an option.

Signed-off-by: Yong Zhi <yong.zhi@intel.com>
2023-11-17 13:12:32 +00:00
Baofeng Tian a451d6b69a Topology2: fix obs size for src converter from 48k
From 48k input, the obs for 11025/22050/44100/88200/176400 setting
need take care, previous implementation left 5 words redundancy
for output, this change removed redundancy, since actual output
buffer size always use double obs size.

Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
2023-11-17 12:47:40 +02:00
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
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 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
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
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
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
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
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
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
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
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
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
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
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
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