Re: [PATCH] ALSA: usb-audio: Do not drop per-channel feature controls marked get_cur_broken
From: Takashi Iwai
Date: Wed Jul 08 2026 - 06:48:03 EST
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@xxxxxxxxx>
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