Skip to content

Commit 790464d

Browse files
committed
topology2: dts: move playback pipeline to independent topology
In order to adopt more different playback pipelines, refer to sof-hda-generic.conf and move playback pipeline in cavs-rt5682.conf to cavs-mixin-mixout-ssp.conf. Co-developed-by: Mac Chiang <mac.chiang@intel.com> Signed-off-by: Mac Chiang <mac.chiang@intel.com> Signed-off-by: Joe Cheng <joe.cheng@xperi.com>
1 parent 1005f64 commit 790464d

2 files changed

Lines changed: 102 additions & 87 deletions

File tree

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
#
2+
# Pipeline definitions
3+
#
4+
# PCM0 ---> gain ----> Mixin ----> Mixout ----> gain ----> SSP0
5+
# PCM1 ---> gain ----> Mixin ----> Mixout ----> gain ----> SSP1
6+
#
7+
8+
# Pipeline ID:1 PCM ID: 0
9+
Object.Pipeline {
10+
# playback pipelines
11+
host-copier-gain-mixin-playback [
12+
{
13+
index 1
14+
15+
Object.Widget.host-copier.1 {
16+
stream_name '$HEADSET_PLAYBACK_PCM_STREAM_NAME'
17+
pcm_id $HEADSET_PCM_ID
18+
}
19+
Object.Widget.gain.1 {
20+
Object.Control.mixer.1 {
21+
name 'Pre Mixer $HEADSET_PCM_NAME Playback Volume'
22+
}
23+
}
24+
}
25+
{
26+
index 3
27+
28+
Object.Widget.host-copier.1 {
29+
stream_name '$SPEAKER_PLAYBACK_PCM_STREAM_NAME'
30+
pcm_id $SPEAKER_PCM_ID
31+
}
32+
Object.Widget.gain.1 {
33+
Object.Control.mixer.1 {
34+
name 'Pre Mixer $SPEAKER_PCM_NAME Playback Volume'
35+
}
36+
}
37+
}
38+
]
39+
40+
mixout-gain-dai-copier-playback [
41+
{
42+
index 2
43+
44+
Object.Widget.dai-copier.1 {
45+
dai_index $HEADSET_SSP_DAI_INDEX
46+
dai_type "SSP"
47+
copier_type "SSP"
48+
stream_name "$HEADSET_CODEC_NAME"
49+
node_type $I2S_LINK_OUTPUT_CLASS
50+
}
51+
52+
Object.Widget.gain.1 {
53+
Object.Control.mixer.1 {
54+
name 'Post Mixer $HEADSET_PCM_NAME Playback Volume'
55+
}
56+
}
57+
}
58+
{
59+
index 4
60+
61+
Object.Widget.dai-copier.1 {
62+
dai_index $SPEAKER_SSP_DAI_INDEX
63+
dai_type "SSP"
64+
copier_type "SSP"
65+
stream_name "$SPEAKER_CODEC_NAME"
66+
node_type $I2S_LINK_OUTPUT_CLASS
67+
}
68+
69+
Object.Widget.gain.1 {
70+
Object.Control.mixer.1 {
71+
name 'Post Mixer $SPEAKER_PCM_NAME Playback Volume'
72+
}
73+
}
74+
}
75+
]
76+
}
77+
78+
Object.Base.route [
79+
{
80+
source "gain.2.1"
81+
sink "dai-copier.SSP.$HEADSET_CODEC_NAME.playback"
82+
}
83+
{
84+
source "mixin.1.1"
85+
sink "mixout.2.1"
86+
}
87+
{
88+
source "gain.4.1"
89+
sink "dai-copier.SSP.$SPEAKER_CODEC_NAME.playback"
90+
}
91+
{
92+
source "mixin.3.1"
93+
sink "mixout.4.1"
94+
}
95+
]

tools/topology/topology2/cavs-rt5682.conf

Lines changed: 7 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ Define {
105105
GOOGLE_AEC_PIPELINE_PRIORITY 2
106106
DMIC_PIPELINE_PRIORITY 1
107107
ECHO_REF_PIPELINE_PRIORITY 0
108+
PLAYBACK_PIPELINE_SRC "volume"
108109
}
109110

110111
# override defaults with platform-specific config
@@ -140,6 +141,11 @@ IncludeByKey.INCLUDE_BT_OFFLOAD {
140141
"true" "platform/intel/bt-generic.conf"
141142
}
142143

