summaryrefslogtreecommitdiffstats
path: root/sound/usb
diff options
context:
space:
mode:
authorYao-Wen Mao <yaowen@google.com>2015-08-28 16:33:25 +0800
committerTakashi Iwai <tiwai@suse.de>2015-08-28 10:38:25 +0200
commit6aa6925cad06159dc6e25857991bbc4960821242 (patch)
tree1669df95a62653f61d8e190f17fb109fed78880c /sound/usb
parent0662292aec0528363df037ad7c66bf9949c7ce46 (diff)
downloadlinux-6aa6925cad06159dc6e25857991bbc4960821242.tar.bz2
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 <yaowen@google.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb')
-rw-r--r--sound/usb/mixer.c2
1 files changed, 1 insertions, 1 deletions
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)