summaryrefslogtreecommitdiffstats
path: root/sound/usb/card.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2010-09-03 22:38:52 +0200
committerTakashi Iwai <tiwai@suse.de>2010-09-03 22:38:52 +0200
commit68885a3ff38ed51fa02f241feb405c9922a90ee0 (patch)
tree2fc626df39d5e0e1f6b065238141f7d49187c737 /sound/usb/card.c
parent7b28079b3284ccb15ad4f003fb7073890600d0c1 (diff)
parenta2acad8298a42b7be684a32fafaf83332bba9c2b (diff)
downloadlinux-68885a3ff38ed51fa02f241feb405c9922a90ee0.tar.bz2
Merge branch 'fix/misc' into topic/misc
Diffstat (limited to 'sound/usb/card.c')
-rw-r--r--sound/usb/card.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/sound/usb/card.c b/sound/usb/card.c
index 498a2d8fa4bb..4aa4678e0a01 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)
}
switch (protocol) {
+ default:
+ snd_printdd(KERN_WARNING "unknown interface protocol %#02x, assuming v1\n",
+ protocol);
+ /* fall through */
+
case UAC_VERSION_1: {
struct uac1_ac_header_descriptor *h1 = control_header;
@@ -253,10 +258,6 @@ static int snd_usb_create_streams(struct snd_usb_audio *chip, int ctrlif)
break;
}
-
- default:
- snd_printk(KERN_ERR "unknown protocol version 0x%02x\n", protocol);
- return -EINVAL;
}
return 0;
@@ -480,7 +481,13 @@ static void *snd_usb_audio_probe(struct usb_device *dev,
goto __error;
}
- chip->ctrl_intf = alts;
+ /*
+ * For devices with more than one control interface, we assume the
+ * first contains the audio controls. We might need a more specific
+ * check here in the future.
+ */
+ if (!chip->ctrl_intf)
+ chip->ctrl_intf = alts;
if (err > 0) {
/* create normal USB audio interfaces */