Commit Graph

1555 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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 613021b37f Tools: Topology2: Add widget class TDFB
This patch adds the class for the Time domain fixed beamformer
(TDFB) and example blobs for line arrays.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-10-26 17:08:45 +03:00
Seppo Ingalsuo d27d068245 Tools: Topology2: Add support for ALSA enum control
This patch adds to definitions in common.conf a new class "text"
to support the enum control values.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-10-26 17:08:45 +03:00
Marc Herbert 1b1ec6c492 topology/cmake: skip all topologies when alsatplg < 1.2.5
Stop producing corrupted .tplg files when using `codec_consumer` (e.g.:
sof-imx8mp-btsco-dual-8ch.tplg, sof-imx8ulp-9x9-btsco-16k.tplg, ...)

Then we'll be able to finally search/replace "codec_master", see revert

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-10-24 20:32:28 +03:00
Marc Herbert d9fb722b64 topology/cmake: move alsatplg_version() one level up
We want to use it in topology1 too.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-10-24 20:32:28 +03:00
Marc Herbert 4495357f1e topology2/cmake: extract new function "alsatplg_version()" for re-use
We'll use this new function to require ALSA 1.2.5 and finally rename to
"codec_consumer" (see revert discussion #5192)

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-10-23 11:26:07 +01:00
Marc Herbert ec1cfd8f95 topology2/cmake: stricter if execute_process(alsatplg --version ...)
We want to fail if STATUS is not defined, the empty string, the FALSE
string or anything unexpected that it is not strictly equal to success
code "0".

Fixes commit 308a24a92b ("topology2: Add build support")

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-10-23 11:26:07 +01:00
Jyri Sarha 2eeae16d24 topology2: doc: Fix main page
The main page sources were dropped out from the document sources in the
last review rounds of the original PR. Add *.doxy to FILE_PATTERNS to
add it back.

Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
2023-10-20 11:42:22 +03:00
Ranjani Sridharan b6d34fb4a8 topology2: Replace audio_format objects
Replace audio_format objects with input_audio_format/output_audio_format
objects in preparation for deprecating the audio_format class.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-10-19 20:57:23 +03:00
Ranjani Sridharan 7c735fe7a7 topology2: deepbuffer-playback: Remove stale comments
These were left over when the audio formats were cleaned up.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-10-19 20:57:23 +03:00
SaiSurya Ch 559f3ffdb9 tools: topology: add ACP_6_3 topology support
Add ACP_6_3 platform topology.

Signed-off-by: SaiSurya Ch <saisurya.chakkaveeravenkatanaga@amd.com>
2023-10-19 20:47:38 +03:00
Ranjani Sridharan 054003f292 topology2: host-gateway-playback: Replace audio_format objects
Use input_audio_format/output_audio_format explicitly in preparation for
deprecating the audio_format class.

Fixes: 7a11e27bf2 ('topology2: host-gateway-capture: Replace audio_format objects')
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-10-18 16:56:59 +01:00
Ranjani Sridharan 5945235b42 topology2: mixout-gain-dai-copier-playback: Replace audio_format objects
Use input_audio_format/output_audio_format explicitly in preparation for
deprecating the audio_format class.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-10-18 16:56:59 +01:00
Ranjani Sridharan 1125fe06bc topology2: gain-copier-capture: Replace use of audio_format objects
Use input_audio_format/output_audio_format explicitly in preparation for
deprecating the audio_format class.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-10-18 16:56:59 +01:00
Ranjani Sridharan f64cc8f528 topology2: dmic-generic: Replace use of audio_format objects
Use input_audio_format/output_audio_format explicitly in preparation for
deprecating the audio_format class.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-10-18 16:56:59 +01:00
Keqiao Zhang 02a7c98534 topology: add test TPLGs for LNL-RVP
There're no differences for SSP and SoundWire TPLGs between
MTL and LNL, we can reuse MTL TPLGs for LNL.

Signed-off-by: Keqiao Zhang <keqiao.zhang@intel.com>
2023-10-18 17:41:22 +03:00
Mac Chiang e3fc9c1c8e topology2: add rt713_rt1316, no sdw_dmic config
This is additional HW board: No SDW_DMIC connection

SDW0: rt713 Jack codec
SDW1: rt1316 smart amp l
SDW2: rt1316 smart amp r

Signed-off-by: Mac Chiang <mac.chiang@intel.com>
2023-10-18 16:32:15 +03:00
Rander Wang 1fc1d28584 topology2: clean up audio format
Separate the input & output audio format.

Signed-off-by: Rander Wang <rander.wang@intel.com>
2023-10-17 15:55:07 -07:00
Rander Wang 4dad5c2d5c topolog2: nocodec: set output_pin number
The num_output_pins was set for pass-through path but missed in normal
path. Without it Linux kernel driver wouldn't set second output pin
format for dai copier which connects smart amp and gain module.

Signed-off-by: Rander Wang <rander.wang@intel.com>
2023-10-17 15:55:07 -07:00
Seppo Ingalsuo c22e3f438d Tools: Topology2: Use windows_fade in nocodec topologies
This patch changes all cavs-nocodec.conf based topologies to
use exponential Windows fade curve_type in gain components. It
is done to ensure the ramp gets tested after change of gain
curve_type default to linear.

The gain in included deep buffer playback pipeline (hw:0,31) and
in mixer pipeline (hw:0,41) are not changed because they are used
also in normal topologies. Also in capture direction DMIC raw
(hw:0,10) remains curve_type 2. Other gains are curve_type 1
Windows fade.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-10-17 17:33:50 +01:00
Seppo Ingalsuo 9aadd197ab Tools: Topology2: Change gain default curve type to linear
This change can drop in TGL platform 2ch 48 kHz gain component
peak load e.g. from 16.7 to 7.09 MCPS CPU_PEAK(MAX) reported by
sof_perf_analyzer.py. The peak varies a bit time. If several
gain instances ramp simulatenously in stream start, the peak
MCPS consumption could be source for xruns and glitches if overall
load is high.

The change with linear curve is barely audible. The
computationally heavier Windows fade exponential curve is required
only with Windows OS. Since Windows is not using ALSA topologies
this change does not impact it.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-10-17 17:33:50 +01:00
Ranjani Sridharan aeb83eccc4 topology2: sdw-jack-generic: Replace audio_format objects
Use input_output_format/output_audio_format explicitly. Additionally,
this patch introduces the used of the CombineArrays feature in the
topology2 compiler to generate multiple audio format objects from the
attribute array combinations.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-10-17 16:45:29 +01:00
Ranjani Sridharan 6850be91ba topology2: deepbuffer-playback: Replace audio_format objects
Use the input_audio_format/output_audio_format objects explicitly.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-10-17 16:45:29 +01:00
Ranjani Sridharan b0b5958875 topology2: sdw-amp/dmic-generic: Remove incorrect audio format
Setting the in bit depth for the second audio format in the
host-gateway-capture object results in resetting the channel count to 2.
The in_bit_depth is set to 32-bit by default for all audio formats in
host-gateway-capture class already.

Fixes: 7a11e27bf2 ('topology2: host-gateway-capture: Replace audio_format objects')
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-10-17 15:44:54 +01:00
Seppo Ingalsuo 64fcebbd64 Tools: Topology2: Add nocodec topology to test google-rtc-aec
The first playback PCM is for AEC mic input via SSP0 LBM. The second
playback PCM is for AEC reference via SSP2 LBM. The first capture
PCM is the AEC output.

The AEC (mockup) can be run and tested with the topology like
this:

$ aplay -Dhw:0,0 mic_clip.wav &
$ aplay -Dhw:0,2 ref_clip.wav &
$ arecord -Dhw:0,0 -f dat -d 10 output.wav

With AEC mockup version output.wav is mix of microphone
and reference.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-10-16 16:08:24 +01:00
Daniel Baluta 15507ec9ef topology: Add MICFIL topology for imx8mp
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2023-10-16 12:47:50 +02:00
Bard Liao c1b74bac9b topology2: sof-mtl-rt713-l0-rt1316-l12-rt1713-l3: use default stream
name

rt713 and rt1713 are in different SoundWire links. So, no DAI type will
be appended to DAI link name. We should use default stream name in
the topology.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
2023-10-13 12:39:38 +03:00
Seppo Ingalsuo df8f9dfc09 Tools: Topology2: Add sof-hda-benchmark-eqfir16/24/32-tgl build
This patch adds FIR EQ topologies build.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-10-13 12:34:56 +03:00
Seppo Ingalsuo 311c03026f Tools: Topology2: Add sof-hda-benchmark-eqiir16/24/32-tgl generate
This patch adds IIR EQ topologies build.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-10-13 12:34:56 +03:00
Seppo Ingalsuo 501816a90a Tools: Topology2: Add sof-hda-benchmark-drc16/24/32-tgl build
This patch adds DRC test topologies build.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-10-13 12:34:56 +03:00
Seppo Ingalsuo a292c9cf25 Tools: Topology2: Build topologies to test processing components
This patch uses cavs-benchmark-hda.conf to build topologies to
test components in a simple playback and capture configuration.

host copier --> component --> DAI copier
host copier <-- component <-- DAI copier

The built topologies are
sof-hda-benchmark-dcblock16/24/32-tgl.tplg

The shell script bench_comp_generate.sh is added to conveniently
generate include files needed to build new test topologies for
component with s16/s24/s32 format.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-10-13 12:34:56 +03:00
Seppo Ingalsuo 269d8d5924 Tools: Topology2: Add DC block component
This patch adds the widget class dcblock and a sample
bytes configuration blobs.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-10-13 12:34:56 +03:00
Ranjani Sridharan 7a11e27bf2 topology2: host-gateway-capture: Replace audio_format objects
With input_audio_format/output_audio_format objects in preparation to
deprecate the audio_format class.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-10-12 15:55:30 +03:00
Jyri Sarha c1996e01e1 topology2: doc: Little fixes to make all classes show correctly
There were couple of classes that did not have their topology2 snippets
showing. Probably the essential problem was just the class definition
starting from the first line of the file. There was nothing obviously
wrong in the output of the filter, but the way the doxygen works is
sometimes hard to anticipate. Adding \struct before the definition
fixed the problem.

Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
2023-10-06 15:34:14 +01:00
Jyri Sarha 649ac7d2d2 topology2: doc: input_audio_format.conf: Translate comments to Doxygen
Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
2023-10-06 15:34:14 +01:00
Jyri Sarha 215d7b3a07 topology2: doc: fe_dai.conf: Change comments to Doxygen
Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
2023-10-06 15:34:14 +01:00
Jyri Sarha a3e6cf7aac topology2: doc: data.conf: Change comments to Doxygen
Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
2023-10-06 15:34:14 +01:00
Jyri Sarha 22ec5b3811 topology2: doc: audio_format.conf: Translate comments to Doxygen
Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
2023-10-06 15:34:14 +01:00
Jyri Sarha c7f0e930f2 topology2: doc: widget-common.conf: Attribute comments to Doxygen
Change attribute comments to Doxygen comments.

Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
2023-10-06 15:34:14 +01:00
Jyri Sarha 2e9589069a topology2: doc: volume-playback.conf: Doxygenify existing comments
Doxygenify all comments that are correctly placed near the attribute's
or objects C-translation. This is not the case for comments before
Object.Base { } definition or comment before including
pipeline-common.conf, which is inlined by the topology2 filter, does
not end up in any relevant place, so its better just leave those
comments as they are. They can anyway be read from topology2 source
snippets.

Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
2023-10-06 15:34:14 +01:00
Jyri Sarha 13cf2a2752 topology2: doc: mixer.conf: Doxygenify and improve the existing comments
Improve and convert comments to doxygen documentation.

Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
2023-10-06 15:34:14 +01:00
Jyri Sarha 37ac9fcc6a topology2: doc: common.conf: Doxygenify the existing comments
Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
2023-10-06 15:34:14 +01:00
Jyri Sarha 080dc5a340 topology2: doc: gain.conf: Convert comments to Doxygen documentation
Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
2023-10-06 15:34:14 +01:00
Jyri Sarha 3014380909 topology2: doc: mainpage.doxy: Add simple main-page with contents
The initial main-page contains a short introduction into topology2
Doxygen documentation, and an inline reference to automatically
generated contents page.

The commit also adds more advanced cmake rules to track all document
dependencies.

Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
2023-10-06 15:34:14 +01:00
Jyri Sarha 59dd233c43 topology2: doc: topology2-generate-contents.sh: Script to generate contents
This commit adds topology2-generate-contents.sh the script to generate the
contents page that will be inline included to the mainpage added in the next
commit.

Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
2023-10-06 15:34:14 +01:00
Jyri Sarha 23a74a382c topology2: doc: Add README instructing how to build the documentation
Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
2023-10-06 15:34:14 +01:00
Jyri Sarha 3e0fdf5eba topology2: doc: Initial cmake build rules for doxygen documentation
Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
2023-10-06 15:34:14 +01:00
Jyri Sarha cfa4d44ffa topology2: doc: Add initial sof.doxygen.in
Includes all *.conf files under topology2 to the Doxygen documentation
and points directly to mainpage Doxygen source.

Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
2023-10-06 15:34:14 +01:00
Jyri Sarha 4d3934248f topology2: doc: topology2-filter.py: Add topology2 Doxygen filter
This is the second version of topology2 to C Doxygen filter. Its far
from perfect, but it should get us started.

The purpose of the translated C code is not to document actual
topology2 code, but only to provide anchors for Doxygen to form a
network of links through which to navigate the topology sources and
find the pieces of related Doxygen documentation. The filter also
creates separate pages of the original code and adds links next to the
pages in the C struct definition, instance documentation and their
possible Doxygen documentation.

Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
2023-10-06 15:34:14 +01:00
Seppo Ingalsuo 51159d80e4 Tools: Topology2: Fix the gain.conf curve_type values
This patch adds the other SOF volume ramp types linear and
logarithmic with and without zero crossings detect mode to gain
widget class. The names of fade values are changed to be similar
as in enum sof_volume_ramp, since there is a specific curve
shape required for Windows OS.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-10-04 14:24:15 +03:00
Ranjani Sridharan 9e9120a154 topology2: google-rtc-aec: Remove byte control
The blob contains the input/output audio formats but these are already
passed during module init based on hw_params. So no need to have the
byte control for it.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-10-03 18:14:41 +03:00
Ranjani Sridharan 351fe7e3ef topology2: google-rtc-aec: Add 4ch audio formats
The DMIC capture path should support both 4ch and 2ch audio formats.
Also, since the Google AEC module only support 16-bit input format,
modify the output of the refeence capture DAI accordingly.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-10-03 18:14:41 +03:00
Ranjani Sridharan 18595e9cd3 topology2: speaker-echo-ref: Remove the echo ref PCM
The echo-ref pipeline ie the DAI capture pipeline involving the speaker
codec is already part of the list of pipelines that gets set up and
triggered when the DMIC capture starts. Therefore, there's no need for
the echo-ref PCM to explicitly start the reference capture. So, remove
it and connect the codec DAI to the google-rts-aec module directly.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-10-03 18:14:41 +03:00
Rander Wang 9e21d8ba62 topology2: set pipeline priority for google aec stream
Set priority for aec stream so that driver can trigger pipeline based on
pipeline priority.

Signed-off-by: Rander Wang <rander.wang@intel.com>
2023-10-03 18:14:19 +03:00
Seppo Ingalsuo 2cdd11a95d Tools: Topology2: Remove 50 ms curve duration set from nocodec
We need to care about audio user experience and peak MCPS
usage in production topologies.

The alsabat test is disturbed by the longer ramp so the
change can be reverted from nocodec topologies. Those
topologies are never used by end users. Also the peak MCPS
mitigation is not relevant for test topologies, as long as
higher MCPS is not triggering error reports. The curve
duration is restored without explicit set to the default 20 ms.

Fixes: #8238
Fixes: d0d74a477f
       ("Tools: Topology2: Change in capture gain
       curve_duration to 50 m")

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-09-25 11:24:01 +01:00
Rander Wang beddfb360a topology2: Add 4ch audio formats for gain-capture pipeline
Add support in gain-capture pipeline to support 4ch DMIC stream.

Signed-off-by: Rander Wang <rander.wang@intel.com>
2023-09-25 11:23:25 +01:00
Rander Wang e7a1592002 topology2: use input|output audio format
The old style is not used now.

Signed-off-by: Rander Wang <rander.wang@intel.com>
2023-09-25 11:23:25 +01:00
Chao Song 75337b41eb topology2: remove duplicated pipeline index attribute definition
The pipeline-common.conf helps us to define several
common pipeline attributes include pipeline index,
there is no need to define pipeline index in each
pipeline class definition if pipeline-common.conf
is included.

Signed-off-by: Chao Song <chao.song@linux.intel.com>
2023-09-22 14:21:59 +01:00
Pierre-Louis Bossart 0912756595 topology2: intel: bt-ssp-config: use cardinal clock as source
All existing SSP-based topologies use the audio cardinal clock,
*EXCEPT* Bluetooth related ones. This doesn't make much sense, let's
use the same clock source for all SSPs.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2023-09-20 20:45:20 +03:00
Kai Vehmanen 1479462824 topology1: remove Intel CML and EHL topologies
These topologies are no longer supported by mainline firmware
code for these platforms. The stable-v2.2 branch continues to
support these targets.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2023-09-20 15:41:51 +01:00
Seppo Ingalsuo d0d74a477f Tools: Topology2: Change in capture gain curve_duration to 50 ms
This change increases the ramp duration from 20 ms to 50 ms. It
lowers the peak load of peak volume component due to longer same
gain value blocks. The internal update rate for gain becomes 250 us
instead of 125 us. The longer fade-in ramp also conceals better
possible analog capture start transients.

This changes for 4ch capture for gain.11.1 in sof-hda-generic-4ch.tplg
from

CPU_PEAK(MAX) = 21.95
PEAK(MAX)/AVG(AVG) = 7.51

to

CPU_PEAK(MAX) = 9.07
PEAK(MAX)/AVG(AVG) = 3.12

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-09-20 15:37:05 +01:00
Vamshi Krishna Gopal 6f2475b086 topology1: Use DYNAMIC for ADL and RPL topologies
use dynamic for all the adl and rpl topologies except 3p(waves,DTS),
excluded Dell sdw topologies which are not tested.

Signed-off-by: Vamshi Krishna Gopal <vamshi.krishna.gopal@intel.com>
2023-09-18 19:09:57 +03:00
Bard Liao e38f3f7829 topology2: add sof-mtl-rt713-l0-rt1316-l12-rt1713-l3 support
Add sof-mtl-rt713-l0-rt1316-l12-rt1713-l3 support.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
2023-09-15 10:04:12 +03:00
Bard Liao 3eada7c188 topology1: add sof-rpl-rt711-l0-rt1316-l12.tplg support
Adding sof-rpl-rt711-l0-rt1316-l12.tplg. The topology is the same
as sof-rpl-rt711-l0-rt1316-l12-rt714-l3, but without local mic (rt714).

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
2023-09-14 16:48:15 +01:00
Seppo Ingalsuo 84809f9606 Tools: Topology2: Add Multiband-DRC
This patch adds the topology2 files for multiband-DRC. The EFX
processing chain is gain - IIR - FIR - DRC or Multiband-DRC. The
DRC selection is done with macro EFX_DRC_COMPONENT and values
"singleband" and "multiband".

The multiband-drc has two ALSA controls, bytes and switch. The
switch control switches the processing on and off.

The generated topology files with multiband-drc are:

sof-hda-efx-mbdrc-generic.tplg
sof-hda-efx-mbdrc-generic-2ch.tplg
sof-hda-efx-mbdrc-generic-4cg.tplg

The topology files with DRC are as before:

sof-hda-efx-mbdrc-generic.tplg
sof-hda-efx-mbdrc-generic-2ch.tplg
sof-hda-efx-mbdrc-generic-4cg.tplg

The configuration blob default is updated to what is generated
by the current example_multiband_drc.m configuration script. The
pass-through blob is set as default for tplg2. The topology 1
blobs are updated similarly.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-09-11 13:24:55 +01:00
Ranjani Sridharan 9ccfbc4e39 sof-glk-nocodec: disable pipelines when disabling SSPs
When we added the flags to disable SSP0 and SSP1 on the UP2, we took the
shortcut of just removing the PCMs in topology but left the pipelines
and widgets in the topology in. While this works in practice to prevent
us from testing those SSPs, the right way is to also remove those
pipelines also when the SSPs are disabled.

This stops tplgtool2.py from complaining constantly about this
inconsistency since https://github.com/thesofproject/sof-test/pull/1079
which made the sof-test verify-tplg-binary.sh fail every time:

```
tplgtool2.py sof-glk-nocodec.tplg

ERROR: No pcm id=0 for widget=PCM0C
ERROR: No pcm id=1 for widget=PCM1C
ERROR: No pcm id=0 for widget=PCM0P
ERROR: No pcm id=1 for widget=PCM1P
ERROR: tplgtool2.py returned 4
```

This change affects only sof-apl-nocodec and sof-glk-nocodec.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-09-11 10:17:07 +03:00
Brent Lu bd6933b5ab topology1: sof-tgl-max98357a-rt5682: add sof-adl-rt5650 topology
Add a new topology sof-adl-rt5650 for ALC5650 which supports SSP0 for
headset and SSP1 for speakers since this codec implements two I2S
interfaces.

DAI format changed to mclk: 24.576MHz, bclk: 3.072MHz, sample bits:
24-bit to avoid using ASRC function on codec side.

Signed-off-by: Brent Lu <brent.lu@intel.com>
2023-09-08 14:38:57 +01:00
Rander Wang fc8a4b6730 topology2: change the sample type for Linux audio system
At first the sample type is set to MSB_INTEGER to follow windows
settings, but actually we use LSB_INTERGER type such as S24_4LE.
Now change the default sample type to LSB_INTERGER to align with
FW usage. For DAI copier we need to use MSB_INTERGER for hardware
requirement. Currently sample type only affect s24/c32 case, so only
change sample type in dai for this format config.

FW will use sample type to choose correct format conversion
function and can deal with Windows audio stream correctly with MSB
s24/c32 format.

out_fmt_cfg is redefined for a alsa-lib bug. Alsa-lib will first process
out_fmt_cfg = '$[($out_channels | ($out_valid_bit_depth * 256)) |
($out_sample_type * 65536)]' in base class and then deal with
out_sample_type, so error is reported. Now first define out_sample_type
and then out_fmt_cfg, everything works.

Signed-off-by: Rander Wang <rander.wang@intel.com>
2023-09-06 12:14:42 +03:00
Uday M Bhat e12a099b84 topology2: NUM_HDMIS is set to 3 for MTL devices and updated in platform file
NUM_HDMIS is set to 3 as default value for MTL platform. SPK_ID and BT_ID
are modified based on this change in the target cmake file.

Signed-off-by: Yong Zhi <yong.zhi@intel.com>
Signed-off-by: Uday M Bhat <uday.m.bhat@intel.com>
2023-09-06 13:19:30 +08:00
Seppo Ingalsuo 2a7a94d238 Tools: Topology2: Add SRC component to cavs-nocodec.conf topologies
This patch adds 8 - 192 kHz playback and capture SRC to nocodec
topologies such sof-tgl-nocodec.tplg. It enables testing of SRC
component with IPC4 via the SSP loopback in the nocodec topologies

E.g. Play random noise at 44.1 kHz and capture it as 32 kHz. The
SSP loopback runs internally at 48 kHz.

aplay -Dhw:0,2 -f S32_LE -c 2 -r 44100 -d 10 -t raw /dev/random
arecord -Dhw:0,2 -f S16_LE -c 2 -r 32000 -d 10 /tmp/recording.wav

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-09-05 18:56:47 +03:00
Seppo Ingalsuo 961e4a645d Tools: Topology2: Use more specific src format .conf files
This patch replaces src_format.conf and src_passthrough_format.conf
with more specific formats definitions for host copiers,
pass-through components, playback src, and capture src.

The DSP internal pipelines are 32 bits, so src_s32_passthrough.conf
is used for components like gain those pass the 8 - 192 kHz
rates with s32 format.

The formats in src_format_sxx_to_s32_convert.conf is for use for
for playback host copier. Input formats are s16/24/32 and the only
output format is s32. Similarly the  src_format_s32_to_sxx_convert.conf
is for capture host copier.

The formats for playback SRC are in src_format_s32_convert_to_48k.conf,
and the formats for capture are in src_format_s32_convert_from_48k.conf.

The new formats definitions use the input_audio_format and
output_audio_format objects instead of audio_format. The unnecessary
word lengths are removed to minimize the formats count in every
component.

The pipelines host-copier-gain-src-mixin-playback.conf and
src-gain-mixin-playback.conf those used the previous format definitions
are updated with these changes.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-09-05 18:56:47 +03:00
Seppo Ingalsuo 56def4ea10 Tools: Topology2: No mandatory rate_out to support capture SRC
This patch removes rule to require fixed rate_out for SRC
widget. A capture SRC in host pipeline or near it has typically
variable output rate.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-09-05 18:56:47 +03:00
Yong Zhi 107043f978 topology2: cavs-rt5682: use macros for all PCM IDs
Make it less error-prone for maintenance.

Signed-off-by: Yong Zhi <yong.zhi@intel.com>
2023-08-31 15:22:05 +01:00
Brent Lu dca9085047 topology1: adl-max98360a-da7219: support DA7219 headphone codec
Add an new topology adl-max98360a-da7219.tplg for DA7219 headphone
codec with MAX98360A speaker amplifier on ADL boards. The MCLK
frequency is set to 24.576MHz to use PLL bypass mode and avoid the
WCLK locking problem on earlier platforms.

Signed-off-by: Brent Lu <brent.lu@intel.com>
2023-08-30 14:10:23 +01:00
Seppo Ingalsuo 77a41bebeb Tools: Topology1: Multiband-DRC: Update setup blobs
The multiband_drc_coef_default.m4 is updated to what the current
setup tool example_multiband_drc() exports.

Another blob for pass-through is added with emphasis and all bands
processing disabled. Such blob is useful when headphone and
speaker paths are shared. Headphone mode should use pass-through.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-08-29 18:51:00 +03:00
Chao Song 82b7f6869f topology2: align benchmark hda topology with other hda topology
In this patch, audio_format is deprecated, and use
input_audio_format/output_audio_format instead.

Correct the IIR control bytes naming, and make it the
same with other HDA topology.

Signed-off-by: Chao Song <chao.song@linux.intel.com>
2023-08-29 18:48:12 +03:00
Seppo Ingalsuo 6cebb327a2 Tools: Topology1: Add IIR and IIR+FIR HDA generic playback topologies
This patch removes non-practical sof-hda-generic-loud topologies and
generates instead IIR and IIR+FIR topologies for headphone/speaker
path for no-DMIC/2ch-DMIC/4ch-DMIC platforms. The IIR and FIR are
by default programmed for pass-through without any processing.

sof-hda-generic-iir.tplg
sof-hda-generic-iir-2ch.tplg
sof-hda-generic-iir-4ch.tplg
sof-hda-generic-iir-fir.tplg
sof-hda-generic-iir-fir-2ch.tplg
sof-hda-generic-iir-fir-4ch.tplg

The custom topologies can be used e.g. copying them to
/lib/firmware/intel/sof-tplg-custom/ and by adding
to /etc/modprobe.d/sof.conf the following lines with desired
configuration un-commmented.

#options snd_sof_pci tplg_filename="sof-hda-generic-iir.tplg" tplg_path="intel/sof-tplg-custom"
#options snd_sof_pci tplg_filename="sof-hda-generic-iir-fir.tplg" tplg_path="intel/sof-tplg-custom"
#options snd_sof_pci tplg_filename="sof-hda-generic-iir-2ch.tplg" tplg_path="intel/sof-tplg-custom"
#options snd_sof_pci tplg_filename="sof-hda-generic-iir-fir-2ch.tplg" tplg_path="intel/sof-tplg-custom"
#options snd_sof_pci tplg_filename="sof-hda-generic-iir-4ch.tplg" tplg_path="intel/sof-tplg-custom"
#options snd_sof_pci tplg_filename="sof-hda-generic-iir-fir-4ch.tplg" tplg_path="intel/sof-tplg-custom"

The patch contains a fix for pipeline with FIR to undefine the
related macros to avoid them to possibly impact another FIR instance.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-08-25 09:15:18 +03:00
Marcin Szkudlinski 5de6d098d7 Revert "topology2: change the sample type for Linux audio system"
This reverts commit 196f86cde4.
2023-08-24 18:03:19 +03:00
Rander Wang 196f86cde4 topology2: change the sample type for Linux audio system
At first the sample type is set to MSB_INTEGER to follow windows
settings, but actually we use LSB_INTERGER type such as S24_4LE.
Now change the default sample type to LSB_INTERGER to align with
FW usage. For DAI copier we need to use MSB_INTERGER for hardware
requirement. Currently sample type only affect s24/c32 case, so only
change sample type in dai for this format config.

FW will use sample type to choose correct format conversion
function and can deal with Windows audio stream correctly with MSB
s24/c32 format.

out_fmt_cfg is redefined for a alsa-lib bug. Alsa-lib will first process
out_fmt_cfg = '$[($out_channels | ($out_valid_bit_depth * 256)) |
($out_sample_type * 65536)]' in base class and then deal with
out_sample_type, so error is reported. Now first define out_sample_type
and then out_fmt_cfg, everything works.

