All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: Don't force bias on ground referenced devices
@ 2011-09-22 10:12 Mark Brown
  0 siblings, 0 replies; only message in thread
From: Mark Brown @ 2011-09-22 10:12 UTC (permalink / raw)
  To: Liam Girdwood; +Cc: alsa-devel, patches, Mark Brown

Currently we force all devices in the system to be at the same bias level.
This is due to concerns about power or pop/click impacts from either
ramping VMID or mismatching VMID on the analogue I/O lines between
connected devices but does mean we power devices up more often than we
really need to.

If a device flags idle_bias_off this will usually mean that it's either
all digital or ground referenced (in which case the idle and powered bias
levels are identical) so this concern does not apply and we can save some
power by leaving it off when not needed itself.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
 sound/soc/soc-dapm.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index 6cac045..2bde6b0c 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -1319,13 +1319,16 @@ static int dapm_power_widgets(struct snd_soc_dapm_context *dapm, int event)
 		}
 	}
 
-	/* Force all contexts in the card to the same bias state */
+	/* Force all contexts in the card to the same bias state if
+	 * they're not ground referenced.
+	 */
 	bias = SND_SOC_BIAS_OFF;
 	list_for_each_entry(d, &card->dapm_list, list)
 		if (d->target_bias_level > bias)
 			bias = d->target_bias_level;
 	list_for_each_entry(d, &card->dapm_list, list)
-		d->target_bias_level = bias;
+		if (!d->idle_bias_off)
+			d->target_bias_level = bias;
 
 	trace_snd_soc_dapm_walk_done(card);
 
-- 
1.7.6.3

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2011-09-22 10:12 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-22 10:12 [PATCH] ASoC: Don't force bias on ground referenced devices Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.