Skip to content

Commit 3a00e44

Browse files
checkupuplgirdwood
authored andcommitted
topology2: Split the configuration of dolby-dax on the headphone
On certain platforms, such as Intel PTL, memory limitations prevent the creation of two instances simultaneously on both the speaker and headphone pipelines. Therefore, new configuration SSP_HEADSET_DAX for cavs-rt5682 and SDW_JACK_PIPELINE_SRC for cavs-sdw have been added to allow users to decide whether to enable DAX on both the speaker and headphone pipelines based on the platform's capabilities. Additionally, to maintain the readability of the cavs-sdw configuration file, the sdw-dax files for the speaker and headphone have been separated into their own files. sdw-amp-dax.conf: Based on sdw-amp-generic.conf, remove all logic where PASSTHROUGH is set to true and SDW_SPK_ENHANCED_PLAYBACK is set to false, and add the dolby-dax widget sdw-jack-dax.conf: Based on sdw-jack-generic.conf, remove all logic where PASSTHROUGH is set to true and SDW_SPK_ENHANCED_PLAYBACK is set to false, and add the dolby-dax widget Signed-off-by: Jun Lai <jun.lai@dolby.com>
1 parent 30201f8 commit 3a00e44

File tree

7 files changed

+1411
-289
lines changed

7 files changed

+1411
-289
lines changed

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

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

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

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

