Commit b1625fbb authored by Takashi Iwai's avatar Takashi Iwai Committed by Mark Brown

ASoC: stm32: Use snd_pcm_stop_xrun() helper

The XRUN trigger from the driver should be done via
snd_pcm_stop_xrun().  It simplifies the locking as well.
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent dc865fb9
...@@ -300,11 +300,8 @@ static irqreturn_t stm32_sai_isr(int irq, void *devid) ...@@ -300,11 +300,8 @@ static irqreturn_t stm32_sai_isr(int irq, void *devid)
status = SNDRV_PCM_STATE_XRUN; status = SNDRV_PCM_STATE_XRUN;
} }
if (status != SNDRV_PCM_STATE_RUNNING) { if (status != SNDRV_PCM_STATE_RUNNING)
snd_pcm_stream_lock(sai->substream); snd_pcm_stop_xrun(sai->substream);
snd_pcm_stop(sai->substream, SNDRV_PCM_STATE_XRUN);
snd_pcm_stream_unlock(sai->substream);
}
return IRQ_HANDLED; return IRQ_HANDLED;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment