mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-03 13:13:40 +00:00
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>
This commit is contained in:
parent
0662292aec
commit
6aa6925cad
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user