Skip to content

Commit

Permalink
ASoC: Force all DAPM contexts into the same bias state
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Mark Brown committed Apr 9, 2011
1 parent d25b7c1 commit 52ba67b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions sound/soc/soc-dapm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1101,6 +1101,15 @@ static int dapm_power_widgets(struct snd_soc_dapm_context *dapm, int event)
}
}

/* Force all contexts in the card to the same bias state */
power = 0;
list_for_each_entry(d, &card->dapm_list, list)
if (d->dev_power)
power = 1;
list_for_each_entry(d, &card->dapm_list, list)
d->dev_power = power;


/* Run all the bias changes in parallel */
list_for_each_entry(d, &dapm->card->dapm_list, list)
async_schedule_domain(dapm_pre_sequence_async, d,
Expand Down

0 comments on commit 52ba67b

Please sign in to comment.