Skip to contentSkip to conversation

fix selector unit bug affecting some USB speakerphones

PATCH Applied Russ Cox 2 participants 2 messages Aug 6, 2007 1 message not in the archive Sound

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Russ Cox

author
#1 lore raw

PATCH 1/1 fix selector unit bug affecting some USB speakerphones

My reading of the maintainers file is that
sound/usb/usbmixer.c belongs to [email protected]
but I got no response to this message, so I am
resending it here.

Russ

---------- Forwarded message ----------
From: Russ Cox <[email protected]>
Date: Jun 21, 2007 7:48 PM
Subject: [PATCH] fix selector unit bug affecting some USB speakerphones
To: [email protected]

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.

---
 sound/usb/usbmixer.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
sound/usb/usbmixer.c +0 -0
index 325d4b6..19776e7 100644
@@ -1483,7 +1483,7 @@ static int parse_audio_selector_unit(struct

mixer_build *state, int unitid, unsi

        struct snd_kcontrol *kctl;
        char **namelist;
-       if (! num_ins || desc[0] < 6 + num_ins) {
+       if (! num_ins || desc[0] < 5 + num_ins) {
                snd_printk(KERN_ERR "invalid SELECTOR UNIT descriptor
%d\n", unitid);
                return -EINVAL;
        }

--
1.4.4.2

Applied
#2 lore raw

At Mon, 6 Aug 2007 09:31:28 -0400,

Quoted 5 lines · Russ Cox

My reading of the maintainers file is that
sound/usb/usbmixer.c belongs to [email protected]
but I got no response to this message, so I am
resending it here.

I applied it to ALSA tree. Thanks.

Takashi

Quoted 46 lines

Russ

---------- Forwarded message ----------
From: Russ Cox <[email protected]>
Date: Jun 21, 2007 7:48 PM
Subject: [PATCH] fix selector unit bug affecting some USB speakerphones
To: [email protected]

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.

---
 sound/usb/usbmixer.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
sound/usb/usbmixer.c +0 -0
index 325d4b6..19776e7 100644
@@ -1483,7 +1483,7 @@ static int parse_audio_selector_unit(struct

mixer_build *state, int unitid, unsi

        struct snd_kcontrol *kctl;
        char **namelist;
sound/usb/usbmixer.c +1 -1
-       if (! num_ins || desc[0] < 6 + num_ins) {
+       if (! num_ins || desc[0] < 5 + num_ins) {
                snd_printk(KERN_ERR "invalid SELECTOR UNIT descriptor
%d\n", unitid);
                return -EINVAL;
        }

--
1.4.4.2
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/