diff options
Diffstat (limited to 'sound/soc/soc-dapm.c')
-rw-r--r-- | sound/soc/soc-dapm.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index 1f55ded4047f..1315663c1c09 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c | |||
@@ -3068,9 +3068,13 @@ static void soc_dapm_shutdown_codec(struct snd_soc_dapm_context *dapm) | |||
3068 | * standby. | 3068 | * standby. |
3069 | */ | 3069 | */ |
3070 | if (powerdown) { | 3070 | if (powerdown) { |
3071 | snd_soc_dapm_set_bias_level(dapm, SND_SOC_BIAS_PREPARE); | 3071 | if (dapm->bias_level == SND_SOC_BIAS_ON) |
3072 | snd_soc_dapm_set_bias_level(dapm, | ||
3073 | SND_SOC_BIAS_PREPARE); | ||
3072 | dapm_seq_run(dapm, &down_list, 0, false); | 3074 | dapm_seq_run(dapm, &down_list, 0, false); |
3073 | snd_soc_dapm_set_bias_level(dapm, SND_SOC_BIAS_STANDBY); | 3075 | if (dapm->bias_level == SND_SOC_BIAS_PREPARE) |
3076 | snd_soc_dapm_set_bias_level(dapm, | ||
3077 | SND_SOC_BIAS_STANDBY); | ||
3074 | } | 3078 | } |
3075 | } | 3079 | } |
3076 | 3080 | ||
@@ -3083,7 +3087,9 @@ void snd_soc_dapm_shutdown(struct snd_soc_card *card) | |||
3083 | 3087 | ||
3084 | list_for_each_entry(codec, &card->codec_dev_list, list) { | 3088 | list_for_each_entry(codec, &card->codec_dev_list, list) { |
3085 | soc_dapm_shutdown_codec(&codec->dapm); | 3089 | soc_dapm_shutdown_codec(&codec->dapm); |
3086 | snd_soc_dapm_set_bias_level(&codec->dapm, SND_SOC_BIAS_OFF); | 3090 | if (codec->dapm.bias_level == SND_SOC_BIAS_STANDBY) |
3091 | snd_soc_dapm_set_bias_level(&codec->dapm, | ||
3092 | SND_SOC_BIAS_OFF); | ||
3087 | } | 3093 | } |
3088 | } | 3094 | } |
3089 | 3095 | ||