Skip to content

Commit 52ba67b

Browse files
committed
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>
1 parent d25b7c1 commit 52ba67b

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

sound/soc/soc-dapm.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1101,6 +1101,15 @@ static int dapm_power_widgets(struct snd_soc_dapm_context *dapm, int event)
11011101
}
11021102
}
11031103

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+
11041113
/* Run all the bias changes in parallel */
11051114
list_for_each_entry(d, &dapm->card->dapm_list, list)
11061115
async_schedule_domain(dapm_pre_sequence_async, d,

0 commit comments

Comments
 (0)