* [PATCH] ALSA: usb-audio: Add quirk for Redragon H510-PRO Wireless headset
@ 2026-07-05 18:42 Agustin Luzardo
2026-07-07 18:31 ` [PATCH] ALSA: usb-audio: Do not drop per-channel feature controls marked get_cur_broken Agustin Luzardo
2026-07-08 10:39 ` [PATCH] ALSA: usb-audio: Add quirk for Redragon H510-PRO Wireless headset Takashi Iwai
0 siblings, 2 replies; 5+ messages in thread
From: Agustin Luzardo @ 2026-07-05 18:42 UTC (permalink / raw)
To: perex, tiwai; +Cc: linux-sound, linux-kernel, Agustin Luzardo
The device with USB ID 040b:0897 (Weltrend Semiconductor chipset,
sold rebranded as the Redragon H510-PRO Wireless headset, reporting
"XiiSound Technology Corporation" in its USB string descriptors)
reports a constant value on GET_CUR for its PCM Playback Volume
control while still supporting an actually tunable volume. This
trips the sticky-value detection in check_sticky_volume_control(),
which disables the mixer control entirely:
usb 1-4: 5:0: sticky mixer values (0/100/1 => 80), disabling
As a result, the device boots with playback volume effectively muted
and provides no way to raise it through the normal ALSA/PipeWire
mixer path.
Apply QUIRK_FLAG_MIXER_GET_CUR_BROKEN so the sticky check marks the
control as get_cur_broken and relies on the cached value instead of
disabling the mixer control outright.
Tested by backporting this quirk flag and the supporting
get_cur_broken logic onto a Linux 7.1.2-zen kernel build that does
not yet carry it, and confirming that after applying the flag the
kernel log changes from:
usb 1-4: 5:0: sticky mixer values (0/100/1 => 80), disabling
to:
usb 1-4: 5:0: broken mixer GET_CUR (0/100/1 => 80)
with the control usable via the driver's cached value afterward.
Signed-off-by: Agustin Luzardo <agustinluzardo09@gmail.com>
---
sound/usb/quirks.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/sound/usb/quirks.c b/sound/usb/quirks.c
index 0000000..0000000 100644
--- a/sound/usb/quirks.c
+++ b/sound/usb/quirks.c
@@ -2211,6 +2211,8 @@
DEVICE_FLG(0x03f0, 0x654a, /* HP 320 FHD Webcam */
QUIRK_FLAG_GET_SAMPLE_RATE | QUIRK_FLAG_MIC_RES_16),
+ DEVICE_FLG(0x040b, 0x0897, /* Weltrend Semiconductor, sold as Redragon H510-PRO Wireless headset */
+ QUIRK_FLAG_MIXER_GET_CUR_BROKEN),
DEVICE_FLG(0x041e, 0x3000, /* Creative SB Extigy */
QUIRK_FLAG_IGNORE_CTL_ERROR),
DEVICE_FLG(0x041e, 0x4080, /* Creative Live Cam VF0610 */
--
2.46.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH] ALSA: usb-audio: Do not drop per-channel feature controls marked get_cur_broken
2026-07-05 18:42 [PATCH] ALSA: usb-audio: Add quirk for Redragon H510-PRO Wireless headset Agustin Luzardo
@ 2026-07-07 18:31 ` Agustin Luzardo
2026-07-08 10:40 ` Takashi Iwai
2026-07-08 18:35 ` Agustin Luzardo
2026-07-08 10:39 ` [PATCH] ALSA: usb-audio: Add quirk for Redragon H510-PRO Wireless headset Takashi Iwai
1 sibling, 2 replies; 5+ messages in thread
From: Agustin Luzardo @ 2026-07-07 18:31 UTC (permalink / raw)
To: perex, tiwai; +Cc: linux-sound, linux-kernel, Agustin Luzardo
When a per-channel Feature Unit control (e.g. a stereo PCM Playback
Volume control) hits the sticky-mixer check during get_min_max_with_quirks(),
and the device carries QUIRK_FLAG_MIXER_GET_CUR_BROKEN, the sticky
check marks the control as cval->get_cur_broken and returns -ENXIO
instead of disabling it outright.
However, __build_feature_ctl() does not know about this and treats
any negative return other than -EAGAIN as fatal, discarding the
kcontrol entirely:
if ((ret < 0 && ret != -EAGAIN) || cval->max <= cval->min) {
...
snd_ctl_free_one(kctl);
return;
}
For a stereo device where only some channels trip the sticky check,
this silently drops the per-channel (stereo) control while the
master-only control (built separately, without going through the
same channel-specific GET_CUR negotiation) survives. The result is
that the user is left with a single mono/master volume control
instead of the independent per-channel controls the device actually
supports, with no visible error (usb_audio_dbg is typically compiled
out).
This was observed on a Weltrend Semiconductor 040b:0897 device (sold
as the Redragon H510-PRO Wireless headset), which reports a genuine
stereo Feature Unit (bNrChannels = 2, bmaControls with Volume set for
both channels) but ends up exposing only a single-channel "PCM
Playback Volume" control once QUIRK_FLAG_MIXER_GET_CUR_BROKEN is
applied for that device.
Skip the discard when the control was already marked get_cur_broken,
as long as a sane range was otherwise established.
Signed-off-by: Agustin Luzardo <agustinluzardo09@gmail.com>
---
sound/usb/mixer.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/sound/usb/mixer.c b/sound/usb/mixer.c
index 0000000..0000000 100644
--- a/sound/usb/mixer.c
+++ b/sound/usb/mixer.c
@@ -1970,8 +1970,10 @@ static void __build_feature_ctl(struct usb_mixer_interface *mixer,
/* get min/max values */
ret = get_min_max_with_quirks(cval, 0, kctl);
- /* skip a bogus volume range */
- if ((ret < 0 && ret != -EAGAIN) || cval->max <= cval->min) {
+ /* skip a bogus volume range, unless the sticky check already
+ * marked this control as usable via the driver's cached value
+ * (QUIRK_FLAG_MIXER_GET_CUR_BROKEN) */
+ if ((ret < 0 && ret != -EAGAIN && !cval->get_cur_broken) ||
+ cval->max <= cval->min) {
usb_audio_dbg(mixer->chip,
"[%d] FU [%s] skipped due to invalid volume\n",
cval->head.id, kctl->id.name);
--
2.46.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] ALSA: usb-audio: Add quirk for Redragon H510-PRO Wireless headset
2026-07-05 18:42 [PATCH] ALSA: usb-audio: Add quirk for Redragon H510-PRO Wireless headset Agustin Luzardo
2026-07-07 18:31 ` [PATCH] ALSA: usb-audio: Do not drop per-channel feature controls marked get_cur_broken Agustin Luzardo
@ 2026-07-08 10:39 ` Takashi Iwai
1 sibling, 0 replies; 5+ messages in thread
From: Takashi Iwai @ 2026-07-08 10:39 UTC (permalink / raw)
To: Agustin Luzardo; +Cc: perex, tiwai, linux-sound, linux-kernel
On Sun, 05 Jul 2026 20:42:27 +0200,
Agustin Luzardo wrote:
>
> The device with USB ID 040b:0897 (Weltrend Semiconductor chipset,
> sold rebranded as the Redragon H510-PRO Wireless headset, reporting
> "XiiSound Technology Corporation" in its USB string descriptors)
> reports a constant value on GET_CUR for its PCM Playback Volume
> control while still supporting an actually tunable volume. This
> trips the sticky-value detection in check_sticky_volume_control(),
> which disables the mixer control entirely:
>
> usb 1-4: 5:0: sticky mixer values (0/100/1 => 80), disabling
>
> As a result, the device boots with playback volume effectively muted
> and provides no way to raise it through the normal ALSA/PipeWire
> mixer path.
>
> Apply QUIRK_FLAG_MIXER_GET_CUR_BROKEN so the sticky check marks the
> control as get_cur_broken and relies on the cached value instead of
> disabling the mixer control outright.
>
> Tested by backporting this quirk flag and the supporting
> get_cur_broken logic onto a Linux 7.1.2-zen kernel build that does
> not yet carry it, and confirming that after applying the flag the
> kernel log changes from:
>
> usb 1-4: 5:0: sticky mixer values (0/100/1 => 80), disabling
>
> to:
>
> usb 1-4: 5:0: broken mixer GET_CUR (0/100/1 => 80)
>
> with the control usable via the driver's cached value afterward.
>
> Signed-off-by: Agustin Luzardo <agustinluzardo09@gmail.com>
Applied this one now. Thanks.
Takashi
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ALSA: usb-audio: Do not drop per-channel feature controls marked get_cur_broken
2026-07-07 18:31 ` [PATCH] ALSA: usb-audio: Do not drop per-channel feature controls marked get_cur_broken Agustin Luzardo
@ 2026-07-08 10:40 ` Takashi Iwai
2026-07-08 18:35 ` Agustin Luzardo
1 sibling, 0 replies; 5+ messages in thread
From: Takashi Iwai @ 2026-07-08 10:40 UTC (permalink / raw)
To: Agustin Luzardo; +Cc: perex, tiwai, linux-sound, linux-kernel
On Tue, 07 Jul 2026 20:31:33 +0200,
Agustin Luzardo wrote:
>
> When a per-channel Feature Unit control (e.g. a stereo PCM Playback
> Volume control) hits the sticky-mixer check during get_min_max_with_quirks(),
> and the device carries QUIRK_FLAG_MIXER_GET_CUR_BROKEN, the sticky
> check marks the control as cval->get_cur_broken and returns -ENXIO
> instead of disabling it outright.
>
> However, __build_feature_ctl() does not know about this and treats
> any negative return other than -EAGAIN as fatal, discarding the
> kcontrol entirely:
>
> if ((ret < 0 && ret != -EAGAIN) || cval->max <= cval->min) {
> ...
> snd_ctl_free_one(kctl);
> return;
> }
>
> For a stereo device where only some channels trip the sticky check,
> this silently drops the per-channel (stereo) control while the
> master-only control (built separately, without going through the
> same channel-specific GET_CUR negotiation) survives. The result is
> that the user is left with a single mono/master volume control
> instead of the independent per-channel controls the device actually
> supports, with no visible error (usb_audio_dbg is typically compiled
> out).
>
> This was observed on a Weltrend Semiconductor 040b:0897 device (sold
> as the Redragon H510-PRO Wireless headset), which reports a genuine
> stereo Feature Unit (bNrChannels = 2, bmaControls with Volume set for
> both channels) but ends up exposing only a single-channel "PCM
> Playback Volume" control once QUIRK_FLAG_MIXER_GET_CUR_BROKEN is
> applied for that device.
>
> Skip the discard when the control was already marked get_cur_broken,
> as long as a sane range was otherwise established.
>
> Signed-off-by: Agustin Luzardo <agustinluzardo09@gmail.com>
Hm, by some reason, this patch couldn't be applied cleanly via git-am.
It seems that your mailer screwed up.
Could you try to resubmit after correcting the setup?
At best, try to submit to yourself and verify that you can do properly
apply the patch from the mail beforehand.
thanks,
Takashi
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ALSA: usb-audio: Do not drop per-channel feature controls marked get_cur_broken
2026-07-07 18:31 ` [PATCH] ALSA: usb-audio: Do not drop per-channel feature controls marked get_cur_broken Agustin Luzardo
2026-07-08 10:40 ` Takashi Iwai
@ 2026-07-08 18:35 ` Agustin Luzardo
1 sibling, 0 replies; 5+ messages in thread
From: Agustin Luzardo @ 2026-07-08 18:35 UTC (permalink / raw)
To: perex, tiwai; +Cc: linux-sound, linux-kernel
Please disregard this patch - after further testing I found real
regressions with it (non-independent channels, duplicated device
chimes on boot and even on shutdown). No need to resubmit it.
The first patch (quirk_flags mixer_get_cur_broken for 040b:0897,
already applied) is the one that should stay - please just ignore
this second one.
Thanks,
Agustin
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-07-08 18:36 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-05 18:42 [PATCH] ALSA: usb-audio: Add quirk for Redragon H510-PRO Wireless headset Agustin Luzardo
2026-07-07 18:31 ` [PATCH] ALSA: usb-audio: Do not drop per-channel feature controls marked get_cur_broken Agustin Luzardo
2026-07-08 10:40 ` Takashi Iwai
2026-07-08 18:35 ` Agustin Luzardo
2026-07-08 10:39 ` [PATCH] ALSA: usb-audio: Add quirk for Redragon H510-PRO Wireless headset Takashi Iwai
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox