Lines Matching refs:dev
53 iface = usb_ifnum_to_if(chip->dev, quirk->ifnum); in create_composite_quirk()
65 iface = usb_ifnum_to_if(chip->dev, quirk->ifnum); in create_composite_quirk()
130 usb_set_interface(chip->dev, altsd->bInterfaceNumber, 0); in create_standard_audio_quirk()
190 usb_set_interface(chip->dev, fp->iface, 0); in create_fixed_stream_quirk()
389 ifcount = chip->dev->actconfig->desc.bNumInterfaces; in create_autodetect_quirks()
393 iface = usb_ifnum_to_if(chip->dev, ifnum); in create_autodetect_quirks()
501 usb_set_interface(chip->dev, fp->iface, 0); in create_uaxx_quirk()
574 static int snd_usb_extigy_boot_quirk(struct usb_device *dev, struct usb_interface *intf) in snd_usb_extigy_boot_quirk() argument
576 struct usb_host_config *config = dev->actconfig; in snd_usb_extigy_boot_quirk()
581 dev_dbg(&dev->dev, "sending Extigy boot sequence...\n"); in snd_usb_extigy_boot_quirk()
583 err = snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev,0), in snd_usb_extigy_boot_quirk()
586 dev_dbg(&dev->dev, "error sending boot message: %d\n", err); in snd_usb_extigy_boot_quirk()
587 err = usb_get_descriptor(dev, USB_DT_DEVICE, 0, in snd_usb_extigy_boot_quirk()
588 &dev->descriptor, sizeof(dev->descriptor)); in snd_usb_extigy_boot_quirk()
589 config = dev->actconfig; in snd_usb_extigy_boot_quirk()
591 dev_dbg(&dev->dev, "error usb_get_descriptor: %d\n", err); in snd_usb_extigy_boot_quirk()
592 err = usb_reset_configuration(dev); in snd_usb_extigy_boot_quirk()
594 dev_dbg(&dev->dev, "error usb_reset_configuration: %d\n", err); in snd_usb_extigy_boot_quirk()
595 dev_dbg(&dev->dev, "extigy_boot: new boot length = %d\n", in snd_usb_extigy_boot_quirk()
602 static int snd_usb_audigy2nx_boot_quirk(struct usb_device *dev) in snd_usb_audigy2nx_boot_quirk() argument
606 snd_usb_ctl_msg(dev, usb_rcvctrlpipe(dev, 0), 0x2a, in snd_usb_audigy2nx_boot_quirk()
610 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), 0x29, in snd_usb_audigy2nx_boot_quirk()
618 static int snd_usb_fasttrackpro_boot_quirk(struct usb_device *dev) in snd_usb_fasttrackpro_boot_quirk() argument
622 if (dev->actconfig->desc.bConfigurationValue == 1) { in snd_usb_fasttrackpro_boot_quirk()
623 dev_info(&dev->dev, in snd_usb_fasttrackpro_boot_quirk()
630 err = usb_driver_set_configuration(dev, 2); in snd_usb_fasttrackpro_boot_quirk()
632 dev_dbg(&dev->dev, in snd_usb_fasttrackpro_boot_quirk()
640 dev_info(&dev->dev, "Fast Track Pro config OK\n"); in snd_usb_fasttrackpro_boot_quirk()
649 static int snd_usb_cm106_write_int_reg(struct usb_device *dev, int reg, u16 value) in snd_usb_cm106_write_int_reg() argument
656 return snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), USB_REQ_SET_CONFIGURATION, in snd_usb_cm106_write_int_reg()
661 static int snd_usb_cm106_boot_quirk(struct usb_device *dev) in snd_usb_cm106_boot_quirk() argument
667 return snd_usb_cm106_write_int_reg(dev, 2, 0x8004); in snd_usb_cm106_boot_quirk()
676 static int snd_usb_cm6206_boot_quirk(struct usb_device *dev) in snd_usb_cm6206_boot_quirk() argument
682 err = snd_usb_cm106_write_int_reg(dev, reg, val[reg]); in snd_usb_cm6206_boot_quirk()
691 static int snd_usb_gamecon780_boot_quirk(struct usb_device *dev) in snd_usb_gamecon780_boot_quirk() argument
697 return snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), UAC_SET_CUR, in snd_usb_gamecon780_boot_quirk()
706 static int snd_usb_novation_boot_quirk(struct usb_device *dev) in snd_usb_novation_boot_quirk() argument
710 usb_set_interface(dev, 0, 1); in snd_usb_novation_boot_quirk()
721 static int snd_usb_accessmusic_boot_quirk(struct usb_device *dev) in snd_usb_accessmusic_boot_quirk() argument
731 err = usb_interrupt_msg(dev, usb_sndintpipe(dev, 0x05), buf, in snd_usb_accessmusic_boot_quirk()
751 static int snd_usb_nativeinstruments_boot_quirk(struct usb_device *dev) in snd_usb_nativeinstruments_boot_quirk() argument
753 int ret = usb_control_msg(dev, usb_sndctrlpipe(dev, 0), in snd_usb_nativeinstruments_boot_quirk()
760 usb_reset_device(dev); in snd_usb_nativeinstruments_boot_quirk()
768 static void mbox2_setup_48_24_magic(struct usb_device *dev) in mbox2_setup_48_24_magic() argument
779 snd_usb_ctl_msg(dev, usb_rcvctrlpipe(dev, 0), in mbox2_setup_48_24_magic()
781 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), in mbox2_setup_48_24_magic()
783 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), in mbox2_setup_48_24_magic()
785 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), in mbox2_setup_48_24_magic()
798 static int snd_usb_mbox2_boot_quirk(struct usb_device *dev) in snd_usb_mbox2_boot_quirk() argument
800 struct usb_host_config *config = dev->actconfig; in snd_usb_mbox2_boot_quirk()
809 dev_err(&dev->dev, "Invalid firmware size=%d.\n", fwsize); in snd_usb_mbox2_boot_quirk()
813 dev_dbg(&dev->dev, "Sending Digidesign Mbox 2 boot sequence...\n"); in snd_usb_mbox2_boot_quirk()
819 snd_usb_ctl_msg(dev, usb_rcvctrlpipe(dev, 0), in snd_usb_mbox2_boot_quirk()
824 dev_dbg(&dev->dev, "device not ready, resending boot sequence...\n"); in snd_usb_mbox2_boot_quirk()
829 dev_err(&dev->dev, "Unknown bootresponse=%d, or timed out, ignoring device.\n", bootresponse[0]); in snd_usb_mbox2_boot_quirk()
833 dev_dbg(&dev->dev, "device initialised!\n"); in snd_usb_mbox2_boot_quirk()
835 err = usb_get_descriptor(dev, USB_DT_DEVICE, 0, in snd_usb_mbox2_boot_quirk()
836 &dev->descriptor, sizeof(dev->descriptor)); in snd_usb_mbox2_boot_quirk()
837 config = dev->actconfig; in snd_usb_mbox2_boot_quirk()
839 dev_dbg(&dev->dev, "error usb_get_descriptor: %d\n", err); in snd_usb_mbox2_boot_quirk()
841 err = usb_reset_configuration(dev); in snd_usb_mbox2_boot_quirk()
843 dev_dbg(&dev->dev, "error usb_reset_configuration: %d\n", err); in snd_usb_mbox2_boot_quirk()
844 dev_dbg(&dev->dev, "mbox2_boot: new boot length = %d\n", in snd_usb_mbox2_boot_quirk()
847 mbox2_setup_48_24_magic(dev); in snd_usb_mbox2_boot_quirk()
849 dev_info(&dev->dev, "Digidesign Mbox 2: 24bit 48kHz"); in snd_usb_mbox2_boot_quirk()
875 usb_set_interface(chip->dev, iface, 0); in quattro_skip_setting_quirk()
908 usb_set_interface(chip->dev, iface, 0); in audiophile_skip_setting_quirk()
936 usb_set_interface(chip->dev, iface, 0); in fasttrackpro_skip_setting_quirk()
985 int snd_usb_apply_boot_quirk(struct usb_device *dev, in snd_usb_apply_boot_quirk() argument
994 return snd_usb_extigy_boot_quirk(dev, intf); in snd_usb_apply_boot_quirk()
998 return snd_usb_audigy2nx_boot_quirk(dev); in snd_usb_apply_boot_quirk()
1002 return snd_usb_cm106_boot_quirk(dev); in snd_usb_apply_boot_quirk()
1007 return snd_usb_cm6206_boot_quirk(dev); in snd_usb_apply_boot_quirk()
1011 return snd_usb_mbox2_boot_quirk(dev); in snd_usb_apply_boot_quirk()
1015 return snd_usb_novation_boot_quirk(dev); in snd_usb_apply_boot_quirk()
1019 return snd_usb_accessmusic_boot_quirk(dev); in snd_usb_apply_boot_quirk()
1024 return snd_usb_nativeinstruments_boot_quirk(dev); in snd_usb_apply_boot_quirk()
1026 return snd_usb_fasttrackpro_boot_quirk(dev); in snd_usb_apply_boot_quirk()
1028 return snd_usb_gamecon780_boot_quirk(dev); in snd_usb_apply_boot_quirk()
1194 struct usb_device *dev = subs->dev; in snd_usb_select_mode_quirk() local
1201 err = usb_set_interface(dev, fmt->iface, 0); in snd_usb_select_mode_quirk()
1210 err = snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), 0, in snd_usb_select_mode_quirk()
1222 err = snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), 0, in snd_usb_select_mode_quirk()
1231 err = snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), 0, in snd_usb_select_mode_quirk()
1271 void snd_usb_set_interface_quirk(struct usb_device *dev) in snd_usb_set_interface_quirk() argument
1273 struct snd_usb_audio *chip = dev_get_drvdata(&dev->dev); in snd_usb_set_interface_quirk()
1290 void snd_usb_ctl_msg_quirk(struct usb_device *dev, unsigned int pipe, in snd_usb_ctl_msg_quirk() argument
1294 struct snd_usb_audio *chip = dev_get_drvdata(&dev->dev); in snd_usb_ctl_msg_quirk()
1384 switch (le16_to_cpu(chip->dev->descriptor.bcdDevice)) { in snd_usb_interface_dsd_format_quirks()