|
6 | 6 | # |
7 | 7 | # The gain before mixin is for the different routes(e.g., deepbuffer, headset). |
8 | 8 |
|
9 | | -# Pipeline ID:1 PCM ID: 0 |
| 9 | +Define { |
| 10 | + USE_CTC_SPK "false" |
| 11 | +} |
| 12 | + |
| 13 | +# playback pipelines |
10 | 14 | Object.Pipeline { |
11 | | - # playback pipelines |
12 | 15 | host-copier-gain-mixin-playback [ |
13 | 16 | { |
14 | 17 | index $HEADSET_HOST_PIPELINE_ID |
@@ -38,69 +41,124 @@ Object.Pipeline { |
38 | 41 | } |
39 | 42 | ] |
40 | 43 |
|
41 | | - mixout-gain-ctc-dai-copier-playback [ |
| 44 | + mixout-gain-dai-copier-playback [ |
42 | 45 | { |
43 | | - index $HEADSET_DAI_PIPELINE_ID |
| 46 | + index $HEADSET_DAI_PIPELINE_ID |
| 47 | + |
| 48 | + Object.Widget.dai-copier.1 { |
| 49 | + dai_index $HEADSET_SSP_DAI_INDEX |
| 50 | + dai_type "SSP" |
| 51 | + copier_type "SSP" |
| 52 | + stream_name "$HEADSET_CODEC_NAME" |
| 53 | + node_type $I2S_LINK_OUTPUT_CLASS |
| 54 | + } |
| 55 | + |
| 56 | + Object.Widget.gain.1 { |
| 57 | + Object.Control.mixer.1 { |
| 58 | + name 'Post Mixer $HEADSET_PCM_NAME Playback Volume' |
| 59 | + } |
| 60 | + } |
| 61 | + } |
| 62 | + ] |
44 | 63 |
|
45 | | - Object.Widget.dai-copier.1 { |
46 | | - dai_index $HEADSET_SSP_DAI_INDEX |
47 | | - dai_type "SSP" |
48 | | - copier_type "SSP" |
49 | | - stream_name "$HEADSET_CODEC_NAME" |
50 | | - node_type $I2S_LINK_OUTPUT_CLASS |
51 | | - } |
| 64 | + IncludeByKey.USE_CTC_SPK { |
| 65 | + "true" { |
| 66 | + mixout-gain-ctc-dai-copier-playback [ |
| 67 | + { |
| 68 | + index $SPEAKER_DAI_PIPELINE_ID |
| 69 | + stream_name "$SPEAKER_CODEC_NAME" |
52 | 70 |
|
53 | | - Object.Widget.gain.1 { |
54 | | - Object.Control.mixer.1 { |
55 | | - name 'Post Mixer $HEADSET_PCM_NAME Playback Volume' |
56 | | - } |
57 | | - } |
58 | | - } |
59 | | - { |
60 | | - index $SPEAKER_DAI_PIPELINE_ID |
| 71 | + Object.Widget.dai-copier.1 { |
| 72 | + dai_index $SPEAKER_SSP_DAI_INDEX |
| 73 | + dai_type "SSP" |
| 74 | + copier_type "SSP" |
| 75 | + stream_name "$SPEAKER_CODEC_NAME" |
| 76 | + node_type $I2S_LINK_OUTPUT_CLASS |
| 77 | + } |
| 78 | + Object.Widget.gain.1 { |
| 79 | + Object.Control.mixer.1 { |
| 80 | + name 'Post Mixer $SPEAKER_PCM_NAME Playback Volume' |
| 81 | + } |
| 82 | + } |
| 83 | + Object.Widget.ctc.1 { |
| 84 | + Object.Control { |
| 85 | + mixer."1" { |
| 86 | + name 'CTC Switch' |
| 87 | + } |
| 88 | + bytes."1" { |
| 89 | + name 'CTC.0' |
| 90 | + max 4160 |
| 91 | + } |
| 92 | + } |
| 93 | + } |
| 94 | + } |
| 95 | + ] |
| 96 | + } |
| 97 | + "false" { |
| 98 | + mixout-gain-dai-copier-playback [ |
| 99 | + { |
| 100 | + index $SPEAKER_DAI_PIPELINE_ID |
61 | 101 |
|
62 | | - Object.Widget.dai-copier.1 { |
63 | | - dai_index $SPEAKER_SSP_DAI_INDEX |
64 | | - dai_type "SSP" |
65 | | - copier_type "SSP" |
66 | | - stream_name "$SPEAKER_CODEC_NAME" |
67 | | - node_type $I2S_LINK_OUTPUT_CLASS |
68 | | - } |
69 | | - Object.Widget.gain.1 { |
70 | | - Object.Control.mixer.1 { |
71 | | - name 'Post Mixer $SPEAKER_PCM_NAME Playback Volume' |
72 | | - } |
73 | | - } |
74 | | - Object.Widget.ctc.1 { |
75 | | - Object.Control { |
76 | | - mixer."1" { |
77 | | - name 'CTC Switch' |
| 102 | + Object.Widget.dai-copier.1 { |
| 103 | + dai_index $SPEAKER_SSP_DAI_INDEX |
| 104 | + dai_type "SSP" |
| 105 | + copier_type "SSP" |
| 106 | + stream_name "$SPEAKER_CODEC_NAME" |
| 107 | + node_type $I2S_LINK_OUTPUT_CLASS |
78 | 108 | } |
79 | | - bytes."1" { |
80 | | - name 'CTC.0' |
81 | | - max 4160 |
| 109 | + Object.Widget.gain.1 { |
| 110 | + Object.Control.mixer.1 { |
| 111 | + name 'Post Mixer $SPEAKER_PCM_NAME Playback Volume' |
| 112 | + } |
82 | 113 | } |
83 | 114 | } |
84 | | - } |
85 | | - } |
86 | | - ] |
| 115 | + ] |
| 116 | + } |
| 117 | + } |
87 | 118 | } |
88 | 119 |
|
89 | 120 | Object.Base.route [ |
90 | 121 | { |
91 | | - source "gain.$HEADSET_DAI_PIPELINE_ID.1" |
92 | | - sink "dai-copier.SSP.$HEADSET_CODEC_NAME.playback" |
93 | | - } |
94 | | - { |
| 122 | + source "dai-copier.SSP.$HEADSET_CODEC_NAME.capture" |
| 123 | + sink "host-copier.$HEADSET_PCM_ID.capture" |
| 124 | + } |
| 125 | + { |
| 126 | + source "host-copier.$HEADSET_PCM_ID.playback" |
| 127 | + sink "gain.1.1" |
| 128 | + } |
| 129 | + { |
95 | 130 | source "mixin.$HEADSET_HOST_PIPELINE_ID.1" |
96 | 131 | sink "mixout.$HEADSET_DAI_PIPELINE_ID.1" |
97 | | - } |
| 132 | + } |
| 133 | + { |
| 134 | + source "gain.$HEADSET_DAI_PIPELINE_ID.1" |
| 135 | + sink "dai-copier.SSP.$HEADSET_CODEC_NAME.playback" |
| 136 | + } |
98 | 137 | { |
99 | | - source "ctc.$SPEAKER_DAI_PIPELINE_ID.1" |
100 | | - sink "dai-copier.SSP.$SPEAKER_CODEC_NAME.playback" |
| 138 | + source "host-copier.$SPEAKER_PCM_ID.playback" |
| 139 | + sink "gain.3.1" |
101 | 140 | } |
102 | 141 | { |
103 | | - source "mixin.$SPEAKER_HOST_PIPELINE_ID.1" |
104 | | - sink "mixout.$SPEAKER_DAI_PIPELINE_ID.1" |
105 | | - } |
| 142 | + source "mixin.$SPEAKER_HOST_PIPELINE_ID.1" |
| 143 | + sink "mixout.$SPEAKER_DAI_PIPELINE_ID.1" |
| 144 | + } |
106 | 145 | ] |
| 146 | + |
| 147 | +IncludeByKey.USE_CTC_SPK { |
| 148 | + "true" { |
| 149 | + Object.Base.route [ |
| 150 | + { |
| 151 | + source "ctc.$SPEAKER_DAI_PIPELINE_ID.1" |
| 152 | + sink "dai-copier.SSP.$SPEAKER_CODEC_NAME.playback" |
| 153 | + } |
| 154 | + ] |
| 155 | + } |
| 156 | + "false" { |
| 157 | + Object.Base.route [ |
| 158 | + { |
| 159 | + source "gain.$SPEAKER_DAI_PIPELINE_ID.1" |
| 160 | + sink "dai-copier.SSP.$SPEAKER_CODEC_NAME.playback" |
| 161 | + } |
| 162 | + ] |
| 163 | + } |
| 164 | +} |
0 commit comments