diff options
author | Yao-Wen Mao <yaowen@google.com> | 2015-08-28 16:33:25 +0800 |
---|---|---|
committer | Luis Henriques <luis.henriques@canonical.com> | 2015-09-29 16:44:41 +0100 |
commit | a1cd2dbf3effb7e474e4f8b935a5df1e9eaa665f (patch) | |
tree | 8953b5a1b7e4cd92054ace18fa656826b3bf23b1 /sound/usb | |
parent | 932c8cc6cf800b6c971c3cdfd90068f418de823b (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>
[ luis: backported to 3.16: adjusted context ]
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
Diffstat (limited to 'sound/usb')
-rw-r--r-- | sound/usb/mixer.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/usb/mixer.c b/sound/usb/mixer.c index f6d4967a652a..1550e15e9179 100644 --- a/sound/usb/mixer.c +++ b/sound/usb/mixer.c @@ -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) |