[ALSA] Fix hang-up at disconnection of usb-audio
Fix hang-up at disconnection of usb-audio devices while accessing PCM. Don't handle PCM operations any more after shutdown flag is set. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
This commit is contained in:
committed by
Jaroslav Kysela
parent
282e0c87f2
commit
de1b8b93a0
@@ -1469,7 +1469,8 @@ static int snd_usb_hw_free(struct snd_pcm_substream *substream)
|
||||
subs->cur_audiofmt = NULL;
|
||||
subs->cur_rate = 0;
|
||||
subs->period_bytes = 0;
|
||||
release_substream_urbs(subs, 0);
|
||||
if (!subs->stream->chip->shutdown)
|
||||
release_substream_urbs(subs, 0);
|
||||
return snd_pcm_free_vmalloc_buffer(substream);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user