Signed-off-by: Rander Wang <rander.wang@intel.com>
2023-08-22 17:51:56 +03:00
Iuliana Prodan afe5bb76f7 topology: imx: Add compress and PCM mixer topology file for boards with wm8962 codec
Generate compress and PCM mixer topology file for i.MX8 and i.MX8MP
with wm8962 codec based on sof-imx8-compr-wm8960-mixer.

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2023-08-21 13:18:58 +01:00
Iuliana Prodan b16d5bf662 topology: imx: Combine mixer of compress and PCM topology files for i.MX8MP and i.MX8
Combine topology files for i.MX8MP and i.MX8 using different
variables like SAI_INDEX and CODEC.

Based on CODEC use the proper STREAM_NAME.

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2023-08-21 13:18:58 +01:00
Jyri Sarha 865946cf06 topology2: widget-common.conf: Default no_wname_in_kcontrol_name to true
Set no_wname_in_kcontrol_name attribute default to true to for all
widgets.

This change will drop widget name prefixes from all kcontrols created
from currently defined widgets, as they all include
widget-common.conf. In practice this means that for example "gain.2.1
Post Mixer Analog Playback Volume" becomes just "Post Mixer Analog
Playback Volume" and same for all kcontrols.

This behavior can be reverted per widget basis by setting
no_wname_in_kcontrol_name attribute to false in the relevant widget.

Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
2023-08-21 13:07:17 +01:00
Jyri Sarha 53281d3b17 topology2: mixer: Add no_wname_in_kcontrol_name attribute to comp tokens
Adds "no_wname_in_kcontrol_name" token, and the associated boolean
attribute to generic component attributes.

