HyperX Driver Coming For Linux 7.3 Just To Report A Microphone's Mute Status

HyperX Driver Coming For Linux 7.3 Just To Report A Microphone's Mute Status

A new driver coming for the Linux 7.3 kernel is HID-HyperX. It's not some new driver to support fancy hardware and some nifty features but rather mundane in nature due to the poor behavior of a high-end HyperX USB gaming microphone. The HID-HyperX driver currently amounts to handling the mute button reporting of the HyperX QuadCast 2 USB gaming microphone. This is a high-end USB gaming microphone with reported "studio quality recording" and has a list price of $149 USD. Among its features are a "tap-to-mute sensor" but it's that mute sensor/button that doesn't behave nicely under Linux. Benjamin Blume who authored this HID-HyperX open-source driver explained of the microphone's behavior in Linux never knowing that the microphone is muted: "The tap-to-mute button of the HyperX QuadCast 2 (03f0:07b4) is handled entirely in the device firmware. The firmware gates the audio internally but never sends the Telephony "Phone Mute" usage (0x2f) that its own report descriptor advertises, and it does not touch the UAC feature unit either. Consequently neither an evdev key event nor an ALSA mixer change is ever generated, and userspace has no way to learn that the microphone was muted: desktops keep showing the microphone as live, and conferencing applications keep displaying an unmuted microphone while transmitting silence. The mute state is reported through a vendor-defined collection instead: 06 c0 ff Usage Page (Vendor-Defined 0xFFC0) a1 01 Collection (Application) 06 c1 ff Usage Page (Vendor-Defined 0xFFC1) 85 77 Report ID (0x77) 09 f0 Usage (0xF0) 75 08 95 3f Report Size (8), Report Count (63) 81 02 Input (Data,Var,Abs) Pressing the button emits a 64-byte report on that collection: 77 06 00 00 ... microphone unmuted 77 06 01 00 ... microphone muted where byte 1 identifies the mute event and byte 2 carries the resulting state. As the payload is an opaque vendor blob carrying no HID usages, hid-input cannot map it and a hwdb entry cannot express it either. Add a driver that decodes the report and emits KEY_MICMUTE, which makes the button behave like any other microphone mute key. Note that the device reports the resulting absolute state, whereas KEY_MICMUTE is a momentary key that userspace acts on as a toggle, so the driver emits one keypress per state change. Tested on a HyperX QuadCast 2 (03f0:07b4)." This patch now in the HID subsystem's "for-next" Git branch adds the 117 lines of C code driver for properly handling the mute button at least for now just on the HyperX QuadCast 2. In turn this driver will be merged later in the month for Linux 7.3. The rest of the functionality of this USB gaming microphone should be working fine on Linux and now soon it's mute status too.

Original Source

Read the full article at Phoronix →

KhanList aggregates and links to publicly available news content. We do not host full articles from third-party sources. Always verify important information with original sources.