summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2025-04-17 23:23:17 +0000
committerMark Brown <broonie@kernel.org>2025-04-26 02:17:35 +0100
commitce6949be36997f65d70bb6496bdfa4befff5bbab (patch)
tree8b0937eac3485566a233a0f9037ce5d7d99766cc
parent749027309025a3bb4785ab8f20e18bc641fae848 (diff)
ASoC: renesas: rsnd: allow to use ADG as standalone
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>
-rw-r--r--sound/soc/renesas/rcar/core.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sound/soc/renesas/rcar/core.c b/sound/soc/renesas/rcar/core.c
index 30afc942d381..4f4ed24cb361 100644
--- a/sound/soc/renesas/rcar/core.c
+++ b/sound/soc/renesas/rcar/core.c
@@ -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);