Skip to content

Commit

Permalink
ASoC: atmel: Fix unlocked snd_pcm_stop() call
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Takashi Iwai committed Jul 15, 2013
1 parent 46f6c1a commit 5711857
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sound/soc/atmel/atmel-pcm-dma.c
Original file line number Diff line number Diff line change
@@ -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);

0 comments on commit 5711857

Please sign in to comment.