diff options
author | Xiang Xiao <xiaoxiang@xiaomi.com> | 2014-03-01 16:04:02 (GMT) |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-03-03 04:40:54 (GMT) |
commit | 57996358f4d679b2bc39d4cd15166bb89fc8d981 (patch) | |
tree | 37eab28a27ed8b5e36bbe70f852113b711057c77 /sound/soc/soc-dapm.c | |
parent | 26e24ddce755cd6fb4b05a87ae37f7e10faa0c4b (diff) | |
download | linux-57996358f4d679b2bc39d4cd15166bb89fc8d981.tar.xz |
ASoC: dapm: Power off all widgets in the snd_soc_dapm_shutdown
The widgets generated by the machine driver need to power off too.
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound/soc/soc-dapm.c')
-rw-r--r-- | sound/soc/soc-dapm.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index 4200f96..d856e7c 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c @@ -4116,7 +4116,7 @@ void snd_soc_dapm_free(struct snd_soc_dapm_context *dapm) } EXPORT_SYMBOL_GPL(snd_soc_dapm_free); -static void soc_dapm_shutdown_codec(struct snd_soc_dapm_context *dapm) +static void soc_dapm_shutdown_dapm(struct snd_soc_dapm_context *dapm) { struct snd_soc_card *card = dapm->card; struct snd_soc_dapm_widget *w; @@ -4156,12 +4156,12 @@ static void soc_dapm_shutdown_codec(struct snd_soc_dapm_context *dapm) */ void snd_soc_dapm_shutdown(struct snd_soc_card *card) { - struct snd_soc_codec *codec; + struct snd_soc_dapm_context *dapm; - list_for_each_entry(codec, &card->codec_dev_list, card_list) { - soc_dapm_shutdown_codec(&codec->dapm); - if (codec->dapm.bias_level == SND_SOC_BIAS_STANDBY) - snd_soc_dapm_set_bias_level(&codec->dapm, + list_for_each_entry(dapm, &card->dapm_list, list) { + soc_dapm_shutdown_dapm(dapm); + if (dapm->bias_level == SND_SOC_BIAS_STANDBY) + snd_soc_dapm_set_bias_level(dapm, SND_SOC_BIAS_OFF); } } |