Skip to content

Commit 093db05

Browse files
committed
topology2: isolated dolby-dax widget setting on headphone
On certain platforms, such as Intel PTL, memory limitations prevent the creation of two instances simultaneously on both the speaker and headphone pipelines. The DAX_HEADSET option has been added here to allow user to decide whether to enable DAX on both the speaker and headphone pipelines based on the platform's capabilities. Signed-off-by: Jun Lai <jun.lai@dolby.com>
1 parent 678de87 commit 093db05

3 files changed

Lines changed: 291 additions & 132 deletions

File tree

tools/topology/topology2/cavs-mixin-mixout-dax-ssp.conf

Lines changed: 96 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
Define {
1010
DOLBY_DAX_CORE_ID 0
11+
DAX_HEADSET "false"
1112
}
1213

1314
# Pipeline ID:1 PCM ID: 0
@@ -46,7 +47,9 @@ Object.Pipeline {
4647
}
4748
]
4849

49-
mixout-gain-dax-dai-copier-playback [
50+
IncludeByKey.DAX_HEADSET {
51+
"true" {
52+
mixout-gain-dax-dai-copier-playback [
5053
{
5154
index $HEADSET_DAI_PIPELINE_ID
5255

@@ -112,17 +115,20 @@ Object.Pipeline {
112115
}
113116
}
114117
}
118+
]
119+
}
120+
"false" {
121+
mixout-gain-dai-copier-playback [
115122
{
116-
index $SPEAKER_DAI_PIPELINE_ID
117-
core_id $SPEAKER_PCM_CORE_ID
123+
index $HEADSET_DAI_PIPELINE_ID
118124

119125
Object.Widget.dai-copier.1 {
120-
dai_index $SPEAKER_SSP_DAI_INDEX
126+
dai_index $HEADSET_SSP_DAI_INDEX
121127
dai_type "SSP"
122128
copier_type "SSP"
123-
stream_name "$SPEAKER_CODEC_NAME"
129+
stream_name "$HEADSET_CODEC_NAME"
124130
node_type $I2S_LINK_OUTPUT_CLASS
125-
IncludeByKey.SSP_SPK_FMT_24 {
131+
IncludeByKey.SSP_HS_FMT_24 {
126132
"true" {
127133
Object.Base.output_audio_format [
128134
{
@@ -146,50 +152,107 @@ Object.Pipeline {
146152

147153
Object.Widget.gain.1 {
148154
Object.Control.mixer.1 {
149-
name 'Post Mixer $SPEAKER_PCM_NAME Playback Volume'
155+
name 'Post Mixer $HEADSET_PCM_NAME Playback Volume'
150156
}
151157
}
158+
}
159+
]
160+
}
161+
}
162+
mixout-gain-dax-dai-copier-playback [
163+
{
164+
index $SPEAKER_DAI_PIPELINE_ID
165+
core_id $SPEAKER_PCM_CORE_ID
152166

153-
Object.Widget.dolby-dax.1 {
154-
core_id $DOLBY_DAX_CORE_ID
155-
Object.Control {
156-
mixer."1" {
157-
name 'DAX Speaker Switch'
158-
}
159-
mixer."2" {
160-
name 'DAX Speaker Switch CP'
161-
}
162-
mixer."3" {
163-
name 'DAX Speaker Switch CTC'
164-
}
165-
mixer."4" {
166-
name 'DAX Speaker Volume'
167-
}
168-
enum."1" {
169-
name 'DAX Speaker Profile'
167+
Object.Widget.dai-copier.1 {
168+
dai_index $SPEAKER_SSP_DAI_INDEX
169+
dai_type "SSP"
170+
copier_type "SSP"
171+
stream_name "$SPEAKER_CODEC_NAME"
172+
node_type $I2S_LINK_OUTPUT_CLASS
173+
IncludeByKey.SSP_SPK_FMT_24 {
174+
"true" {
175+
Object.Base.output_audio_format [
176+
{
177+
out_bit_depth 32
178+
out_valid_bit_depth 24
179+
out_sample_type $SAMPLE_TYPE_LSB_INTEGER
180+
out_fmt_cfg "$[($out_channels | ($out_valid_bit_depth * 256))]"
170181
}
171-
enum."2" {
172-
name 'DAX Speaker Device'
173-
}
174-
bytes."1" {
175-
name 'DAX Speaker Tuning'
176-
max 8192
182+
]
183+
}
184+
"false" {
185+
Object.Base.output_audio_format [
186+
{
187+
out_bit_depth 32
188+
out_valid_bit_depth 32
177189
}
190+
]
178191
}
179192
}
193+
}
180194

181-
Object.Widget.pipeline.1 {
182-
core $SPEAKER_PCM_CORE_ID
195+
Object.Widget.gain.1 {
196+
Object.Control.mixer.1 {
197+
name 'Post Mixer $SPEAKER_PCM_NAME Playback Volume'
198+
}
199+
}
200+
201+
Object.Widget.dolby-dax.1 {
202+
core_id $DOLBY_DAX_CORE_ID
203+
Object.Control {
204+
mixer."1" {
205+
name 'DAX Speaker Switch'
206+
}
207+
mixer."2" {
208+
name 'DAX Speaker Switch CP'
209+
}
210+
mixer."3" {
211+
name 'DAX Speaker Switch CTC'
212+
}
213+
mixer."4" {
214+
name 'DAX Speaker Volume'
215+
}
216+
enum."1" {
217+
name 'DAX Speaker Profile'
218+
}
219+
enum."2" {
220+
name 'DAX Speaker Device'
221+
}
222+
bytes."1" {
223+
name 'DAX Speaker Tuning'
224+
max 8192
225+
}
183226
}
184227
}
228+
229+
Object.Widget.pipeline.1 {
230+
core $SPEAKER_PCM_CORE_ID
231+
}
232+
}
185233
]
186234
}
187235

188-
Object.Base.route [
236+
IncludeByKey.DAX_HEADSET {
237+
"true" {
238+
Object.Base.route [
189239
{
190240
source "dolby-dax.$HEADSET_DAI_PIPELINE_ID.1"
191241
sink "dai-copier.SSP.$HEADSET_CODEC_NAME.playback"
192242
}
243+
]
244+
}
245+
"false" {
246+
Object.Base.route [
247+
{
248+
source "gain.$HEADSET_DAI_PIPELINE_ID.1"
249+
sink "dai-copier.SSP.$HEADSET_CODEC_NAME.playback"
250+
}
251+
]
252+
}
253+
}
254+
255+
Object.Base.route [
193256
{
194257
source "mixin.$HEADSET_HOST_PIPELINE_ID.1"
195258
sink "mixout.$HEADSET_DAI_PIPELINE_ID.1"

tools/topology/topology2/cavs-sdw.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ Define {
120120
SDW_AMP_XOVER_EQFIR_PARAMS default
121121
DOLBY_DAX_CORE_ID 0
122122
USE_DAX "false"
123+
DAX_HEADSET "false"
123124
SDW_ECHO_REF_DAI "false"
124125
}
125126

0 commit comments

Comments
 (0)