Support for CMedia CM6533 HID audio jack controls
PATCH v2 1/1 Support for CMedia CM6533 HID audio jack controls
The C-Media CM6533 is a USB audio chip featuring it's jack detection capability.The device originates an interrupt transfer via HID interface each time when a jack event occurs. The purpose of this patch is to handle hid raw events to keep the operating system informed of user interactions.
---
Changes in v2:
- The return type of input_configured callback has been changed from void to be int.
drivers/hid/Kconfig | 6 ++ drivers/hid/Makefile | 1 + drivers/hid/hid-cm6533.c | 168 +++++++++++++++++++++++++++++++++++++++++++++++ drivers/hid/hid-core.c | 1 + drivers/hid/hid-ids.h | 1 + 5 files changed, 177 insertions(+) create mode 100644 drivers/hid/hid-cm6533.c
drivers/hid/Kconfig +6 -0
@@ -196,6 +196,12 @@ config HID_PRODIKEYS multimedia keyboard, but will lack support for the musical keyboard and some additional multimedia keys. +config HID_CM6533 + tristate "CMedia CM6533 HID audio jack controls" + depends on HID + ---help--- + Support for CMedia CM6533 HID audio jack controls. + config HID_CP2112 tristate "Silicon Labs CP2112 HID USB-to-SMBus Bridge support" depends on USB_HID && I2C && GPIOLIB
drivers/hid/Makefile +1 -0
@@ -29,6 +29,7 @@ obj-$(CONFIG_HID_BELKIN) += hid-belkin.o obj-$(CONFIG_HID_BETOP_FF) += hid-betopff.o obj-$(CONFIG_HID_CHERRY) += hid-cherry.o obj-$(CONFIG_HID_CHICONY) += hid-chicony.o +obj-$(CONFIG_HID_CM6533) += hid-cm6533.o obj-$(CONFIG_HID_CORSAIR) += hid-corsair.o obj-$(CONFIG_HID_CP2112) += hid-cp2112.o obj-$(CONFIG_HID_CYPRESS) += hid-cypress.o
drivers/hid/hid-cm6533.c new file +168 -0
168 lines not on this page · raw message
drivers/hid/hid-core.c +1 -0
@@ -2056,6 +2056,7 @@ static const struct hid_device_id hid_have_special_driver[] = { { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_NINTENDO, USB_DEVICE_ID_NINTENDO_WIIMOTE) }, { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_NINTENDO, USB_DEVICE_ID_NINTENDO_WIIMOTE2) }, { HID_USB_DEVICE(USB_VENDOR_ID_RAZER, USB_DEVICE_ID_RAZER_BLADE_14) }, + { HID_USB_DEVICE(USB_VENDOR_ID_CMEDIA, USB_DEVICE_ID_CM6533) }, { } };
drivers/hid/hid-ids.h +1 -0
@@ -246,6 +246,7 @@#define USB_VENDOR_ID_CMEDIA 0x0d8c#define USB_DEVICE_ID_CM109 0x000e +#define USB_DEVICE_ID_CM6533 0x0022#define USB_VENDOR_ID_CODEMERCS 0x07c0#define USB_DEVICE_ID_CODEMERCS_IOW_FIRST 0x1500
Signature · 1 line
1.9.1
Jiri Kosina
maintainerQuoted 11 lines · Ben Chen
The C-Media CM6533 is a USB audio chip featuring it's jack detection capability.The device originates an interrupt transfer via HID interface each time when a jack event occurs. The purpose of this patch is to handle hid raw events to keep the operating system informed of user interactions.
Signed-off-by Ben Chen <[email protected]>---
Changes in v2:
- The return type ofinput_configuredcallback has been changed from void to be int.drivers/hid/Kconfig | 6 ++ drivers/hid/Makefile | 1 + drivers/hid/hid-cm6533.c | 168 +++++++++++++++++++++++++++++++++++++++++++++++
We usually name the drivers according to the vendor name. IOW, I'd suggest you rename the driver to hid-cmedia.
Thanks,
Signature · 2 lines
Jiri Kosina SUSE Labs