summaryrefslogtreecommitdiff
path: root/sys/dev/audio.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/audio.c')
-rw-r--r--sys/dev/audio.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/dev/audio.c b/sys/dev/audio.c
index 23d030090e7..35a9908e2df 100644
--- a/sys/dev/audio.c
+++ b/sys/dev/audio.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: audio.c,v 1.187 2020/02/13 21:00:48 ratchov Exp $ */
+/* $OpenBSD: audio.c,v 1.188 2020/03/08 15:15:57 ratchov Exp $ */
/*
* Copyright (c) 2015 Alexandre Ratchov <alex@caoua.org>
*
@@ -1370,6 +1370,10 @@ audio_detach(struct device *self, int flags)
sc->ops->close(sc->arg);
sc->mode = 0;
}
+ if (sc->mix_isopen) {
+ wakeup(&sc->mix_blocking);
+ selwakeup(&sc->mix_sel);
+ }
/* free resources */
free(sc->mix_evbuf, M_DEVBUF, sc->mix_nent * sizeof(struct mixer_ev));