From: Daniel Mack <daniel@caiaq.de>
To: alsa-devel@alsa-project.org
Cc: Takashi Iwai <tiwai@suse.de>, Clemens Ladisch <clemens@ladisch.de>
Subject: [PATCH] ALSA: sound/usb: fix UAC1 regression
Date: Sat, 8 May 2010 11:24:56 +0200 [thread overview]
Message-ID: <1273310696-10920-1-git-send-email-daniel@caiaq.de> (raw)
In-Reply-To: <4BE5120B.4020201@gmail.com>
Commit 23caaf19b ("ALSA: usb-mixer: Add support for Audio Class v2.0")
broke support for Class1 devices due to two faulty changes. This patch
fixes it.
Signed-off-by: Daniel Mack <daniel@caiaq.de>
Reported-and-Tested-by: The Source <thesourcehim@gmail.com>
Cc: Takashi Iwai <tiwai@suse.de>
Cc: Clemens Ladisch <clemens@ladisch.de>
---
include/linux/usb/audio.h | 2 +-
sound/usb/mixer.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/linux/usb/audio.h b/include/linux/usb/audio.h
index 905a87c..57f2055 100644
--- a/include/linux/usb/audio.h
+++ b/include/linux/usb/audio.h
@@ -244,7 +244,7 @@ struct uac_selector_unit_descriptor {
static inline __u8 uac_selector_unit_iSelector(struct uac_selector_unit_descriptor *desc)
{
__u8 *raw = (__u8 *) desc;
- return raw[desc->bLength - 1];
+ return raw[9 + desc->bLength - 1];
}
/* 4.3.2.5 Feature Unit Descriptor */
diff --git a/sound/usb/mixer.c b/sound/usb/mixer.c
index 21613fe..fa0fb77 100644
--- a/sound/usb/mixer.c
+++ b/sound/usb/mixer.c
@@ -656,7 +656,7 @@ static int check_input_term(struct mixer_build *state, int id, struct usb_audio_
case UAC_FEATURE_UNIT: {
/* the header is the same for v1 and v2 */
struct uac_feature_unit_descriptor *d = p1;
- id = d->bUnitID;
+ id = d->bSourceID;
break; /* continue to parse */
}
case UAC_MIXER_UNIT: {
--
1.7.1
next prev parent reply other threads:[~2010-05-08 9:25 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-22 16:28 usbaudio: Support for USB audio v2.0 devices Daniel Mack
2010-02-22 16:28 ` [PATCH 1/4] ALSA: usbaudio: parse USB descriptors with structs Daniel Mack
2010-02-22 16:28 ` [PATCH 2/4] ALSA: usbaudio: introduce new types for audio class v2 Daniel Mack
2010-02-22 16:28 ` [PATCH 3/4] ALSA: usbaudio: implement basic set of class v2.0 parser Daniel Mack
2010-02-22 16:28 ` [PATCH 4/4] ALSA: usbmixer: bail out early when parsing audio class v2 descriptors Daniel Mack
2010-02-22 17:40 ` usbaudio: Support for USB audio v2.0 devices Clemens Ladisch
2010-02-22 17:50 ` Daniel Mack
2010-03-02 9:13 ` adelias
2010-03-02 18:35 ` Daniel Mack
2010-04-27 13:23 ` adelias
2010-04-27 13:31 ` The Source
2010-04-27 14:07 ` Daniel Mack
2010-04-27 15:29 ` The Source
2010-04-27 15:43 ` Daniel Mack
2010-04-27 17:27 ` The Source
2010-04-27 17:33 ` Daniel Mack
2010-05-02 16:56 ` The Source
2010-05-03 20:55 ` Daniel Mack
2010-05-07 13:19 ` The Source
2010-05-07 13:22 ` Daniel Mack
2010-05-07 20:12 ` Daniel Mack
2010-05-07 21:32 ` The Source
2010-05-08 1:38 ` Daniel Mack
2010-05-08 7:26 ` The Source
2010-05-08 9:19 ` Daniel Mack
2010-05-08 9:24 ` Daniel Mack [this message]
2010-05-08 9:45 ` [PATCH] ALSA: sound/usb: fix UAC1 regression Takashi Iwai
2010-04-27 14:06 ` usbaudio: Support for USB audio v2.0 devices Daniel Mack
2010-05-03 12:49 ` adelias
2010-05-04 10:48 ` Daniel Mack
2010-05-18 7:07 ` adelias
2010-05-18 7:40 ` Daniel Mack
2010-05-18 8:32 ` adelias
2010-05-27 18:21 ` Daniel Mack
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=1273310696-10920-1-git-send-email-daniel@caiaq.de \
--to=daniel@caiaq.de \
--cc=alsa-devel@alsa-project.org \
--cc=clemens@ladisch.de \
--cc=tiwai@suse.de \
/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;
as well as URLs for NNTP newsgroup(s).