Skip to content

Commit ee5d196

Browse files
committed
topology2: Add compressed 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-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 ee729a7 commit ee5d196

File tree

2 files changed

+43
-0
lines changed

2 files changed

+43
-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 {
@@ -76,6 +79,19 @@ Define {
7679
DEEP_BUFFER_PIPELINE_SRC 'mixin.15.1'
7780
DEEP_BUFFER_PIPELINE_SINK 'mixout.1.1'
7881
DEEP_BUFFER_PCM_NAME 'Deepbuffer Jack Out'
82+
83+
COMPR_PIPELINE_ID 30
84+
COMPR_PCM_ID 50
85+
COMPR_PIPELINE_SRC 'mixin.30.1'
86+
COMPR_PIPELINE_SINK 'mixout.1.1'
87+
COMPR_PCM_NAME 'Compr Jack Out'
88+
89+
COMPR_2_PIPELINE_ID 32
90+
COMPR_2_PCM_ID 52
91+
COMPR_2_PIPELINE_SRC 'mixin.32.1'
92+
COMPR_2_PIPELINE_SINK 'mixout.21.1'
93+
COMPR_2_PCM_NAME 'Compr Speaker'
94+
7995
DEEP_BUFFER_PIPELINE_ID_2 16
8096
DEEP_BUFFER_PCM_ID_2 35
8197
DEEP_BUFFER_PIPELINE_SRC_2 'mixin.16.1'
@@ -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: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -449,4 +449,13 @@ 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-rt722-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"
452461
)

0 commit comments

Comments
 (0)