From: Mark Brown Date: Fri, 11 Feb 2011 11:42:19 +0000 (+0000) Subject: ASoC: Ensure supplies are maintained for force enabled widgets X-Git-Tag: firefly_0821_release~7613^2~2269^2~10 X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=3017358a75917b5ed5ad361c02ba2a7e257d3b2a;p=firefly-linux-kernel-4.4.55.git ASoC: Ensure supplies are maintained for force enabled widgets 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 Tested-by: Stephen Warren Acked-by: Liam Girdwood --- diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index 4df96ec9a813..25e54230cc6a 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c @@ -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;