diff options
author | Takashi Iwai <tiwai@suse.de> | 2010-09-04 00:38:52 +0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2010-09-04 00:38:52 +0400 |
commit | 68885a3ff38ed51fa02f241feb405c9922a90ee0 (patch) | |
tree | 2fc626df39d5e0e1f6b065238141f7d49187c737 /sound/usb/card.c | |
parent | 7b28079b3284ccb15ad4f003fb7073890600d0c1 (diff) | |
parent | a2acad8298a42b7be684a32fafaf83332bba9c2b (diff) | |
download | linux-68885a3ff38ed51fa02f241feb405c9922a90ee0.tar.xz |
Merge branch 'fix/misc' into topic/misc
Diffstat (limited to 'sound/usb/card.c')
-rw-r--r-- | sound/usb/card.c | 17 |
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 */ |