mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Russ Cox" <rsc@swtch.com>
To: linux-kernel@vger.kernel.org
Subject: [PATCH] fix selector unit bug affecting some USB speakerphones
Date: Mon, 6 Aug 2007 09:31:28 -0400	[thread overview]
Message-ID: <ee9e417a0708060631h72595d28le9de0d13f21cb658@mail.gmail.com> (raw)
In-Reply-To: <20070621234846.56F401E8C22@holo.morphisms.net>

My reading of the maintainers file is that
sound/usb/usbmixer.c belongs to perex@suse.cz
but I got no response to this message, so I am
resending it here.

Russ

---------- Forwarded message ----------
From: Russ Cox <rsc@swtch.com>
Date: Jun 21, 2007 7:48 PM
Subject: [PATCH] fix selector unit bug affecting some USB speakerphones
To: perex@suse.cz

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>

---
 sound/usb/usbmixer.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/sound/usb/usbmixer.c b/sound/usb/usbmixer.c
index 325d4b6..19776e7 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
        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

       reply	other threads:[~2007-08-06 13:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20070621234846.56F401E8C22@holo.morphisms.net>
2007-08-06 13:31 ` Russ Cox [this message]
2007-08-06 13:38   ` Takashi Iwai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ee9e417a0708060631h72595d28le9de0d13f21cb658@mail.gmail.com \
    --to=rsc@swtch.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®