Loading sound/usb/card.c +15 −3 Original line number Diff line number Diff line Loading @@ -225,10 +225,23 @@ static int snd_usb_create_streams(struct snd_usb_audio *chip, int ctrlif) struct usb_device *dev = chip->dev; struct usb_host_interface *host_iface; struct usb_interface_descriptor *altsd; struct usb_interface *usb_iface; int i, protocol; usb_iface = usb_ifnum_to_if(dev, ctrlif); if (!usb_iface) { snd_printk(KERN_ERR "%d:%u : does not exist\n", dev->devnum, ctrlif); return -EINVAL; } /* find audiocontrol interface */ host_iface = &usb_ifnum_to_if(dev, ctrlif)->altsetting[0]; host_iface = &usb_iface->altsetting[0]; if (!host_iface) { snd_printk(KERN_ERR "Audio Control interface is not available."); return -EINVAL; } altsd = get_iface_desc(host_iface); protocol = altsd->bInterfaceProtocol; Loading Loading @@ -289,8 +302,7 @@ static int snd_usb_create_streams(struct snd_usb_audio *chip, int ctrlif) case UAC_VERSION_2: case UAC_VERSION_3: { struct usb_interface_assoc_descriptor *assoc = usb_ifnum_to_if(dev, ctrlif)->intf_assoc; usb_iface->intf_assoc; if (!assoc) { /* * Firmware writers cannot count to three. So to find Loading Loading
sound/usb/card.c +15 −3 Original line number Diff line number Diff line Loading @@ -225,10 +225,23 @@ static int snd_usb_create_streams(struct snd_usb_audio *chip, int ctrlif) struct usb_device *dev = chip->dev; struct usb_host_interface *host_iface; struct usb_interface_descriptor *altsd; struct usb_interface *usb_iface; int i, protocol; usb_iface = usb_ifnum_to_if(dev, ctrlif); if (!usb_iface) { snd_printk(KERN_ERR "%d:%u : does not exist\n", dev->devnum, ctrlif); return -EINVAL; } /* find audiocontrol interface */ host_iface = &usb_ifnum_to_if(dev, ctrlif)->altsetting[0]; host_iface = &usb_iface->altsetting[0]; if (!host_iface) { snd_printk(KERN_ERR "Audio Control interface is not available."); return -EINVAL; } altsd = get_iface_desc(host_iface); protocol = altsd->bInterfaceProtocol; Loading Loading @@ -289,8 +302,7 @@ static int snd_usb_create_streams(struct snd_usb_audio *chip, int ctrlif) case UAC_VERSION_2: case UAC_VERSION_3: { struct usb_interface_assoc_descriptor *assoc = usb_ifnum_to_if(dev, ctrlif)->intf_assoc; usb_iface->intf_assoc; if (!assoc) { /* * Firmware writers cannot count to three. So to find Loading