Lines Matching refs:dev

43 		iface = usb_ifnum_to_if(chip->dev, quirk->ifnum);  in create_composite_quirk()
55 iface = usb_ifnum_to_if(chip->dev, quirk->ifnum); in create_composite_quirk()
108 usb_set_interface(chip->dev, altsd->bInterfaceNumber, 0); in create_standard_audio_quirk()
204 usb_set_interface(chip->dev, fp->iface, 0); in create_fixed_stream_quirk()
483 usb_set_interface(chip->dev, fp->iface, 0); in create_uaxx_quirk()
555 static int snd_usb_extigy_boot_quirk(struct usb_device *dev, struct usb_interface *intf) in snd_usb_extigy_boot_quirk() argument
557 struct usb_host_config *config = dev->actconfig; in snd_usb_extigy_boot_quirk()
562 dev_dbg(&dev->dev, "sending Extigy boot sequence...\n"); in snd_usb_extigy_boot_quirk()
564 err = snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev,0), in snd_usb_extigy_boot_quirk()
567 dev_dbg(&dev->dev, "error sending boot message: %d\n", err); in snd_usb_extigy_boot_quirk()
568 err = usb_get_descriptor(dev, USB_DT_DEVICE, 0, in snd_usb_extigy_boot_quirk()
569 &dev->descriptor, sizeof(dev->descriptor)); in snd_usb_extigy_boot_quirk()
570 config = dev->actconfig; in snd_usb_extigy_boot_quirk()
572 dev_dbg(&dev->dev, "error usb_get_descriptor: %d\n", err); in snd_usb_extigy_boot_quirk()
573 err = usb_reset_configuration(dev); in snd_usb_extigy_boot_quirk()
575 dev_dbg(&dev->dev, "error usb_reset_configuration: %d\n", err); in snd_usb_extigy_boot_quirk()
576 dev_dbg(&dev->dev, "extigy_boot: new boot length = %d\n", in snd_usb_extigy_boot_quirk()
583 static int snd_usb_audigy2nx_boot_quirk(struct usb_device *dev) in snd_usb_audigy2nx_boot_quirk() argument
587 snd_usb_ctl_msg(dev, usb_rcvctrlpipe(dev, 0), 0x2a, in snd_usb_audigy2nx_boot_quirk()
591 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), 0x29, in snd_usb_audigy2nx_boot_quirk()
599 static int snd_usb_fasttrackpro_boot_quirk(struct usb_device *dev) in snd_usb_fasttrackpro_boot_quirk() argument
603 if (dev->actconfig->desc.bConfigurationValue == 1) { in snd_usb_fasttrackpro_boot_quirk()
604 dev_info(&dev->dev, in snd_usb_fasttrackpro_boot_quirk()
611 err = usb_driver_set_configuration(dev, 2); in snd_usb_fasttrackpro_boot_quirk()
613 dev_dbg(&dev->dev, in snd_usb_fasttrackpro_boot_quirk()
621 dev_info(&dev->dev, "Fast Track Pro config OK\n"); in snd_usb_fasttrackpro_boot_quirk()
630 static int snd_usb_cm106_write_int_reg(struct usb_device *dev, int reg, u16 value) in snd_usb_cm106_write_int_reg() argument
637 return snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), USB_REQ_SET_CONFIGURATION, in snd_usb_cm106_write_int_reg()
642 static int snd_usb_cm106_boot_quirk(struct usb_device *dev) in snd_usb_cm106_boot_quirk() argument
648 return snd_usb_cm106_write_int_reg(dev, 2, 0x8004); in snd_usb_cm106_boot_quirk()
735 static int snd_usb_cm6206_boot_quirk(struct usb_device *dev) in snd_usb_cm6206_boot_quirk() argument
781 err = snd_usb_cm106_write_int_reg(dev, reg, val[reg]); in snd_usb_cm6206_boot_quirk()
790 static int snd_usb_gamecon780_boot_quirk(struct usb_device *dev) in snd_usb_gamecon780_boot_quirk() argument
796 return snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), UAC_SET_CUR, in snd_usb_gamecon780_boot_quirk()
805 static int snd_usb_novation_boot_quirk(struct usb_device *dev) in snd_usb_novation_boot_quirk() argument
809 usb_set_interface(dev, 0, 1); in snd_usb_novation_boot_quirk()
820 static int snd_usb_accessmusic_boot_quirk(struct usb_device *dev) in snd_usb_accessmusic_boot_quirk() argument
827 if (usb_pipe_type_check(dev, usb_sndintpipe(dev, 0x05))) in snd_usb_accessmusic_boot_quirk()
832 err = usb_interrupt_msg(dev, usb_sndintpipe(dev, 0x05), buf, in snd_usb_accessmusic_boot_quirk()
852 static int snd_usb_nativeinstruments_boot_quirk(struct usb_device *dev) in snd_usb_nativeinstruments_boot_quirk() argument
856 ret = usb_control_msg(dev, usb_sndctrlpipe(dev, 0), in snd_usb_nativeinstruments_boot_quirk()
863 usb_reset_device(dev); in snd_usb_nativeinstruments_boot_quirk()
871 static void mbox2_setup_48_24_magic(struct usb_device *dev) in mbox2_setup_48_24_magic() argument
882 snd_usb_ctl_msg(dev, usb_rcvctrlpipe(dev, 0), in mbox2_setup_48_24_magic()
884 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), in mbox2_setup_48_24_magic()
886 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), in mbox2_setup_48_24_magic()
888 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), in mbox2_setup_48_24_magic()
901 static int snd_usb_mbox2_boot_quirk(struct usb_device *dev) in snd_usb_mbox2_boot_quirk() argument
903 struct usb_host_config *config = dev->actconfig; in snd_usb_mbox2_boot_quirk()
912 dev_err(&dev->dev, "Invalid firmware size=%d.\n", fwsize); in snd_usb_mbox2_boot_quirk()
916 dev_dbg(&dev->dev, "Sending Digidesign Mbox 2 boot sequence...\n"); in snd_usb_mbox2_boot_quirk()
922 snd_usb_ctl_msg(dev, usb_rcvctrlpipe(dev, 0), in snd_usb_mbox2_boot_quirk()
927 dev_dbg(&dev->dev, "device not ready, resending boot sequence...\n"); in snd_usb_mbox2_boot_quirk()
932 dev_err(&dev->dev, "Unknown bootresponse=%d, or timed out, ignoring device.\n", bootresponse[0]); in snd_usb_mbox2_boot_quirk()
936 dev_dbg(&dev->dev, "device initialised!\n"); in snd_usb_mbox2_boot_quirk()
938 err = usb_get_descriptor(dev, USB_DT_DEVICE, 0, in snd_usb_mbox2_boot_quirk()
939 &dev->descriptor, sizeof(dev->descriptor)); in snd_usb_mbox2_boot_quirk()
940 config = dev->actconfig; in snd_usb_mbox2_boot_quirk()
942 dev_dbg(&dev->dev, "error usb_get_descriptor: %d\n", err); in snd_usb_mbox2_boot_quirk()
944 err = usb_reset_configuration(dev); in snd_usb_mbox2_boot_quirk()
946 dev_dbg(&dev->dev, "error usb_reset_configuration: %d\n", err); in snd_usb_mbox2_boot_quirk()
947 dev_dbg(&dev->dev, "mbox2_boot: new boot length = %d\n", in snd_usb_mbox2_boot_quirk()
950 mbox2_setup_48_24_magic(dev); in snd_usb_mbox2_boot_quirk()
952 dev_info(&dev->dev, "Digidesign Mbox 2: 24bit 48kHz"); in snd_usb_mbox2_boot_quirk()
957 static int snd_usb_axefx3_boot_quirk(struct usb_device *dev) in snd_usb_axefx3_boot_quirk() argument
961 dev_dbg(&dev->dev, "Waiting for Axe-Fx III to boot up...\n"); in snd_usb_axefx3_boot_quirk()
968 err = usb_control_msg(dev, usb_sndctrlpipe(dev, 0), in snd_usb_axefx3_boot_quirk()
972 dev_err(&dev->dev, in snd_usb_axefx3_boot_quirk()
977 dev_dbg(&dev->dev, "Axe-Fx III is now ready\n"); in snd_usb_axefx3_boot_quirk()
979 err = usb_set_interface(dev, 1, 0); in snd_usb_axefx3_boot_quirk()
981 dev_dbg(&dev->dev, in snd_usb_axefx3_boot_quirk()
987 static void mbox3_setup_48_24_magic(struct usb_device *dev) in mbox3_setup_48_24_magic() argument
998 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), in mbox3_setup_48_24_magic()
1000 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), in mbox3_setup_48_24_magic()
1007 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), in mbox3_setup_48_24_magic()
1012 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), in mbox3_setup_48_24_magic()
1019 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), in mbox3_setup_48_24_magic()
1022 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), in mbox3_setup_48_24_magic()
1025 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), in mbox3_setup_48_24_magic()
1028 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), in mbox3_setup_48_24_magic()
1031 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), in mbox3_setup_48_24_magic()
1034 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), in mbox3_setup_48_24_magic()
1037 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), in mbox3_setup_48_24_magic()
1040 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), in mbox3_setup_48_24_magic()
1047 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), in mbox3_setup_48_24_magic()
1052 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), in mbox3_setup_48_24_magic()
1057 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), in mbox3_setup_48_24_magic()
1062 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), in mbox3_setup_48_24_magic()
1068 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), in mbox3_setup_48_24_magic()
1071 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), in mbox3_setup_48_24_magic()
1074 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), in mbox3_setup_48_24_magic()
1077 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), in mbox3_setup_48_24_magic()
1084 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), in mbox3_setup_48_24_magic()
1087 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), in mbox3_setup_48_24_magic()
1091 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), in mbox3_setup_48_24_magic()
1094 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), in mbox3_setup_48_24_magic()
1097 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), in mbox3_setup_48_24_magic()
1100 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), in mbox3_setup_48_24_magic()
1103 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), in mbox3_setup_48_24_magic()
1106 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), in mbox3_setup_48_24_magic()
1109 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), in mbox3_setup_48_24_magic()
1112 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), in mbox3_setup_48_24_magic()
1117 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), in mbox3_setup_48_24_magic()
1122 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), in mbox3_setup_48_24_magic()
1127 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), in mbox3_setup_48_24_magic()
1136 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), in mbox3_setup_48_24_magic()
1139 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), in mbox3_setup_48_24_magic()
1142 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), in mbox3_setup_48_24_magic()
1145 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), in mbox3_setup_48_24_magic()
1148 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), in mbox3_setup_48_24_magic()
1151 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), in mbox3_setup_48_24_magic()
1154 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), in mbox3_setup_48_24_magic()
1157 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), in mbox3_setup_48_24_magic()
1160 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), in mbox3_setup_48_24_magic()
1163 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), in mbox3_setup_48_24_magic()
1166 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), in mbox3_setup_48_24_magic()
1169 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), in mbox3_setup_48_24_magic()
1175 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), in mbox3_setup_48_24_magic()
1181 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), in mbox3_setup_48_24_magic()
1184 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), in mbox3_setup_48_24_magic()
1190 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), in mbox3_setup_48_24_magic()
1196 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), in mbox3_setup_48_24_magic()
1199 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), in mbox3_setup_48_24_magic()
1212 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), in mbox3_setup_48_24_magic()
1222 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), in mbox3_setup_48_24_magic()
1230 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), in mbox3_setup_48_24_magic()
1233 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), in mbox3_setup_48_24_magic()
1242 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), in mbox3_setup_48_24_magic()
1247 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), in mbox3_setup_48_24_magic()
1253 static int snd_usb_mbox3_boot_quirk(struct usb_device *dev) in snd_usb_mbox3_boot_quirk() argument
1255 struct usb_host_config *config = dev->actconfig; in snd_usb_mbox3_boot_quirk()
1262 dev_err(&dev->dev, "Invalid descriptor size=%d.\n", descriptor_size); in snd_usb_mbox3_boot_quirk()
1266 dev_dbg(&dev->dev, "device initialised!\n"); in snd_usb_mbox3_boot_quirk()
1268 err = usb_get_descriptor(dev, USB_DT_DEVICE, 0, in snd_usb_mbox3_boot_quirk()
1269 &dev->descriptor, sizeof(dev->descriptor)); in snd_usb_mbox3_boot_quirk()
1270 config = dev->actconfig; in snd_usb_mbox3_boot_quirk()
1272 dev_dbg(&dev->dev, "error usb_get_descriptor: %d\n", err); in snd_usb_mbox3_boot_quirk()
1274 err = usb_reset_configuration(dev); in snd_usb_mbox3_boot_quirk()
1276 dev_dbg(&dev->dev, "error usb_reset_configuration: %d\n", err); in snd_usb_mbox3_boot_quirk()
1277 dev_dbg(&dev->dev, "mbox3_boot: new boot length = %d\n", in snd_usb_mbox3_boot_quirk()
1280 mbox3_setup_48_24_magic(dev); in snd_usb_mbox3_boot_quirk()
1281 dev_info(&dev->dev, "Digidesign Mbox 3: 24bit 48kHz"); in snd_usb_mbox3_boot_quirk()
1288 static int snd_usb_motu_microbookii_communicate(struct usb_device *dev, u8 *buf, in snd_usb_motu_microbookii_communicate() argument
1293 if (usb_pipe_type_check(dev, usb_sndintpipe(dev, 0x01))) in snd_usb_motu_microbookii_communicate()
1295 err = usb_interrupt_msg(dev, usb_sndintpipe(dev, 0x01), buf, *length, in snd_usb_motu_microbookii_communicate()
1305 if (usb_pipe_type_check(dev, usb_rcvintpipe(dev, 0x82))) in snd_usb_motu_microbookii_communicate()
1307 err = usb_interrupt_msg(dev, usb_rcvintpipe(dev, 0x82), buf, buf_size, in snd_usb_motu_microbookii_communicate()
1319 static int snd_usb_motu_microbookii_boot_quirk(struct usb_device *dev) in snd_usb_motu_microbookii_boot_quirk() argument
1332 dev_info(&dev->dev, "Waiting for MOTU Microbook II to boot up...\n"); in snd_usb_motu_microbookii_boot_quirk()
1337 err = snd_usb_motu_microbookii_communicate(dev, buf, MICROBOOK_BUF_SIZE, in snd_usb_motu_microbookii_boot_quirk()
1341 dev_err(&dev->dev, in snd_usb_motu_microbookii_boot_quirk()
1350 dev_err(&dev->dev, in snd_usb_motu_microbookii_boot_quirk()
1361 dev, buf, MICROBOOK_BUF_SIZE, &actual_length); in snd_usb_motu_microbookii_boot_quirk()
1363 dev_err(&dev->dev, in snd_usb_motu_microbookii_boot_quirk()
1381 dev_info(&dev->dev, "MOTU MicroBook II ready\n"); in snd_usb_motu_microbookii_boot_quirk()
1388 static int snd_usb_motu_m_series_boot_quirk(struct usb_device *dev) in snd_usb_motu_m_series_boot_quirk() argument
1416 usb_set_interface(chip->dev, iface, 0); in quattro_skip_setting_quirk()
1449 usb_set_interface(chip->dev, iface, 0); in audiophile_skip_setting_quirk()
1477 usb_set_interface(chip->dev, iface, 0); in fasttrackpro_skip_setting_quirk()
1562 int snd_usb_apply_boot_quirk(struct usb_device *dev, in snd_usb_apply_boot_quirk() argument
1571 return snd_usb_extigy_boot_quirk(dev, intf); in snd_usb_apply_boot_quirk()
1575 return snd_usb_audigy2nx_boot_quirk(dev); in snd_usb_apply_boot_quirk()
1579 return snd_usb_cm106_boot_quirk(dev); in snd_usb_apply_boot_quirk()
1584 return snd_usb_cm6206_boot_quirk(dev); in snd_usb_apply_boot_quirk()
1588 return snd_usb_mbox2_boot_quirk(dev); in snd_usb_apply_boot_quirk()
1591 return snd_usb_mbox3_boot_quirk(dev); in snd_usb_apply_boot_quirk()
1596 return snd_usb_novation_boot_quirk(dev); in snd_usb_apply_boot_quirk()
1600 return snd_usb_accessmusic_boot_quirk(dev); in snd_usb_apply_boot_quirk()
1605 return snd_usb_nativeinstruments_boot_quirk(dev); in snd_usb_apply_boot_quirk()
1607 return snd_usb_fasttrackpro_boot_quirk(dev); in snd_usb_apply_boot_quirk()
1609 return snd_usb_gamecon780_boot_quirk(dev); in snd_usb_apply_boot_quirk()
1611 return snd_usb_axefx3_boot_quirk(dev); in snd_usb_apply_boot_quirk()
1620 return snd_usb_motu_microbookii_boot_quirk(dev); in snd_usb_apply_boot_quirk()
1627 int snd_usb_apply_boot_quirk_once(struct usb_device *dev, in snd_usb_apply_boot_quirk_once() argument
1634 return snd_usb_motu_m_series_boot_quirk(dev); in snd_usb_apply_boot_quirk_once()
1729 usb_set_interface(subs->dev, 0, 1); in pioneer_djm_set_format_quirk()
1731 snd_usb_ctl_msg(subs->stream->chip->dev, in pioneer_djm_set_format_quirk()
1732 usb_sndctrlpipe(subs->stream->chip->dev, 0), in pioneer_djm_set_format_quirk()
1764 struct usb_device *dev = chip->dev; in snd_usb_select_mode_quirk() local
1771 err = usb_set_interface(dev, fmt->iface, 0); in snd_usb_select_mode_quirk()
1780 err = snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), 0, in snd_usb_select_mode_quirk()
1789 err = snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), 0, in snd_usb_select_mode_quirk()
1831 void snd_usb_ctl_msg_quirk(struct usb_device *dev, unsigned int pipe, in snd_usb_ctl_msg_quirk() argument
1835 struct snd_usb_audio *chip = dev_get_drvdata(&dev->dev); in snd_usb_ctl_msg_quirk()
1914 switch (le16_to_cpu(chip->dev->descriptor.bcdDevice)) { in snd_usb_interface_dsd_format_quirks()
1936 iface = usb_ifnum_to_if(chip->dev, fp->iface); in snd_usb_interface_dsd_format_quirks()