From a3814c58b95285ad9990d9134e9f4fcdfe8fe557 Mon Sep 17 00:00:00 2001 From: Jyri Sarha Date: Mon, 5 Jun 2023 00:29:16 +0300 Subject: [PATCH] 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 --- .../platform/intel/sdw-jack-generic.conf | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/tools/topology/topology2/platform/intel/sdw-jack-generic.conf b/tools/topology/topology2/platform/intel/sdw-jack-generic.conf index 0281c12efc62..967ad26e9c63 100644 --- a/tools/topology/topology2/platform/intel/sdw-jack-generic.conf +++ b/tools/topology/topology2/platform/intel/sdw-jack-generic.conf @@ -7,6 +7,11 @@ IncludeByKey.PASSTHROUGH { } } +Define { + JACK_PLAYBACK_PCM_NAME "Jack Out" + JACK_CAPTURE_PCM_NAME "Jack In" +} + # # List of all DAIs # @@ -57,7 +62,7 @@ IncludeByKey.PASSTHROUGH { } Object.Widget.gain.1 { Object.Control.mixer.1 { - name '1 Playback Volume 0' + name 'Pre Mixer $JACK_PLAYBACK_PCM_NAME Playback Volume' } } } @@ -73,7 +78,7 @@ IncludeByKey.PASSTHROUGH { } Object.Widget.gain.1 { Object.Control.mixer.1 { - name '2 Main Playback Volume' + name 'Post Mixer $JACK_PLAYBACK_PCM_NAME Playback Volume' } } } @@ -292,11 +297,11 @@ IncludeByKey.PASSTHROUGH { Object.PCM.pcm [ { - name "Jack out" + name "$JACK_PLAYBACK_PCM_NAME" id 0 direction "playback" Object.Base.fe_dai.1 { - name "Jack out" + name "$JACK_PLAYBACK_PCM_NAME" } Object.PCM.pcm_caps.1 { @@ -305,11 +310,11 @@ Object.PCM.pcm [ } } { - name "Jack in" + name "$JACK_CAPTURE_PCM_NAME" id 1 direction "capture" Object.Base.fe_dai.1 { - name "Jack in" + name "$JACK_CAPTURE_PCM_NAME" } Object.PCM.pcm_caps.1 {