ALSA: usb-audio: Set the value of potential sticky mixers to maximum
authorRong Zhang <i@rong.moe>
Sat, 30 May 2026 19:52:49 +0000 (03:52 +0800)
committerTakashi Iwai <tiwai@suse.de>
Sun, 31 May 2026 14:07:32 +0000 (16:07 +0200)
commitaa2f4addab44407c7aa742321de5dc1914ab5762
tree1c9d0d5f09044536ea579e4d3b5487bfa1277d8b
parent2c142b63c8ee982cdfdba49a616027c266294838
ALSA: usb-audio: Set the value of potential sticky mixers to maximum

It makes no sense to restore the saved value for a sticky mixer, since
setting any value is a no-op.

However, in some rare cases, SET_CUR is effective despite GET_CUR always
returns a constant value. These mixers are not sticky, but there's no
way to distinguish them. Without any additional information, the best
thing we can do is to set the mixer value to the maximum before bailing
out, so that a soft mixer can still reach the maximum hardware volume if
the mixer turns out to be non-sticky. Meanwhile, all channels must be
synchronized to prevent imbalance volume.

Fixes: 86aa1ea1f15c ("ALSA: usb-audio: Do not expose sticky mixers")
Signed-off-by: Rong Zhang <i@rong.moe>
Link: https://patch.msgid.link/20260531-uac-sticky-error-path-v1-1-12c2329d17ef@rong.moe
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/usb/mixer.c