diff options
author | Yao-Wen Mao <yaowen@google.com> | 2015-08-28 04:33:25 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2015-08-28 04:38:25 -0400 |
commit | 6aa6925cad06159dc6e25857991bbc4960821242 (patch) | |
tree | 1669df95a62653f61d8e190f17fb109fed78880c | |
parent | 0662292aec0528363df037ad7c66bf9949c7ce46 (diff) |
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>
-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) | |||
2540 | for (c = 0; c < MAX_CHANNELS; c++) { | 2540 | for (c = 0; c < MAX_CHANNELS; c++) { |
2541 | if (!(cval->cmask & (1 << c))) | 2541 | if (!(cval->cmask & (1 << c))) |
2542 | continue; | 2542 | continue; |
2543 | if (cval->cached & (1 << c)) { | 2543 | if (cval->cached & (1 << (c + 1))) { |
2544 | err = snd_usb_set_cur_mix_value(cval, c + 1, idx, | 2544 | err = snd_usb_set_cur_mix_value(cval, c + 1, idx, |
2545 | cval->cache_val[idx]); | 2545 | cval->cache_val[idx]); |
2546 | if (err < 0) | 2546 | if (err < 0) |