11#
22# Pipeline definitions
33#
4- # PCM0 ---> gain ----> Mixin ----> Mixout ----> gain ----> DAX ----> SSP0
5- # PCM1 ---> gain ----> Mixin ----> Mixout ----> gain ----> DAX ----> SSP1
4+ # PCM0 ---> gain ----> Mixin ----> Mixout ----> gain ----> DAX ----> CTC ----> SSP0
5+ # PCM1 ---> gain ----> Mixin ----> Mixout ----> gain ----> DAX ----> CTC ----> SSP1
66#
77# The gain before mixin is for the different routes(e.g., deepbuffer, headset).
88
99Define {
1010 DOLBY_DAX_CORE_ID 0
1111 SSP_HEADSET_DAX "false"
12+ USE_CTC_SPK "false"
1213}
1314
15+
1416# Pipeline ID:1 PCM ID: 0
1517Object.Pipeline {
1618 # playback pipelines
@@ -52,31 +54,33 @@ Object.Pipeline {
5254 mixout-gain-dax-dai-copier-playback [
5355 {
5456 index $HEADSET_DAI_PIPELINE_ID
57+ stream_name "$HEADSET_CODEC_NAME"
5558
5659 Object.Widget.dai-copier.1 {
5760 dai_index $HEADSET_SSP_DAI_INDEX
5861 dai_type "SSP"
5962 copier_type "SSP"
6063 stream_name "$HEADSET_CODEC_NAME"
6164 node_type $I2S_LINK_OUTPUT_CLASS
65+
6266 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- ]
67+ "true" {
68+ Object.Base.output_audio_format [
69+ {
70+ out_bit_depth 32
71+ out_valid_bit_depth 24
72+ out_sample_type $SAMPLE_TYPE_LSB_INTEGER
73+ out_fmt_cfg "$[($out_channels | ($out_valid_bit_depth * 256))]"
74+ }
75+ ]
7276 }
73- "false" {
74- Object.Base.output_audio_format [
75- {
76- out_bit_depth 32
77- out_valid_bit_depth 32
78- }
79- ]
77+ "false" {
78+ Object.Base.output_audio_format [
79+ {
80+ out_bit_depth 32
81+ out_valid_bit_depth 32
82+ }
83+ ]
8084 }
8185 }
8286 }
@@ -128,24 +132,25 @@ Object.Pipeline {
128132 copier_type "SSP"
129133 stream_name "$HEADSET_CODEC_NAME"
130134 node_type $I2S_LINK_OUTPUT_CLASS
135+
131136 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- ]
137+ "true" {
138+ Object.Base.output_audio_format [
139+ {
140+ out_bit_depth 32
141+ out_valid_bit_depth 24
142+ out_sample_type $SAMPLE_TYPE_LSB_INTEGER
143+ out_fmt_cfg "$[($out_channels | ($out_valid_bit_depth * 256))]"
144+ }
145+ ]
141146 }
142- "false" {
143- Object.Base.output_audio_format [
144- {
145- out_bit_depth 32
146- out_valid_bit_depth 32
147- }
148- ]
147+ "false" {
148+ Object.Base.output_audio_format [
149+ {
150+ out_bit_depth 32
151+ out_valid_bit_depth 32
152+ }
153+ ]
149154 }
150155 }
151156 }
@@ -160,80 +165,173 @@ Object.Pipeline {
160165 }
161166 }
162167
163- mixout-gain-dax-dai-copier-playback [
164- {
165- index $SPEAKER_DAI_PIPELINE_ID
166- core_id $SPEAKER_PCM_CORE_ID
168+ IncludeByKey.USE_CTC_SPK {
169+ "true" {
170+ mixout-gain-dax-ctc-dai-copier-playback [
171+ {
172+ index $SPEAKER_DAI_PIPELINE_ID
173+ core_id $SPEAKER_PCM_CORE_ID
174+ stream_name "$SPEAKER_CODEC_NAME"
175+
176+ Object.Widget.dai-copier.1 {
177+ dai_index $SPEAKER_SSP_DAI_INDEX
178+ dai_type "SSP"
179+ copier_type "SSP"
180+ stream_name "$SPEAKER_CODEC_NAME"
181+ node_type $I2S_LINK_OUTPUT_CLASS
167182
168- Object.Widget.dai-copier.1 {
169- dai_index $SPEAKER_SSP_DAI_INDEX
170- dai_type "SSP"
171- copier_type "SSP"
172- stream_name "$SPEAKER_CODEC_NAME"
173- node_type $I2S_LINK_OUTPUT_CLASS
174- IncludeByKey.SSP_SPK_FMT_24 {
175- "true" {
176- Object.Base.output_audio_format [
177- {
178- out_bit_depth 32
179- out_valid_bit_depth 24
180- out_sample_type $SAMPLE_TYPE_LSB_INTEGER
181- out_fmt_cfg "$[($out_channels | ($out_valid_bit_depth * 256))]"
183+ IncludeByKey.SSP_SPK_FMT_24 {
184+ "true" {
185+ Object.Base.output_audio_format [
186+ {
187+ out_bit_depth 32
188+ out_valid_bit_depth 24
189+ out_sample_type $SAMPLE_TYPE_LSB_INTEGER
190+ out_fmt_cfg "$[($out_channels | ($out_valid_bit_depth * 256))]"
191+ }
192+ ]
193+ }
194+ "false" {
195+ Object.Base.output_audio_format [
196+ {
197+ out_bit_depth 32
198+ out_valid_bit_depth 32
199+ }
200+ ]
201+ }
182202 }
183- ]
184203 }
185- "false" {
186- Object.Base.output_audio_format [
187- {
188- out_bit_depth 32
189- out_valid_bit_depth 32
204+
205+ Object.Widget.gain.1 {
206+ Object.Control.mixer.1 {
207+ name 'Post Mixer $SPEAKER_PCM_NAME Playback Volume'
190208 }
191- ]
192209 }
193- }
194- }
195-
196- Object.Widget.gain.1 {
197- Object.Control.mixer.1 {
198- name 'Post Mixer $SPEAKER_PCM_NAME Playback Volume'
199- }
200- }
201210
202- Object.Widget.dolby-dax.1 {
203- core_id $DOLBY_DAX_CORE_ID
204- Object.Control {
205- mixer."1" {
206- name 'DAX Speaker Switch'
207- }
208- mixer."2" {
209- name 'DAX Speaker Switch CP'
211+ Object.Widget.dolby-dax.1 {
212+ core_id $DOLBY_DAX_CORE_ID
213+ Object.Control {
214+ mixer."1" {
215+ name 'DAX Speaker Switch'
216+ }
217+ mixer."2" {
218+ name 'DAX Speaker Switch CP'
219+ }
220+ mixer."3" {
221+ name 'DAX Speaker Switch CTC'
222+ }
223+ mixer."4" {
224+ name 'DAX Speaker Volume'
225+ }
226+ enum."1" {
227+ name 'DAX Speaker Profile'
228+ }
229+ enum."2" {
230+ name 'DAX Speaker Device'
231+ }
232+ bytes."1" {
233+ name 'DAX Speaker Tuning'
234+ max 8192
235+ }
236+ }
210237 }
211- mixer."3" {
212- name 'DAX Speaker Switch CTC'
238+
239+ Object.Widget.pipeline.1 {
240+ core $SPEAKER_PCM_CORE_ID
213241 }
214- mixer."4" {
215- name 'DAX Speaker Volume'
242+ }
243+ ]
244+ }
245+ "false" {
246+ mixout-gain-dax-dai-copier-playback [
247+ {
248+ index $SPEAKER_DAI_PIPELINE_ID
249+ core_id $SPEAKER_PCM_CORE_ID
250+ stream_name "$SPEAKER_CODEC_NAME"
251+
252+ Object.Widget.dai-copier.1 {
253+ dai_index $SPEAKER_SSP_DAI_INDEX
254+ dai_type "SSP"
255+ copier_type "SSP"
256+ stream_name "$SPEAKER_CODEC_NAME"
257+ node_type $I2S_LINK_OUTPUT_CLASS
258+
259+ IncludeByKey.SSP_SPK_FMT_24 {
260+ "true" {
261+ Object.Base.output_audio_format [
262+ {
263+ out_bit_depth 32
264+ out_valid_bit_depth 24
265+ out_sample_type $SAMPLE_TYPE_LSB_INTEGER
266+ out_fmt_cfg "$[($out_channels | ($out_valid_bit_depth * 256))]"
267+ }
268+ ]
269+ }
270+ "false" {
271+ Object.Base.output_audio_format [
272+ {
273+ out_bit_depth 32
274+ out_valid_bit_depth 32
275+ }
276+ ]
277+ }
278+ }
216279 }
217- enum."1" {
218- name 'DAX Speaker Profile'
280+
281+ Object.Widget.gain.1 {
282+ Object.Control.mixer.1 {
283+ name 'Post Mixer $SPEAKER_PCM_NAME Playback Volume'
284+ }
219285 }
220- enum."2" {
221- name 'DAX Speaker Device'
286+
287+ Object.Widget.dolby-dax.1 {
288+ core_id $DOLBY_DAX_CORE_ID
289+ Object.Control {
290+ mixer."1" {
291+ name 'DAX Speaker Switch'
292+ }
293+ mixer."2" {
294+ name 'DAX Speaker Switch CP'
295+ }
296+ mixer."3" {
297+ name 'DAX Speaker Switch CTC'
298+ }
299+ mixer."4" {
300+ name 'DAX Speaker Volume'
301+ }
302+ enum."1" {
303+ name 'DAX Speaker Profile'
304+ }
305+ enum."2" {
306+ name 'DAX Speaker Device'
307+ }
308+ bytes."1" {
309+ name 'DAX Speaker Tuning'
310+ max 8192
311+ }
312+ }
222313 }
223- bytes."1" {
224- name 'DAX Speaker Tuning'
225- max 8192
314+
315+ Object.Widget.pipeline.1 {
316+ core $SPEAKER_PCM_CORE_ID
226317 }
227318 }
228- }
229-
230- Object.Widget.pipeline.1 {
231- core $SPEAKER_PCM_CORE_ID
232- }
319+ ]
233320 }
234- ]
321+ }
235322}
236323
324+ Object.Base.route [
325+ {
326+ source "mixin.$HEADSET_HOST_PIPELINE_ID.1"
327+ sink "mixout.$HEADSET_DAI_PIPELINE_ID.1"
328+ }
329+ {
330+ source "mixin.$SPEAKER_HOST_PIPELINE_ID.1"
331+ sink "mixout.$SPEAKER_DAI_PIPELINE_ID.1"
332+ }
333+ ]
334+
237335IncludeByKey.SSP_HEADSET_DAX {
238336 "true" {
239337 Object.Base.route [
@@ -253,17 +351,21 @@ IncludeByKey.SSP_HEADSET_DAX {
253351 }
254352}
255353
256- Object.Base.route [
257- {
258- source "mixin.$HEADSET_HOST_PIPELINE_ID.1"
259- sink "mixout.$HEADSET_DAI_PIPELINE_ID.1"
260- }
261- {
262- source "dolby-dax.$SPEAKER_DAI_PIPELINE_ID.1"
263- sink "dai-copier.SSP.$SPEAKER_CODEC_NAME.playback"
354+ IncludeByKey.USE_CTC_SPK {
355+ "true" {
356+ Object.Base.route [
357+ {
358+ source "ctc.$SPEAKER_DAI_PIPELINE_ID.1"
359+ sink "dai-copier.SSP.$SPEAKER_CODEC_NAME.playback"
360+ }
361+ ]
264362 }
265- {
266- source "mixin.$SPEAKER_HOST_PIPELINE_ID.1"
267- sink "mixout.$SPEAKER_DAI_PIPELINE_ID.1"
363+ "false" {
364+ Object.Base.route [
365+ {
366+ source "dolby-dax.$SPEAKER_DAI_PIPELINE_ID.1"
367+ sink "dai-copier.SSP.$SPEAKER_CODEC_NAME.playback"
368+ }
369+ ]
268370 }
269- ]
371+ }
0 commit comments