提交 9a841ebb 编写于 作者: M Mark Brown

ASoC: Create card DAPM widgets early so they can be used in callbacks

This helps with things like setting up the initial state.
Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: NLiam Girdwood <lrg@ti.com>
上级 01b07e2d
......@@ -1878,6 +1878,10 @@ static void snd_soc_instantiate_card(struct snd_soc_card *card)
INIT_WORK(&card->deferred_resume_work, soc_resume_deferred);
#endif
if (card->dapm_widgets)
snd_soc_dapm_new_controls(&card->dapm, card->dapm_widgets,
card->num_dapm_widgets);
/* initialise the sound card only once */
if (card->probe) {
ret = card->probe(card);
......@@ -1911,9 +1915,6 @@ static void snd_soc_instantiate_card(struct snd_soc_card *card)
card->controls,
card->num_controls);
if (card->dapm_widgets)
snd_soc_dapm_new_controls(&card->dapm, card->dapm_widgets,
card->num_dapm_widgets);
if (card->dapm_routes)
snd_soc_dapm_add_routes(&card->dapm, card->dapm_routes,
card->num_dapm_routes);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册