From: Yao-Wen Mao Date: Fri, 28 Aug 2015 08:33:25 +0000 (+0800) Subject: ALSA: usb-audio: correct the value cache check. X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6aa6925cad06159dc6e25857991bbc4960821242;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git 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 --- 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)