Merge "ALSA: Avoid endless sleep after disconnect"

This commit is contained in:
Linux Build Service Account
2014-11-08 12:56:17 -08:00
committed by Gerrit - the friendly Code Review server
+4 -1
View File
@@ -1216,8 +1216,11 @@ static int snd_pcm_dev_disconnect(struct snd_device *device)
list_del_init(&pcm->list);
for (cidx = 0; cidx < 2; cidx++)
for (substream = pcm->streams[cidx].substream; substream; substream = substream->next)
if (substream->runtime)
if (substream->runtime) {
substream->runtime->status->state = SNDRV_PCM_STATE_DISCONNECTED;
wake_up(&substream->runtime->sleep);
wake_up(&substream->runtime->tsleep);
}
list_for_each_entry(notify, &snd_pcm_notify_list, list) {
notify->n_disconnect(pcm);
}