summaryrefslogtreecommitdiffstats
path: root/sound/soc
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2013-07-11 18:00:01 +0200
committerTakashi Iwai <tiwai@suse.de>2013-07-15 21:25:13 +0200
commit571185717f8d7f2a088a7ac38d94a9ad5fd9da5c (patch)
tree07c175d7e27363ffcfb21eaefd76d95026d9279a /sound/soc
parent46f6c1aaf790be9ea3c8ddfc8f235a5f677d08e2 (diff)
downloadop-kernel-dev-571185717f8d7f2a088a7ac38d94a9ad5fd9da5c.zip
op-kernel-dev-571185717f8d7f2a088a7ac38d94a9ad5fd9da5c.tar.gz
ASoC: atmel: Fix unlocked snd_pcm_stop() call
snd_pcm_stop() must be called in the PCM substream lock context. Cc: <stable@vger.kernel.org> Acked-by: Mark Brown <broonie@linaro.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/soc')
-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 1d38fd0..d128265 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);
OpenPOWER on IntegriCloud