Skip to contentSkip to conversation

HID: cmedia: add support for HS-100B mute button

PATCH Superseded Thomas Weißschuh 1 participant 1 message Jul 16, 2021 HID

v2 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 HID: cmedia: add support for HS-100B mute button

These chips report mute button events in bit 4 of their report without it being part of the report descriptor.
Use a custom descriptor that maps this bit.

---

v1: https://lore.kernel.org/linux-input/[email protected]/

v1 -> v2:
* Merged into the existing cmedia driver instead of creating a dedicated driver.

 drivers/hid/Kconfig      |   5 +-
 drivers/hid/hid-cmedia.c | 100 ++++++++++++++++++++++++++++++++++-----
 drivers/hid/hid-ids.h    |   1 +
 drivers/hid/hid-quirks.c |   1 +
 4 files changed, 94 insertions(+), 13 deletions(-)
drivers/hid/Kconfig +3 -2
index 160554903ef9..6f72ecd79db0 100644
@@ -259,10 +259,11 @@ config HID_PRODIKEYS
 	  and some additional multimedia keys.
 
 config HID_CMEDIA
-	tristate "CMedia CM6533 HID audio jack controls"
+	tristate "CMedia audio chips"
 	depends on HID
 	help
-	Support for CMedia CM6533 HID audio jack controls.
+	Support for CMedia CM6533 HID audio jack controls
+        and HS100B mute buttons.
 
 config HID_CP2112
 	tristate "Silicon Labs CP2112 HID USB-to-SMBus Bridge support"
drivers/hid/hid-cmedia.c +89 -11

181 lines not on this page · raw message

drivers/hid/hid-ids.h +1 -0
index 8f1893e68112..6864e4e6ac8b 100644
@@ -292,6 +292,7 @@
 
 #define USB_VENDOR_ID_CMEDIA		0x0d8c
 #define USB_DEVICE_ID_CM109		0x000e
+#define USB_DEVICE_ID_CMEDIA_HS100B	0x0014
 #define USB_DEVICE_ID_CM6533		0x0022
 
 #define USB_VENDOR_ID_CODEMERCS		0x07c0
drivers/hid/hid-quirks.c +1 -0
index 51b39bda9a9d..8c1813abd86f 100644
@@ -345,6 +345,7 @@ static const struct hid_device_id hid_have_special_driver[] = {
 #endif
 #if IS_ENABLED(CONFIG_HID_CMEDIA)
 	{ HID_USB_DEVICE(USB_VENDOR_ID_CMEDIA, USB_DEVICE_ID_CM6533) },
+	{ HID_USB_DEVICE(USB_VENDOR_ID_CMEDIA, USB_DEVICE_ID_CMEDIA_HS100B) },
 #endif
 #if IS_ENABLED(CONFIG_HID_CORSAIR)
 	{ HID_USB_DEVICE(USB_VENDOR_ID_CORSAIR, USB_DEVICE_ID_CORSAIR_K90) },

base-commit: 1b97ec646386cea5b4be139f7685b4a4b4d3799a

Signature · 1 line
2.32.0