Re: [PATCH v3 4/4] ASoC: simple-card: Add DT documentation for multi-DAI links

From: Mark Brown
Date: Mon Mar 17 2014 - 12:43:59 EST


On Sat, Mar 15, 2014 at 12:30:05PM +0100, Jean-Francois Moine wrote:
> There may be many couples of CPU/CODEC DAI links.
> The example 2 is extracted from the Cubox DT.

Oh, here's some documentation - please include the documentation
before the code, without the documentation the reader is going to have
no idea what the code is supposed to be implementing.

> + There may be one or many couples (simple-audio-card,cpu, simple-audio-card,codec)
> + (see example 2).

This doesn't mention how they're matched up.

> +sound {
> + compatible = "simple-audio-card";
> + simple-audio-card,name = "Cubox Audio";
> +
> + simple-audio-card,cpu@0 { /* I2S - HDMI */
> + sound-dai = <&audio1 0>;
> + format = "i2s";
> + };
> + simple-audio-card,codec@0 {
> + sound-dai = <&tda998x 0>;
> + };
> +
> + simple-audio-card,cpu@1 { /* S/PDIF - HDMI */
> + sound-dai = <&audio1 1>;
> + };
> + simple-audio-card,codec@1 {
> + sound-dai = <&tda998x 1>;
> + };

So, this is not exactly pretty as a binding. I would expect to see the
links explicitly represented in the DT so you see the two DAIs in each
link grouped into a container, the above isn't very easy to read and as
Jyri says this lack of clarity also causes practical problems in that
there's nowhere to place link specific parameters.

I think what I'd expect to see here is that the simple card can either
be a container with a link in it directly or a container of links.

Attachment: signature.asc
Description: Digital signature