From: Mark Brown Date: Wed, 28 Sep 2011 19:12:01 +0000 (+0100) Subject: ASoC: Instantiate DAPM widgets before we do the DAI link init X-Git-Tag: v3.12-rc1~3017^2~700 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0b07ab9244d34929b6e07d6a275137a229e9c839;p=kernel%2Fkernel-generic.git ASoC: Instantiate DAPM widgets before we do the DAI link init The DAI init function may want to do something that needs the widgets to be instantiated. Signed-off-by: Mark Brown --- diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index a58c1fc..1ed8093 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -1059,6 +1059,9 @@ static int soc_post_component_init(struct snd_soc_card *card, temp = codec->name_prefix; codec->name_prefix = NULL; + /* Make sure all DAPM widgets are instantiated */ + snd_soc_dapm_new_widgets(&codec->dapm); + /* do machine specific initialization */ if (!dailess && dai_link->init) ret = dai_link->init(rtd); @@ -1070,9 +1073,6 @@ static int soc_post_component_init(struct snd_soc_card *card, } codec->name_prefix = temp; - /* Make sure all DAPM widgets are instantiated */ - snd_soc_dapm_new_widgets(&codec->dapm); - /* register the rtd device */ rtd->codec = codec; rtd->dev.parent = card->dev;