diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2010-11-05 13:50:48 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2010-11-06 11:11:24 -0400 |
commit | 71a295602ed967fa22d96d57a2e38bb86de24db7 (patch) | |
tree | 7cafff050fbb140174590dcdab359653845365ca /sound/soc/pxa/magician.c | |
parent | 6424dca23e6b5a2f7a19a69cf7c0990b11717b00 (diff) |
ASoC: Lock the CODEC in PXA external jack controls
When doing anything with the system, especially DAPM, we need to hold the
CODEC mutex.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Diffstat (limited to 'sound/soc/pxa/magician.c')
-rw-r--r-- | sound/soc/pxa/magician.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sound/soc/pxa/magician.c b/sound/soc/pxa/magician.c index b8207ced4072..5ef0526924b9 100644 --- a/sound/soc/pxa/magician.c +++ b/sound/soc/pxa/magician.c | |||
@@ -72,9 +72,13 @@ static int magician_startup(struct snd_pcm_substream *substream) | |||
72 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 72 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
73 | struct snd_soc_codec *codec = rtd->codec; | 73 | struct snd_soc_codec *codec = rtd->codec; |
74 | 74 | ||
75 | mutex_lock(&codec->mutex); | ||
76 | |||
75 | /* check the jack status at stream startup */ | 77 | /* check the jack status at stream startup */ |
76 | magician_ext_control(codec); | 78 | magician_ext_control(codec); |
77 | 79 | ||
80 | mutex_unlock(&codec->mutex); | ||
81 | |||
78 | return 0; | 82 | return 0; |
79 | } | 83 | } |
80 | 84 | ||