aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2015-04-10 05:47:00 -0400
committerMark Brown <broonie@kernel.org>2015-04-10 11:11:12 -0400
commita5053a8e200e865ab786384df3f985a3cbb346fe (patch)
tree41f2e16371b52738e3b90cce8612830ddd35a0b7
parent1ddca24c532247894eb4430e9315e690306cf860 (diff)
ASoC: core: call snd_soc_runtime_set_dai_fmt() before soc_new_pcm()
Current snd_soc_runtime_set_dai_fmt() is called after soc_probe_link_dais(). this means snd_soc_dai_set_fmt() will be called after soc_new_pcm(). Before appling 1efb53a220b78fdfdbb97b726a2156713e75bdab (ASoC: simple-card: Remove support for setting differing DAI formats) simple-card user had (1) snd_soc_dai_set_fmt() -> soc_new_pcm(), but, after that it is (2) soc_new_pcm() -> snd_soc_dai_set_fmt(). At least rsnd driver is assuming (1) pattern. This patch move snd_soc_dai_set_fmt() into soc_probe_link_dais() after the dai_link->init section to solve this issue. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--sound/soc/soc-core.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 25fcd80cb108..2fb3bf738b5b 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -1359,6 +1359,9 @@ static int soc_probe_link_dais(struct snd_soc_card *card, int num, int order)
1359 } 1359 }
1360 } 1360 }
1361 1361
1362 if (dai_link->dai_fmt)
1363 snd_soc_runtime_set_dai_fmt(rtd, dai_link->dai_fmt);
1364
1362 ret = soc_post_component_init(rtd, dai_link->name); 1365 ret = soc_post_component_init(rtd, dai_link->name);
1363 if (ret) 1366 if (ret)
1364 return ret; 1367 return ret;
@@ -1672,12 +1675,6 @@ static int snd_soc_instantiate_card(struct snd_soc_card *card)
1672 snd_soc_dapm_add_routes(&card->dapm, card->of_dapm_routes, 1675 snd_soc_dapm_add_routes(&card->dapm, card->of_dapm_routes,
1673 card->num_of_dapm_routes); 1676 card->num_of_dapm_routes);
1674 1677
1675 for (i = 0; i < card->num_links; i++) {
1676 if (card->dai_link[i].dai_fmt)
1677 snd_soc_runtime_set_dai_fmt(&card->rtd[i],
1678 card->dai_link[i].dai_fmt);
1679 }
1680
1681 snprintf(card->snd_card->shortname, sizeof(card->snd_card->shortname), 1678 snprintf(card->snd_card->shortname, sizeof(card->snd_card->shortname),
1682 "%s", card->name); 1679 "%s", card->name);
1683 snprintf(card->snd_card->longname, sizeof(card->snd_card->longname), 1680 snprintf(card->snd_card->longname, sizeof(card->snd_card->longname),