Skip to content

Commit

Permalink
ASoC: Ensure supplies are maintained for force enabled widgets
Browse files Browse the repository at this point in the history
If a widget has been force enabled then not only do we need to keep the
widget itself enabled, we also need to keep any supplies the widget
requires enabled. The user could force all the individual widgets on but
this requires too much knowledge of device internals.

Signed-off-by: Mark Brown <[email protected]>
Tested-by: Stephen Warren <[email protected]>
Acked-by: Liam Girdwood <[email protected]>
  • Loading branch information
broonie committed Feb 13, 2011
1 parent c52fd02 commit 3017358
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion sound/soc/soc-dapm.c
Original file line number Diff line number Diff line change
Expand Up @@ -712,7 +712,15 @@ static int dapm_supply_check_power(struct snd_soc_dapm_widget *w)
!path->connected(path->source, path->sink))
continue;

if (path->sink && path->sink->power_check &&
if (!path->sink)
continue;

if (path->sink->force) {
power = 1;
break;
}

if (path->sink->power_check &&
path->sink->power_check(path->sink)) {
power = 1;
break;
Expand Down

0 comments on commit 3017358

Please sign in to comment.