Skip to content

Commit 84ce028

Browse files
committed
topology2: cavs-sdw: add compressed playback pipeline with phase vocoder
Add a new compr-speed-playback FE pipeline class for cavs-sdw that runs a decoder followed by the phase_vocoder module before the usual SRC, gain and mixin stages. The decoder and phase_vocoder widgets are placed on the DP scheduler so they can consume variable amounts of input per output period, which is what enables time-scaling playback of a compressed stream. The pipeline is instantiated from a new platform/intel/compr-speed.conf for both the Jack (COMPRESSED_SPEED_1) and Speaker (COMPRESSED_SPEED_2) paths, with defaults added to compr-default.conf (PCM IDs 60/62, pipeline IDs 95/96, PCM names "Compress Speed Playback[ 2]"). cavs-sdw gains matching COMPR_SPEED_* defines, an IncludeByKey.COMPRESSED_SPEED hook, and propagation of COMPRESSED_SPEED_1/2 through the Jack and amp-links branches so the pipeline is only built when it is requested. Two development targets, sof-arl-cs42l43-l0-compr-speed and sof-mtl-rt713-l0-rt1316-l12-compr-speed, are added to tplg-targets.cmake so the new topology can be built and exercised. Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
1 parent bb6b4b8 commit 84ce028

7 files changed

Lines changed: 631 additions & 1 deletion

File tree

