Skip to content

Commit cf135e3

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-mtl-rt713-l0-rt1316-l12-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 3ee7184 commit cf135e3

File tree

2 files changed

+44
-0
lines changed

2 files changed

+44
-0
lines changed

tools/topology/topology2/cavs-sdw.conf

Lines changed: 28 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,12 @@ 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_SINK 'mixout.1.1'
90+
COMPR_PCM_NAME 'Compress Jack Out'
91+
COMPR_2_PIPELINE_SINK 'mixout.21.1'
92+
COMPR_2_PCM_NAME 'Compress Speaker'
93+
8494
SDW_JACK_OUT_STREAM 'SDW0-Playback'
8595
SDW_JACK_IN_STREAM 'SDW0-Capture'
8696
SDW_JACK_OUT_BE_ID 0
@@ -189,5 +199,23 @@ IncludeByKey.SDW_DMIC {
189199

190200
IncludeByKey.SDW_JACK {
191201
"true" "platform/intel/sdw-jack-generic.conf"
202+
"false" {
203+
Define {
204+
# disable compressed audio for Jack
205+
COMPRESSED_1 false
206+
}
207+
}
192208
}
193209

210+
IncludeByKey.NUM_SDW_AMP_LINKS {
211+
"[1-3]" {
212+
Define {
213+
# Enable compressed audio for Speaker
214+
COMPRESSED_2 true
215+
}
216+
}
217+
}
218+
219+
IncludeByKey.COMPRESSED {
220+
"true" "platform/intel/compr.conf"
221+
}

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

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -461,4 +461,20 @@ SDW_JACK_OUT_STREAM=Playback-SimpleJack,SDW_JACK_IN_STREAM=Capture-SimpleJack,\
461461
PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-ptl-rt722-4ch-echoref.bin,DMIC0_ENHANCED_CAPTURE=true,\
462462
EFX_DMIC0_TDFB_PARAMS=line4_pass,EFX_DMIC0_DRC_PARAMS=dmic_default,\
463463
SDW_JACK_ECHO_REF=true,SDW_SPK_ECHO_REF=true,SDW_ECHO_REF_DAI=true"
464+
465+
# Soundwire topologies with compressed support
466+
"cavs-sdw\;sof-arl-cs42l43-l0-compr\;PLATFORM=mtl,NUM_SDW_AMP_LINKS=1,SDW_DMIC=1,\
467+
SDW_AMP_FEEDBACK=false,SDW_SPK_STREAM=Playback-SmartAmp,SDW_DMIC_STREAM=Capture-SmartMic,\
468+
SDW_JACK_OUT_STREAM=Playback-SimpleJack,SDW_JACK_IN_STREAM=Capture-SimpleJack,COMPRESSED=true"
469+
470+
"cavs-sdw\;sof-mtl-rt713-l0-rt1316-l12-compr\;PLATFORM=mtl,NUM_SDW_AMP_LINKS=2,\
471+
HDMI1_ID=4,HDMI2_ID=5,HDMI3_ID=6,COMPRESSED=true"
472+
473+
"cavs-sdw\;sof-ptl-rt721-compr\;PLATFORM=ptl,SDW_DMIC=1,NUM_SDW_AMP_LINKS=1,\
474+
SDW_AMP_FEEDBACK=false,SDW_SPK_STREAM=Playback-SmartAmp,SDW_DMIC_STREAM=Capture-SmartMic,\
475+
SDW_JACK_OUT_STREAM=Playback-SimpleJack,SDW_JACK_IN_STREAM=Capture-SimpleJack,COMPRESSED=true"
476+
477+
"cavs-sdw\;sof-ptl-rt722-compr\;PLATFORM=ptl,SDW_DMIC=1,NUM_SDW_AMP_LINKS=1,\
478+
SDW_AMP_FEEDBACK=false,SDW_SPK_STREAM=Playback-SmartAmp,SDW_DMIC_STREAM=Capture-SmartMic,\
479+
SDW_JACK_OUT_STREAM=Playback-SimpleJack,SDW_JACK_IN_STREAM=Capture-SimpleJack,COMPRESSED=true"
464480
)

0 commit comments

Comments
 (0)