diff options
author | Alexandre Ratchov <ratchov@cvs.openbsd.org> | 2020-03-08 15:15:58 +0000 |
---|---|---|
committer | Alexandre Ratchov <ratchov@cvs.openbsd.org> | 2020-03-08 15:15:58 +0000 |
commit | fd2ca2dd830df557bc0c425981aa7f7219918fe4 (patch) | |
tree | a8fceeb1cdfb5538f680696f214426f2e1d4dbd6 /sys/dev | |
parent | 95cc480f4e7a9f6397099466adfd5e8861c09c7f (diff) |
Wake up processes reading the mixer when the device is detached.
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/audio.c | 6 |
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)); |