diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2014-02-27 21:25:24 -0500 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-02-28 00:25:25 -0500 |
commit | f687d900d30a61dda38db2a99239f5284a86a309 (patch) | |
tree | e62e8be424fb8237ee30d6b876630fd885099e86 /sound/soc/generic/simple-card.c | |
parent | 6ff62eedce4f7756b092d276165d8e11edab9f28 (diff) |
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>
Diffstat (limited to 'sound/soc/generic/simple-card.c')
-rw-r--r-- | sound/soc/generic/simple-card.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c index bdd176ddff07..034a2b73f6c1 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, | |||
234 | priv->codec_dai.fmt, | 234 | priv->codec_dai.fmt, |
235 | priv->codec_dai.sysclk); | 235 | priv->codec_dai.sysclk); |
236 | 236 | ||
237 | /* | ||
238 | * soc_bind_dai_link() will check cpu name | ||
239 | * after of_node matching if dai_link has cpu_dai_name. | ||
240 | * but, it will never match if name was created by fmt_single_name() | ||
241 | * remove cpu_dai_name to escape name matching. | ||
242 | * see | ||
243 | * fmt_single_name() | ||
244 | * fmt_multiple_name() | ||
245 | */ | ||
246 | dai_link->cpu_dai_name = NULL; | ||
247 | |||
237 | return 0; | 248 | return 0; |
238 | } | 249 | } |
239 | 250 | ||