The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Agustin Luzardo <agustinluzardo09@gmail.com>
Cc: perex@perex.cz, tiwai@suse.com, linux-sound@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ALSA: usb-audio: Do not drop per-channel feature controls marked get_cur_broken
Date: Wed, 08 Jul 2026 12:40:22 +0200	[thread overview]
Message-ID: <874ii969yh.wl-tiwai@suse.de> (raw)
In-Reply-To: <20260707183133.8113-1-agustinluzardo09@gmail.com>

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

  reply	other threads:[~2026-07-08 10:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

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=874ii969yh.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=agustinluzardo09@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.com \
    /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