aboutsummaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2013-07-11 18:00:01 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-07-25 14:07:28 -0700
commitb5aa3fc5730c605f4f6e1dbc45db459cfd59d1ed (patch)
treea82baf3e7c5ab5c70eefa9aa6ce5e7b52ba36006 /sound
parentd23067e924e410875602b3427251b88cd18da73f (diff)
ASoC: atmel: Fix unlocked snd_pcm_stop() call
commit 571185717f8d7f2a088a7ac38d94a9ad5fd9da5c upstream. snd_pcm_stop() must be called in the PCM substream lock context. Acked-by: Mark Brown <broonie@linaro.org> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/atmel/atmel-pcm-dma.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sound/soc/atmel/atmel-pcm-dma.c b/sound/soc/atmel/atmel-pcm-dma.c
index 1d38fd0bc4e..d1282652679 100644
--- a/sound/soc/atmel/atmel-pcm-dma.c
+++ b/sound/soc/atmel/atmel-pcm-dma.c
@@ -81,7 +81,9 @@ static void atmel_pcm_dma_irq(u32 ssc_sr,
/* stop RX and capture: will be enabled again at restart */
ssc_writex(prtd->ssc->regs, SSC_CR, prtd->mask->ssc_disable);
+ snd_pcm_stream_lock(substream);
snd_pcm_stop(substream, SNDRV_PCM_STATE_XRUN);
+ snd_pcm_stream_unlock(substream);
/* now drain RHR and read status to remove xrun condition */
ssc_readx(prtd->ssc->regs, SSC_RHR);