49-
mixout-gain-dax-dai-copier-playback [
50-
{
51-
index $HEADSET_DAI_PIPELINE_ID
50+
IncludeByKey.SSP_HEADSET_DAX {
51+
"true" {
52+
mixout-gain-dax-dai-copier-playback [
53+
{
54+
index $HEADSET_DAI_PIPELINE_ID
5255

53-
Object.Widget.dai-copier.1 {
54-
dai_index $HEADSET_SSP_DAI_INDEX
55-
dai_type "SSP"
56-
copier_type "SSP"
57-
stream_name "$HEADSET_CODEC_NAME"
58-
node_type $I2S_LINK_OUTPUT_CLASS
59-
IncludeByKey.SSP_HS_FMT_24 {
60-
"true" {
61-
Object.Base.output_audio_format [
62-
{
63-
out_bit_depth 32
64-
out_valid_bit_depth 24
65-
out_sample_type $SAMPLE_TYPE_LSB_INTEGER
66-
out_fmt_cfg "$[($out_channels | ($out_valid_bit_depth * 256))]"
56+
Object.Widget.dai-copier.1 {
57+
dai_index $HEADSET_SSP_DAI_INDEX
58+
dai_type "SSP"
59+
copier_type "SSP"
60+
stream_name "$HEADSET_CODEC_NAME"
61+
node_type $I2S_LINK_OUTPUT_CLASS
62+
IncludeByKey.SSP_HS_FMT_24 {
63+
"true" {
64+
Object.Base.output_audio_format [
65+
{
66+
out_bit_depth 32
67+
out_valid_bit_depth 24
68+
out_sample_type $SAMPLE_TYPE_LSB_INTEGER
69+
out_fmt_cfg "$[($out_channels | ($out_valid_bit_depth * 256))]"
70+
}
71+
]
72+
}
73+
"false" {
74+
Object.Base.output_audio_format [
75+
{
76+
out_bit_depth 32
77+
out_valid_bit_depth 32
78+
}
79+
]
80+
}
6781
}
68-
]
6982
}
70-
"false" {
71-
Object.Base.output_audio_format [
72-
{
73-
out_bit_depth 32
74-
out_valid_bit_depth 32
83+
84+
Object.Widget.gain.1 {
85+
Object.Control.mixer.1 {
86+
name 'Post Mixer $HEADSET_PCM_NAME Playback Volume'
7587
}
76-
]
7788
}
78-
}
79-
}
8089

81-
Object.Widget.gain.1 {
82-
Object.Control.mixer.1 {
83-
name 'Post Mixer $HEADSET_PCM_NAME Playback Volume'
90+
Object.Widget.dolby-dax.1 {
91+
core_id $DOLBY_DAX_CORE_ID
92+
Object.Control {
93+
mixer."1" {
94+
name 'DAX Headphone Switch'
95+
}
96+
mixer."2" {
97+
name 'DAX Headphone Switch CP'
98+
}
99+
mixer."3" {
100+
name 'DAX Headphone Switch CTC'
101+
}
102+
mixer."4" {
103+
name 'DAX Headphone Volume'
104+
}
105+
enum."1" {
106+
name 'DAX Headphone Profile'
107+
}
108+
enum."2" {
109+
name 'DAX Headphone Device'
110+
}
111+
bytes."1" {
112+
name 'DAX Headphone Tuning'
113+
max 8192
114+
}
115+
}
116+
}
84117
}
85-
}
118+
]
119+
}
120+
"false" {
121+
mixout-gain-dai-copier-playback [
122+
{
123+
index $HEADSET_DAI_PIPELINE_ID
86124

87-
Object.Widget.dolby-dax.1 {
88-
core_id $DOLBY_DAX_CORE_ID
89-
Object.Control {
90-
mixer."1" {
91-
name 'DAX Headphone Switch'
92-
}
93-
mixer."2" {
94-
name 'DAX Headphone Switch CP'
95-
}
96-
mixer."3" {
97-
name 'DAX Headphone Switch CTC'
98-
}
99-
mixer."4" {
100-
name 'DAX Headphone Volume'
101-
}
102-
enum."1" {
103-
name 'DAX Headphone Profile'
104-
}
105-
enum."2" {
106-
name 'DAX Headphone Device'
125+
Object.Widget.dai-copier.1 {
126+
dai_index $HEADSET_SSP_DAI_INDEX
127+
dai_type "SSP"
128+
copier_type "SSP"
129+
stream_name "$HEADSET_CODEC_NAME"
130+
node_type $I2S_LINK_OUTPUT_CLASS
131+
IncludeByKey.SSP_HS_FMT_24 {
132+
"true" {
133+
Object.Base.output_audio_format [
134+
{
135+
out_bit_depth 32
136+
out_valid_bit_depth 24
137+
out_sample_type $SAMPLE_TYPE_LSB_INTEGER
138+
out_fmt_cfg "$[($out_channels | ($out_valid_bit_depth * 256))]"
139+
}
140+
]
141+
}
142+
"false" {
143+
Object.Base.output_audio_format [
144+
{
145+
out_bit_depth 32
146+
out_valid_bit_depth 32
147+
}
148+
]
149+
}
150+
}
107151
}
108-
bytes."1" {
109-
name 'DAX Headphone Tuning'
110-
max 8192
152+
153+
Object.Widget.gain.1 {
154+
Object.Control.mixer.1 {
155+
name 'Post Mixer $HEADSET_PCM_NAME Playback Volume'
156+
}
111157
}
112158
}
113-
}
159+
]
114160
}
161+
}
162+
163+
mixout-gain-dax-dai-copier-playback [
115164
{
116165
index $SPEAKER_DAI_PIPELINE_ID
117166
core_id $SPEAKER_PCM_CORE_ID
@@ -185,11 +234,26 @@ Object.Pipeline {
185234
]
186235
}
187236

188-
Object.Base.route [
189-
{
190-
source "dolby-dax.$HEADSET_DAI_PIPELINE_ID.1"
191-
sink "dai-copier.SSP.$HEADSET_CODEC_NAME.playback"
237+
IncludeByKey.SSP_HEADSET_DAX {
238+
"true" {
239+
Object.Base.route [
240+
{
241+
source "dolby-dax.$HEADSET_DAI_PIPELINE_ID.1"
242+
sink "dai-copier.SSP.$HEADSET_CODEC_NAME.playback"
243+
}
244+
]
245+
}
246+
"false" {
247+
Object.Base.route [
248+
{
249+
source "gain.$HEADSET_DAI_PIPELINE_ID.1"
250+
sink "dai-copier.SSP.$HEADSET_CODEC_NAME.playback"
251+
}
252+
]
192253
}
254+
}
255+
256+
Object.Base.route [
193257
{
194258
source "mixin.$HEADSET_HOST_PIPELINE_ID.1"
195259
sink "mixout.$HEADSET_DAI_PIPELINE_ID.1"

tools/topology/topology2/cavs-sdw.conf

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,8 @@ Define {
120120
SDW_AMP_XOVER_EQIIR_PARAMS default
121121
SDW_AMP_XOVER_EQFIR_PARAMS default
122122
DOLBY_DAX_CORE_ID 0
123-
USE_DAX "false"
123+
SDW_AMP_PIPELINE_SRC "generic"
124+
SDW_JACK_PIPELINE_SRC "generic"
124125
SDW_ECHO_REF_DAI "false"
125126
}
126127

@@ -187,7 +188,12 @@ IncludeByKey.SDW_ECHO_REF_DAI {
187188
IncludeByKey.SDW_AMP_XOVER {
188189
"false" {
189190
IncludeByKey.NUM_SDW_AMP_LINKS {
190-
"[1-3]" "platform/intel/sdw-amp-generic.conf"
191+
"[1-3]" {
192+
IncludeByKey.SDW_AMP_PIPELINE_SRC {
193+
"dax" "platform/intel/sdw-amp-dax.conf"
194+
"generic" "platform/intel/sdw-amp-generic.conf"
195+
}
196+
}
191197
}
192198
IncludeByKey.NUM_SDW_AMP_CTC_LINKS {
193199
"[1-3]" "platform/intel/sdw-amp-generic-ctc.conf"
@@ -205,7 +211,12 @@ IncludeByKey.SDW_DMIC {
205211
}
206212

207213
IncludeByKey.SDW_JACK {
208-
"true" "platform/intel/sdw-jack-generic.conf"
214+
"true" {
215+
IncludeByKey.SDW_JACK_PIPELINE_SRC {
216+
"dax" "platform/intel/sdw-jack-dax.conf"
217+
"generic" "platform/intel/sdw-jack-generic.conf"
218+
}
219+
}
209220
"false" {
210221
Define {
211222
# disable compressed audio for Jack

0 commit comments

Comments
 (0)