* [PATCH] ALSA: usb-audio: Fix imbalance per-channel volume of sticky mixers
@ 2026-07-05 18:19 Rong Zhang
2026-07-06 8:23 ` Takashi Iwai
0 siblings, 1 reply; 2+ messages in thread
From: Rong Zhang @ 2026-07-05 18:19 UTC (permalink / raw)
To: Jaroslav Kysela, Takashi Iwai
Cc: Takashi Iwai, linux-sound, linux-kernel, Rong Zhang
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: aa2f4addab44 ("ALSA: usb-audio: Set the value of potential sticky mixers to maximum")
Signed-off-by: Rong Zhang <i@rong.moe>
---
sound/usb/mixer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/usb/mixer.c b/sound/usb/mixer.c
index b4c855c25eef..703c118f9d4e 100644
--- a/sound/usb/mixer.c
+++ b/sound/usb/mixer.c
@@ -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++;
---
base-commit: 7404ce51637231382873d0b55edabc2f3b841a9d
change-id: ceff7816-uac-sticky-channels-fix-12f145cb9cec
Thanks,
Rong
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-07-06 8:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-05 18:19 [PATCH] ALSA: usb-audio: Fix imbalance per-channel volume of sticky mixers Rong Zhang
2026-07-06 8:23 ` Takashi Iwai
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox