All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: dapm: Only mark pin widgets as dirty if we actually change state
@ 2012-02-16 19:51 Mark Brown
  0 siblings, 0 replies; only message in thread
From: Mark Brown @ 2012-02-16 19:51 UTC (permalink / raw)
  To: Liam Girdwood; +Cc: alsa-devel, patches, Mark Brown

Small optimisation for noop state updates.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
 sound/soc/soc-dapm.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index 2844879..a2a9c11 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -1915,10 +1915,12 @@ static int snd_soc_dapm_set_pin(struct snd_soc_dapm_context *dapm,
 		return -EINVAL;
 	}
 
+	if (w->connected != status)
+		dapm_mark_dirty(w, "pin configuration");
+
 	w->connected = status;
 	if (status == 0)
 		w->force = 0;
-	dapm_mark_dirty(w, "pin configuration");
 
 	return 0;
 }
-- 
1.7.9.rc1

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2012-02-16 19:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-16 19:51 [PATCH] ASoC: dapm: Only mark pin widgets as dirty if we actually change state Mark Brown

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.