Skip to contentSkip to conversation

ASoC: Ensure supplies are maintained for force enabled widgets

PATCH In review Mark Brown 3 participants 3 messages Feb 11, 2011 – Feb 13, 2011

Subsystems (2)
lore
Share & tools
lore

Mark Brown

author
#0 lore raw

PATCH 1/1 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.

---

This is only compile tested so far.

 sound/soc/soc-dapm.c |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)
sound/soc/soc-dapm.c +9 -1
index b30eda6..1bd24d5 100644
@@ -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;
Signature · 1 line
1.7.2.3
Tested-by on v1 1/1
#1 lore raw

Mark Brown wrote at Friday, February 11, 2011 4:44 AM:

Quoted 6 lines

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.

Thanks, this fixes the problem.

Signature · 1 line
nvpublic
Acked-by on v1 1/1
#2 lore raw
In reply to Mark Brown
Quoted 7 lines · Mark Brown

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.

---

Signature · 3 lines
Freelance Developer, SlimLogic Ltd
ASoC and Voltage Regulator Maintainer.
http://www.slimlogic.co.uk