summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkettenis <kettenis@openbsd.org>2015-02-07 01:49:05 +0000
committerkettenis <kettenis@openbsd.org>2015-02-07 01:49:05 +0000
commita9bfd655420a8c66263b7f74b41e75f024b14473 (patch)
treefa5b56f80fa9b50e6d69fcb0eaf7bf23b6a12227
parentTedu the old idle page zeroing code. (diff)
downloadwireguard-openbsd-a9bfd655420a8c66263b7f74b41e75f024b14473.tar.xz
wireguard-openbsd-a9bfd655420a8c66263b7f74b41e75f024b14473.zip
Let a volume key event unmute. This makes the software state follow the
hardware behaviour on Thinkpads making it harder for software state and hardware state get out of sync. ok deraadt@
-rw-r--r--sys/dev/audio.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/sys/dev/audio.c b/sys/dev/audio.c
index 730d96928b0..d20542f87ea 100644
--- a/sys/dev/audio.c
+++ b/sys/dev/audio.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: audio.c,v 1.127 2015/01/27 03:17:35 dlg Exp $ */
+/* $OpenBSD: audio.c,v 1.128 2015/02/07 01:49:05 kettenis Exp $ */
/* $NetBSD: audio.c,v 1.119 1999/11/09 16:50:47 augustss Exp $ */
/*
@@ -3521,6 +3521,18 @@ wskbd_set_mixervolume_callback(void *xch)
DPRINTF(("%s: au_set_gain: %d\n", __func__, error));
goto done;
}
+
+ /*
+ * Unmute whenever we raise or lower the volume. This
+ * mimicks the behaviour of the hardware volume
+ * buttons on Thinkpads making sure that our software
+ * mute state follows the hardware mute state.
+ */
+ error = au_set_mute(sc, ports, 0);
+ if (error != 0) {
+ DPRINTF(("%s: au_set_mute: %d\n", __func__, error));
+ goto done;
+ }
}
done: