public inbox for linux-sound@vger.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Rong Zhang <i@rong.moe>
Cc: Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
	Icenowy Zheng <uwu@icenowy.me>,
	linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org,
	Takashi Iwai <tiwai@suse.de>
Subject: Re: [PATCH 0/3] ALSA: usb-audio: Refactor mixer checks and add check for sticky mixers
Date: Sat, 11 Apr 2026 10:03:50 +0200	[thread overview]
Message-ID: <87bjfpgbyx.wl-tiwai@suse.de> (raw)
In-Reply-To: <20260411-uac-sticky-mixer-v1-0-29d62717befd@rong.moe>

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@rong.moe
> 
> Signed-off-by: Rong Zhang <i@rong.moe>
> ---
> 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

      parent reply	other threads:[~2026-04-11  8:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-10 17:49 [PATCH 0/3] ALSA: usb-audio: Refactor mixer checks and add check for sticky mixers Rong Zhang
2026-04-10 17:49 ` [PATCH 1/3] ALSA: usb-audio: Add error checks against get_min_max*() Rong Zhang
2026-04-10 17:49 ` [PATCH 2/3] ALSA: usb-audio: Move volume control resolution check into a function Rong Zhang
2026-04-10 17:49 ` [PATCH 3/3] ALSA: usb-audio: Do not expose sticky mixers Rong Zhang
2026-04-11  8:03 ` Takashi Iwai [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87bjfpgbyx.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=i@rong.moe \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.com \
    --cc=uwu@icenowy.me \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox