]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
ASoC: renesas: rsnd: allow to use ADG as standalone
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Thu, 17 Apr 2025 23:23:17 +0000 (23:23 +0000)
committerMark Brown <broonie@kernel.org>
Sat, 26 Apr 2025 01:17:35 +0000 (02:17 +0100)
Audio clock generator (= ADG) can be used standalone (without DAI),
but current driver indicates error if it doesn't have DAI on DT.
It is not error, allow to use ADG as standalone.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87v7r22x0a.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/renesas/rcar/core.c

index 30afc942d3818209e74ce2bd188fc3ae6e3f52f8..4f4ed24cb361617e5d0f7a1034f3e0979b7ebb97 100644 (file)
@@ -1482,8 +1482,13 @@ static int rsnd_dai_probe(struct rsnd_priv *priv)
        int dai_i;
 
        nr = rsnd_dai_of_node(priv, &is_graph);
+
+       /*
+        * There is a case that it is used only for ADG (Sound Clock).
+        * No DAI is not error
+        */
        if (!nr)
-               return -EINVAL;
+               return 0;
 
        rdrv = devm_kcalloc(dev, nr, sizeof(*rdrv), GFP_KERNEL);
        rdai = devm_kcalloc(dev, nr, sizeof(*rdai), GFP_KERNEL);