Skip to contentSkip to conversation

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

PATCH Applied Thomas Weißschuh 2 participants 3 messages Jul 20, 2021 – Jul 28, 2021 HID

lore
Share & tools
lore
#0 lore raw

PATCH v4 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

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

v3 -> v4:
* Create a dedicated struct hid_driver, leaving the existing intact
* Drop entry in hid-quirks.c

 drivers/hid/Kconfig      |  5 ++-
 drivers/hid/hid-cmedia.c | 90 +++++++++++++++++++++++++++++++++++++++-
 drivers/hid/hid-ids.h    |  1 +
 3 files changed, 92 insertions(+), 4 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 +88 -2

114 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

base-commit: 1b97ec646386cea5b4be139f7685b4a4b4d3799a

Signature · 1 line
2.32.0
maintainer Applied
#1 lore raw
Quoted 19 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.

---

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

Quoted 5 lines

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

v3 -> v4:
* Create a dedicated struct hid_driver, leaving the existing intact
* Drop entry in hid-quirks.c

Applied, thanks Thomas.

Signature · 2 lines
Jiri Kosina
SUSE Labs
#2 lore raw
Quoted 7 lines · Jiri Kosina
Quoted 3 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.

Applied, thanks Thomas.

Thanks Jiri!

Thomas