tools/topology/topology2/cavs-sdw.conf

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
<deepbuffer-playback.conf>
2929
<deepbuffer-capture.conf>
3030
<compr-playback.conf>
31+
<compr-speed-playback.conf>
3132
<host-gateway-playback.conf>
3233
<host-gateway-capture.conf>
3334
<host-gateway-tdfb-drc-capture.conf>
@@ -98,6 +99,11 @@ Define {
9899
COMPR_2_PIPELINE_SINK 'mixout.21.1'
99100
COMPR_2_PCM_NAME 'Compress Speaker'
100101

102+
COMPR_SPEED_PIPELINE_SINK 'mixout.1.1'
103+
COMPR_SPEED_PCM_NAME 'Compress Speed Jack Out'
104+
COMPR_SPEED_2_PIPELINE_SINK 'mixout.21.1'
105+
COMPR_SPEED_2_PCM_NAME 'Compress Speed Speaker'
106+
101107
SDW_JACK_OUT_STREAM 'SDW0-Playback'
102108
SDW_JACK_IN_STREAM 'SDW0-Capture'
103109
SDW_JACK_OUT_BE_ID 0
@@ -238,6 +244,7 @@ IncludeByKey.SDW_JACK {
238244
Define {
239245
# disable compressed audio for Jack
240246
COMPRESSED_1 false
247+
COMPRESSED_SPEED_1 false
241248
}
242249
}
243250
}
@@ -247,6 +254,7 @@ IncludeByKey.NUM_SDW_AMP_LINKS {
247254
Define {
248255
# Enable compressed audio for Speaker
249256
COMPRESSED_2 true
257+
COMPRESSED_SPEED_2 true
250258
}
251259
}
252260
}
@@ -287,3 +295,6 @@ IncludeByKey.SDW_DMIC_AUDIO_FEATURE_CAPTURE {
287295
IncludeByKey.SDW_DMIC_COMPR_AUDIO_FEATURE_CAPTURE {
288296
"true" "platform/intel/sdw-dmic-audio-feature-compress.conf"
289297
}
298+
IncludeByKey.COMPRESSED_SPEED {
299+
"true" "platform/intel/compr-speed.conf"
300+
}

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -467,9 +467,17 @@ SDW_JACK_ECHO_REF=true,SDW_SPK_ECHO_REF=true,SDW_ECHO_REF_DAI=true"
467467
SDW_AMP_FEEDBACK=false,SDW_SPK_STREAM=Playback-SmartAmp,SDW_DMIC_STREAM=Capture-SmartMic,\
468468
SDW_JACK_OUT_STREAM=Playback-SimpleJack,SDW_JACK_IN_STREAM=Capture-SimpleJack,COMPRESSED=true"
469469

470+
"cavs-sdw\;sof-arl-cs42l43-l0-compr-speed\;PLATFORM=mtl,NUM_SDW_AMP_LINKS=1,SDW_DMIC=1,\
471+
SDW_AMP_FEEDBACK=false,SDW_SPK_STREAM=Playback-SmartAmp,SDW_DMIC_STREAM=Capture-SmartMic,\
472+
SDW_JACK_OUT_STREAM=Playback-SimpleJack,SDW_JACK_IN_STREAM=Capture-SimpleJack,\
473+
COMPRESSED=true,COMPRESSED_SPEED=true"
474+
470475
"cavs-sdw\;sof-mtl-rt713-l0-rt1316-l12-compr\;PLATFORM=mtl,NUM_SDW_AMP_LINKS=2,\
471476
HDMI1_ID=4,HDMI2_ID=5,HDMI3_ID=6,COMPRESSED=true"
472477

478+
"cavs-sdw\;sof-mtl-rt713-l0-rt1316-l12-compr-speed\;PLATFORM=mtl,NUM_SDW_AMP_LINKS=2,\
479+
HDMI1_ID=4,HDMI2_ID=5,HDMI3_ID=6,COMPRESSED=true,COMPRESSED_SPEED=true"
480+
473481
"cavs-sdw\;sof-ptl-rt721-compr\;PLATFORM=ptl,SDW_DMIC=1,NUM_SDW_AMP_LINKS=1,\
474482
SDW_AMP_FEEDBACK=false,SDW_SPK_STREAM=Playback-SmartAmp,SDW_DMIC_STREAM=Capture-SmartMic,\
475483
SDW_JACK_OUT_STREAM=Playback-SimpleJack,SDW_JACK_IN_STREAM=Capture-SimpleJack,COMPRESSED=true"
Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
# Phase vocoder input formats: mono + stereo, all rates,
2+
# 8/16/24/32-bit. ibs = frames * channels * bytes_per_sample
3+
# (480 frames per DP period, matching current stereo values).
4+
num_input_audio_formats 40
5+
CombineArrays.Object.Base.input_audio_format [
6+
# mono
7+
{
8+
in_channels [ 1 ]
9+
in_rate [
10+
8000
11+
44100
12+
48000
13+
96000
14+
192000
15+
]
16+
in_bit_depth [ 8 ]
17+
in_valid_bit_depth [ 8 ]
18+
in_sample_type [ $SAMPLE_TYPE_UNSIGNED_INTEGER ]
19+
ibs [ 480 ]
20+
}
21+
{
22+
in_channels [ 1 ]
23+
in_rate [
24+
8000
25+
44100
26+
48000
27+
96000
28+
192000
29+
]
30+
in_bit_depth [ 16 ]
31+
in_valid_bit_depth [ 16 ]
32+
ibs [ 960 ]
33+
}
34+
{
35+
in_channels [ 1 ]
36+
in_rate [
37+
8000
38+
44100
39+
48000
40+
96000
41+
192000
42+
]
43+
in_bit_depth [ 32 ]
44+
in_valid_bit_depth [ 24 ]
45+
ibs [ 1920 ]
46+
}
47+
{
48+
in_channels [ 1 ]
49+
in_rate [
50+
8000
51+
44100
52+
48000
53+
96000
54+
192000
55+
]
56+
in_bit_depth [ 32 ]
57+
in_valid_bit_depth [ 32 ]
58+
ibs [ 1920 ]
59+
}
60+
# stereo
61+
{
62+
in_channels [ 2 ]
63+
in_rate [
64+
8000
65+
44100
66+
48000
67+
96000
68+
192000
69+
]
70+
in_bit_depth [ 8 ]
71+
in_valid_bit_depth [ 8 ]
72+
in_sample_type [ $SAMPLE_TYPE_UNSIGNED_INTEGER ]
73+
ibs [ 960 ]
74+
}
75+
{
76+
in_channels [ 2 ]
77+
in_rate [
78+
8000
79+
44100
80+
48000
81+
96000
82+
192000
83+
]
84+
in_bit_depth [ 16 ]
85+
in_valid_bit_depth [ 16 ]
86+
ibs [ 1920 ]
87+
}
88+
{
89+
in_channels [ 2 ]
90+
in_rate [
91+
8000
92+
44100
93+
48000
94+
96000
95+
192000
96+
]
97+
in_bit_depth [ 32 ]
98+
in_valid_bit_depth [ 24 ]
99+
ibs [ 3840 ]
100+
}
101+
{
102+
in_channels [ 2 ]
103+
in_rate [
104+
8000
105+
44100
106+
48000
107+
96000
108+
192000
109+
]
110+
in_bit_depth [ 32 ]
111+
in_valid_bit_depth [ 32 ]
112+
ibs [ 3840 ]
113+
}
114+
]
Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
# Phase vocoder output formats: mono + stereo, all rates,
2+
# 8/16/24/32-bit. obs = frames * channels * bytes_per_sample
3+
# (240 frames per DP period, matching current stereo values).
4+
num_output_audio_formats 40
5+
CombineArrays.Object.Base.output_audio_format [
6+
# mono
7+
{
8+
out_channels [ 1 ]
9+
out_rate [
10+
8000
11+
44100
12+
48000
13+
96000
14+
192000
15+
]
16+
out_bit_depth [ 8 ]
17+
out_valid_bit_depth [ 8 ]
18+
out_sample_type [ $SAMPLE_TYPE_UNSIGNED_INTEGER ]
19+
obs [ 240 ]
20+
}
21+
{
22+
out_channels [ 1 ]
23+
out_rate [
24+
8000
25+
44100
26+
48000
27+
96000
28+
192000
29+
]
30+
out_bit_depth [ 16 ]
31+
out_valid_bit_depth [ 16 ]
32+
obs [ 480 ]
33+
}
34+
{
35+
out_channels [ 1 ]
36+
out_rate [
37+
8000
38+
44100
39+
48000
40+
96000
41+
192000
42+
]
43+
out_bit_depth [ 32 ]
44+
out_valid_bit_depth [ 24 ]
45+
obs [ 960 ]
46+
}
47+
{
48+
out_channels [ 1 ]
49+
out_rate [
50+
8000
51+
44100
52+
48000
53+
96000
54+
192000
55+
]
56+
out_bit_depth [ 32 ]
57+
out_valid_bit_depth [ 32 ]
58+
obs [ 960 ]
59+
}
60+
# stereo
61+
{
62+
out_channels [ 2 ]
63+
out_rate [
64+
8000
65+
44100
66+
48000
67+
96000
68+
192000
69+
]
70+
out_bit_depth [ 8 ]
71+
out_valid_bit_depth [ 8 ]
72+
out_sample_type [ $SAMPLE_TYPE_UNSIGNED_INTEGER ]
73+
obs [ 480 ]
74+
}
75+
{
76+
out_channels [ 2 ]
77+
out_rate [
78+
8000
79+
44100
80+
48000
81+
96000
82+
192000
83+
]
84+
out_bit_depth [ 16 ]
85+
out_valid_bit_depth [ 16 ]
86+
obs [ 960 ]
87+
}
88+
{
89+
out_channels [ 2 ]
90+
out_rate [
91+
8000
92+
44100
93+
48000
94+
96000
95+
192000
96+
]
97+
out_bit_depth [ 32 ]
98+
out_valid_bit_depth [ 24 ]
99+
obs [ 1920 ]
100+
}
101+
{
102+
out_channels [ 2 ]
103+
out_rate [
104+
8000
105+
44100
106+
48000
107+
96000
108+
192000
109+
]
110+
out_bit_depth [ 32 ]
111+
out_valid_bit_depth [ 32 ]
112+
obs [ 1920 ]
113+
}
114+
]

0 commit comments

Comments
 (0)