aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2013-08-27 09:51:00 -0400
committerMark Brown <broonie@linaro.org>2013-08-27 10:39:43 -0400
commit8c193b8dce4f2a2474dc2bc39ec972454df9d439 (patch)
treefb8dd4397f57e87488d14e0247783b42aacabca1 /sound
parent4b52fa211a7c65eab78acf3f434361d40de87688 (diff)
ASoC: Move call to snd_soc_dapm_new_widgets() after snd_soc_dapm_auto_nc_codec_pins()
Call snd_soc_dapm_new_widgets() before the auto non-connected pins have been marked as not connected will power the system under the assumption that those pins are connected. Once the pins have been marked as disconnected the system there will be an additional power run. This can cause unnecessary power transitions. Calling snd_soc_dapm_new_widgets() only after the pins have been marked as non-connected avoids this. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/soc-core.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 85e2a8b8f288..9375012ccb21 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -1803,12 +1803,12 @@ static int snd_soc_instantiate_card(struct snd_soc_card *card)
1803 } 1803 }
1804 } 1804 }
1805 1805
1806 snd_soc_dapm_new_widgets(&card->dapm);
1807
1808 if (card->fully_routed) 1806 if (card->fully_routed)
1809 list_for_each_entry(codec, &card->codec_dev_list, card_list) 1807 list_for_each_entry(codec, &card->codec_dev_list, card_list)
1810 snd_soc_dapm_auto_nc_codec_pins(codec); 1808 snd_soc_dapm_auto_nc_codec_pins(codec);
1811 1809
1810 snd_soc_dapm_new_widgets(&card->dapm);
1811
1812 ret = snd_card_register(card->snd_card); 1812 ret = snd_card_register(card->snd_card);
1813 if (ret < 0) { 1813 if (ret < 0) {
1814 dev_err(card->dev, "ASoC: failed to register soundcard %d\n", 1814 dev_err(card->dev, "ASoC: failed to register soundcard %d\n",