Re: [PATCH 0/3] ALSA: usb-audio: Refactor mixer checks and add check for sticky mixers
From: Takashi Iwai
Date: Sat Apr 11 2026 - 04:04:11 EST
On Fri, 10 Apr 2026 19:49:01 +0200,
Rong Zhang wrote:
>
> All callers of get_min_max*() ignore the latter's return code
> completely. This means to ignore temporary errors at the probe time.
> However, it is not optimal and leads to some maintenance burdens.
> Besides, get_min_max_with_quirks() is too lengthy and hard to read.
>
> Some devices' mixers are sticky, which accept SET_CUR but do absolutely
> nothing. Registering these mixers confuses userspace and results in
> ineffective volume control.
>
> Patch 1 makes get_min_max*() return -EAGAIN for temporary errors, and
> check against it in the callers of get_min_max*(). If any other error
> occurs, bail out of the caller early.
>
> Patch 2 moves the volume control resolution check code into a function
> as it's relatively self-contained.
>
> Patch 3 checks if a mixer is sticky by setting the volume to the maximum
> or minimum value and checking for effectiveness afterward, and prevents
> the mixer from being registered if it turns out to be sticky.
>
> Quirky device sample:
>
> usb 7-1: New USB device found, idVendor=0e0b, idProduct=fa01, bcdDevice= 1.00
> usb 7-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
> usb 7-1: Product: Feaulle Rainbow
> usb 7-1: Manufacturer: Generic
> usb 7-1: SerialNumber: 20210726905926
> (Mic Capture Volume)
>
> This series is separated from https://lore.kernel.org/r/20260409-feaulle-rainbow-v1-2-09179e09000d@xxxxxxxx
>
> Signed-off-by: Rong Zhang <i@xxxxxxxx>
> ---
> Rong Zhang (3):
> ALSA: usb-audio: Add error checks against get_min_max*()
> ALSA: usb-audio: Move volume control resolution check into a function
> ALSA: usb-audio: Do not expose sticky mixers
Applied all three patches now. Thanks.
Takashi