If the attribute is set to true for a widget then non of its
associated kcontrols names will have the widget name as a prefix. For
example "gain.2.1 Post Mixer Analog Playback Volume" becomes just
"Post Mixer Analog Playback Volume".

Signed-off-by: Jyri Sarha <jyri.sarha@intel.com>
2023-08-21 13:07:17 +01:00
Rander Wang 5674c31c8f topology2: update pin setting to latest one
pin_index is not used so replace it with input_pin_index

Signed-off-by: Rander Wang <rander.wang@intel.com>
2023-08-21 10:58:09 +01:00
Pin-chih Lin b793d1ce2b topology1: waves: add definition WAVES_SPK_ONLY
Introduced var WAVES_SPK_ONLY (depend on WAVES) for specifying the
topology requested to apply Waves module on Speaker pipeline only
(not on Heaadphones).

Signed-off-by: Pin-chih Lin <johnylin@google.com>
2023-08-17 17:06:06 +01:00
Seppo Ingalsuo 8aededeb96 Tools: Topology2: Fix playback EFX FIR and IIR defaults
The default values should be "passthrough" since the pipeline
mixout-gain-efx-dai-copier-playback.conf applies them this way:

IncludeByKey.EFX_FIR_PARAMS {
  "passthrough" "include/components/eqfir/passthrough.conf"
}

