diff options
author | Clemens Ladisch <clemens@ladisch.de> | 2010-09-03 04:53:11 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2010-09-03 16:36:39 -0400 |
commit | a2acad8298a42b7be684a32fafaf83332bba9c2b (patch) | |
tree | 34cddff9b3b8efcc3a60a6e9d0a3e001a714d364 /sound/usb/card.c | |
parent | 7b6717e144de6592e614fd7fc3b914b6bf686a9d (diff) |
ALSA: usb-audio: fix detection of vendor-specific device protocol settings
The Audio Class v2 support code in 2.6.35 added checks for the
bInterfaceProtocol field. However, there are devices (usually those
detected by vendor-specific quirks) that do not have one of the
predefined values in this field, which made the driver reject them.
To fix this regression, restore the old behaviour, i.e., assume that
a device with an unknown bInterfaceProtocol field (other than
UAC_VERSION_2) has more or less UAC-v1-compatible descriptors.
[compile warning fixes by tiwai]
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Cc: Daniel Mack <daniel@caiaq.de>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb/card.c')
-rw-r--r-- | sound/usb/card.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sound/usb/card.c b/sound/usb/card.c index b443a33d31c9..32e4be8a187c 100644 --- a/sound/usb/card.c +++ b/sound/usb/card.c | |||
@@ -216,6 +216,11 @@ static int snd_usb_create_streams(struct snd_usb_audio *chip, int ctrlif) | |||
216 | } | 216 | } |
217 | 217 | ||
218 | switch (protocol) { | 218 | switch (protocol) { |
219 | default: | ||
220 | snd_printdd(KERN_WARNING "unknown interface protocol %#02x, assuming v1\n", | ||
221 | protocol); | ||
222 | /* fall through */ | ||
223 | |||
219 | case UAC_VERSION_1: { | 224 | case UAC_VERSION_1: { |
220 | struct uac1_ac_header_descriptor *h1 = control_header; | 225 | struct uac1_ac_header_descriptor *h1 = control_header; |
221 | 226 | ||
@@ -253,10 +258,6 @@ static int snd_usb_create_streams(struct snd_usb_audio *chip, int ctrlif) | |||
253 | 258 | ||
254 | break; | 259 | break; |
255 | } | 260 | } |
256 | |||
257 | default: | ||
258 | snd_printk(KERN_ERR "unknown protocol version 0x%02x\n", protocol); | ||
259 | return -EINVAL; | ||
260 | } | 261 | } |
261 | 262 | ||
262 | return 0; | 263 | return 0; |