mirror of
https://github.com/edk2-porting/linux-next.git
synced 2025-01-14 08:34:02 +08:00
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: Takashi Iwai <tiwai@suse.de> Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
dc865fb9e7
commit
b1625fbb3b
@ -300,11 +300,8 @@ static irqreturn_t stm32_sai_isr(int irq, void *devid)
|
||||
status = SNDRV_PCM_STATE_XRUN;
|
||||
}
|
||||
|
||||
if (status != SNDRV_PCM_STATE_RUNNING) {
|
||||
snd_pcm_stream_lock(sai->substream);
|
||||
snd_pcm_stop(sai->substream, SNDRV_PCM_STATE_XRUN);
|
||||
snd_pcm_stream_unlock(sai->substream);
|
||||
}
|
||||
if (status != SNDRV_PCM_STATE_RUNNING)
|
||||
snd_pcm_stop_xrun(sai->substream);
|
||||
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user