From d1084b582725b93c5cbf64a119f2328370f3ef50 Mon Sep 17 00:00:00 2001 From: Mark Brown Date: Sat, 4 Jun 2011 11:34:43 +0100 Subject: [PATCH] --- yaml --- r: 257494 b: refs/heads/master c: dfcc9047c97ca99b151e30133c9bccf5ab258ca6 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/sound/soc/soc-dapm.c | 23 +++++++++++++++++++++-- 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index a9f3d70e92b9..27177e82f52a 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 56fba41f8f6444f9e2db3bfe2c4cc5c5bac43d1d +refs/heads/master: dfcc9047c97ca99b151e30133c9bccf5ab258ca6 diff --git a/trunk/sound/soc/soc-dapm.c b/trunk/sound/soc/soc-dapm.c index 0bbded43e213..6be6546648c8 100644 --- a/trunk/sound/soc/soc-dapm.c +++ b/trunk/sound/soc/soc-dapm.c @@ -1147,8 +1147,27 @@ static int dapm_power_widgets(struct snd_soc_dapm_context *dapm, int event) power = w->power_check(w); else power = 1; - if (power) - w->dapm->target_bias_level = SND_SOC_BIAS_ON; + + if (power) { + d = w->dapm; + + /* Supplies and micbiases only bring + * the context up to STANDBY as unless + * something else is active and + * passing audio they generally don't + * require full power. + */ + switch (w->id) { + case snd_soc_dapm_supply: + case snd_soc_dapm_micbias: + if (d->target_bias_level < SND_SOC_BIAS_STANDBY) + d->target_bias_level = SND_SOC_BIAS_STANDBY; + break; + default: + d->target_bias_level = SND_SOC_BIAS_ON; + break; + } + } if (w->power == power) continue;