Skip to content

Commit 442cfd5

Browse files
morimotobroonie
authored andcommitted
ASoC: audio-graph-card2: recommend to use auto select DAI format
"Simple Audio Card", "Audio Graph Card", "Audio Graph Card2" are possible to set DAI format via DT. OTOH, ASoC is supporting .auto_selectable_formats to select DAI format automatically. Let's recommend to use it on "Audio Graph Card2". One note is that it keeps supporting DAI format setting via DT. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://patch.msgid.link/87ik7s36k2.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent c6b09cd commit 442cfd5

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

sound/soc/generic/audio-graph-card2.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -778,6 +778,18 @@ static void graph_link_init(struct simple_util_priv *priv,
778778
graph_parse_daifmt(ports_cpu, &daifmt);
779779
graph_parse_daifmt(ports_codec, &daifmt);
780780
graph_parse_daifmt(lnk, &daifmt);
781+
if (daifmt) {
782+
struct device *dev = simple_priv_to_dev(priv);
783+
784+
/*
785+
* Recommend to use Auto Select by using .auto_selectable_formats.
786+
* linux/sound/soc/renesas/rcar/core.c can be good sample for it.
787+
*
788+
* One note is that Audio Graph Card2 still keeps compatible to set
789+
* DAI format via DT.
790+
*/
791+
dev_warn_once(dev, "use .auto_selectable_formats on each corresponding CPU/Codec driver");
792+
}
781793

782794
graph_util_parse_link_direction(lnk, &playback_only, &capture_only);
783795
graph_util_parse_link_direction(ports_cpu, &playback_only, &capture_only);

0 commit comments

Comments
 (0)