diff options
author | Takashi Iwai <tiwai@suse.de> | 2006-11-08 15:41:29 +0100 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2006-11-28 13:46:38 +0100 |
commit | de1b8b93a0ba016b07d13086a15ad692536e6995 (patch) | |
tree | 840f0b486009d1ddd5c38fd57bc49e2f749253a1 /sound/core/oss | |
parent | 282e0c87f223afbe8b182197eb06c127a66353ce (diff) | |
download | kernel_samsung_aries-de1b8b93a0ba016b07d13086a15ad692536e6995.zip kernel_samsung_aries-de1b8b93a0ba016b07d13086a15ad692536e6995.tar.gz kernel_samsung_aries-de1b8b93a0ba016b07d13086a15ad692536e6995.tar.bz2 |
[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>
Diffstat (limited to 'sound/core/oss')
-rw-r--r-- | sound/core/oss/pcm_oss.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sound/core/oss/pcm_oss.c b/sound/core/oss/pcm_oss.c index 505b23e..e0821eb 100644 --- a/sound/core/oss/pcm_oss.c +++ b/sound/core/oss/pcm_oss.c @@ -2359,7 +2359,8 @@ static int snd_pcm_oss_release(struct inode *inode, struct file *file) substream = pcm_oss_file->streams[SNDRV_PCM_STREAM_CAPTURE]; snd_assert(substream != NULL, return -ENXIO); pcm = substream->pcm; - snd_pcm_oss_sync(pcm_oss_file); + if (!pcm->card->shutdown) + snd_pcm_oss_sync(pcm_oss_file); mutex_lock(&pcm->open_mutex); snd_pcm_oss_release_file(pcm_oss_file); mutex_unlock(&pcm->open_mutex); |