And IIR similarly.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-08-16 17:05:25 +03:00
Seppo Ingalsuo 53e8b71f69 Tools: Topology2: Remove 24 bit formats from EFX pipeline
This patch makes similar change to pipeline as done earlier
for mixout-gain-dai-copier-playback.conf. The 24/32 bit formats
are deleted as unnecessacy. The audio format definition for
DRC is changed to similar style as for copier and gain.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-08-16 14:39:30 +01:00
Seppo Ingalsuo 8652395490 Tools: Topology2: Add DRC to sof-hda-efx-generic topologies
This patch adds DRC component to EFX pipeline. The DRC is very
useful for speaker output to enhance loudness and reduce
speaker distortion in loud playback.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-08-16 14:39:30 +01:00
Yong Zhi aec3bfdb77 topology2: add core id macros for echo ref & EC pipelines
Add macros in preparation to run RTC AEC on secondary core

Signed-off-by: Yong Zhi <yong.zhi@intel.com>
2023-08-16 14:06:01 +01:00
Pin-chih Lin ad2f035c06 smart amp : Do not use DYNAMIC topology with DTS
Follows after:
    214f98378 ("smart amp : Do not use DYNAMIC topology")

which makes DYNAMIC undefined during smart amp tplg pipeline pcm/dai config due
to the use of volatile Kcontrols.

