summaryrefslogtreecommitdiff
path: root/sys/dev/hid
diff options
context:
space:
mode:
authorAnton Lindqvist <anton@cvs.openbsd.org>2021-09-01 10:41:40 +0000
committerAnton Lindqvist <anton@cvs.openbsd.org>2021-09-01 10:41:40 +0000
commit21369d9fdf4619c60872a98e37a04fc97912389e (patch)
tree89b268081f5c949a022393bf5e2398a4a2bbb2f8 /sys/dev/hid
parente4158bce64461d221590bd49fb34cc3d83cc0681 (diff)
Add support for the more rare volume usage which differs compared to the
more common volume increment/decrement usages in which each volume change direction is represented using a distinct usage. The volume usage instead uses bits of the interrupt buffer to represent the wanted volume. The same bits should be within the bounds given by the logical min/max associated with the HID item. However, the volume is not interpreted as an absolute value but rather just looking at the sign bit in order to determine the volume change direction. I couldn't find any documentation of this usage and the implementation is therefore solely based on analysing actual data from Richard Toohey's <richardjtoohey at gmail dot com> Dell keyboard.
Diffstat (limited to 'sys/dev/hid')
-rw-r--r--sys/dev/hid/hid.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/hid/hid.h b/sys/dev/hid/hid.h
index 06f6350ed75..28de534124e 100644
--- a/sys/dev/hid/hid.h
+++ b/sys/dev/hid/hid.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: hid.h,v 1.8 2021/08/20 05:19:08 anton Exp $ */
+/* $OpenBSD: hid.h,v 1.9 2021/09/01 10:41:39 anton Exp $ */
/* $NetBSD: hid.h,v 1.8 2002/07/11 21:14:25 augustss Exp $ */
/* $FreeBSD: src/sys/dev/usb/hid.h,v 1.7 1999/11/17 22:33:40 n_hibma Exp $ */
@@ -401,6 +401,7 @@ int hid_is_collection(const void *, int, uint8_t, int32_t);
#define HUC_TRACK_PREV 0x00b6
#define HUC_STOP 0x00b7
#define HUC_PLAY_PAUSE 0x00cd
+#define HUC_VOLUME 0x00e0
#define HUC_MUTE 0x00e2
#define HUC_VOL_INC 0x00e9
#define HUC_VOL_DEC 0x00ea