Commit a1cd2dbf authored by Yao-Wen Mao's avatar Yao-Wen Mao Committed by Luis Henriques

ALSA: usb-audio: correct the value cache check.

commit 6aa6925c upstream.

The check of cval->cached should be zero-based (including master channel).
Signed-off-by: default avatarYao-Wen Mao <yaowen@google.com>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
[ luis: backported to 3.16: adjusted context ]
Signed-off-by: default avatarLuis Henriques <luis.henriques@canonical.com>
parent 932c8cc6
......@@ -2529,7 +2529,7 @@ static int restore_mixer_value(struct usb_mixer_elem_info *cval)
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 = set_cur_mix_value(cval, c + 1, idx,
cval->cache_val[idx]);
if (err < 0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment