From: Mark Brown Date: Fri, 20 Jul 2012 16:29:34 +0000 (+0100) Subject: ASoC: dapm: Fix _PRE and _POST events for DAPM performance improvements X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0ff97ebf0804d2e519d578fcb4db03f104d2ca8c;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git ASoC: dapm: Fix _PRE and _POST events for DAPM performance improvements 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 Acked-by: Liam Girdwood Cc: stable@vger.kernel.org --- diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index f7a13f720529..025060b26fb7 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c @@ -1598,7 +1598,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;