Commit Graph

2053 Commits

Author SHA1 Message Date
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
Ranjani Sridharan 528a973fe6 tplg_parser: process: Update the ipc4 builder
Add support for parsing the effect type widget in IPC4 topologies.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-08-09 16:14:06 +01:00
Ranjani Sridharan 662c04b694 tplg_parser: pipeline: Update the ipc4 builder
Add support for parsing the scheduler widget in IPC4 topologies.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-08-09 16:14:06 +01:00
Ranjani Sridharan 90c929d522 tplg_parser: mixer: Update the ipc4 builder
Add support for parsing the mixer widget in IPC4 topologies.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-08-09 16:14:06 +01:00
Ranjani Sridharan d79ef35e70 tplg_parser: buffer: Update the ipc4 builder
Add support for parsing the module-copier(buffer) in IPC4 topologies.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-08-09 16:14:06 +01:00
Ranjani Sridharan 8661fd445c tplg_parser: pga: Update the ipc4 builder
Add support for parsing the pga widget in IPC4 topologies.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-08-09 16:14:06 +01:00
Ranjani Sridharan 1ba3124e5f tplg_parser: Extend the tplg_context and comp_info for IPC4
Extend the definitions for struct tplg_context and struct tplg_comp_info
to include the fields to parse the ipc_payload and audio format
information from topology.
Also, add the logic for parsing the input/output audio formats from the
topology.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-08-09 16:14:06 +01:00
Ranjani Sridharan 0a248c87c9 tplg_parser: tokens: Add support for parsing multiple sets of the same tokens
Add support for parsing multiple token sets belonging to the same group.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-08-09 16:14:06 +01:00
Seppo Ingalsuo 39edc7a844 Tools: Tune: Update crossover configurations export for tplg2
The script example_crossover.m is converted to export 2, 3, and 4
way crossover configurations for tplg1 and tplg2.

The crossover parameters like number of sinks, pipeline ids of
sinks, sample rate, and band limits are added to generate blob
filenames.

The changes include fixes for running the script with Matlab in
addition to Octave.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-08-09 16:49:35 +03: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
Seppo Ingalsuo 5856042024 Audio: DRC: Convert component to module adapter API
This patch replaces legacy component API with new module adapter
API. There are no changes to functionality.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-07-25 15:48:08 +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
Seppo Ingalsuo 7458312a76 Tools: Testbench: Remove unnecessary scheduling component find
The pcm_dev is no more used in the code. It also causes a
problem with "error: ipc get comp" with some topologies, where
p->sched_id is missing. This fix helps testbech to parse a
topology like

pcm0p --> buf2.0 --> muxdemux --> buf1.0 --> ssp0.out
                        ^
pcm1p --> buf3.0 -------|

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-07-03 17:13:45 +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
Marcin Szkudlinski 589df2aea4 buffer: don't access stream internals
add more functions to audio_stream internals

Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
2023-06-19 16:26:08 +02: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
Seppo Ingalsuo 869666061b Tools: Test: Audio: Fix syntax error in test_run.m
The fprintf() command prints only "#!/bin/sh". For some reason
this has been ignored by interpreter but as clear error it is
better to fix.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-06-06 15:32:45 +03:00
Seppo Ingalsuo 0cb752d362 Tools: Test: Audio: Valgrind run related fixes
The changes to scripts/host-testbench.sh and earlier to process_test.m
have unintentionally dropped valgrind run from test.

This patch enables valgrind for process_test.m runs and fixes
issue in test run octave side function to silently ignore
error about failed shell command. Normally test fail when there
is no data or incorrect data, but a valgrind failure with correct
test output was passed.

Valgrind output becomes visible if testbench run trace stderr
redirection to file is disabled. If not done valgrind error would
stop the test but the analysis would not be printed to console.

Fixes: 6b744bcc63 ("host-testbench.sh: use process_test.m for 8 components")

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-06-06 15:32:45 +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
Seppo Ingalsuo e7fc334bda Tools: Tune: DRC: Changes for Matlab compatibility
This patch enables running example_drc.m script with Matlab.
The endifs are changed to end. And mixed usage of endfunction
and end is corrected to just end. The unnecessary
semicolons from function declarations are deleted.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-05-29 10:12:16 +03:00
Seppo Ingalsuo 83a2ae813c Tools: Tune: DRC: Export configurations for topology2
This patch changes a bit structure of example_drc to export
conveniently several different blobs. The changed script
exports configurations blobs for disabled and enabled mode.

Two functions for IPC4 and topology2 compatibility are
generalized from EQ to common directory. The EQ and other
tools will be updated to later to use the common get_abi()
and tplg2_write() functions.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-05-29 10:12:16 +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
Seppo Ingalsuo e4342324c0 Tools: Test: Audio: Add test for level dependent gain
This patch adds to process_test.m test with amplitude sweep
to determine level dependent logarithmic gain.

Currently there is no test pass/fail criteria. But the test result
plot can be examined from directory plots. E.g. first full test
for DRC with "process_test('drc', 32, 32, 48000, 1);".

The view the plots from shell with "eog plots/ldlg_drc_*.png". Or
examine the plots directory with a file maneger GUI.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-05-25 14:42:24 +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
Andy Ross e4aee1afe7 Revert "tools: Remove older fuzz framework"
This got merged too fast.  Turns out it broke the newer fuzz
integration that was in the same YAML file.  Also there are some
evolving review comments.  Will resubmit.

This reverts commit 11e57f5030.

Signed-off-by: Andy Ross <andyross@google.com>
2023-05-23 12:27:28 -07:00
Andy Ross 11e57f5030 tools: Remove older fuzz framework
Fuzzing via the new framework is now integrated at oss-fuzz upstream,
so there's no point to keep this in SOF anymore.  The github workflow
has bitrot vs. the newer build.sh, and that docker build is very
heavyweight vs. the newer fuzz.sh smoke test that runs in the regular
build container anyway.

Signed-off-by: Andy Ross <andyross@google.com>
2023-05-23 10:03:02 -07: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