* [PATCH] ASoC: dapm: don't skip evaluate the power of widget with force set
@ 2014-04-13 8:37 Xiang Xiao
2014-04-14 20:36 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Xiang Xiao @ 2014-04-13 8:37 UTC (permalink / raw)
To: broonie, lgirdwood, bardliao; +Cc: alsa-devel, xiaoxiang
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
---
sound/soc/soc-dapm.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index c8a780d..14af77e 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -1673,7 +1673,7 @@ static void dapm_widget_set_peer_power(struct snd_soc_dapm_widget *peer,
/* If the peer is already in the state we're moving to then we
* won't have an impact on it. */
- if (power != peer->power)
+ if (peer->force || power != peer->power)
dapm_mark_dirty(peer, "peer state change");
}
@@ -1683,7 +1683,7 @@ static void dapm_widget_set_power(struct snd_soc_dapm_widget *w, bool power,
{
struct snd_soc_dapm_path *path;
- if (w->power == power)
+ if (!w->force && w->power == power)
return;
trace_snd_soc_dapm_widget_power(w, power);
--
1.8.1.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ASoC: dapm: don't skip evaluate the power of widget with force set
2014-04-13 8:37 [PATCH] ASoC: dapm: don't skip evaluate the power of widget with force set Xiang Xiao
@ 2014-04-14 20:36 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2014-04-14 20:36 UTC (permalink / raw)
To: Xiang Xiao; +Cc: bardliao, alsa-devel, lgirdwood
[-- Attachment #1.1: Type: text/plain, Size: 605 bytes --]
On Sun, Apr 13, 2014 at 04:37:20PM +0800, Xiang Xiao wrote:
> Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
You should explain why you want to do this in the changelog - what's the
problem that's being fixed or benefit?
> - if (power != peer->power)
> + if (peer->force || power != peer->power)
> dapm_mark_dirty(peer, "peer state change");
This doesn't correspond to your changelog - it *will* skip evaluating
the widget power if the widget is forced. It's not clear why this would
be a benefit.
> - if (w->power == power)
> + if (!w->force && w->power == power)
> return;
Similarly here.
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-04-14 20:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-13 8:37 [PATCH] ASoC: dapm: don't skip evaluate the power of widget with force set Xiang Xiao
2014-04-14 20:36 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox