aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2012-01-31 10:49:10 -0500
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-01-31 14:29:07 -0500
commit125a25da5729740b7d1dc417a3d5549321baae17 (patch)
tree0870744203ec6265747e07e5597c883f3e9e279f /sound/soc
parent67f97f5c3edad35c4d37a94f994c76111a177fb6 (diff)
ASoC: core: Better support for idle_bias_off suspend ignores
If an idle_bias_off device is in any state other than off then it is still active for some reason (typically a low power function such as accessory detection). This wasn't an issue when the feature was implemented as we always went to _ON for any active function, subsequent power improvements have changed things. With the modern way of doing things we should overhaul the infrastructure to allow devices to explicitly take references for these functions but that's a much more invasive change and will require driver updates to deploy, this will bring the framework into line with the existing driver set before we do that work. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
Diffstat (limited to 'sound/soc')
-rw-r--r--sound/soc/soc-core.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index b5ecf6d23214..92cee24ed2dc 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -567,6 +567,17 @@ int snd_soc_suspend(struct device *dev)
567 if (!codec->suspended && codec->driver->suspend) { 567 if (!codec->suspended && codec->driver->suspend) {
568 switch (codec->dapm.bias_level) { 568 switch (codec->dapm.bias_level) {
569 case SND_SOC_BIAS_STANDBY: 569 case SND_SOC_BIAS_STANDBY:
570 /*
571 * If the CODEC is capable of idle
572 * bias off then being in STANDBY
573 * means it's doing something,
574 * otherwise fall through.
575 */
576 if (codec->dapm.idle_bias_off) {
577 dev_dbg(codec->dev,
578 "idle_bias_off CODEC on over suspend\n");
579 break;
580 }
570 case SND_SOC_BIAS_OFF: 581 case SND_SOC_BIAS_OFF:
571 codec->driver->suspend(codec); 582 codec->driver->suspend(codec);
572 codec->suspended = 1; 583 codec->suspended = 1;