summary refs log tree commit diff
path: root/sound/usb/pcm.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2021-02-06 21:30:52 +0100
committerTakashi Iwai <tiwai@suse.de>2021-02-08 16:00:16 +0100
commit257d2d7e9e798305d65825cb82b0a7d1c0511e89 (patch)
treef1d1e65ad416ef861172c3ea9e4aa8b5d9ec4599 /sound/usb/pcm.c
parent5c2b301476ec493be15546f05e23414e2aa9d472 (diff)
downloadlinux-257d2d7e9e798305d65825cb82b0a7d1c0511e89.tar.gz
ALSA: usb-audio: Don't avoid stopping the stream at disconnection
In the later patch, we're going to issue the PCM sync_stop calls at
disconnection.  But currently the USB-audio driver can't handle it
because it has a check of shutdown flag for stopping the URBs.  This
is basically superfluous (the stopping URBs are safe at disconnection
state), so let's drop the check.

Fixes: dc5eafe7787c ("ALSA: usb-audio: Support PCM sync_stop")
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20210206203052.15606-4-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb/pcm.c')
-rw-r--r--sound/usb/pcm.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/sound/usb/pcm.c b/sound/usb/pcm.c
index dcadf8f164b2..bf5a0f3c1fad 100644
--- a/sound/usb/pcm.c
+++ b/sound/usb/pcm.c
@@ -270,10 +270,7 @@ static int snd_usb_pcm_sync_stop(struct snd_pcm_substream *substream)
 {
 	struct snd_usb_substream *subs = substream->runtime->private_data;
 
-	if (!snd_usb_lock_shutdown(subs->stream->chip)) {
-		sync_pending_stops(subs);
-		snd_usb_unlock_shutdown(subs->stream->chip);
-	}
+	sync_pending_stops(subs);
 	return 0;
 }