ASoC: atmel: Fix unlocked snd_pcm_stop() call
authorTakashi Iwai <tiwai@suse.de>
Thu, 11 Jul 2013 16:00:01 +0000 (18:00 +0200)
committerTakashi Iwai <tiwai@suse.de>
Mon, 15 Jul 2013 19:25:13 +0000 (21:25 +0200)
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>
sound/soc/atmel/atmel-pcm-dma.c

index 1d38fd0bc4e26bd49772d7e030efb7e283e5687f..d12826526798fc47620e4cb613df9e95da8a8f7c 100644 (file)
@@ -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);