diff options
author | Yao-Wen Mao <yaowen@google.com> | 2015-08-28 10:33:25 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2015-08-28 10:38:25 +0200 |
commit | 6aa6925cad06159dc6e25857991bbc4960821242 (patch) | |
tree | 1669df95a62653f61d8e190f17fb109fed78880c /sound/usb/mixer.c | |
parent | ALSA: usb-audio: Handle normal and auto-suspend equally (diff) | |
download | linux-6aa6925cad06159dc6e25857991bbc4960821242.tar.xz linux-6aa6925cad06159dc6e25857991bbc4960821242.zip |
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/mixer.c')
-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 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) |