diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-09-28 15:12:01 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-10-03 16:34:56 -0400 |
commit | 0b07ab9244d34929b6e07d6a275137a229e9c839 (patch) | |
tree | 2748f981737c87e7a0ea06f60b0bda6997303254 | |
parent | f3a54a283b58b932cd3d018ca4a1ba96cc43a895 (diff) |
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 <broonie@opensource.wolfsonmicro.com>
-rw-r--r-- | sound/soc/soc-core.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index a58c1fc966e..1ed8093b44e 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, | |||
1059 | temp = codec->name_prefix; | 1059 | temp = codec->name_prefix; |
1060 | codec->name_prefix = NULL; | 1060 | codec->name_prefix = NULL; |
1061 | 1061 | ||
1062 | /* Make sure all DAPM widgets are instantiated */ | ||
1063 | snd_soc_dapm_new_widgets(&codec->dapm); | ||
1064 | |||
1062 | /* do machine specific initialization */ | 1065 | /* do machine specific initialization */ |
1063 | if (!dailess && dai_link->init) | 1066 | if (!dailess && dai_link->init) |
1064 | ret = dai_link->init(rtd); | 1067 | ret = dai_link->init(rtd); |
@@ -1070,9 +1073,6 @@ static int soc_post_component_init(struct snd_soc_card *card, | |||
1070 | } | 1073 | } |
1071 | codec->name_prefix = temp; | 1074 | codec->name_prefix = temp; |
1072 | 1075 | ||
1073 | /* Make sure all DAPM widgets are instantiated */ | ||
1074 | snd_soc_dapm_new_widgets(&codec->dapm); | ||
1075 | |||
1076 | /* register the rtd device */ | 1076 | /* register the rtd device */ |
1077 | rtd->codec = codec; | 1077 | rtd->codec = codec; |
1078 | rtd->dev.parent = card->dev; | 1078 | rtd->dev.parent = card->dev; |