This commit applies the same on sof-eq-iir-dts-codec-smart-amplifier.m4 which
is used for (DTS + smart amp) projects.

Signed-off-by: Pin-chih Lin <johnylin@google.com>
2023-08-16 14:00:31 +01:00
Chao Song d484b76ffb topology2: add SDW topology for Dell SKU0C87 devices
Dell SKU0C87 devices have below config:

SDW0: RT714 DMIC
SDW1: RT1318 Speaker
SDW2: RT1318 Speaker

Add topology support in this patch for Dell SKU0C87 devices.

Signed-off-by: Chao Song <chao.song@linux.intel.com>
2023-08-14 15:29:08 +03:00
Seppo Ingalsuo fb6c3b7e9d Tools: Topology: Add test topologies for crossover component
This patch adds build of tplg1 development topologies
sof-tgl-nocodec-crossover-2way.tplg
sof-tgl-nocodec-crossover-4way.tplg

The tplg2 development topology version is
sof-tgl-nocodec-crossover-2way.tplg

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-08-10 12:16:53 +01:00
Alexander Boehm edda342d6a topology1: fix sai.m4 clock inversion
A misplaced ) prevented the optional 'inverted'
flag from working as intended.

Signed-off-by: Alexander Boehm <aboehm@eurofunk.com>
2023-08-04 12:10:42 +01:00
Alexander Boehm d176d09529 topology1: add imx8mp dual SAI topology, 8ch each
Use btsco driver to output and capture 8ch on SAI2 and 8ch on SAI3

Signed-off-by: Alexander Boehm <aboehm@eurofunk.com>
2023-08-04 12:10:42 +01:00
SaiSurya Ch ea233be4a7 tools: topology: add vangogh topology support
Add vangogh platform topology for nau8821,max988388.

Signed-off-by: SaiSurya Ch <saisurya.chakkaveeravenkatanaga@amd.com>
2023-07-25 15:00:03 +01:00
Yong Zhi a6de3b1602 topology2: cavs-rt5682: Change ECHO_REF_PCM_ID to 29 to avoid conflict
Fix tplgtool2.py caught error with sof-mtl-max98357a-rt5682.tplg

ERROR: Multiple pcm id=27: 2 (['EchoRef', 'DMIC0 RTC AEC'])

Signed-off-by: Yong Zhi <yong.zhi@intel.com>
2023-07-24 16:38:34 +01:00
Sathya Prakash M R 214f98378f smart amp : Do not use DYNAMIC topology
DYNAMIC topology should not be used for pipeline with volatile
Kcontrols.
Hence ensuring the flag is un defined before processing
smart amp related PCM and DAI configs

Suggested-by: Sridharan, Ranjani <ranjani.sridharan@linux.intel.com>
Signed-off-by: Sathya Prakash M R <sathya.prakash.m.r@intel.com>
2023-07-20 22:10:43 +03:00
Chao Song fc1ddf95d4 topology2: fix conditional inclusion of DMIC snippets for nocodec
DMIC now is controlled by two variables, PASSHTHROUGH
and NUM_DMICS, we should consider the values for both
variables to decide the inclusion of DMIC pipelines,
routes, widgets, etc.

Fixes: #7931

Signed-off-by: Chao Song <chao.song@linux.intel.com>
2023-07-20 09:57:12 -07:00
Yong Zhi 47cb612379 topology2: speaker-echo-ref.conf: Use macros for PCM ID
Use macro to avoid hardcoding of the PCM Id.

Signed-off-by: Yong Zhi <yong.zhi@intel.com>
2023-07-14 14:29:12 +03:00
Yong Zhi e23857b641 topology2: nocodec-multicore: test multi-stream capture
Enable more complex pipelines for multi-core use cases.

Signed-off-by: Yong Zhi <yong.zhi@intel.com>
2023-07-11 19:30:06 +01:00
Mac Chiang 1fadc21187 topology2: cavs-rt5682: add sof-mtl-rt1019-rt5682 support
Due to sof_mtl_rt1019_rt5682 machine driver without BT_OFFLAD
bit and support 3 HDMI devices, so make the BT_OFFLOAD option
and subsequentially mapping SPK_ID from 7 to 6.

Signed-off-by: Mac Chiang <mac.chiang@intel.com>
2023-07-10 15:07:56 +01:00
Mac Chiang 1e6f4e0618 topology2: cavs-rt5682: make BT offload as option
Consider the variant projects with/without bt offload feature
so include BT_OFFLOAD pipelines as an option if needed

Signed-off-by: Mac Chiang <mac.chiang@intel.com>
2023-07-10 15:07:56 +01:00
Pierre-Louis Bossart 3029a0cc38 topology2: cavs-sdw: fix bad index in passthrough mode
When PASSTHROUGH is true, the topology generation throws this error:

ALSA lib dapm.c:247:(tplg_build_routes) undefined source widget/stream
'host-copier.0.playback'

using the pcm_id 2 used for the host copier fixes the issue.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2023-07-07 12:11:16 +01:00
Bard Liao b267012f22 Topology2: sdw-amp-generic: add missing num_input_pins
num_input_pins was missing in passthrough mode.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
2023-07-06 10:58:32 -07:00
Seppo Ingalsuo 2fb0c1d811 Tools: Topology2: Add a development HDA generic MCPS benchmark topology
This patch builds new development topologies
sof-hda-benchmark-generic-<tgl/mtl/lnl>.tplg to evaluate performance
of a set of playback components.

The topology for PCM0P playback is

host-copier.0 --> gain.1.1 --> mixin.1.1 -->
	mixout.2.1 --> aria.2.1 --> gain.2.1  --> mixin
	mixout.3.1 --> dai-copier.HDA

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-07-04 16:09:57 +01:00
Jaska Uimonen 8380946137 topology1: test topology for tgl nocodec mux
Add test topology for muxing 2 pipelines into 1 with SSP dai and
capturing the result from loopback.

Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
2023-07-04 15:37:21 +01:00
MARUTHI MACHANI 388075ec82 topology1:amd: comments update
topology comments update

Signed-off-by: MARUTHI MACHANI <maruthi.machani@amd.com>
2023-07-04 15:18:52 +01:00
MARUTHI MACHANI 3fa5085a4e topology1:amd: topology changes to support virtual playback passthrough for mux
Topology changes to support virtual playback passthrough for mux

Signed-off-by: MARUTHI MACHANI <maruthi.machani@amd.com>
2023-07-04 15:18:52 +01:00
Bard Liao a6fa09cca7 Topology2: add sof-tgl-rt711-rt1308-rt715 topology
Add sof-tgl-rt711-rt1308-rt715 topology for topology2.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
2023-07-04 15:18:27 +01:00
Bard Liao 4fa2ad4261 Topology2: sdw-amp-generic: add 2nd amp feedback when SDW_AMP_FEEDBACK
is true

