Commit 1ef08eb2 authored by Takashi Iwai's avatar Takashi Iwai Committed by Greg Kroah-Hartman

ALSA: usx2y: Fix unlocked snd_pcm_stop() call

commit 5be1efb4 upstream.

snd_pcm_stop() must be called in the PCM substream lock context.
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 4b06cd61
...@@ -273,7 +273,11 @@ static void usX2Y_clients_stop(struct usX2Ydev *usX2Y) ...@@ -273,7 +273,11 @@ static void usX2Y_clients_stop(struct usX2Ydev *usX2Y)
struct snd_usX2Y_substream *subs = usX2Y->subs[s]; struct snd_usX2Y_substream *subs = usX2Y->subs[s];
if (subs) { if (subs) {
if (atomic_read(&subs->state) >= state_PRERUNNING) { if (atomic_read(&subs->state) >= state_PRERUNNING) {
unsigned long flags;
snd_pcm_stream_lock_irqsave(subs->pcm_substream, flags);
snd_pcm_stop(subs->pcm_substream, SNDRV_PCM_STATE_XRUN); snd_pcm_stop(subs->pcm_substream, SNDRV_PCM_STATE_XRUN);
snd_pcm_stream_unlock_irqrestore(subs->pcm_substream, flags);
} }
for (u = 0; u < NRURBS; u++) { for (u = 0; u < NRURBS; u++) {
struct urb *urb = subs->urb[u]; struct urb *urb = subs->urb[u];
......
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