forked from rubenslte/android_kernel_samsung_msm8226
Merge "ALSA: Avoid endless sleep after disconnect"
This commit is contained in:
committed by
Gerrit - the friendly Code Review server
commit
e756f4de05
+4
-1
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user