mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-07-16 17:57:38 -04:00
ALSA: usb-audio: Fix imbalance per-channel volume of sticky mixers
I accidentally made an off-by-a-line mistake when mimicking other code
paths that set all channels. The mistake breaks sticky mixers with
multiple channels.
I didn't realize this mistake at that time, as my device's mixer is
single-channel.
Fix it, so that per-channel volume of sticky mixers is balanced.
Fixes: aa2f4addab ("ALSA: usb-audio: Set the value of potential sticky mixers to maximum")
Signed-off-by: Rong Zhang <i@rong.moe>
Link: https://patch.msgid.link/20260706-uac-sticky-channels-fix-v1-1-92741c538283@rong.moe
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
@@ -1473,8 +1473,8 @@ static int get_min_max_with_quirks(struct usb_mixer_elem_info *cval,
|
||||
if (!cval->cmask) {
|
||||
snd_usb_set_cur_mix_value(cval, 0, 0, cval->max);
|
||||
} else {
|
||||
idx = 0;
|
||||
for (i = 0; i < MAX_CHANNELS; i++) {
|
||||
idx = 0;
|
||||
if (cval->cmask & BIT(i)) {
|
||||
snd_usb_set_cur_mix_value(cval, i + 1, idx, cval->max);
|
||||
idx++;
|
||||
|
||||
Reference in New Issue
Block a user