[alsa-devel] [PATCH] ASoC: Ensure supplies are maintained for force enabled widgets

Mark Brown broonie at opensource.wolfsonmicro.com
Fri Feb 11 12:44:13 CET 2011


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 at opensource.wolfsonmicro.com>
---

This is only compile tested so far.

 sound/soc/soc-dapm.c |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index b30eda6..1bd24d5 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;
-- 
1.7.2.3



More information about the Alsa-devel mailing list