aboutsummaryrefslogtreecommitdiffstats
path: root/sound/usb
diff options
context:
space:
mode:
authorRuss Cox <rsc@swtch.com>2007-08-06 09:37:58 -0400
committerJaroslav Kysela <perex@perex.cz>2007-10-16 09:58:26 -0400
commit38977e96cb32e658716e11a05ec7f1fc4618e0f3 (patch)
tree560a6536f198358561c558291cf5bd82ef77b661 /sound/usb
parent6ed44ad3ebec52059f6f534deeb08f1d701852c5 (diff)
[ALSA] fix selector unit bug affecting some USB speakerphones
Following the suggestion in this thread: https://bugs.launchpad.net/ubuntu/+source/alsa-lib/+bug/26683 the correct upper bound on desc[0] is 5 + num_ins not 6 + num_ins, because the index used later is 5+i, not 6+i. This change makes my Vosky Chatterbox speakerphone work. Apparently it also helps with the Minivox MV100. Signed-off-by: Russ Cox <rsc@swtch.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'sound/usb')
-rw-r--r--sound/usb/usbmixer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/usb/usbmixer.c b/sound/usb/usbmixer.c
index 98d54483fec7..5e329690cfb1 100644
--- a/sound/usb/usbmixer.c
+++ b/sound/usb/usbmixer.c
@@ -1483,7 +1483,7 @@ static int parse_audio_selector_unit(struct mixer_build *state, int unitid, unsi
1483 struct snd_kcontrol *kctl; 1483 struct snd_kcontrol *kctl;
1484 char **namelist; 1484 char **namelist;
1485 1485
1486 if (! num_ins || desc[0] < 6 + num_ins) { 1486 if (! num_ins || desc[0] < 5 + num_ins) {
1487 snd_printk(KERN_ERR "invalid SELECTOR UNIT descriptor %d\n", unitid); 1487 snd_printk(KERN_ERR "invalid SELECTOR UNIT descriptor %d\n", unitid);
1488 return -EINVAL; 1488 return -EINVAL;
1489 } 1489 }