Currently, we add the 2nd sdw amp feedback unconditionally. It will lead
to an issue when aggregated apms don't support feedback function.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
2023-07-04 15:18:27 +01:00
Bard Liao cc3b75665f Topology2: hdmi: use macro to set HDMI BE name
HDMI BE name may not be iDispx.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
2023-07-04 15:13:56 +01:00
Ranjani Sridharan b1ce311540 topology2: pipelines: dai-copier-eqiir-module-copier-capture: Replace audio_format object
Use the input_audio_format/output_audio_format objects explicitly.
Also, add the 4ch audio format in the class definition as this is only
instantiated once in dmic-generic.conf and needs support for both
formats.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-07-04 15:10:35 +01:00
Ranjani Sridharan 511f680b02 topology2: pipelines: io-gateway: Replace audio_format object
Use the input_audio_format/output_audio_format objects explicitly.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-07-04 15:10:35 +01:00
Ranjani Sridharan 914b855d72 topology2: components: mixout: Replace audio_format object
Use the input_audio_format/output_audio_format objects explicitly.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-07-04 15:10:35 +01:00
Ranjani Sridharan 7ad6659b9e topology2: components: mixin: Replace audio_format object
Use the input_audio_format/output_audio_format objects explicitly.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-07-04 15:10:35 +01:00
Jyri Sarha 593563b69e topology2: cavs-mixin-mixout-efx-hda.conf: Uppercase IIR and FIR
Make these last IIR and FIR acronyms in the kcontrol names uppercase.

Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
2023-07-03 16:13:37 +01:00
Jyri Sarha 50f5c8fbdc topology2: Rename remaining non mixer kcontrols to follow new naming scheme
Rename all remaining kcontrols to follow the new naming scheme that is
already used for all mixers.

This commit changes kcontrol names as follows:

cavs-nocodec.conf:
'smart_amp_init' -> 'Main Playback and Port0 smart_amp_init'

cavs-mixin-mixout-hda.conf:
'4 Main capture Iir Eq' -> 'Analog Capture IIR Eq'

dmic-generic.conf:
'DMIC0 capture Iir Eq' -> 'DMIC0 Capture IIR Eq'

sdw-jack-generic.conf:
'4 Main capture Iir Eq' -> 'Jack In Capture IIR Eq'

Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
2023-06-30 13:24:56 +03:00
Jyri Sarha a3814c58b9 topology2: sdw-jack-generic.conf: Rename mixers
Rename mixers according to the new naming convention by referring to
the associated PCM name and the position in the topology. Create
defines for PCM names so the name is only in one place. Adds a define
for the capture PCM too. The commit also updates the PCM names while
adding the defines.

This produces following changes, on PCM names:
'Jack in' -> 'Jack In'
'Jack out' -> 'Jack Out'

and on mixer names:
'1 Playback Volume 0' -> 'Pre Mixer Jack Out Playback Volume'
'2 Main Playback Volume' -> 'Post Mixer Jack Out Playback Volume'

Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
2023-06-28 17:17:15 +03:00
Jyri Sarha 2af91434b5 topology2: cavs-sdw-src-gain-mixin.conf: Rename mixers
Rename mixers according to the new naming convention by referring to
the associated PCM name and the position in the topology. Create
defines for PCM names so the name is only in one place. The commit
also updates the PCM names while adding the defines.

This produces following changes, on PCM names:
'Jack in' -> 'Jack In'
'Jack Out' -> 'Jack Out'

and on mixer names:
'Src Playback Volume' -> 'Pre Mixer Jack Out Playback Volume'
'Main Playback Volume' -> 'Post Mixer Jack Out Playback Volume'

Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
2023-06-28 17:17:15 +03:00
Jyri Sarha bda1bcd5bc topology2: cavs-rt5682.conf: Rename mixers
Rename mixers according to the new naming convention by referring to
the associated PCM name and the position in the topology. Create defines
for PCM names so the name is only in one place.

This produces following changes:

'Playback Volume 1' -> 'Pre Mixer Headset Playback Volume'
'Playback Volume 3' -> 'Pre Mixer Speaker Playback Volume'
'Main Playback Volume 2' -> 'Post Mixer Headset Playback Volume'
'Main Playback Volume 4' -> 'Post Mixer Speaker Playback Volume'

Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
2023-06-28 17:17:15 +03:00
Jyri Sarha 2cef521c36 topology2: cavs-nocodec-multicore.conf: Rename playback volumes
Rename SSP0, SSP1, and SSP2 playback volumes according to PCM names
they are connected to. Define the PCM names as variables so the name
can be changed in a single place.

This is how the change will look like:

'gain.1.1 Playback Volume 1' to
'gain.1.1 Pre Mixer Port0 Playback Volume'

'gain.14.1 Main Playback Volume 14' to
'gain.14.1 Post Mixer Port0 Playback Volume'

'gain.3.1 Playback Volume 3' to
'gain.3.1 Pre Mixer Port1 Playback Volume'

'gain.4.1 Main Playback Volume 4' to
'gain.4.1 Post Mixer Port1 Playback Volume'

'gain.5.1 Playback Volume 5' to
'gain.5.1 Pre Mixer Port2 Playback Volume'

'gain.6.1 Main Playback Volume 6' to
'gain.6.1 Post Mixer Port2 Playback Volume'

Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
2023-06-28 12:33:10 +03:00
Jyri Sarha a0b1a391b8 topology2: cavs-mixin-mixout-efx-hda.conf: Rename Iir and Fir Eqs
Rename mixin and mixout EFX Analog Playback Eqs to follow the same
naming scheme as the mixers.

As a result of this commit Eqs are renamed in sof-hda-efx-generic.tplg
as follows:

'eqfir.2.1 2 Main playback Fir Eq' to
'eqfir.2.1 Post Mixer Analog Playback Fir Eq'

and

'eqiir.2.1 2 Main playback Iir Eq' to
'eqiir.2.1 Post Mixer Analog Playback Iir Eq'

Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
2023-06-28 12:33:10 +03:00
Jyri Sarha ecff8a1d3d topology2: cavs-mixin-mixout-efx-hda.conf: Improve mixer names
Rename mixin and mixout EFX Analog Playback volumes. Rewrite the names
of the mixers to better reflect their position in the topology.

As a result of this commit mixers are renamed in sof-hda-efx-generic.tplg
as follows:

'gain.1.1 1 2nd Playback Volume' to 'gain.1.1 Pre Mixer Analog Playback Volume'

and

'gain.2.1 2 Main Playback Volume' to
'gain.2.1 Post Mixer Analog Playback Volume'

Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
2023-06-28 12:33:10 +03:00
Uday M Bhat 3de4a6e5d7 topology2: cavs-sdw : Update BT offload SSP for MTL chromebook
For MTL chromebook, SSP 1 is used for BT offload with
cavs-sdw configuration

Co-developed-by: Yong Zhi <yong.zhi@intel.com>
Signed-off-by: Yong Zhi <yong.zhi@intel.com>
Co-developed-by: Jairaj Arava <jairaj.arava@intel.com>
Signed-off-by: Jairaj Arava <jairaj.arava@intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Uday M Bhat <uday.m.bhat@intel.com>
2023-06-27 13:33:35 +03:00
Balamurugan C 81f582279c topology1: adl: add support for Nocodec amp and HDMI-in capture.
Adding support for the alderlake products which doesn't have no ssp
amplifier but need to support HDMI audio playback and HDMI-in capture
via I2S

Signed-off-by: Balamurugan C <balamurugan.c@intel.com>
2023-06-21 12:14:03 +03:00
Balamurugan C 310b10c055 topology1: tgl: add support for Nocodec amp and HDMI-in capture.
Adding support for the product which doesn't have no ssp amplifier
but need to support HDMI audio playback and HDMI-in capture via I2S.

Signed-off-by: Balamurugan C <balamurugan.c@intel.com>
2023-06-21 12:14:03 +03:00
Balamurugan C d0dbfd62ca topology1: add support for rt1308 ssp amp + HDMI-in capture.
Adding support for rt1308 ssp amplifier and HDMI-in capture via I2S.