144+
IncludeByKey.PLAYBACK_PIPELINE_SRC {
145+
"volume" "cavs-mixin-mixout-ssp.conf"
146+
}
147+
148+
143149
#
144150
# List of all DAIs
145151
#
@@ -198,81 +204,11 @@ Object.Dai.SSP [
198204
#
199205
# Pipeline definitions
200206
#
201-
# PCM0 ---> gain ----> Mixin ----> Mixout ----> gain ----> SSP0
202-
# PCM1 ---> gain ----> Mixin ----> Mixout ----> gain ----> SSP1
203-
#
204207
# SSP0 ----> PCM0
205208
# SSP1 ----> PCM1
206209

207210
# Pipeline ID:1 PCM ID: 0
208211
Object.Pipeline {
209-
# playback pipelines
210-
host-copier-gain-mixin-playback [
211-
{
212-
index 1
213-
214-
Object.Widget.host-copier.1 {
215-
stream_name '$HEADSET_PLAYBACK_PCM_STREAM_NAME'
216-
pcm_id $HEADSET_PCM_ID
217-
}
218-
Object.Widget.gain.1 {
219-
Object.Control.mixer.1 {
220-
name 'Pre Mixer $HEADSET_PCM_NAME Playback Volume'
221-
}
222-
}
223-
}
224-
{
225-
index 3
226-
227-
Object.Widget.host-copier.1 {
228-
stream_name '$SPEAKER_PLAYBACK_PCM_STREAM_NAME'
229-
pcm_id $SPEAKER_PCM_ID
230-
}
231-
Object.Widget.gain.1 {
232-
Object.Control.mixer.1 {
233-
name 'Pre Mixer $SPEAKER_PCM_NAME Playback Volume'
234-
}
235-
}
236-
}
237-
]
238-
239-
mixout-gain-dai-copier-playback [
240-
{
241-
index 2
242-
243-
Object.Widget.dai-copier.1 {
244-
dai_index $HEADSET_SSP_DAI_INDEX
245-
dai_type "SSP"
246-
copier_type "SSP"
247-
stream_name "$HEADSET_CODEC_NAME"
248-
node_type $I2S_LINK_OUTPUT_CLASS
249-
}
250-
251-
Object.Widget.gain.1 {
252-
Object.Control.mixer.1 {
253-
name 'Post Mixer $HEADSET_PCM_NAME Playback Volume'
254-
}
255-
}
256-
}
257-
{
258-
index 4
259-
260-
Object.Widget.dai-copier.1 {
261-
dai_index $SPEAKER_SSP_DAI_INDEX
262-
dai_type "SSP"
263-
copier_type "SSP"
264-
stream_name "$SPEAKER_CODEC_NAME"
265-
node_type $I2S_LINK_OUTPUT_CLASS
266-
}
267-
268-
Object.Widget.gain.1 {
269-
Object.Control.mixer.1 {
270-
name 'Post Mixer $SPEAKER_PCM_NAME Playback Volume'
271-
}
272-
}
273-
}
274-
]
275-
276212
host-gateway-capture [
277213
{
278214
index 5
@@ -350,22 +286,6 @@ Object.PCM.pcm [
350286
]
351287

352288
Object.Base.route [
353-
{
354-
source "gain.2.1"
355-
sink "dai-copier.SSP.$HEADSET_CODEC_NAME.playback"
356-
}
357-
{
358-
source "mixin.1.1"
359-
sink "mixout.2.1"
360-
}
361-
{
362-
source "gain.4.1"
363-
sink "dai-copier.SSP.$SPEAKER_CODEC_NAME.playback"
364-
}
365-
{
366-
source "mixin.3.1"
367-
sink "mixout.4.1"
368-
}
369289
{
370290
source "dai-copier.SSP.$HEADSET_CODEC_NAME.capture"
371291
sink "host-copier.$HEADSET_PCM_ID.capture"
@@ -374,7 +294,7 @@ Object.Base.route [
374294
source "host-copier.$HEADSET_PCM_ID.playback"
375295
sink "gain.1.1"
376296
}
377-
{
297+
{
378298
source "host-copier.$SPEAKER_PCM_ID.playback"
379299
sink "gain.3.1"
380300
}

0 commit comments

Comments
 (0)