From 6aa6925cad06159dc6e25857991bbc4960821242 Mon Sep 17 00:00:00 2001 From: Yao-Wen Mao Date: Fri, 28 Aug 2015 16:33:25 +0800 Subject: ALSA: usb-audio: correct the value cache check. The check of cval->cached should be zero-based (including master channel). Signed-off-by: Yao-Wen Mao Cc: Signed-off-by: Takashi Iwai --- sound/usb/mixer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sound/usb/mixer.c') diff --git a/sound/usb/mixer.c b/sound/usb/mixer.c index fd5c49e94867..f494dced3c11 100644 --- a/sound/usb/mixer.c +++ b/sound/usb/mixer.c @@ -2540,7 +2540,7 @@ static int restore_mixer_value(struct usb_mixer_elem_list *list) for (c = 0; c < MAX_CHANNELS; c++) { if (!(cval->cmask & (1 << c))) continue; - if (cval->cached & (1 << c)) { + if (cval->cached & (1 << (c + 1))) { err = snd_usb_set_cur_mix_value(cval, c + 1, idx, cval->cache_val[idx]); if (err < 0) -- cgit v1.2.3