summaryrefslogtreecommitdiffstats
path: root/sound/soc/soc-dapm.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2009-06-07 13:37:44 +0100
committerMark Brown <broonie@opensource.wolfsonmicro.com>2009-06-08 13:52:05 +0100
commit4f1c1923851f9734c972812121e80a3b04ab3af4 (patch)
tree04fe3675139896b7aeda0b955956b7f3834a98d5 /sound/soc/soc-dapm.c
parent81628103dd8527d99ea39b054a3f002d5859d7c3 (diff)
ASoC: Coalesce power updates for PGAs
Handle gain ramping for PGAs so we can coalesce their power updates too. This is not ideal since we can't cope properly with gain ramping for stereo paths but that was the case without coalescing and gain ramping is relatively infrequently used so the effects are limited. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/soc-dapm.c')
-rw-r--r--sound/soc/soc-dapm.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index 3fc791c28aa..7299ce405b2 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -786,6 +786,10 @@ static void dapm_seq_run_coalesced(struct snd_soc_codec *codec,
pr_err("%s: pre event failed: %d\n",
w->name, ret);
}
+
+ /* Lower PGA volume to reduce pops */
+ if (w->id == snd_soc_dapm_pga && !w->power)
+ dapm_set_pga(w, w->power);
}
if (reg >= 0) {
@@ -797,6 +801,10 @@ static void dapm_seq_run_coalesced(struct snd_soc_codec *codec,
}
list_for_each_entry(w, pending, power_list) {
+ /* Raise PGA volume to reduce pops */
+ if (w->id == snd_soc_dapm_pga && w->power)
+ dapm_set_pga(w, w->power);
+
/* power up post event */
if (w->power && w->event &&
(w->event_flags & SND_SOC_DAPM_POST_PMU)) {
@@ -886,8 +894,6 @@ static void dapm_seq_run(struct snd_soc_codec *codec, struct list_head *list,
case snd_soc_dapm_line:
case snd_soc_dapm_spk:
/* No register support currently */
- case snd_soc_dapm_pga:
- /* Don't coalsece these yet due to gain ramping */
ret = dapm_generic_apply_power(w);
break;