summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2014-02-27 18:25:24 -0800
committerDarren Etheridge <detheridge@ti.com>2014-06-20 15:19:25 -0500
commita4960e1c3eb0ee0bc6162f29bd2fc2529957a224 (patch)
tree3adaa12149059a7b31286e3603481abaef8f1372 /sound
parentd4315ad7626d86bea9f96a0fabcddfb44840b8a0 (diff)
ASoC: simple-card: cpu_dai_name creates confusion when DT case
[ Upstream commit f687d900d30a61dda38db2a99239f5284a86a309 ] Basically, soc_bind_dai_link() checks cpu_dai->dev->of_node and dai_link->cpu_of_node in DT case. But after that it will check cpu_dai->name and dai_link->cpu_dai_name too. On the other hand, snd_soc_dai :: name is created by fmt_single_name() or fmt_multiple_name(). There is no confusion if dai name is created by fmt_multiple_name(), since cpu_dai->name is same as dai_link->cpu_dai_name. but, if dai name is created by fmt_single_name(), CPU DAI never match. Thus, simple-card not set dai_link->cpu_dai_name if DT case to skip naming match on soc_bind_dai_link() Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@linaro.org> Signed-off-by: Darren Etheridge <detheridge@ti.com>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/generic/simple-card.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c
index bdd176ddff0..034a2b73f6c 100644
--- a/sound/soc/generic/simple-card.c
+++ b/sound/soc/generic/simple-card.c
@@ -234,6 +234,17 @@ static int asoc_simple_card_parse_of(struct device_node *node,
priv->codec_dai.fmt,
priv->codec_dai.sysclk);
+ /*
+ * soc_bind_dai_link() will check cpu name
+ * after of_node matching if dai_link has cpu_dai_name.
+ * but, it will never match if name was created by fmt_single_name()
+ * remove cpu_dai_name to escape name matching.
+ * see
+ * fmt_single_name()
+ * fmt_multiple_name()
+ */
+ dai_link->cpu_dai_name = NULL;
+
return 0;
}