]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ASoC: dapm: Fix marking widgets dirty when a route is added
authorLars-Peter Clausen <lars@metafoo.de>
Tue, 27 Aug 2013 13:50:54 +0000 (15:50 +0200)
committerMark Brown <broonie@linaro.org>
Tue, 27 Aug 2013 14:32:49 +0000 (15:32 +0100)
The current calls to dapm_mark_dirty() in snd_soc_dapm_add_path() are on a path
that is only reached if the sink widget is either a mixer or a mux. Move the
calls further up so they are called for all widget types.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
sound/soc/soc-dapm.c

index d84bd0f167b684e69bd93ef9c3205e93eca39d99..7e9afbc49ef2482d9418010e8e5bb854a92cfaba 100644 (file)
@@ -2374,6 +2374,9 @@ static int snd_soc_dapm_add_path(struct snd_soc_dapm_context *dapm,
                        wsource->ext = 1;
        }
 
+       dapm_mark_dirty(wsource, "Route added");
+       dapm_mark_dirty(wsink, "Route added");
+
        /* connect static paths */
        if (control == NULL) {
                list_add(&path->list, &dapm->card->paths);
@@ -2436,9 +2439,6 @@ static int snd_soc_dapm_add_path(struct snd_soc_dapm_context *dapm,
                return 0;
        }
 
-       dapm_mark_dirty(wsource, "Route added");
-       dapm_mark_dirty(wsink, "Route added");
-
        return 0;
 err:
        kfree(path);