[alsa-devel] About ASoC DAIs cleanup
Kuninori Morimoto
kuninori.morimoto.gx at renesas.com
Thu Dec 21 02:28:09 CET 2017
Hi Mark
Thank you for sharing ideas
> > for_each_dais(dai, xxx) {
> > if(!dai->peripheral)
> > /* non Peripheral == CPU portion */
> >
> > if(dai->peripheral)
> > /* Peripheral == Codec portion */
> > }
>
> > But what do you think about this idea/naming etc ?
> > I want to investigate more about Codec <-> Codec connection,
> > which driver is using it ? Especially CPU portion
>
> I'm thinking it might be better to keep the list ordered in the DAI link
> - that will scale up better with multi-drop links. What's going to be a
> bit more tricky sometimes is working out which end of the link is a CPU
> DAI but we can probably take a good guess easily enough on order neutral
> bindings and things liken simple-card already know explicitly.
If my understanding was correct, we can call all DAIs
by one for_each loop with controllable order on your idea.
This is nice.
But, callback order will be exchanged ?
For example soc_pcm_trigger() case, .trigger callback order currently is
Codec DAI -> Component(Platform) -> CPU DAI -> RTD
it will be
all ordered DAIs -> Component(Platform) -> RTD
Codec / CPU callback order are OK, but DAI / Component order is exchanged.
If this is not a big problem, we can do it.
And one issue I noticed.
If we merged all Codec/CPU DAI into one DAI list, and without
flags (like .peripheral flag), current DAI master/slave direction will be problem.
At least snd_soc_runtime_set_dai_fmt() is switching it for Codec <-> Codec case.
If we can change current SND_SOC_DAIFMT_CBx_CFx style to
xx_MASTER / xx_SLAVE style on each DAIs, this can be no problem I think.
I guess Lars is thinking about it ?
Best regards
---
Kuninori Morimoto
More information about the Alsa-devel
mailing list