summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorYao-Wen Mao <yaowen@google.com>2015-08-28 16:33:25 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-09-29 19:26:01 +0200
commitae7d175f7d461643dd6eface450704c4076cfc0d (patch)
tree33908cf0bdb576f673f7b9546956c5ef46202e5d /sound
parent37e7e6bf19f75255444a6a53d90a16d8c5e5a471 (diff)
ALSA: usb-audio: correct the value cache check.
commit 6aa6925cad06159dc6e25857991bbc4960821242 upstream. The check of cval->cached should be zero-based (including master channel). Signed-off-by: Yao-Wen Mao <yaowen@google.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'sound')
-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 8b7e391dd0b8..cd8ed2e393a2 100644
--- a/sound/usb/mixer.c
+++ b/sound/usb/mixer.c
@@ -2522,7 +2522,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)