All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: Ensure supplies are maintained for force enabled widgets
@ 2011-02-11 11:44 Mark Brown
  2011-02-11 16:56 ` Stephen Warren
  2011-02-13 16:19 ` Liam Girdwood
  0 siblings, 2 replies; 3+ messages in thread
From: Mark Brown @ 2011-02-11 11:44 UTC (permalink / raw
  To: Liam Girdwood; +Cc: alsa-devel, patches, swarren, 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.

Signed-off-by: Mark Brown <broonie@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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] ASoC: Ensure supplies are maintained for force enabled widgets
  2011-02-11 11:44 [PATCH] ASoC: Ensure supplies are maintained for force enabled widgets Mark Brown
@ 2011-02-11 16:56 ` Stephen Warren
  2011-02-13 16:19 ` Liam Girdwood
  1 sibling, 0 replies; 3+ messages in thread
From: Stephen Warren @ 2011-02-11 16:56 UTC (permalink / raw
  To: Mark Brown, Liam Girdwood
  Cc: alsa-devel@alsa-project.org, patches@opensource.wolfsonmicro.com

Mark Brown wrote at Friday, February 11, 2011 4:44 AM:
> 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>

Thanks, this fixes the problem.

-- 
nvpublic

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] ASoC: Ensure supplies are maintained for force enabled widgets
  2011-02-11 11:44 [PATCH] ASoC: Ensure supplies are maintained for force enabled widgets Mark Brown
  2011-02-11 16:56 ` Stephen Warren
@ 2011-02-13 16:19 ` Liam Girdwood
  1 sibling, 0 replies; 3+ messages in thread
From: Liam Girdwood @ 2011-02-13 16:19 UTC (permalink / raw
  To: Mark Brown; +Cc: alsa-devel, patches, swarren

On Fri, 2011-02-11 at 11:44 +0000, Mark Brown wrote:
> 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>
> ---

Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
-- 
Freelance Developer, SlimLogic Ltd
ASoC and Voltage Regulator Maintainer.
http://www.slimlogic.co.uk

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-02-13 16:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-11 11:44 [PATCH] ASoC: Ensure supplies are maintained for force enabled widgets Mark Brown
2011-02-11 16:56 ` Stephen Warren
2011-02-13 16:19 ` Liam Girdwood

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.