[alsa-devel] [PATCH] ASoC:simple-card: Add multi-CODEC support
Jean-Francois Moine
moinejf at free.fr
Wed Sep 10 19:25:03 CEST 2014
On Wed, 10 Sep 2014 18:27:26 +0200
Benoit Cousson <bcousson at baylibre.com> wrote:
> >> I don't have strong opinion on that, but in my case, I was considering
> >> using a simple list instead of several nodes.
> >> I don't like having to add fake address just to ensure uniqueness.
> >>
> >> Something like that:
> >>
> >> sound-dais = <&spdif_codec 1>, <&hdmi 0>;
> >
> > You are right, this would be simpler (I did not see that there could be
> > phandle's with different cell sizes in a list).
>
> In fact you cannot, that why I added the same number of parameters for
> both.
>
> For DT, it is just a list of elements, it could be encoded like that:
> <&spdif_codec 1 &hdmi 0>;
>
> At the end it will be a list of u32 inside the dtb.
Yes, but __of_parse_phandle_with_args() handles the number of cells of the phandle.
> BTW, what is that extra parameter after the phandle? I cannot find any
> reference of that inside the Documentation.
It is the DAI number inside the CODEC. The TDA998x CODEC has two DAIs,
S/PDIF and I2S.
> If we need to have a random number of parameters after the code-dai
> phandle, we couldn't use that list.
>
> >> That being said, it will require changing the name with a plural form,
> >> and ensuring we have the same number of parameters for each codec.
> >
> > But I don't think that changing the name could be useful: the treatment
> > is exactly the same and, as a result, all CODEC DAIs go to the DAI
> > list of the DAI link.
>
> Yeah, maybe not that useful, but that was just to be aligned with
> similar cases in DT bindings. Like gpios, interrupts...
Not easy! "sound-dai" is used for both the CPU and CODEC DAIs.
Adding "sound-dais" for just the CODEC DAIs would complexify the
simple-card logic...
--
Ken ar c'hentañ | ** Breizh ha Linux atav! **
Jef | http://moinejf.free.fr/
More information about the Alsa-devel
mailing list