ALSA: usb-audio: Skip broken playback feature unit on XiiSound chips
Subsystems (2)
PATCH v3 1/1 ALSA: usb-audio: Skip broken playback feature unit on XiiSound chips
Weltrend XiiSound-based devices (040b:0897, e.g. Redragon H878 wireless headset) expose a UAC1 playback feature unit whose volume and mute controls are unusable in practice: the reported per-channel dB range is only 0..+0.39dB, yet setting any volume below the maximum mutes one or even both channels, and the mapping between logical and physical channels is unreliable. Any attempt by userspace to drive the hardware volume therefore results in muted or one-sided audio.
Ignore the playback feature unit via a usbmix_name_map so that userspace falls back to software volume, and pin the unit's master and per-channel volumes to the reported maximum with mutes cleared when the mixer is created, so the signal path always stays fully open. The capture path (microphone feature unit) is not affected and keeps working.
Tested with a Redragon H878 wireless headset on PipeWire/PulseAudio:
stereo output works on both channels at any volume, software volume applies smoothly, and mute/unmute works.
---
Changes in v3:
- Re-pin the playback feature unit on resume via snd_usb_mixer_resume_quirk(), as the device may lose its state over suspend (Sashiko AI review).
- Validate the UAC_GET_MAX read length instead of only checking for negative errors, to avoid pinning with a short read (Sashiko AI review).
Changes in v2:
- Skip the broken playback feature unit via a usbmix_name_map in mixer_maps.c instead of open-coding the skip in the FU parser, as suggested by Takashi Iwai.
sound/usb/mixer_maps.c | 19 +++++++++++++ sound/usb/mixer_quirks.c | 59 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 78 insertions(+)
sound/usb/mixer_maps.c +19 -0
@@ -374,6 +374,20 @@ static const struct usbmix_name_map dell_alc4020_map[] = { { 0 } }; +/* +* Weltrend XiiSound chips (040b:0897, e.g. Redragon H878): +* the playback feature unit is broken; its volume controls act like +* mute switches below the maximum value and the channel mapping is +* unreliable, so any hardware volume change mutes one or both +* channels. Skip the unit entirely and let userspace fall back to +* software volume; the unit is pinned to maximum/unmuted by the +* mixer quirk in mixer_quirks.c. +*/ +static const struct usbmix_name_map xiisound_map[] = { + {5 ,NULL },/* playback feature unit */ + {0 } +}; +/* * Corsair Virtuoso calls everything "Headset" without this, leading to * applications moving the sidetone control instead of the main one.
@@ -790,6 +804,11 @@ static const struct usbmix_ctl_map usbmix_ctl_maps[] = { .id = USB_ID(0x1395, 0x0025), .map = sennheiser_pc8_map, }, + { +/* Weltrend XiiSound (Redragon H878) */ + .id = USB_ID(0x040b, 0x0897), + .map = xiisound_map, + }, {/* Microsoft USB Link headset */ .id = USB_ID(0x045e, 0x083c),
sound/usb/mixer_quirks.c +59 -0
77 lines not on this page · raw message
Signature · 1 line
2.43.0
Takashi Iwai
AppliedQuoted 17 lines · Cristiano Souza
Weltrend XiiSound-based devices (040b:0897, e.g. Redragon H878 wireless headset) expose a UAC1 playback feature unit whose volume and mute controls are unusable in practice: the reported per-channel dB range is only 0..+0.39dB, yet setting any volume below the maximum mutes one or even both channels, and the mapping between logical and physical channels is unreliable. Any attempt by userspace to drive the hardware volume therefore results in muted or one-sided audio.
Ignore the playback feature unit via a
usbmix_name_mapso that userspace falls back to software volume, and pin the unit's master and per-channel volumes to the reported maximum with mutes cleared when the mixer is created, so the signal path always stays fully open. The capture path (microphone feature unit) is not affected and keeps working.
Quoted 6 lines
Tested with a Redragon H878 wireless headset on PipeWire/PulseAudio:
stereo output works on both channels at any volume, software volume applies smoothly, and mute/unmute works.Signed-off-by Cristiano Souza <[email protected]>
Applied to for-next branch. Thanks.
Takashi