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

From: Jyri Sarha
Date: Mon Mar 17 2014 - 06:20:01 EST


On 2014-03-15 13:30, Jean-Francois Moine wrote:
There may be many couples of CPU/CODEC DAI links.
The example 2 is extracted from the Cubox DT.

Signed-off-by: Jean-Francois Moine <moinejf@xxxxxxx>
---
[...]

This binding forces all the dai links to share the same card level properties. I find it problematic in these cases:

- simple-audio-card,format : CPU/CODEC common audio format.
"i2s", "right_j", "left_j" , "dsp_a"
"dsp_b", "ac97", "pdm", "msb", "lsb"

The code allows having the format parameter in sub nodes too, but the document does no mention it. Adding a mention would solve this problem at least partly.

Neither does the document mention that "simple-audio-card,bitclock-inversion" and "simple-audio-card,frame-inversion" are also allowed in card level. Currently the code uses simple bit-wise-or from card-level and dai-level daifmt parameters, which may lead to broken daifmt setting. However, this on directly related to this patch.

- dai-tdm-slot-num : Please refer to tdm-slot.txt.
- dai-tdm-slot-width : Please refer to tdm-slot.txt.

These properties are actually only taken from sub-nodes so the document is broken but the code is ok.

In general this binding would look better if another sub-node level would added for dai-link related properties, including the cpu and codec sub-nodes, but that would break the backwards compatibility.

Best regards,
Jyri
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/