]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ASoC: dapm: Fix _PRE and _POST events for DAPM performance improvements
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Fri, 20 Jul 2012 16:29:34 +0000 (17:29 +0100)
committerBen Hutchings <ben@decadent.org.uk>
Thu, 2 Aug 2012 13:37:59 +0000 (14:37 +0100)
commit 0ff97ebf0804d2e519d578fcb4db03f104d2ca8c upstream.

Ever since the DAPM performance improvements we've been marking all widgets
as not dirty after each DAPM run. Since _PRE and _POST events aren't part
of the DAPM graph this has rendered them non-functional, they will never be
marked dirty again and thus will never be run again.

Fix this by skipping them when marking widgets as not dirty.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
sound/soc/soc-dapm.c

index 90e93bf4fa799dd897e4a68570a8290b7cd6b945..0dc441cb001c8cce8e9ccdd2b9013e39aa90673d 100644 (file)
@@ -1381,7 +1381,15 @@ static int dapm_power_widgets(struct snd_soc_dapm_context *dapm, int event)
        }
 
        list_for_each_entry(w, &card->widgets, list) {
-               list_del_init(&w->dirty);
+               switch (w->id) {
+               case snd_soc_dapm_pre:
+               case snd_soc_dapm_post:
+                       /* These widgets always need to be powered */
+                       break;
+               default:
+                       list_del_init(&w->dirty);
+                       break;
+               }
 
                if (w->power) {
                        d = w->dapm;