Commit Graph

1377 Commits

Author SHA1 Message Date
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