From: Clemens Ladisch <clemens@ladisch.de>
To: Takashi Iwai <tiwai@suse.de>
Cc: alsa-devel@alsa-project.org, Daniel Mack <zonque@gmail.com>
Subject: Re: [PATCH 1/3] ALSA: snd-usb: Accept UAC2 FORMAT_TYPE descriptors with bLength > 6
Date: Thu, 04 Aug 2011 16:17:42 +0200 [thread overview]
Message-ID: <4E3AAA06.3020204@ladisch.de> (raw)
In-Reply-To: <s5h1ux1l18a.wl%tiwai@suse.de>
Takashi Iwai wrote:
> Daniel Mack wrote:
>> @@ -352,7 +352,7 @@ int snd_usb_parse_audio_endpoints(struct snd_usb_audio *chip, int iface_no)
>> continue;
>> }
>> if (((protocol == UAC_VERSION_1) && (fmt->bLength < 8)) ||
>> - ((protocol == UAC_VERSION_2) && (fmt->bLength != 6))) {
>> + ((protocol == UAC_VERSION_2) && (fmt->bLength < 6))) {
>> snd_printk(KERN_ERR "%d:%u:%d : invalid UAC_FORMAT_TYPE desc (protocol %d, bLength %d)\n",
>> dev->devnum, iface_no, altno, protocol, fmt->bLength);
>> continue;
>
> This patch isn't applicable to sound git tree. Any missing patch?
Obviously some temporary debugging patch to log protocol/bLength.
--8<---------------------------------------------------------------->8--
ALSA: snd-usb: Accept UAC2 FORMAT_TYPE descriptors with bLength > 6
The Focusrite Scarlett 18i6 USB has them that way, which is probably a
bug. Anyway, the driver should simply ignore this fact.
Signed-off-by: Daniel Mack <zonque@gmail.com>
Reported-by: Nicolai Krakowiak <nicolai.krakowiak@gmail.com>
Cc: stable@kernel.org
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
---
sound/usb/endpoint.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/sound/usb/endpoint.c b/sound/usb/endpoint.c
index 1eea7e3..1867bbd 100644
--- a/sound/usb/endpoint.c
+++ b/sound/usb/endpoint.c
@@ -352,7 +352,7 @@ int snd_usb_parse_audio_endpoints(struct snd_usb_audio *chip, int iface_no)
continue;
}
if (((protocol == UAC_VERSION_1) && (fmt->bLength < 8)) ||
- ((protocol == UAC_VERSION_2) && (fmt->bLength != 6))) {
+ ((protocol == UAC_VERSION_2) && (fmt->bLength < 6))) {
snd_printk(KERN_ERR "%d:%u:%d : invalid UAC_FORMAT_TYPE desc\n",
dev->devnum, iface_no, altno);
continue;
next prev parent reply other threads:[~2011-08-04 14:14 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-04 13:56 [PATCH 0/3] 3 Patches for better UAC2 handling Daniel Mack
2011-08-04 13:56 ` [PATCH 1/3] ALSA: snd-usb: Accept UAC2 FORMAT_TYPE descriptors with bLength > 6 Daniel Mack
2011-08-04 14:07 ` Takashi Iwai
2011-08-04 14:15 ` Daniel Mack
2011-08-04 14:17 ` Clemens Ladisch [this message]
2011-08-04 14:17 ` Daniel Mack
2011-08-04 14:27 ` Takashi Iwai
2011-08-06 7:26 ` Daniel Mack
2011-08-06 8:22 ` Takashi Iwai
2011-08-06 8:29 ` Daniel Mack
2011-08-04 13:56 ` [PATCH 2/3] ALSA: snd-usb: avoid dividing by zero on invalid input Daniel Mack
2011-08-04 13:56 ` [PATCH 3/3] ALSA: snd-usb: operate on given mixer interface only Daniel Mack
2011-08-04 14:11 ` [PATCH 0/3] 3 Patches for better UAC2 handling Clemens Ladisch
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=4E3AAA06.3020204@ladisch.de \
--to=clemens@ladisch.de \
--cc=alsa-devel@alsa-project.org \
--cc=tiwai@suse.de \
--cc=zonque@gmail.com \
/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