aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/soc-dapm.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2011-04-04 08:05:11 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-04-08 22:24:08 -0400
commit52ba67bf85889828b3766207fa43ce7159c84c78 (patch)
treebdc8bbcdebf8d32ad3c6daccf0c2c7c6a40372c1 /sound/soc/soc-dapm.c
parentd25b7c1ec7da4636587ad1a22b324bcd7b89b6bc (diff)
ASoC: Force all DAPM contexts into the same bias state
Currently we allow all DAPM contexts to determine their own bias level. While this should in general work in most situations and will deliver the lowest possible power it causes problems for our integration with the card bias level as we're calling the card bias level functions for each DAPM context even though they're card wide but don't say which CODEC we're calling them for. Mitigate against this by forcing everything to be in the same state. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
Diffstat (limited to 'sound/soc/soc-dapm.c')
-rw-r--r--sound/soc/soc-dapm.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index 567645c0308b..68879209b315 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -1101,6 +1101,15 @@ static int dapm_power_widgets(struct snd_soc_dapm_context *dapm, int event)
1101 } 1101 }
1102 } 1102 }
1103 1103
1104 /* Force all contexts in the card to the same bias state */
1105 power = 0;
1106 list_for_each_entry(d, &card->dapm_list, list)
1107 if (d->dev_power)
1108 power = 1;
1109 list_for_each_entry(d, &card->dapm_list, list)
1110 d->dev_power = power;
1111
1112
1104 /* Run all the bias changes in parallel */ 1113 /* Run all the bias changes in parallel */
1105 list_for_each_entry(d, &dapm->card->dapm_list, list) 1114 list_for_each_entry(d, &dapm->card->dapm_list, list)
1106 async_schedule_domain(dapm_pre_sequence_async, d, 1115 async_schedule_domain(dapm_pre_sequence_async, d,