Commit 9d49925
committed
ASoC: extra format on each DAI
Merge series from Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>:
Current clock provider/consumer setting is set by dai_link->dai_fmt, and it
is Codec base on Sound Card driver (= SND_SOC_DAIFMT_CBx_CFx).
Current CPU/Codec drivers are already based on its own base
(= SND_SOC_DAIFMT_Bx_Fx). So, Codec clock setting uses dai_link->dai_fmt
as-is, and CPU side clock setting is created from Codec base setting by
flipping. Because of this, we can't set both CPU/Codec clock consumer for
example.
To solve this issue, this patch-set adds new ext_fmt on each DAI.
It can keep compatible with legacy style.
1. SND_SOC_DAIFMT_FORMAT_MASK
2. SND_SOC_DAIFMT_CLOCK
3. SND_SOC_DAIFMT_INV
4. SND_SOC_DAIFMT_CLOCK_PROVIDER
dai_fmt : dai_link->dai_fmt = common settings
ext_fmt : each DAI settings
Legacy
dai_fmt includes 1, 2, 3, 4
New style
dai_fmt includes 1, 2, 3
ext_fmt includes 4
Audio-Graph-Card2 will use this new style by this patch-set.
By this patch, Card2 default behavior (= no "clock-master / frame-master"
settings on DT) will be changed, but no drivers are using it.
In case of no DAI has "clock-master / frame-master" property on DT,
it will be...
Legacy
CPU : provider (because flipped from Codec)
Codec: consumer
New style
CPU : consumer
Codec: consumer
One note is that Simple-Card, Audio-Graph-Card don't implement
this new style to keep compatiblily.
In Overlay case, port order can be random, so we shouldn't use get_next()
function to get next port.5 files changed
Lines changed: 179 additions & 230 deletions
File tree
- include/sound
- sound/soc
- generic
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
681 | 681 | | |
682 | 682 | | |
683 | 683 | | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
684 | 695 | | |
685 | 696 | | |
686 | 697 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | | - | |
85 | | - | |
86 | | - | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | 92 | | |
97 | 93 | | |
98 | 94 | | |
| |||
140 | 136 | | |
141 | 137 | | |
142 | 138 | | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
147 | 143 | | |
148 | 144 | | |
149 | 145 | | |
| |||
152 | 148 | | |
153 | 149 | | |
154 | 150 | | |
155 | | - | |
| 151 | + | |
156 | 152 | | |
157 | 153 | | |
158 | 154 | | |
| |||
187 | 183 | | |
188 | 184 | | |
189 | 185 | | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | | - | |
| 186 | + | |
198 | 187 | | |
199 | 188 | | |
200 | 189 | | |
| |||
250 | 239 | | |
251 | 240 | | |
252 | 241 | | |
253 | | - | |
254 | | - | |
255 | 242 | | |
256 | 243 | | |
257 | 244 | | |
| |||
267 | 254 | | |
268 | 255 | | |
269 | 256 | | |
270 | | - | |
271 | | - | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
272 | 260 | | |
273 | 261 | | |
274 | 262 | | |
275 | | - | |
276 | | - | |
277 | | - | |
278 | 263 | | |
279 | 264 | | |
280 | 265 | | |
| |||
361 | 346 | | |
362 | 347 | | |
363 | 348 | | |
364 | | - | |
365 | | - | |
366 | 349 | | |
367 | 350 | | |
368 | 351 | | |
| |||
374 | 357 | | |
375 | 358 | | |
376 | 359 | | |
377 | | - | |
378 | | - | |
| 360 | + | |
| 361 | + | |
379 | 362 | | |
380 | 363 | | |
381 | 364 | | |
| |||
399 | 382 | | |
400 | 383 | | |
401 | 384 | | |
402 | | - | |
403 | | - | |
404 | | - | |
405 | 385 | | |
406 | 386 | | |
407 | 387 | | |
| |||
0 commit comments