Signed-off-by: Balamurugan C <balamurugan.c@intel.com>
2023-06-21 12:14:03 +03:00
Ranjani Sridharan 584e2f62e5 topology2: cavs-nocodec-multicore: Replace audio_format objects
Use the input_audio_format/output_audio_format objects instead.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-06-21 12:10:02 +03:00
Ranjani Sridharan 4a64defa94 topology2: cavs-rt5682: Replace audio_format objects
Use the input_audio_format/output_audio_format objects instead.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-06-21 12:10:02 +03:00
Ranjani Sridharan bdd3bf2409 topology2: cavs-nocodec-bt: Replace audio_format objects
Use the input_audio_format/output_audio_format objects instead.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-06-21 12:10:02 +03:00
Yong Zhi 83ff81984a topology2: deepbuffer-playback: increase default buffer_size_max
buffer_size_max of PCM cap for deepbuf is configured for 65536.
Quadruple the buffer_size/period_size to allow aplay to use larger
buffer size.

Signed-off-by: Yong Zhi <yong.zhi@intel.com>
2023-06-20 14:09:33 +03:00
Yong Zhi 77e3e92157 topology2: cavs-rt5682: Add 2ch DMIC topology
Rex SKU1 variant has only 2xDMIC enabled on PDM1, use 2xch
capture for power saving.

Signed-off-by: Yong Zhi <yong.zhi@intel.com>
2023-06-19 10:18:12 +03:00
Jaska Uimonen f0f5bddd7b topology2: fix dai index in nocodec multicore
Dai index in one copier is set to 1 even though it should be 0, thus
change it.

Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
2023-06-16 18:24:37 +03:00
Jaska Uimonen f5df5097c8 topology2: fix nhlt debug binary names
Some topologies have the same file name specified as nhlt debug output
so they will override others. Change the names to be unique.

Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
2023-06-16 18:24:37 +03:00
Ranjani Sridharan 75e8f4b63c topology2: cavs-nocodec: Introduce macros for PCM IDs
And fix the erroneous PCM ID for SSP0 capture.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-06-15 19:50:03 +03:00
Bard Liao f0b44b4854 Topology2: sdw-jack-generic: add 24 bit format support for sdw jack
Somehow s24_le format is missed.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
2023-06-15 16:35:03 +03:00
Yong Zhi b75a94bfd3 topology2: cavs-nocodec: run DMIC pipelines on core1
There is pinmux on MTL platform to optionally enable DMIC,
add this config to the build and run the pipeline on core 1.

Signed-off-by: Yong Zhi <yong.zhi@intel.com>
2023-06-15 11:10:45 +03:00
Ranjani Sridharan 561f4b036c topology2: sdw-jack-generic: Fix the number of input pins
This was missed earlier.

Fixes: f8ad12734d ("topology2: cavs-sdw: Add option for passthrough pipelines")
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-06-14 21:45:23 +03:00
Yong Zhi d3f8bdc304 topology2: add sof-mtl-cs42l42-l0-max98363-l2-4ch support
cs42l42 headset codec on link0 & 2xmax98363 on link 2.

Co-developed-by: Uday M Bhat <uday.m.bhat@intel.com>
Co-developed-by: Jairaj Arava <jairaj.arava@intel.com>
Signed-off-by: Yong Zhi <yong.zhi@intel.com>
2023-06-13 18:24:13 +03:00
Ranjani Sridharan 8d5e624d03 topology2: intel: hdmi-generic: Replace audio_format objects
Use the input_audio_format and output_audio_format objects instead.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-06-13 11:16:10 +03:00
Ranjani Sridharan 8cb7bf1baf topology2: cavs-mixin-mixout: Replace audio_format instance
Use the input_audio_format and output_audio_format objects instead
and fix the number of input/output formats to 1.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-06-13 11:16:10 +03:00
Bard Liao 8ef4d51e68 topology2: sdw-jack-generic: add SDW_JACK_CAPTURE_CH macro
Adding SDW_JACK_CAPTURE_CH macro to specify sdw jack channels.
The default value is 2.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
2023-06-12 10:12:36 +03:00
Bard Liao f6f57fe82b Topology2: sdw-jack-generic: add 1 ch format support
Some codecs like cs42l42 support 1 channel capture only.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
2023-06-12 10:12:36 +03:00
Mengdong Lin a5c0c49707 topology2: add development tplg to test playback with 2 cores
This is to allow CI to test a simple multicore playback case on
MTL/TGL/ADL: SSP0 playback on core 0 and SSP2 playback on core 1.

Capture uses core 0 only atm. More multicore usage will be
introduced later.

Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
2023-06-12 10:09:00 +03:00
Ranjani Sridharan 1da18c2caa topology2: cavs-sdw: Build passthrough LNL FPGA topology
With RT711 on link 0

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-06-07 18:17:20 +03:00
Ranjani Sridharan f8ad12734d topology2: cavs-sdw: Add option for passthrough pipelines
Add a compile time option to build SDW topologies with passthrough
pipelines.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-06-07 18:17:20 +03:00
Bard Liao 6863eda168 topology2: add sof-mtl-rt712-l0-rt1712-l3.tplg
For MTL + rt712

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
2023-06-06 18:06:10 +03:00
Jyri Sarha b9b030757f topology2: dmic-generic.conf: Rename "DMIC" PCM name to "DMIC Raw"
Rename "DMIC" PCM name to "DMIC Raw" in the generic dmic topology fragment.
The PCM is on the DMIC patch without any processing beyond gain and IIR EQ,
thus the "Raw" extension.

Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
2023-06-02 13:13:45 +03:00
Jyri Sarha 08acbe4b6f topology2: cavs-nocodec.conf: Rename ssp-capture and DMIC0 Raw PCMs
Rename cavs-nocodec capture PCMs. The current PCM names are confusing. These
should be better names for them. The former

"ssp-capture" is now "Port0 2nd Capture",
"DMIC0 Raw" is now "DMIC SFX1", and
"DMIC0 Raw 2" is now "DMIC SFX2".

The PCMs in question have extra gains in the path to simulate processing.
Also the mixer name is changed to compensate for the matching "Capture"
substring in the end of the PCM name, that is part of the mixer name,
to avoid "Capture Capture" tautology.

Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
2023-06-02 13:13:45 +03:00
Pierre-Louis Bossart 058e6571a5 topology1: add support for Dell SKU 0934
Yet another permutation. This needs to be back-ported to 2.2 releases

Closes: https://github.com/thesofproject/linux/issues/4399
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2023-06-02 13:12:06 +03:00
Ranjani Sridharan 6fb22d645e topology2: intel: dmic-generic: Simplify the core ID setting
When all components of a pipeline are scheduled on the same core, use
the pipeline's core_id attribute to set the core_id for all the
components in it. Also, remove the default core_id in class definitions
so that it doesn't take priority over the value passed from the pipeline
object.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-06-01 13:16:56 +03:00
Ranjani Sridharan f1075489cf topology2: dai-copier: Add clarification on input/output format counts
These are mandatory for both directions as they are used to set the DMA
buffer format.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-05-29 09:56:13 +03:00
Ranjani Sridharan 6e2d497371 topology2: dai-copier: num_input_pins/num_output_pins shouldn't be mandatory
Set them based on direction and the actual number of pins used.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-05-29 09:56:13 +03:00
Ranjani Sridharan 66aaa599e9 topology2: dai-copier: Change the naming convention
Change the naming from dai-copier.<copier_type>.<pipeline_id>.<instance>
to dai_copier.<copier_type>.<stream_name.<direction>.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-05-29 09:56:13 +03:00
Ranjani Sridharan ab9449fa08 topology2: tokens: Reduce the string length of token names
In preparation for changing the name of the DAI copier which will make
them a bit longer, reduce the token name lengths by removing the
sof_tkn_ prefix. This is required because the header names in topology
have a 44 character limit and with a long name like:
dai-copier.SSP.NoCodec-0.playback.sof_tkn_comp.uuid, the limit will be
hit. Removing the sof_tkn_ prefix will reduce the number of characters
in the tuple name headers.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-05-29 09:56:13 +03:00
Ranjani Sridharan 1b9cb679bb topology2: components: Make uuid common for all widgets
Move the uuid attribute definition to widget-common.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-05-29 09:56:13 +03:00
Ranjani Sridharan 96bd6bc62d topology2: copier: Rename it to dai-copier
To make it explicit that it is only for the DAI gateway.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-05-29 09:56:13 +03:00
Jyri Sarha a6984b8503 topology2: dmic-generic.conf: Rename generic DMIC volume
Rename generic DMIC mixer name. Define the associated PCM name in a
common place and refer to that name on the mixer name.

