diff options
Diffstat (limited to 'sound/usb/card.c')
| -rw-r--r-- | sound/usb/card.c | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/sound/usb/card.c b/sound/usb/card.c index da1346bd4856..7a8ac1d81be7 100644 --- a/sound/usb/card.c +++ b/sound/usb/card.c | |||
| @@ -236,7 +236,6 @@ static int snd_usb_create_streams(struct snd_usb_audio *chip, int ctrlif) | |||
| 236 | } | 236 | } |
| 237 | 237 | ||
| 238 | case UAC_VERSION_2: { | 238 | case UAC_VERSION_2: { |
| 239 | struct uac_clock_source_descriptor *cs; | ||
| 240 | struct usb_interface_assoc_descriptor *assoc = | 239 | struct usb_interface_assoc_descriptor *assoc = |
| 241 | usb_ifnum_to_if(dev, ctrlif)->intf_assoc; | 240 | usb_ifnum_to_if(dev, ctrlif)->intf_assoc; |
| 242 | 241 | ||
| @@ -245,21 +244,6 @@ static int snd_usb_create_streams(struct snd_usb_audio *chip, int ctrlif) | |||
| 245 | return -EINVAL; | 244 | return -EINVAL; |
| 246 | } | 245 | } |
| 247 | 246 | ||
| 248 | /* FIXME: for now, we expect there is at least one clock source | ||
| 249 | * descriptor and we always take the first one. | ||
| 250 | * We should properly support devices with multiple clock sources, | ||
| 251 | * clock selectors and sample rate conversion units. */ | ||
| 252 | |||
| 253 | cs = snd_usb_find_csint_desc(host_iface->extra, host_iface->extralen, | ||
| 254 | NULL, UAC2_CLOCK_SOURCE); | ||
| 255 | |||
| 256 | if (!cs) { | ||
| 257 | snd_printk(KERN_ERR "CLOCK_SOURCE descriptor not found\n"); | ||
| 258 | return -EINVAL; | ||
| 259 | } | ||
| 260 | |||
| 261 | chip->clock_id = cs->bClockID; | ||
| 262 | |||
| 263 | for (i = 0; i < assoc->bInterfaceCount; i++) { | 247 | for (i = 0; i < assoc->bInterfaceCount; i++) { |
| 264 | int intf = assoc->bFirstInterface + i; | 248 | int intf = assoc->bFirstInterface + i; |
| 265 | 249 | ||
| @@ -481,6 +465,8 @@ static void *snd_usb_audio_probe(struct usb_device *dev, | |||
| 481 | goto __error; | 465 | goto __error; |
| 482 | } | 466 | } |
| 483 | 467 | ||
| 468 | chip->ctrl_intf = alts; | ||
| 469 | |||
| 484 | if (err > 0) { | 470 | if (err > 0) { |
| 485 | /* create normal USB audio interfaces */ | 471 | /* create normal USB audio interfaces */ |
| 486 | if (snd_usb_create_streams(chip, ifnum) < 0 || | 472 | if (snd_usb_create_streams(chip, ifnum) < 0 || |
