Skip to content

Commit 92a8bf5

Browse files
committed
topology2: Add compress playback support to cavs-sdw based topologies
If COMPRESSED is set to true then a compr pipeline will be attached to the Jack and Speaker path. Add example topology under development: sof-arl-cs42l43-l0-compr.tplg sof-ptl-rt721-compr.tplg sof-ptl-rt722-compr.tplg The patch supports: - no compressed pipeline - no regression - When COMPRESSED is set to true then it enables the compr pipeline dynamically for Jack and Speaker depending on their availability, in other words will work in tish combination: only Jack, only Speaker, both Jack and Speaker Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
1 parent 55c5408 commit 92a8bf5

File tree

2 files changed

+47
-0
lines changed

2 files changed

+47
-0
lines changed

tools/topology/topology2/cavs-sdw.conf

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,11 @@
2222
<gain-copier-capture.conf>
2323
<deepbuffer-playback.conf>
2424
<deepbuffer-capture.conf>
25+
<compr-playback.conf>
2526
<host-gateway-playback.conf>
2627
<host-gateway-capture.conf>
2728
<host-gateway-tdfb-drc-capture.conf>
29+
<src.conf>
2830
<io-gateway.conf>
2931
<io-gateway-capture.conf>
3032
<highpass-capture-be.conf>
@@ -53,6 +55,7 @@
5355
<ssp.conf>
5456
<bt-default.conf>
5557
<deep-buffer-default.conf>
58+
<compr-default.conf>
5659
<siggen-host-copier-capture.conf>
5760

5861
Define {
@@ -71,6 +74,7 @@ Define {
7174
DMIC0_ID 4
7275
DMIC1_ID 5
7376
DMIC0_PCM_CAPS 'Gain Capture 13'
77+
7478
DEEP_BUFFER_PIPELINE_ID 15
7579
DEEP_BUFFER_PCM_ID 31
7680
DEEP_BUFFER_PIPELINE_SRC 'mixin.15.1'
@@ -81,6 +85,18 @@ Define {
8185
DEEP_BUFFER_PIPELINE_SRC_2 'mixin.16.1'
8286
DEEP_BUFFER_PIPELINE_SINK_2 'mixout.21.1'
8387
DEEP_BUFFER_PCM_NAME_2 'Deepbuffer Speaker'
88+
89+
COMPR_PIPELINE_ID 30
90+
COMPR_PCM_ID 50
91+
COMPR_PIPELINE_SRC 'mixin.30.1'
92+
COMPR_PIPELINE_SINK 'mixout.1.1'
93+
COMPR_PCM_NAME 'Compress Jack Out'
94+
COMPR_2_PIPELINE_ID 32
95+
COMPR_2_PCM_ID 52
96+
COMPR_2_PIPELINE_SRC 'mixin.32.1'
97+
COMPR_2_PIPELINE_SINK 'mixout.21.1'
98+
COMPR_2_PCM_NAME 'Compress Speaker'
99+
84100
SDW_JACK_OUT_STREAM 'SDW0-Playback'
85101
SDW_JACK_IN_STREAM 'SDW0-Capture'
86102
SDW_JACK_OUT_BE_ID 0
@@ -157,5 +173,23 @@ IncludeByKey.SDW_DMIC {
157173

158174
IncludeByKey.SDW_JACK {
159175
"true" "platform/intel/sdw-jack-generic.conf"
176+
"false" {
177+
Define {
178+
# disable compressed audio for Jack
179+
COMPRESSED_1 false
180+
}
181+
}
160182
}
161183

184+
IncludeByKey.NUM_SDW_AMP_LINKS {
185+
"[1-3]" {
186+
Define {
187+
# Enable compressed audio for Speaker
188+
COMPRESSED_2 true
189+
}
190+
}
191+
}
192+
193+
IncludeByKey.COMPRESSED {
194+
"true" "platform/intel/compr.conf"
195+
}

tools/topology/topology2/development/tplg-targets.cmake

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -449,4 +449,17 @@ SDW_JACK_OUT_STREAM=Playback-SimpleJack,SDW_JACK_IN_STREAM=Capture-SimpleJack,\
449449
PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-ptl-rt722-4ch-echoref.bin,DMIC0_ENHANCED_CAPTURE=true,\
450450
EFX_DMIC0_TDFB_PARAMS=line4_pass,EFX_DMIC0_DRC_PARAMS=dmic_default,\
451451
SDW_JACK_ECHO_REF=true,SDW_SPK_ECHO_REF=true"
452+
453+
# Soundwire topologies with compressed support
454+
"cavs-sdw\;sof-arl-cs42l43-l0-compr\;PLATFORM=mtl,NUM_SDW_AMP_LINKS=1,SDW_DMIC=1,\
455+
SDW_AMP_FEEDBACK=false,SDW_SPK_STREAM=Playback-SmartAmp,SDW_DMIC_STREAM=Capture-SmartMic,\
456+
SDW_JACK_OUT_STREAM=Playback-SimpleJack,SDW_JACK_IN_STREAM=Capture-SimpleJack,COMPRESSED=true"
457+
458+
"cavs-sdw\;sof-ptl-rt721-compr\;PLATFORM=ptl,SDW_DMIC=1,NUM_SDW_AMP_LINKS=1,\
459+
SDW_AMP_FEEDBACK=false,SDW_SPK_STREAM=Playback-SmartAmp,SDW_DMIC_STREAM=Capture-SmartMic,\
460+
SDW_JACK_OUT_STREAM=Playback-SimpleJack,SDW_JACK_IN_STREAM=Capture-SimpleJack,COMPRESSED=true"
461+
462+
"cavs-sdw\;sof-ptl-rt722-compr\;PLATFORM=ptl,SDW_DMIC=1,NUM_SDW_AMP_LINKS=1,\
463+
SDW_AMP_FEEDBACK=false,SDW_SPK_STREAM=Playback-SmartAmp,SDW_DMIC_STREAM=Capture-SmartMic,\
464+
SDW_JACK_OUT_STREAM=Playback-SimpleJack,SDW_JACK_IN_STREAM=Capture-SimpleJack,COMPRESSED=true"
452465
)

0 commit comments

Comments
 (0)