This is a note to let you know that I've just added the patch titled
ASoC: dapm: Fix locking during codec shutdown
to the 3.5-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
asoc-dapm-fix-locking-during-codec-shutdown.patch
and it can be found in the queue-3.5 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.
>From 01005a729a17ab419f61a366e22f3419e7a2c3fe Mon Sep 17 00:00:00 2001
From: Liam Girdwood <[email protected]>
Date: Fri, 6 Jul 2012 16:57:05 +0100
Subject: ASoC: dapm: Fix locking during codec shutdown
From: Liam Girdwood <[email protected]>
commit 01005a729a17ab419f61a366e22f3419e7a2c3fe upstream.
Codec shutdown performs a DAPM power sequence that might cause conflicts
and/or race conditions if another stream power event is running simultaneously.
Use card's dapm mutex to protect any potential race condition between them.
Signed-off-by: Misael Lopez Cruz <[email protected]>
Signed-off-by: Liam Girdwood <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
sound/soc/soc-dapm.c | 5 +++++
1 file changed, 5 insertions(+)
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -3538,10 +3538,13 @@ EXPORT_SYMBOL_GPL(snd_soc_dapm_free);
static void soc_dapm_shutdown_codec(struct snd_soc_dapm_context *dapm)
{
+ struct snd_soc_card *card = dapm->card;
struct snd_soc_dapm_widget *w;
LIST_HEAD(down_list);
int powerdown = 0;
+ mutex_lock(&card->dapm_mutex);
+
list_for_each_entry(w, &dapm->card->widgets, list) {
if (w->dapm != dapm)
continue;
@@ -3564,6 +3567,8 @@ static void soc_dapm_shutdown_codec(stru
snd_soc_dapm_set_bias_level(dapm,
SND_SOC_BIAS_STANDBY);
}
+
+ mutex_unlock(&card->dapm_mutex);
}
/*
Patches currently in stable-queue which might be from [email protected] are
queue-3.5/asoc-dapm-fix-_pre-and-_post-events-for-dapm-performance-improvements.patch
queue-3.5/asoc-dapm-fix-locking-during-codec-shutdown.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html