ASoC: simple-card: cpu_dai_name creates confusion when DT case
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Fri, 28 Feb 2014 02:25:24 +0000 (18:25 -0800)
committerStephane Desneux <stephane.desneux@open.eurogiciel.org>
Wed, 4 Feb 2015 10:13:32 +0000 (11:13 +0100)
commit3ef093801eb6da7d5bd9c7939ade9f3407065d36
tree1ef4b5c46b7eb56cbce70598821a282890b0e3ac
parentbf95deb417eb04c42e7473ec3d820f137012d31a
ASoC: simple-card: cpu_dai_name creates confusion when DT case

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>
(cherry picked from commit f687d900d30a61dda38db2a99239f5284a86a309)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
sound/soc/generic/simple-card.c