On cavs-tgl-nocodec.tplg is seen a following mixer name change:

'gain.13.1 DMIC0 Capture Volume 1' > 'gain.13.1 DMIC Capture Volume'

Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
2023-05-26 11:08:26 +03:00
Jyri Sarha b918e1f316 topology2: nocodec-ssp0-2level.conf: Rename Port0 Aux Volume
Rename SSP0 Aux Playback stream volume before mixing. Use the
associated PCM name in the mixer name. This change affects nocodec
topologies and appears on sof-tgl-nocodec.tplg as a following change:

'gain.21.1 Playback Volume 8' -> 'gain.21.1 Pre Mixer Port0 Aux Playback Volu'

Unfortunately the new mixer name does fit into the space reserved for
it, but it should get fixed once we get rid of the "gain 21.1"-prefix.

Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
2023-05-26 11:08:26 +03:00
Jyri Sarha bdff11cc7a topology2: cavs-nocodec.conf: Rename DMIC0 post mux volumes
Rename cavs-nocodec.conf DMIC0 volumes. Define variables for the
associated PCM names and refer to them in the mixer names. The changes
shown in sof-tgl-nocodec.tplg are:

'gain.18.1 Capture Raw Volume 1' > 'gain.18.1 Post Demux DMIC0 Raw Capture Volu'
'gain.19.1 Main Capture Volume 3' > 'gain.19.1 Pre Demux DMIC0 Raw Capture Volum'
'gain.20.1 Capture Raw Volume 2' > 'gain.20.1 Post Demux DMIC0 Raw 2 Capture Vo'

Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
2023-05-26 11:08:26 +03:00
Jyri Sarha 0f7f4e96b8 topology2: cavs-nocodec.conf: Rename SSP0 Capture Volumes
Rename SSP0 capture related volumes. Define a variable for PCM name
and refer to it in the mixer names.

Using sof-tgl-nocodec.tplg the changes are:

'gain.8.1 Host Capture Volume' > 'gain.8.1 Pre Demux Port0 Capture Volume'
'gain.7.1 Main Capture Volume 1' > 'gain.7.1 Post Demux Port0 Capture Volume'
'gain.17.1 Main Capture Volume 2' > 'gain.17.1 Post Demux ssp-capture Capture Vo'

Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
2023-05-26 11:08:26 +03:00
Jyri Sarha 76310a0a0e topology2: cavs-nocodec.conf: Rename SSP0, SSP1, and SSP2 playback volumes
Rename SSP0, SSP1, and SSP2 playback volumes according to PCM names
they are connected to. Define the PCM names as variables so the name
can be changed in a single place.

This is how the change will look like in sof-tgl-nocodec.tplg:

'gain.1.1 Playback Volume 1' > 'gain.1.1 Pre Mixer Port0 Playback Volume'
'gain.2.1 Main Playback Volume 2' > 'gain.2.1 Post Mixer Port0 Playback Volume'
'gain.3.1 Playback Volume 3' > 'gain.3.1 Pre Mixer Port1 Playback Volume'
'gain.5.1 Playback Volume 5' > 'gain.5.1 Pre Mixer Port2 Playback Volume'
'gain.6.1 Main Playback Volume 6' > 'gain.6.1 Post Mixer Port2 Playback Volume'

Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
2023-05-26 11:08:26 +03:00
Pierre-Louis Bossart 3d54d14f3f topology1: add Dell SKU 0BDA support
Yet another missing topology

This needs to be back-ported to the 2.2 stable branch for releases

Closes: https://github.com/thesofproject/linux/issues/4380
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2023-05-26 10:49:33 +03:00
Bard Liao 601d2bc41e topology2: sdw-amp-generic: set virtual widget type output
Widget type snd_soc_dapm_out_drv and snd_soc_dapm_output will be treat
as virtual widget and be ignored in sof topology in kernel.
We need to set type = output or out_drv in topology when it is a virtual
widget.

Fixes: 3835846836 ("topology2: sdw-amp-generic: Show all aggregated DAIs on the graph")
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
2023-05-25 13:39:23 +03:00
Yong Zhi 94f8b0c4d4 topology2: fix number range between 1 and 1000 used by Regex
Since IncludeByKey uses Regular expressions to validate text match,
the expression [1-1000] does not filter number between 1 to 1000 as
intended. For example, DEEPBUFFER_FW_DMA_MS=0 results in matched while
DEEPBUFFER_FW_DMA_MS=5 returns not found, fix with regex flavor pattern.

Signed-off-by: Yong Zhi <yong.zhi@intel.com>
2023-05-23 13:12:21 +03:00
Bard Liao fda59fb7d4 topology2: remove cavs-sdw.tplg from avs-tplg
There is no device that uses the topology.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
2023-05-22 22:30:36 -07:00
Ranjani Sridharan 3835846836 topology2: sdw-amp-generic: Show all aggregated DAIs on the graph
When there are aggregated amps, the topology includes a DAI copier for
each aggregated DAI. But, since the second DAI is not connected to
anything in topology, it doesn't show up in the graph. So, add a virtual
widget and connect it to the aggregated DAI and the gain module to show
its existence in the graph. When parsing the topology, the kernel
ignores all routes that contain a virtual widget at any end of the
route.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-05-22 18:53:45 -07:00
Ranjani Sridharan 919b402abc topology2: dai-copier: Remove ALH support
Remove ALH support in the generic dai-copier class as it has its own
class now.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-05-22 18:53:45 -07:00
Ranjani Sridharan 05628c9c48 topology2: Use the new ALH dai copier class
Replace the use of the generic dai-copier class with the ALH specific
DAI copier and pipeline class.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-05-22 18:53:45 -07:00
Ranjani Sridharan e9353b0eed topology2: Introduce a new pipeline class
This is specifically meant to be used with ALH DAI copiers.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-05-22 18:53:45 -07:00
Ranjani Sridharan 457113a275 topology2: components: Introduce a new class definition for ALH DAI copiers
Create a new class for ALH because they are different from the other DAI
types with DAI index being irrelevant. So, it would need a new naming
scheme that's more meaningful. For ex: dai-copier-ALH.SDW1-Playback.0

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-05-22 18:53:45 -07:00
Jyri Sarha af9bedb63e topology2: cavs-mixin-mixout-hda: Rename mixin-mixout mixers
Rename mixin and mixout Analog Playback volumes. Rewrite the names of
the mixers to better reflect their position in the topology.

As a result of this commit mixers are renamed in sof-hda-generic.tplg.

'gain.1.1 1 2nd Playback Volume' becomes
'gain.1.1 Pre Mixer Analog Playback Volume'

and

'gain.2.1 2 Main Playback Volume' becomes
'gain.2.1 Post Mixer Analog Playback Volume'

Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
2023-05-19 12:54:41 -07:00
Ranjani Sridharan e5455775b0 topology2: copier: Remove host gateway type support
It is now handled by the host-copier class. Renaming the copier class to
dai-copier and modifying its naming convention will be done in the
follow up patches.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-05-19 08:17:34 -07:00
Ranjani Sridharan b534fc6192 topology2: host-gateway-playback: Use host-copier
Replace the generic copier with host-copier in the class definition and
the instances.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-05-19 08:17:34 -07:00
Ranjani Sridharan ac26e70d95 topology2: host-gateway-capture: use host-copier
Replace the generic copier with host-copier in the class definition and
the instances.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-05-19 08:17:34 -07:00
Ranjani Sridharan 81a354e750 topology2: gain-copier-capture: Use host-copier
Replace the generic copier with host-copier in the class definition and
the instances.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-05-19 08:17:34 -07:00
Ranjani Sridharan 3bee3c25fc topology2: gain-playback: Use host-copier
Replace the generic copier with host-copier in the class definition.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-05-19 08:17:34 -07:00