[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200213155159.3235792-2-jbrunet@baylibre.com>
Date: Thu, 13 Feb 2020 16:51:51 +0100
From: Jerome Brunet <jbrunet@...libre.com>
To: Mark Brown <broonie@...nel.org>,
Liam Girdwood <lgirdwood@...il.com>
Cc: Jerome Brunet <jbrunet@...libre.com>, alsa-devel@...a-project.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-amlogic@...ts.infradead.org,
Kevin Hilman <khilman@...libre.com>
Subject: [PATCH 1/9] ASoC: core: allow a dt node to provide several components
At the moment, querying the dai_name will stop of the first component
matching the dt node. This does not allow a device (single dt node) to
provide several ASoC components which could then be used through DT.
This change let the search go on if the xlate function of the component
returns an error, giving the possibility to another component to match
and return the dai_name.
Signed-off-by: Jerome Brunet <jbrunet@...libre.com>
---
sound/soc/soc-core.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 068d809c349a..03b87427faa7 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -3102,6 +3102,14 @@ int snd_soc_get_dai_name(struct of_phandle_args *args,
*dai_name = dai->driver->name;
if (!*dai_name)
*dai_name = pos->name;
+ } else if (ret) {
+ /*
+ * if another error than ENOTSUPP is returned go on and
+ * check if another component is provided with the same
+ * node. This may happen if a device provides several
+ * components
+ */
+ continue;
}
break;
--
2.24.1
Powered by blists - more mailing lists