Re: [PATCH v2 1/2] ALSA: usb-audio: Add QUIRK_FLAG_MIXER_GET_CUR_BROKEN
From: Rong Zhang
Date: Thu May 28 2026 - 09:36:24 EST
Hi Takashi,
Thanks for your review.
On Thu, 2026-05-28 at 09:44 +0200, Takashi Iwai wrote:
> On Wed, 27 May 2026 20:56:27 +0200,
> Rong Zhang wrote:
> >
> > @@ -1258,6 +1261,16 @@ static int check_sticky_volume_control(struct usb_mixer_elem_info *cval,
> > return 0;
> > }
> >
> > + if (cval->head.mixer->chip->quirk_flags & QUIRK_FLAG_MIXER_GET_CUR_BROKEN) {
> > + usb_audio_warn(cval->head.mixer->chip,
> > + "%d:%d: broken mixer GET_CUR (%d/%d/%d => %d)\n",
> > + cval->head.id, mixer_ctrl_intf(cval->head.mixer),
> > + cval->min, cval->max, cval->res, saved);
> > +
>
> IMO, it's better to be usb_audio_info(). Otherwise it leads to an
> unnecessary caution. Basically the behavior is expected, so there is
> nothing to worry about that.
Hmm, makes sense.
With your suggestion, I also just realized that it makes no sense to
restore a garbage volume using snd_usb_set_cur_mix_value(..., saved)
when GET_CUR is broken. It would be probably better to rely on
init_cur_mix_raw() to initialize the mixer to cval->min instead, just
like what it does for mixers that return errors for GET_CUR.
Hence, I will turn it into a usb_audio_info(), clear cval->cached and
goto no_checks, so that init_cur_mix_raw() will initialize it properly.
The usb_audio_warn() in init_cur_mix_raw() will need to be gated by
cval->get_cur_broken in this case too.
Thanks for your suggestion,
Rong
>
>
> thanks,
>
> Takashi