summaryrefslogtreecommitdiffstats
path: root/sound/soc/stm/stm32_sai_sub.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2018-07-04 16:01:46 +0200
committerMark Brown <broonie@kernel.org>2018-07-04 15:41:36 +0100
commitb1625fbb3b87affbedf14545b65d69ff182a0611 (patch)
tree87c7e6f2c6e02561f558e64eadacd7a8ebe018b5 /sound/soc/stm/stm32_sai_sub.c
parentdc865fb9e7c2251c9585ff6a7bf185d499db13e4 (diff)
downloadlinux-b1625fbb3b87affbedf14545b65d69ff182a0611.tar.bz2
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>
Diffstat (limited to 'sound/soc/stm/stm32_sai_sub.c')
-rw-r--r--sound/soc/stm/stm32_sai_sub.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/sound/soc/stm/stm32_sai_sub.c b/sound/soc/stm/stm32_sai_sub.c
index c4f15ea14197..06fba9650ac4 100644
--- a/sound/soc/stm/stm32_sai_sub.c
+++ b/sound/soc/stm/stm32_sai_sub.c
@@ -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;
}