aboutsummaryrefslogtreecommitdiffstats
path: root/sound/core/pcm.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/core/pcm.c')
-rw-r--r--sound/core/pcm.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sound/core/pcm.c b/sound/core/pcm.c
index 993b2405fdfe..030102caeee9 100644
--- a/sound/core/pcm.c
+++ b/sound/core/pcm.c
@@ -1087,12 +1087,16 @@ static int snd_pcm_dev_disconnect(struct snd_device *device)
1087 goto unlock; 1087 goto unlock;
1088 1088
1089 mutex_lock(&pcm->open_mutex); 1089 mutex_lock(&pcm->open_mutex);
1090 wake_up(&pcm->open_wait);
1090 list_del_init(&pcm->list); 1091 list_del_init(&pcm->list);
1091 for (cidx = 0; cidx < 2; cidx++) 1092 for (cidx = 0; cidx < 2; cidx++)
1092 for (substream = pcm->streams[cidx].substream; substream; substream = substream->next) { 1093 for (substream = pcm->streams[cidx].substream; substream; substream = substream->next) {
1093 snd_pcm_stream_lock_irq(substream); 1094 snd_pcm_stream_lock_irq(substream);
1094 if (substream->runtime) 1095 if (substream->runtime) {
1095 substream->runtime->status->state = SNDRV_PCM_STATE_DISCONNECTED; 1096 substream->runtime->status->state = SNDRV_PCM_STATE_DISCONNECTED;
1097 wake_up(&substream->runtime->sleep);
1098 wake_up(&substream->runtime->tsleep);
1099 }
1096 snd_pcm_stream_unlock_irq(substream); 1100 snd_pcm_stream_unlock_irq(substream);
1097 } 1101 }
1098 list_for_each_entry(notify, &snd_pcm_notify_list, list) { 1102 list_for_each_entry(notify, &snd_pcm_notify_list, list) {