提交 6aa6925c 编写于 作者: Y Yao-Wen Mao 提交者: Takashi Iwai

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

The check of cval->cached should be zero-based (including master channel).
Signed-off-by: NYao-Wen Mao <yaowen@google.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: NTakashi Iwai <tiwai@suse.de>
上级 0662292a
...@@ -2540,7 +2540,7 @@ static int restore_mixer_value(struct usb_mixer_elem_list *list) ...@@ -2540,7 +2540,7 @@ static int restore_mixer_value(struct usb_mixer_elem_list *list)
for (c = 0; c < MAX_CHANNELS; c++) { for (c = 0; c < MAX_CHANNELS; c++) {
if (!(cval->cmask & (1 << c))) if (!(cval->cmask & (1 << c)))
continue; continue;
if (cval->cached & (1 << c)) { if (cval->cached & (1 << (c + 1))) {
err = snd_usb_set_cur_mix_value(cval, c + 1, idx, err = snd_usb_set_cur_mix_value(cval, c + 1, idx,
cval->cache_val[idx]); cval->cache_val[idx]);
if (err < 0) if (err < 0)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册