Re: [PATCH] USB Audio Class 2 Mixer unit support for GET_CUR, SET_CUR and RANGE

From: Takashi Iwai

Date: Tue Sep 15 2026 - 07:26:13 EST


On Tue, 15 Sep 2026 10:54:00 +0200,
Zipdox wrote:
>
> Hello,
>
> The USB Audio Mixer Unit driver (sound/usb/mixer.c) sends audio class
> 1.0 format control messages to devices, regardless of the actual audio
> class version. This means audio class 2.0 devices will receive incorrect
> messages, stall, and cause the driver to error (e.g. alsamixer exits
> with a broken pipe error).

Hmm, for UAC2, UAC_GET_CUR & co isn't passed as is at all, but the
call is translated to UAC2_CS_CUR and UAC2_CS_RANGE accordingly in
get_ctl_value_v2() (that is called from get_ctl_value()
conditionally). So this translation path was skipped somehow with
your device...?


> This patch implements the GET_CUR, SET_CUR,
> and RANGE control requests for mixer units according to the Audio Class
> 2.0 specification.
>
> I have one question though, which has to do with the get_cur_mix_raw
> function. It states "channel = 0: master, 1 = first channel", but as far
> as I know the spec doesn't specify a master control for mixer units. I
> implemented it so that channel 0 results the channel 1 value, but maybe
> some other solution is desirable.
>
> From: Zipdox <zipdox@xxxxxxxxxx>
> Date: Tue, 15 Sep 2026 10:12:01 +0200
> Subject: [PATCH] USB Audio Class 2 Mixer unit support for GET_CUR, SET_CUR and
> RANGE
>
> Signed-off-by: Zipdox <zipdox@xxxxxxxxxx>

Could you try to reformat in a proper patch format?
Also, it looks containing many unnecessary / unrelated changes that
make review more difficult. Please try to concentrate only on the
change you really need.


thanks,

Takashi