HID: cmedia: add support for HS-100B mute button
PATCH v3 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.
v2: https://lore.kernel.org/linux-input/[email protected]/
v2 -> v3:
* Fixed cosmetic checkpatch warnings
* CC-ed Ben Chen who is the original author of hid-cmedia.c
drivers/hid/Kconfig | 5 +- drivers/hid/hid-cmedia.c | 99 +++++++++++++++++++++++++++++++++++----- drivers/hid/hid-ids.h | 1 + drivers/hid/hid-quirks.c | 1 + 4 files changed, 93 insertions(+), 13 deletions(-)
drivers/hid/Kconfig +3 -2
@@ -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 +88 -11
180 lines not on this page · raw message
drivers/hid/hid-ids.h +1 -0
@@ -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
@@ -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
Quoted 18 lines · Thomas Weißschuh
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.Signed-off-by Thomas Weißschuh <[email protected]>---
v1: https://lore.kernel.org/linux-input/[email protected]/v1 -> v2:
* Merged into the existing cmedia driver instead of creating a dedicated driver.v2: https://lore.kernel.org/linux-input/[email protected]/
v2 -> v3:
* Fixed cosmetic checkpatch warnings
* CC-ed Ben Chen who is the original author ofhid-cmedia.c
Quoted 6 lines
drivers/hid/Kconfig | 5 +- drivers/hid/hid-cmedia.c | 99 +++++++++++++++++++++++++++++++++++----- drivers/hid/hid-ids.h | 1 + drivers/hid/hid-quirks.c | 1 + 4 files changed, 93 insertions(+), 13 deletions(-)
FYI:
The Mail to Ben bounced, so we will probably have to do without his review.
Thomas