|
| 1 | +# |
| 2 | +# Pipeline definitions |
| 3 | +# |
| 4 | +# PCM0 ---> gain ----> Mixin ----> Mixout ----> gain ----> DAX ----> CTC ----> SSP0 |
| 5 | +# PCM1 ---> gain ----> Mixin ----> Mixout ----> gain ----> DAX ----> CTC ----> SSP1 |
| 6 | +# |
| 7 | +# The gain before mixin is for the different routes(e.g., deepbuffer, headset). |
| 8 | + |
| 9 | +Define { |
| 10 | + DOLBY_DAX_CORE_ID 0 |
| 11 | + SSP_HEADSET_DAX "false" |
| 12 | +} |
| 13 | + |
| 14 | +<include/pipelines/cavs/mixout-gain-dax-ctc-dai-copier-playback.conf> |
| 15 | + |
| 16 | +# Pipeline ID:1 PCM ID: 0 |
| 17 | +Object.Pipeline { |
| 18 | + # playback pipelines |
| 19 | + host-copier-gain-mixin-playback [ |
| 20 | + { |
| 21 | + index $HEADSET_HOST_PIPELINE_ID |
| 22 | + |
| 23 | + Object.Widget.host-copier.1 { |
| 24 | + stream_name '$HEADSET_PLAYBACK_PCM_STREAM_NAME' |
| 25 | + pcm_id $HEADSET_PCM_ID |
| 26 | + } |
| 27 | + Object.Widget.gain.1 { |
| 28 | + Object.Control.mixer.1 { |
| 29 | + name 'Pre Mixer $HEADSET_PCM_NAME Playback Volume' |
| 30 | + } |
| 31 | + } |
| 32 | + } |
| 33 | + { |
| 34 | + index $SPEAKER_HOST_PIPELINE_ID |
| 35 | + core_id $SPEAKER_PCM_CORE_ID |
| 36 | + |
| 37 | + Object.Widget.host-copier.1 { |
| 38 | + stream_name '$SPEAKER_PLAYBACK_PCM_STREAM_NAME' |
| 39 | + pcm_id $SPEAKER_PCM_ID |
| 40 | + } |
| 41 | + Object.Widget.gain.1 { |
| 42 | + Object.Control.mixer.1 { |
| 43 | + name 'Pre Mixer $SPEAKER_PCM_NAME Playback Volume' |
| 44 | + } |
| 45 | + } |
| 46 | + Object.Widget.pipeline.1 { |
| 47 | + core $SPEAKER_PCM_CORE_ID |
| 48 | + } |
| 49 | + } |
| 50 | + ] |
| 51 | + |
| 52 | + IncludeByKey.SSP_HEADSET_DAX { |
| 53 | + "true" { |
| 54 | + mixout-gain-dax-dai-copier-playback [ |
| 55 | + { |
| 56 | + index $HEADSET_DAI_PIPELINE_ID |
| 57 | + |
| 58 | + Object.Widget.dai-copier.1 { |
| 59 | + dai_index $HEADSET_SSP_DAI_INDEX |
| 60 | + dai_type "SSP" |
| 61 | + copier_type "SSP" |
| 62 | + stream_name "$HEADSET_CODEC_NAME" |
| 63 | + node_type $I2S_LINK_OUTPUT_CLASS |
| 64 | + IncludeByKey.SSP_HS_FMT_24 { |
| 65 | + "true" { |
| 66 | + Object.Base.output_audio_format [ |
| 67 | + { |
| 68 | + out_bit_depth 32 |
| 69 | + out_valid_bit_depth 24 |
| 70 | + out_sample_type $SAMPLE_TYPE_LSB_INTEGER |
| 71 | + out_fmt_cfg "$[($out_channels | ($out_valid_bit_depth * 256))]" |
| 72 | + } |
| 73 | + ] |
| 74 | + } |
| 75 | + "false" { |
| 76 | + Object.Base.output_audio_format [ |
| 77 | + { |
| 78 | + out_bit_depth 32 |
| 79 | + out_valid_bit_depth 32 |
| 80 | + } |
| 81 | + ] |
| 82 | + } |
| 83 | + } |
| 84 | + } |
| 85 | + |
| 86 | + Object.Widget.gain.1 { |
| 87 | + Object.Control.mixer.1 { |
| 88 | + name 'Post Mixer $HEADSET_PCM_NAME Playback Volume' |
| 89 | + } |
| 90 | + } |
| 91 | + |
| 92 | + Object.Widget.dolby-dax.1 { |
| 93 | + core_id $DOLBY_DAX_CORE_ID |
| 94 | + num_input_audio_formats 1 |
| 95 | + num_output_audio_formats 1 |
| 96 | + Object.Base.input_audio_format [ |
| 97 | + { |
| 98 | + in_rate 48000 |
| 99 | + in_bit_depth 32 |
| 100 | + in_valid_bit_depth 32 |
| 101 | + ibs "$[(256 * ($[($in_bit_depth / 8)])) * ($in_channels)]" |
| 102 | + } |
| 103 | + ] |
| 104 | + Object.Base.output_audio_format [ |
| 105 | + { |
| 106 | + out_rate 48000 |
| 107 | + out_bit_depth 32 |
| 108 | + out_valid_bit_depth 32 |
| 109 | + obs "$[(256 * ($[($out_bit_depth / 8)])) * ($out_channels)]" |
| 110 | + } |
| 111 | + ] |
| 112 | + Object.Control { |
| 113 | + mixer."1" { |
| 114 | + name 'DAX Headphone Switch' |
| 115 | + } |
| 116 | + mixer."2" { |
| 117 | + name 'DAX Headphone Switch CP' |
| 118 | + } |
| 119 | + mixer."3" { |
| 120 | + name 'DAX Headphone Switch CTC' |
| 121 | + } |
| 122 | + mixer."4" { |
| 123 | + name 'DAX Headphone Volume' |
| 124 | + } |
| 125 | + enum."1" { |
| 126 | + name 'DAX Headphone Profile' |
| 127 | + } |
| 128 | + enum."2" { |
| 129 | + name 'DAX Headphone Device' |
| 130 | + } |
| 131 | + bytes."1" { |
| 132 | + name 'DAX Headphone Tuning' |
| 133 | + max 8192 |
| 134 | + } |
| 135 | + } |
| 136 | + } |
| 137 | + } |
| 138 | + ] |
| 139 | + } |
| 140 | + "false" { |
| 141 | + mixout-gain-dai-copier-playback [ |
| 142 | + { |
| 143 | + index $HEADSET_DAI_PIPELINE_ID |
| 144 | + |
| 145 | + Object.Widget.dai-copier.1 { |
| 146 | + dai_index $HEADSET_SSP_DAI_INDEX |
| 147 | + dai_type "SSP" |
| 148 | + copier_type "SSP" |
| 149 | + stream_name "$HEADSET_CODEC_NAME" |
| 150 | + node_type $I2S_LINK_OUTPUT_CLASS |
| 151 | + IncludeByKey.SSP_HS_FMT_24 { |
| 152 | + "true" { |
| 153 | + Object.Base.output_audio_format [ |
| 154 | + { |
| 155 | + out_bit_depth 32 |
| 156 | + out_valid_bit_depth 24 |
| 157 | + out_sample_type $SAMPLE_TYPE_LSB_INTEGER |
| 158 | + out_fmt_cfg "$[($out_channels | ($out_valid_bit_depth * 256))]" |
| 159 | + } |
| 160 | + ] |
| 161 | + } |
| 162 | + "false" { |
| 163 | + Object.Base.output_audio_format [ |
| 164 | + { |
| 165 | + out_bit_depth 32 |
| 166 | + out_valid_bit_depth 32 |
| 167 | + } |
| 168 | + ] |
| 169 | + } |
| 170 | + } |
| 171 | + } |
| 172 | + |
| 173 | + Object.Widget.gain.1 { |
| 174 | + Object.Control.mixer.1 { |
| 175 | + name 'Post Mixer $HEADSET_PCM_NAME Playback Volume' |
| 176 | + } |
| 177 | + } |
| 178 | + } |
| 179 | + ] |
| 180 | + } |
| 181 | + } |
| 182 | + |
| 183 | + # For speaker, we want DAX -> CTC |
| 184 | + mixout-gain-dax-ctc-dai-copier-playback [ |
| 185 | + { |
| 186 | + index $SPEAKER_DAI_PIPELINE_ID |
| 187 | + core_id $SPEAKER_PCM_CORE_ID |
| 188 | + |
| 189 | + Object.Widget.dai-copier.1 { |
| 190 | + dai_index $SPEAKER_SSP_DAI_INDEX |
| 191 | + dai_type "SSP" |
| 192 | + copier_type "SSP" |
| 193 | + stream_name "$SPEAKER_CODEC_NAME" |
| 194 | + node_type $I2S_LINK_OUTPUT_CLASS |
| 195 | + IncludeByKey.SSP_SPK_FMT_24 { |
| 196 | + "true" { |
| 197 | + Object.Base.output_audio_format [ |
| 198 | + { |
| 199 | + out_bit_depth 32 |
| 200 | + out_valid_bit_depth 24 |
| 201 | + out_sample_type $SAMPLE_TYPE_LSB_INTEGER |
| 202 | + out_fmt_cfg "$[($out_channels | ($out_valid_bit_depth * 256))]" |
| 203 | + } |
| 204 | + ] |
| 205 | + } |
| 206 | + "false" { |
| 207 | + Object.Base.output_audio_format [ |
| 208 | + { |
| 209 | + out_bit_depth 32 |
| 210 | + out_valid_bit_depth 32 |
| 211 | + } |
| 212 | + ] |
| 213 | + } |
| 214 | + } |
| 215 | + } |
| 216 | + |
| 217 | + Object.Widget.gain.1 { |
| 218 | + Object.Control.mixer.1 { |
| 219 | + name 'Post Mixer $SPEAKER_PCM_NAME Playback Volume' |
| 220 | + } |
| 221 | + } |
| 222 | + |
| 223 | + Object.Widget.dolby-dax.1 { |
| 224 | + core_id $DOLBY_DAX_CORE_ID |
| 225 | + Object.Control { |
| 226 | + mixer."1" { |
| 227 | + name 'DAX Speaker Switch' |
| 228 | + } |
| 229 | + mixer."2" { |
| 230 | + name 'DAX Speaker Switch CP' |
| 231 | + } |
| 232 | + mixer."3" { |
| 233 | + name 'DAX Speaker Switch CTC' |
| 234 | + } |
| 235 | + mixer."4" { |
| 236 | + name 'DAX Speaker Volume' |
| 237 | + } |
| 238 | + enum."1" { |
| 239 | + name 'DAX Speaker Profile' |
| 240 | + } |
| 241 | + enum."2" { |
| 242 | + name 'DAX Speaker Device' |
| 243 | + } |
| 244 | + bytes."1" { |
| 245 | + name 'DAX Speaker Tuning' |
| 246 | + max 8192 |
| 247 | + } |
| 248 | + } |
| 249 | + } |
| 250 | + |
| 251 | + Object.Widget.ctc.1 { |
| 252 | + Object.Control { |
| 253 | + mixer."1" { |
| 254 | + name 'CTC Switch' |
| 255 | + } |
| 256 | + bytes."1" { |
| 257 | + name 'CTC.0' |
| 258 | + max 4160 |
| 259 | + } |
| 260 | + } |
| 261 | + } |
| 262 | + |
| 263 | + Object.Widget.pipeline.1 { |
| 264 | + core $SPEAKER_PCM_CORE_ID |
| 265 | + } |
| 266 | + } |
| 267 | + ] |
| 268 | +} |
| 269 | + |
| 270 | +IncludeByKey.SSP_HEADSET_DAX { |
| 271 | + "true" { |
| 272 | + Object.Base.route [ |
| 273 | + { |
| 274 | + source "dolby-dax.$HEADSET_DAI_PIPELINE_ID.1" |
| 275 | + sink "dai-copier.SSP.$HEADSET_CODEC_NAME.playback" |
| 276 | + } |
| 277 | + ] |
| 278 | + } |
| 279 | + "false" { |
| 280 | + Object.Base.route [ |
| 281 | + { |
| 282 | + source "gain.$HEADSET_DAI_PIPELINE_ID.1" |
| 283 | + sink "dai-copier.SSP.$HEADSET_CODEC_NAME.playback" |
| 284 | + } |
| 285 | + ] |
| 286 | + } |
| 287 | +} |
| 288 | + |
| 289 | +Object.Base.route [ |
| 290 | + { |
| 291 | + source "mixin.$HEADSET_HOST_PIPELINE_ID.1" |
| 292 | + sink "mixout.$HEADSET_DAI_PIPELINE_ID.1" |
| 293 | + } |
| 294 | + { |
| 295 | + source "ctc.$SPEAKER_DAI_PIPELINE_ID.1" |
| 296 | + sink "dai-copier.SSP.$SPEAKER_CODEC_NAME.playback" |
| 297 | + } |
| 298 | + { |
| 299 | + source "mixin.$SPEAKER_HOST_PIPELINE_ID.1" |
| 300 | + sink "mixout.$SPEAKER_DAI_PIPELINE_ID.1" |
| 301 | + } |
| 302 | +] |
0 commit comments