summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2011-02-11 11:42:19 +0000
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-02-13 19:49:47 +0000
commit3017358a75917b5ed5ad361c02ba2a7e257d3b2a (patch)
treeff9e6e55990fa74b160dfd16c4a7b3e25c85c281 /sound
parentc52fd021bc027a90a10782c0dcf667ac0135e478 (diff)
downloadblackbird-op-linux-3017358a75917b5ed5ad361c02ba2a7e257d3b2a.tar.gz
blackbird-op-linux-3017358a75917b5ed5ad361c02ba2a7e257d3b2a.zip
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 <broonie@opensource.wolfsonmicro.com> Tested-by: Stephen Warren <swarren@nvidia.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/soc-dapm.c10
1 files changed, 9 insertions, 1 deletions
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;
OpenPOWER on IntegriCloud