Lines Matching +full:0 +full:x21

42 	for (quirk = quirk_comp->data; quirk->ifnum >= 0; ++quirk) {
50 if (err < 0)
54 for (quirk = quirk_comp->data; quirk->ifnum >= 0; ++quirk) {
62 if (err < 0)
67 return 0;
75 return 0;
84 return snd_usb_midi_v2_create(chip, intf, quirk, 0);
99 alts = &iface->altsetting[0];
102 if (err < 0) {
108 usb_set_interface(chip->dev, altsd->bInterfaceNumber, 0);
109 return 0;
126 if (err < 0)
131 if (err < 0)
139 if (err < 0)
143 return 0;
169 if (fp->nr_rates > 0) {
179 if (fp->iface != get_iface_desc(&iface->altsetting[0])->bInterfaceNumber ||
193 if (fp->datainterval == 0)
195 if (fp->maxpacksize == 0)
201 if (err < 0)
204 usb_set_interface(chip->dev, fp->iface, 0);
207 return 0;
242 epd = get_endpoint(alts, 0);
304 roland_desc, 0xf1);
307 if (roland_desc[0] < 6 || roland_desc[3] != 2)
330 msepd = (struct usb_ms_endpoint_descriptor *)alts->endpoint[0].extra;
331 if (alts->endpoint[0].extralen < 4 ||
351 alts = &iface->altsetting[0];
357 epd = get_endpoint(alts, 0);
363 case 0x0499: /* Yamaha */
368 case 0x0582: /* Roland */
421 .out_cables = 0x0003,
422 .in_cables = 0x0003
429 .out_cables = 0x0001,
430 .in_cables = 0x0001
437 chip->usb_id == USB_ID(0x0582, 0x002b)
453 fp->endpoint = get_endpoint(alts, 0)->bEndpointAddress;
454 fp->ep_attr = get_endpoint(alts, 0)->bmAttributes;
455 fp->datainterval = 0;
456 fp->maxpacksize = le16_to_cpu(get_endpoint(alts, 0)->wMaxPacketSize);
460 case 0x120:
463 case 0x138:
464 case 0x140:
467 case 0x258:
468 case 0x260:
478 if (err < 0) {
483 usb_set_interface(chip->dev, fp->iface, 0);
484 return 0;
495 if (quirk->ifnum < 0)
496 return 0;
565 err = snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev,0),
566 0x10, 0x43, 0x0001, 0x000a, NULL, 0);
567 if (err < 0)
573 err = usb_get_descriptor(dev, USB_DT_DEVICE, 0,
575 if (err < 0)
583 if (err < 0)
589 return 0;
596 snd_usb_ctl_msg(dev, usb_rcvctrlpipe(dev, 0), 0x2a,
598 0, 0, &buf, 1);
599 if (buf == 0) {
600 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), 0x29,
602 1, 2000, NULL, 0);
605 return 0;
621 if (err < 0)
632 return 0;
642 buf[0] = 0x20;
643 buf[1] = value & 0xff;
644 buf[2] = (value >> 8) & 0xff;
646 return snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), USB_REQ_SET_CONFIGURATION,
648 0, 0, &buf, 4);
657 return snd_usb_cm106_write_int_reg(dev, 2, 0x8004);
667 #define CM6206_REG0_SPDIFO_CAT_CODE_GENERAL (0 << 4)
671 #define CM6206_REG0_SPDIFO_PRO_FORMAT BIT(0)
687 #define CM6206_REG1_SPDIFI_MIX BIT(0)
690 #define CM6206_REG2_HEADP_SEL_SIDE_CHANNELS (0 << 13)
705 #define CM6206_REG2_MCUCLKSEL_1_5_MHZ (0)
714 #define CM6206_REG3_SPDIFI_RATE_44_1K BIT(0 << 7)
723 #define CM6206_REG3_SPDIFI_CANREC BIT(0)
728 #define CM6206_REG5_SPDIFO_SEL_FRONT (0 << 9)
738 #define CM6206_REG5_T_SEL_DSDAD_NORMAL 0
746 int err = 0, reg;
784 0x0000,
789 for (reg = 0; reg < ARRAY_SIZE(val); reg++) {
791 if (err < 0)
804 u8 buf[2] = { 0x74, 0xe3 };
805 return snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), UAC_SET_CUR,
818 usb_set_interface(dev, 0, 1);
819 return 0;
825 * acknowledge by sending a sysex on endpoint 0x85 and by displaying a USB
833 static const u8 seq[] = { 0x4e, 0x73, 0x52, 0x01 };
836 if (usb_pipe_type_check(dev, usb_sndintpipe(dev, 0x05)))
841 err = usb_interrupt_msg(dev, usb_sndintpipe(dev, 0x05), buf,
844 if (err < 0)
847 return 0;
865 ret = usb_control_msg(dev, usb_sndctrlpipe(dev, 0),
866 0xaf, USB_TYPE_VENDOR | USB_RECIP_DEVICE,
867 1, 0, NULL, 0, 1000);
869 if (ret < 0)
886 srate[0] = 0x80;
887 srate[1] = 0xbb;
888 srate[2] = 0x00;
891 snd_usb_ctl_msg(dev, usb_rcvctrlpipe(dev, 0),
892 0x01, 0x22, 0x0100, 0x0085, &temp, 0x0003);
893 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0),
894 0x81, 0xa2, 0x0100, 0x0085, &srate, 0x0003);
895 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0),
896 0x81, 0xa2, 0x0100, 0x0086, &srate, 0x0003);
897 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0),
898 0x81, 0xa2, 0x0100, 0x0003, &srate, 0x0003);
907 #define MBOX2_BOOT_LOADING 0x01 /* Hard coded into the device */
908 #define MBOX2_BOOT_READY 0x02 /* Hard coded into the device */
915 u8 bootresponse[0x12];
928 count = 0;
929 bootresponse[0] = MBOX2_BOOT_LOADING;
930 while ((bootresponse[0] == MBOX2_BOOT_LOADING) && (count < 10)) {
932 snd_usb_ctl_msg(dev, usb_rcvctrlpipe(dev, 0),
934 0x85, 0xc0, 0x0001, 0x0000, &bootresponse, 0x0012);
935 if (bootresponse[0] == MBOX2_BOOT_READY)
941 if (bootresponse[0] != MBOX2_BOOT_READY) {
942 dev_err(&dev->dev, "Unknown bootresponse=%d, or timed out, ignoring device.\n", bootresponse[0]);
952 err = usb_get_descriptor(dev, USB_DT_DEVICE, 0,
954 if (err < 0)
963 if (err < 0)
972 return 0; /* Successful boot */
986 err = usb_control_msg(dev, usb_sndctrlpipe(dev, 0),
988 1, 1, NULL, 0, 120000);
989 if (err < 0) {
997 err = usb_set_interface(dev, 1, 0);
998 if (err < 0)
1002 return 0;
1008 /* max volume is: 0x0000. */
1009 /* min volume is: 0x0080 (shown in little endian form) */
1014 /* on = 0x01*/
1015 /* off = 0x00*/
1016 com_buff[0] = 0x00;
1017 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0),
1018 0x01, 0x21, 0x0003, 0x2001, &com_buff, 1);
1021 /* Internal = 0x01*/
1022 /* S/PDIF = 0x02*/
1023 com_buff[0] = 0x01;
1024 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0),
1025 1, 0x21, 0x0100, 0x8001, &com_buff, 1);
1028 com_buff[0] = 0x00;
1029 com_buff[1] = 0x80;
1031 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0),
1032 1, 0x21, 0x0110, 0x4001, &com_buff, 2);
1034 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0),
1035 1, 0x21, 0x0111, 0x4001, &com_buff, 2);
1037 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0),
1038 1, 0x21, 0x0114, 0x4001, &com_buff, 2);
1040 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0),
1041 1, 0x21, 0x0115, 0x4001, &com_buff, 2);
1043 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0),
1044 1, 0x21, 0x0118, 0x4001, &com_buff, 2);
1046 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0),
1047 1, 0x21, 0x0119, 0x4001, &com_buff, 2);
1049 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0),
1050 1, 0x21, 0x011c, 0x4001, &com_buff, 2);
1052 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0),
1053 1, 0x21, 0x011d, 0x4001, &com_buff, 2);
1056 com_buff[0] = 0x00;
1057 com_buff[1] = 0x00;
1059 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0),
1060 1, 0x21, 0x0100, 0x4001, &com_buff, 2);
1061 com_buff[0] = 0x00;
1062 com_buff[1] = 0x80;
1064 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0),
1065 1, 0x21, 0x0101, 0x4001, &com_buff, 2);
1066 com_buff[0] = 0x00;
1067 com_buff[1] = 0x80;
1069 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0),
1070 1, 0x21, 0x0104, 0x4001, &com_buff, 2);
1071 com_buff[0] = 0x00;
1072 com_buff[1] = 0x00;
1074 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0),
1075 1, 0x21, 0x0105, 0x4001, &com_buff, 2);
1077 com_buff[0] = 0x00;
1078 com_buff[1] = 0x80;
1080 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0),
1081 1, 0x21, 0x0108, 0x4001, &com_buff, 2);
1083 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0),
1084 1, 0x21, 0x0109, 0x4001, &com_buff, 2);
1086 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0),
1087 1, 0x21, 0x010c, 0x4001, &com_buff, 2);
1089 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0),
1090 1, 0x21, 0x010d, 0x4001, &com_buff, 2);
1093 com_buff[0] = 0x00;
1094 com_buff[1] = 0x80;
1096 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0),
1097 1, 0x21, 0x0120, 0x4001, &com_buff, 2);
1099 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0),
1100 1, 0x21, 0x0121, 0x4001, &com_buff, 2);
1103 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0),
1104 1, 0x21, 0x0100, 0x4201, &com_buff, 2);
1106 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0),
1107 1, 0x21, 0x0101, 0x4201, &com_buff, 2);
1109 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0),
1110 1, 0x21, 0x0102, 0x4201, &com_buff, 2);
1112 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0),
1113 1, 0x21, 0x0103, 0x4201, &com_buff, 2);
1115 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0),
1116 1, 0x21, 0x0104, 0x4201, &com_buff, 2);
1118 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0),
1119 1, 0x21, 0x0105, 0x4201, &com_buff, 2);
1121 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0),
1122 1, 0x21, 0x0106, 0x4201, &com_buff, 2);
1124 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0),
1125 1, 0x21, 0x0107, 0x4201, &com_buff, 2);
1129 com_buff[0] = 0x02;
1130 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0),
1131 3, 0x21, 0x0000, 0x2001, &com_buff, 1);
1135 com_buff[0] = 0x00;
1136 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0),
1137 3, 0x21, 0x0002, 0x2001, &com_buff, 1);
1140 com_buff[0] = 0x00;
1141 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0),
1142 3, 0x21, 0x0001, 0x2001, &com_buff, 1);
1147 com_buff[0] = 0x00;
1148 com_buff[1] = 0x80;
1150 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0),
1151 1, 0x21, 0x0112, 0x4001, &com_buff, 2);
1153 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0),
1154 1, 0x21, 0x0113, 0x4001, &com_buff, 2);
1156 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0),
1157 1, 0x21, 0x0116, 0x4001, &com_buff, 2);
1159 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0),
1160 1, 0x21, 0x0117, 0x4001, &com_buff, 2);
1162 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0),
1163 1, 0x21, 0x011a, 0x4001, &com_buff, 2);
1165 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0),
1166 1, 0x21, 0x011b, 0x4001, &com_buff, 2);
1168 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0),
1169 1, 0x21, 0x011e, 0x4001, &com_buff, 2);
1171 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0),
1172 1, 0x21, 0x011f, 0x4001, &com_buff, 2);
1174 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0),
1175 1, 0x21, 0x0102, 0x4001, &com_buff, 2);
1177 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0),
1178 1, 0x21, 0x0103, 0x4001, &com_buff, 2);
1180 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0),
1181 1, 0x21, 0x0106, 0x4001, &com_buff, 2);
1183 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0),
1184 1, 0x21, 0x0107, 0x4001, &com_buff, 2);
1186 com_buff[0] = 0x00;
1187 com_buff[1] = 0x00;
1189 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0),
1190 1, 0x21, 0x010a, 0x4001, &com_buff, 2);
1192 com_buff[0] = 0x00;
1193 com_buff[1] = 0x80;
1195 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0),
1196 1, 0x21, 0x010b, 0x4001, &com_buff, 2);
1198 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0),
1199 1, 0x21, 0x010e, 0x4001, &com_buff, 2);
1201 com_buff[0] = 0x00;
1202 com_buff[1] = 0x00;
1204 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0),
1205 1, 0x21, 0x010f, 0x4001, &com_buff, 2);
1207 com_buff[0] = 0x00;
1208 com_buff[1] = 0x80;
1210 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0),
1211 1, 0x21, 0x0122, 0x4001, &com_buff, 2);
1213 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0),
1214 1, 0x21, 0x0123, 0x4001, &com_buff, 2);
1217 /* Room1 = 0x00 */
1218 /* Room2 = 0x01 */
1219 /* Room3 = 0x02 */
1220 /* Hall 1 = 0x03 */
1221 /* Hall 2 = 0x04 */
1222 /* Plate = 0x05 */
1223 /* Delay = 0x06 */
1224 /* Echo = 0x07 */
1225 com_buff[0] = 0x00;
1226 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0),
1227 1, 0x21, 0x0200, 0x4301, &com_buff, 1); /* max is 0xff */
1228 /* min is 0x00 */
1231 /* Set the effect duration to 0 */
1232 /* max is 0xffff */
1233 /* min is 0x0000 */
1234 com_buff[0] = 0x00;
1235 com_buff[1] = 0x00;
1236 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0),
1237 1, 0x21, 0x0400, 0x4301, &com_buff, 2);
1239 /* Set the effect volume and feedback to 0 */
1240 /* max is 0xff */
1241 /* min is 0x00 */
1242 com_buff[0] = 0x00;
1244 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0),
1245 1, 0x21, 0x0500, 0x4301, &com_buff, 1);
1247 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0),
1248 1, 0x21, 0x0300, 0x4301, &com_buff, 1);
1251 /* 0x03 = 250ms */
1252 /* 0x05 = 500ms DEFAULT */
1253 /* 0x08 = 750ms */
1254 /* 0x0a = 1sec */
1255 com_buff[0] = 0x05;
1256 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0),
1257 3, 0x21, 0x0005, 0x2001, &com_buff, 1);
1260 com_buff[0] = 0x00;
1261 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0),
1262 3, 0x21, 0x0004, 0x2001, &com_buff, 1);
1287 err = usb_get_descriptor(dev, USB_DT_DEVICE, 0,
1289 if (err < 0)
1298 if (err < 0)
1307 return 0; /* Successful boot */
1317 if (usb_pipe_type_check(dev, usb_sndintpipe(dev, 0x01)))
1319 err = usb_interrupt_msg(dev, usb_sndintpipe(dev, 0x01), buf, *length,
1321 if (err < 0)
1327 memset(buf, 0, buf_size);
1329 if (usb_pipe_type_check(dev, usb_rcvintpipe(dev, 0x82)))
1331 err = usb_interrupt_msg(dev, usb_rcvintpipe(dev, 0x82), buf, buf_size,
1333 if (err < 0)
1340 return 0;
1345 int err, actual_length, poll_attempts = 0;
1346 static const u8 set_samplerate_seq[] = { 0x00, 0x00, 0x00, 0x00,
1347 0x00, 0x00, 0x0b, 0x14,
1348 0x00, 0x00, 0x00, 0x01 };
1349 static const u8 poll_ready_seq[] = { 0x00, 0x04, 0x00, 0x00,
1350 0x00, 0x00, 0x0b, 0x18 };
1364 if (err < 0) {
1380 memset(buf, 0, MICROBOOK_BUF_SIZE);
1386 if (err < 0) {
1395 * XX 06 00 00 00 00 0b 18 00 00 00 01
1416 return 0;
1422 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0),
1423 16, 0x40, 0x2410, 0x7fff, NULL, 0);
1424 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0),
1425 18, 0x40, 0x0104, 0xffff, NULL, 0);
1428 for (int ch = 0; ch < 32; ch++)
1429 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0),
1430 22, 0x40, 0x400, ch, NULL, 0);
1433 for (int ch = 0; ch < 34; ch++)
1434 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0),
1435 21, 0x40, 0x9000, 0x100 + ch, NULL, 0);
1437 return 0;
1443 #define MAUDIO_SET 0x01 /* parse device_setup */
1444 #define MAUDIO_SET_COMPATIBLE 0x80 /* use only "win-compatible" interfaces */
1445 #define MAUDIO_SET_DTS 0x02 /* enable DTS Digital Output */
1446 #define MAUDIO_SET_96K 0x04 /* 48-96kHz rate if set, 8-48kHz otherwise */
1447 #define MAUDIO_SET_24B 0x08 /* 24bits sample if set, 16bits otherwise */
1448 #define MAUDIO_SET_DI 0x10 /* enable Digital Input */
1449 #define MAUDIO_SET_MASK 0x1f /* bit mask for setup value */
1450 #define MAUDIO_SET_24B_48K_DI 0x19 /* 24bits+48kHz+Digital Input */
1451 #define MAUDIO_SET_24B_48K_NOTDI 0x09 /* 24bits+48kHz+No Digital Input */
1452 #define MAUDIO_SET_16B_48K_DI 0x11 /* 16bits+48kHz+Digital Input */
1453 #define MAUDIO_SET_16B_48K_NOTDI 0x01 /* 16bits+48kHz+No Digital Input */
1458 /* Reset ALL ifaces to 0 altsetting.
1461 usb_set_interface(chip->dev, iface, 0);
1484 return 0; /* keep this altsetting */
1491 /* Reset ALL ifaces to 0 altsetting.
1494 usb_set_interface(chip->dev, iface, 0);
1513 return 0; /* keep this altsetting */
1519 /* Reset ALL ifaces to 0 altsetting.
1522 usb_set_interface(chip->dev, iface, 0);
1551 return 0; /* keep this altsetting */
1576 if ((chip->setup == 0 || chip->setup > 2) && altno != 2)
1583 return 0;
1591 if (chip->usb_id == USB_ID(0x0763, 0x2003))
1594 if (chip->usb_id == USB_ID(0x0763, 0x2001))
1597 if (chip->usb_id == USB_ID(0x0763, 0x2012))
1600 if (chip->usb_id == USB_ID(0x194f, 0x010c))
1603 return 0;
1612 case USB_ID(0x041e, 0x3000):
1617 case USB_ID(0x041e, 0x3020):
1621 case USB_ID(0x10f5, 0x0200):
1625 case USB_ID(0x0d8c, 0x0102):
1627 case USB_ID(0x0ccd, 0x00b1): /* Terratec Aureon 7.1 USB */
1630 case USB_ID(0x0dba, 0x3000):
1633 case USB_ID(0x0dba, 0x5000):
1638 case USB_ID(0x1235, 0x0010): /* Focusrite Novation Saffire 6 USB */
1639 case USB_ID(0x1235, 0x0018): /* Focusrite Novation Twitch */
1642 case USB_ID(0x133e, 0x0815):
1646 case USB_ID(0x17cc, 0x1000): /* Komplete Audio 6 */
1647 case USB_ID(0x17cc, 0x1010): /* Traktor Audio 6 */
1648 case USB_ID(0x17cc, 0x1020): /* Traktor Audio 10 */
1650 case USB_ID(0x0763, 0x2012): /* M-Audio Fast Track Pro USB */
1652 case USB_ID(0x047f, 0xc010): /* Plantronics Gamecom 780 */
1654 case USB_ID(0x2466, 0x8010): /* Fractal Audio Axe-Fx 3 */
1656 case USB_ID(0x07fd, 0x0004): /* MOTU MicroBook II */
1666 case USB_ID(0x2a39, 0x3f8c): /* RME Digiface USB */
1667 case USB_ID(0x2a39, 0x3fa0): /* RME Digiface USB (alternate) */
1671 return 0;
1680 case USB_ID(0x07fd, 0x0008): /* MOTU M Series, 1st hardware version */
1684 return 0;
1695 case USB_ID(0x0763, 0x2001): /* M-Audio Quattro: captured data only */
1700 case USB_ID(0x0763, 0x2003): /* M-Audio Audiophile USB */
1701 if (chip->setup == 0x00 ||
1706 case USB_ID(0x0763, 0x2012): /* M-Audio Fast Track Pro */
1712 return 0;
1721 EMU_QUIRK_SR_44100HZ = 0,
1732 unsigned char emu_samplerate_id = 0;
1764 subs->pkt_offset_adj = (emu_samplerate_id >= EMU_QUIRK_SR_176400HZ) ? 4 : 0;
1773 sr[0] = cur_rate & 0xff;
1774 sr[1] = (cur_rate >> 8) & 0xff;
1775 sr[2] = (cur_rate >> 16) & 0xff;
1776 usb_set_interface(subs->dev, 0, 1);
1779 usb_sndctrlpipe(subs->stream->chip->dev, 0),
1780 0x01, 0x22, 0x0100, windex, &sr, 0x0003);
1781 return 0;
1787 __le32 buff4 = 0;
1788 u8 buff1 = 0x01;
1793 snd_usb_ctl_msg(subs->dev, usb_rcvctrlpipe(subs->dev, 0),
1794 0x01, 0x21 | USB_DIR_IN, 0x0100, 0x8101, &buff4, 4);
1809 snd_usb_ctl_msg(subs->dev, usb_sndctrlpipe(subs->dev, 0),
1810 0x01, 0x21, 0x0100, 0x8101, &buff4, 4);
1813 snd_usb_ctl_msg(subs->dev, usb_sndctrlpipe(subs->dev, 0),
1814 0x01, 0x21, 0x0100, 0x8001, &buff1, 1);
1817 buff4 = 0;
1818 snd_usb_ctl_msg(subs->dev, usb_rcvctrlpipe(subs->dev, 0),
1819 0x01, 0x21 | USB_DIR_IN, 0x0100, 0x8101, &buff4, 4);
1825 32000, 44100, 48000, 0,
1826 64000, 88200, 96000, 0,
1827 128000, 176400, 192000, 0,
1837 for (id = 0; id < ARRAY_SIZE(rme_digiface_rate_table); id++) {
1851 usb_sndctrlpipe(subs->stream->chip->dev, 0),
1852 16, 0x40, val, 0x7078, NULL, 0);
1853 return 0;
1860 case USB_ID(0x041e, 0x3f02): /* E-Mu 0202 USB */
1861 case USB_ID(0x041e, 0x3f04): /* E-Mu 0404 USB */
1862 case USB_ID(0x041e, 0x3f0a): /* E-Mu Tracker Pre */
1863 case USB_ID(0x041e, 0x3f19): /* E-Mu 0204 USB */
1866 case USB_ID(0x534d, 0x0021): /* MacroSilicon MS2100/MS2106 */
1867 case USB_ID(0x534d, 0x2109): /* MacroSilicon MS2109 */
1870 case USB_ID(0x2b73, 0x000a): /* Pioneer DJM-900NXS2 */
1871 case USB_ID(0x2b73, 0x0013): /* Pioneer DJM-450 */
1872 case USB_ID(0x2b73, 0x0034): /* Pioneer DJM-V10 */
1873 pioneer_djm_set_format_quirk(subs, 0x0082);
1875 case USB_ID(0x08e4, 0x017f): /* Pioneer DJM-750 */
1876 case USB_ID(0x08e4, 0x0163): /* Pioneer DJM-850 */
1877 pioneer_djm_set_format_quirk(subs, 0x0086);
1879 case USB_ID(0x0dba, 0x5000):
1882 case USB_ID(0x2a39, 0x3f8c): /* RME Digiface USB */
1883 case USB_ID(0x2a39, 0x3fa0): /* RME Digiface USB (alternate) */
1896 /* First switch to alt set 0, otherwise the mode switch cmd
1899 err = usb_set_interface(dev, fmt->iface, 0);
1900 if (err < 0)
1908 err = snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), 0,
1910 1, 1, NULL, 0);
1911 if (err < 0)
1917 err = snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), 0,
1919 0, 1, NULL, 0);
1920 if (err < 0)
1926 return 0;
1935 if (USB_ID_VENDOR(ep->chip->usb_id) == 0x23ba &&
1946 if ((ep->chip->usb_id == USB_ID(0x0763, 0x2030) ||
1947 ep->chip->usb_id == USB_ID(0x0763, 0x2031)) &&
1952 if ((ep->chip->usb_id == USB_ID(0x0644, 0x8038) || /* TEAC UD-H01 */
1953 ep->chip->usb_id == USB_ID(0x1852, 0x5034)) && /* T+A Dac8 */
1990 if (USB_ID_VENDOR(chip->usb_id) == 0x23ba &&
1991 USB_ID_PRODUCT(chip->usb_id) < 0x0110) {
2007 case USB_ID(0x139f, 0x5504): /* Nagra DAC */
2008 case USB_ID(0x20b1, 0x3089): /* Mola-Mola DAC */
2009 case USB_ID(0x2522, 0x0007): /* LH Labs Geek Out 1V5 */
2010 case USB_ID(0x2522, 0x0009): /* LH Labs Geek Pulse X Inifinity 2V0 */
2011 case USB_ID(0x2522, 0x0012): /* LH Labs VI DAC Infinity */
2012 case USB_ID(0x2772, 0x0230): /* Pro-Ject Pre Box S2 Digital */
2017 case USB_ID(0x0d8c, 0x0316): /* Hegel HD12 DSD */
2018 case USB_ID(0x10cb, 0x0103): /* The Bit Opus #3; with fp->dsd_raw */
2019 case USB_ID(0x16d0, 0x06b2): /* NuPrime DAC-10 */
2020 case USB_ID(0x16d0, 0x06b4): /* NuPrime Audio HD-AVP/AVA */
2021 case USB_ID(0x16d0, 0x0733): /* Furutech ADL Stratos */
2022 case USB_ID(0x16d0, 0x09d8): /* NuPrime IDA-8 */
2023 case USB_ID(0x16d0, 0x09db): /* NuPrime Audio DAC-9 */
2024 case USB_ID(0x16d0, 0x09dd): /* Encore mDSD */
2025 case USB_ID(0x1db5, 0x0003): /* Bryston BDA3 */
2026 case USB_ID(0x20a0, 0x4143): /* WaveIO USB Audio 2.0 */
2027 case USB_ID(0x22e1, 0xca01): /* HDTA Serenade DSD */
2028 case USB_ID(0x249c, 0x9326): /* M2Tech Young MkIII */
2029 case USB_ID(0x2616, 0x0106): /* PS Audio NuWave DAC */
2030 case USB_ID(0x2622, 0x0041): /* Audiolab M-DAC+ */
2031 case USB_ID(0x278b, 0x5100): /* Rotel RC-1590 */
2032 case USB_ID(0x27f7, 0x3002): /* W4S DAC-2v2SE */
2033 case USB_ID(0x29a2, 0x0086): /* Mutec MC3+ USB */
2034 case USB_ID(0x6b42, 0x0042): /* MSB Technology */
2040 case USB_ID(0x16d0, 0x071a): /* Amanero - Combo384 */
2043 case 0x199:
2045 case 0x19b:
2046 case 0x203:
2053 case USB_ID(0x16d0, 0x0a23):
2067 * three (0-2),
2069 * four (0-3).
2079 return 0;
2087 case USB_ID(0x0a92, 0x0053): /* AudioTrak Optoplay */
2093 case USB_ID(0x041e, 0x3020): /* Creative SB Audigy 2 NX */
2094 case USB_ID(0x0763, 0x2003): /* M-Audio Audiophile USB */
2098 case USB_ID(0x0763, 0x2001): /* M-Audio Quattro USB */
2099 case USB_ID(0x0763, 0x2012): /* M-Audio Fast Track Pro USB */
2100 case USB_ID(0x047f, 0x0ca1): /* plantronics headset */
2101 case USB_ID(0x077d, 0x07af): /* Griffin iMic (note that there is
2113 case USB_ID(0x07fd, 0x0004): /* MOTU MicroBook IIc */
2121 case USB_ID(0x1224, 0x2a25): /* Jieli Technology USB PHY 2.0 */
2125 case USB_ID(0x3511, 0x2b1e): /* Opencomm2 UC USB Bluetooth dongle */
2143 #define VENDOR_FLG(vid, _flags) DEVICE_FLG(vid, 0, _flags)
2147 DEVICE_FLG(0x03f0, 0x654a, /* HP 320 FHD Webcam */
2149 DEVICE_FLG(0x041e, 0x3000, /* Creative SB Extigy */
2151 DEVICE_FLG(0x041e, 0x4080, /* Creative Live Cam VF0610 */
2153 DEVICE_FLG(0x045e, 0x083c, /* MS USB Link headset */
2156 DEVICE_FLG(0x045e, 0x070f, /* MS LifeChat LX-3000 Headset */
2158 DEVICE_FLG(0x046d, 0x0807, /* Logitech Webcam C500 */
2160 DEVICE_FLG(0x046d, 0x0808, /* Logitech Webcam C600 */
2162 DEVICE_FLG(0x046d, 0x0809,
2164 DEVICE_FLG(0x046d, 0x0819, /* Logitech Webcam C210 */
2166 DEVICE_FLG(0x046d, 0x081b, /* HD Webcam c310 */
2168 DEVICE_FLG(0x046d, 0x081d, /* HD Webcam c510 */
2170 DEVICE_FLG(0x046d, 0x0825, /* HD Webcam c270 */
2172 DEVICE_FLG(0x046d, 0x0826, /* HD Webcam c525 */
2174 DEVICE_FLG(0x046d, 0x084c, /* Logitech ConferenceCam Connect */
2176 DEVICE_FLG(0x046d, 0x08ca, /* Logitech Quickcam Fusion */
2178 DEVICE_FLG(0x046d, 0x0991, /* Logitech QuickCam Pro */
2181 DEVICE_FLG(0x046d, 0x09a2, /* QuickCam Communicate Deluxe/S7500 */
2183 DEVICE_FLG(0x046d, 0x09a4, /* Logitech QuickCam E 3500 */
2185 DEVICE_FLG(0x046d, 0x0a8f, /* Logitech H390 headset */
2188 DEVICE_FLG(0x0499, 0x1506, /* Yamaha THR5 */
2190 DEVICE_FLG(0x0499, 0x1509, /* Steinberg UR22 */
2192 DEVICE_FLG(0x0499, 0x3108, /* Yamaha YIT-W12TX */
2194 DEVICE_FLG(0x04d8, 0xfeea, /* Benchmark DAC1 Pre */
2196 DEVICE_FLG(0x04e8, 0xa051, /* Samsung USBC Headset (AKG) */
2198 DEVICE_FLG(0x0525, 0xa4ad, /* Hamedal C20 usb camero */
2200 DEVICE_FLG(0x054c, 0x0b8c, /* Sony WALKMAN NW-A45 DAC */
2202 DEVICE_FLG(0x0556, 0x0014, /* Phoenix Audio TMX320VC */
2204 DEVICE_FLG(0x0572, 0x1b08, /* Conexant Systems (Rockwell), Inc. */
2206 DEVICE_FLG(0x0572, 0x1b09, /* Conexant Systems (Rockwell), Inc. */
2208 DEVICE_FLG(0x05a3, 0x9420, /* ELP HD USB Camera */
2210 DEVICE_FLG(0x05a7, 0x1020, /* Bose Companion 5 */
2212 DEVICE_FLG(0x05e1, 0x0408, /* Syntek STK1160 */
2214 DEVICE_FLG(0x05e1, 0x0480, /* Hauppauge Woodbury */
2216 DEVICE_FLG(0x0644, 0x8043, /* TEAC UD-501/UD-501V2/UD-503/NT-503 */
2219 DEVICE_FLG(0x0644, 0x8044, /* Esoteric D-05X */
2222 DEVICE_FLG(0x0644, 0x804a, /* TEAC UD-301 */
2225 DEVICE_FLG(0x0644, 0x805f, /* TEAC Model 12 */
2227 DEVICE_FLG(0x0644, 0x806b, /* TEAC UD-701 */
2230 DEVICE_FLG(0x06f8, 0xb000, /* Hercules DJ Console (Windows Edition) */
2232 DEVICE_FLG(0x06f8, 0xd002, /* Hercules DJ Console (Macintosh Edition) */
2234 DEVICE_FLG(0x0711, 0x5800, /* MCT Trigger 5 USB-to-HDMI */
2236 DEVICE_FLG(0x074d, 0x3553, /* Outlaw RR2150 (Micronas UAC3553B) */
2238 DEVICE_FLG(0x0763, 0x2030, /* M-Audio Fast Track C400 */
2240 DEVICE_FLG(0x0763, 0x2031, /* M-Audio Fast Track C600 */
2242 DEVICE_FLG(0x07fd, 0x000b, /* MOTU M Series 2nd hardware revision */
2244 DEVICE_FLG(0x08bb, 0x2702, /* LineX FM Transmitter */
2246 DEVICE_FLG(0x0951, 0x16ad, /* Kingston HyperX */
2248 DEVICE_FLG(0x0b05, 0x18a6, /* ASUSTek Computer, Inc. */
2250 DEVICE_FLG(0x0b0e, 0x0349, /* Jabra 550a */
2252 DEVICE_FLG(0x0bda, 0x498a, /* Realtek Semiconductor Corp. */
2254 DEVICE_FLG(0x0c45, 0x6340, /* Sonix HD USB Camera */
2256 DEVICE_FLG(0x0c45, 0x636b, /* Microdia JP001 USB Camera */
2258 DEVICE_FLG(0x0d8c, 0x000c, /* C-Media */
2260 DEVICE_FLG(0x0d8c, 0x0012, /* C-Media */
2262 DEVICE_FLG(0x0d8c, 0x0014, /* C-Media */
2264 DEVICE_FLG(0x0ecb, 0x205c, /* JBL Quantum610 Wireless */
2266 DEVICE_FLG(0x0ecb, 0x2069, /* JBL Quantum810 Wireless */
2268 DEVICE_FLG(0x0fd9, 0x0008, /* Hauppauge HVR-950Q */
2270 DEVICE_FLG(0x1101, 0x0003, /* Audioengine D1 */
2272 DEVICE_FLG(0x12d1, 0x3a07, /* Huawei Technologies Co., Ltd. */
2274 DEVICE_FLG(0x1224, 0x2a25, /* Jieli Technology USB PHY 2.0 */
2276 DEVICE_FLG(0x1395, 0x740a, /* Sennheiser DECT */
2278 DEVICE_FLG(0x1397, 0x0507, /* Behringer UMC202HD */
2280 DEVICE_FLG(0x1397, 0x0508, /* Behringer UMC204HD */
2282 DEVICE_FLG(0x1397, 0x0509, /* Behringer UMC404HD */
2284 DEVICE_FLG(0x13e5, 0x0001, /* Serato Phono */
2286 DEVICE_FLG(0x154e, 0x1002, /* Denon DCD-1500RE */
2288 DEVICE_FLG(0x154e, 0x1003, /* Denon DA-300USB */
2290 DEVICE_FLG(0x154e, 0x3005, /* Marantz HD-DAC1 */
2292 DEVICE_FLG(0x154e, 0x3006, /* Marantz SA-14S1 */
2294 DEVICE_FLG(0x154e, 0x300b, /* Marantz SA-KI RUBY / SA-12 */
2296 DEVICE_FLG(0x154e, 0x500e, /* Denon DN-X1600 */
2298 DEVICE_FLG(0x1686, 0x00dd, /* Zoom R16/24 */
2300 DEVICE_FLG(0x17aa, 0x1046, /* Lenovo ThinkStation P620 Rear Line-in, Line-out and Microphone */
2302 DEVICE_FLG(0x17aa, 0x104d, /* Lenovo ThinkStation P620 Internal Speaker + Front Headset */
2304 DEVICE_FLG(0x17ef, 0x3083, /* Lenovo TBT3 dock */
2306 DEVICE_FLG(0x1852, 0x5062, /* Luxman D-08u */
2308 DEVICE_FLG(0x1852, 0x5065, /* Luxman DA-06 */
2310 DEVICE_FLG(0x1901, 0x0191, /* GE B850V3 CP2114 audio interface */
2312 DEVICE_FLG(0x19f7, 0x0003, /* RODE NT-USB */
2314 DEVICE_FLG(0x19f7, 0x0035, /* RODE NT-USB+ */
2316 DEVICE_FLG(0x1bcf, 0x2281, /* HD Webcam */
2318 DEVICE_FLG(0x1bcf, 0x2283, /* NexiGo N930AF FHD Webcam */
2320 DEVICE_FLG(0x2040, 0x7200, /* Hauppauge HVR-950Q */
2322 DEVICE_FLG(0x2040, 0x7201, /* Hauppauge HVR-950Q-MXL */
2324 DEVICE_FLG(0x2040, 0x7210, /* Hauppauge HVR-950Q */
2326 DEVICE_FLG(0x2040, 0x7211, /* Hauppauge HVR-950Q-MXL */
2328 DEVICE_FLG(0x2040, 0x7213, /* Hauppauge HVR-950Q */
2330 DEVICE_FLG(0x2040, 0x7217, /* Hauppauge HVR-950Q */
2332 DEVICE_FLG(0x2040, 0x721b, /* Hauppauge HVR-950Q */
2334 DEVICE_FLG(0x2040, 0x721e, /* Hauppauge HVR-950Q */
2336 DEVICE_FLG(0x2040, 0x721f, /* Hauppauge HVR-950Q */
2338 DEVICE_FLG(0x2040, 0x7240, /* Hauppauge HVR-850 */
2340 DEVICE_FLG(0x2040, 0x7260, /* Hauppauge HVR-950Q */
2342 DEVICE_FLG(0x2040, 0x7270, /* Hauppauge HVR-950Q */
2344 DEVICE_FLG(0x2040, 0x7280, /* Hauppauge HVR-950Q */
2346 DEVICE_FLG(0x2040, 0x7281, /* Hauppauge HVR-950Q-MXL */
2348 DEVICE_FLG(0x2040, 0x8200, /* Hauppauge Woodbury */
2350 DEVICE_FLG(0x21b4, 0x0081, /* AudioQuest DragonFly */
2352 DEVICE_FLG(0x21b4, 0x0230, /* Ayre QB-9 Twenty */
2354 DEVICE_FLG(0x21b4, 0x0232, /* Ayre QX-5 Twenty */
2356 DEVICE_FLG(0x2522, 0x0007, /* LH Labs Geek Out HD Audio 1V5 */
2358 DEVICE_FLG(0x262a, 0x9302, /* ddHiFi TC44C */
2360 DEVICE_FLG(0x2708, 0x0002, /* Audient iD14 */
2362 DEVICE_FLG(0x2912, 0x30c8, /* Audioengine D1 */
2364 DEVICE_FLG(0x2a70, 0x1881, /* OnePlus Technology (Shenzhen) Co., Ltd. BE02T */
2366 DEVICE_FLG(0x2b53, 0x0023, /* Fiero SC-01 (firmware v1.0.0 @ 48 kHz) */
2368 DEVICE_FLG(0x2b53, 0x0024, /* Fiero SC-01 (firmware v1.0.0 @ 96 kHz) */
2370 DEVICE_FLG(0x2b53, 0x0031, /* Fiero SC-01 (firmware v1.1.0) */
2372 DEVICE_FLG(0x2d95, 0x8011, /* VIVO USB-C HEADSET */
2374 DEVICE_FLG(0x2d95, 0x8021, /* VIVO USB-C-XE710 HEADSET */
2376 DEVICE_FLG(0x2d99, 0x0026, /* HECATE G2 GAMING HEADSET */
2378 DEVICE_FLG(0x2fc6, 0xf0b7, /* iBasso DC07 Pro */
2380 DEVICE_FLG(0x30be, 0x0101, /* Schiit Hel */
2382 DEVICE_FLG(0x339b, 0x3a07, /* Synaptics HONOR USB-C HEADSET */
2384 DEVICE_FLG(0x413c, 0xa506, /* Dell AE515 sound bar */
2386 DEVICE_FLG(0x534d, 0x0021, /* MacroSilicon MS2100/MS2106 */
2388 DEVICE_FLG(0x534d, 0x2109, /* MacroSilicon MS2109 */
2392 VENDOR_FLG(0x045e, /* MS Lifecam */
2394 VENDOR_FLG(0x046d, /* Logitech */
2396 VENDOR_FLG(0x047f, /* Plantronics */
2398 VENDOR_FLG(0x0644, /* TEAC Corp. */
2400 VENDOR_FLG(0x07fd, /* MOTU */
2402 VENDOR_FLG(0x1235, /* Focusrite Novation */
2404 VENDOR_FLG(0x1511, /* AURALiC */
2406 VENDOR_FLG(0x152a, /* Thesycon devices */
2408 VENDOR_FLG(0x18d1, /* iBasso devices */
2410 VENDOR_FLG(0x1de7, /* Phoenix Audio */
2412 VENDOR_FLG(0x20b1, /* XMOS based devices */
2414 VENDOR_FLG(0x21ed, /* Accuphase Laboratory */
2416 VENDOR_FLG(0x22d9, /* Oppo */
2418 VENDOR_FLG(0x23ba, /* Playback Design */
2421 VENDOR_FLG(0x25ce, /* Mytek devices */
2423 VENDOR_FLG(0x278b, /* Rotel? */
2425 VENDOR_FLG(0x292b, /* Gustard/Ess based devices */
2427 VENDOR_FLG(0x2972, /* FiiO devices */
2429 VENDOR_FLG(0x2ab6, /* T+A devices */
2431 VENDOR_FLG(0x2afd, /* McIntosh Laboratory, Inc. */
2433 VENDOR_FLG(0x2d87, /* Cayin device */
2435 VENDOR_FLG(0x2fc6, /* Comture-inc devices */
2437 VENDOR_FLG(0x3336, /* HEM devices */
2439 VENDOR_FLG(0x3353, /* Khadas devices */
2441 VENDOR_FLG(0x35f4, /* MSB Technology */
2443 VENDOR_FLG(0x3842, /* EVGA */
2445 VENDOR_FLG(0xc502, /* HiBy devices */
2497 return 0;
2499 for (i = 0; snd_usb_audio_quirk_flag_names[i]; i++) {
2500 if (strcasecmp(name, snd_usb_audio_quirk_flag_names[i]) == 0)
2504 return 0;
2523 "From %s apply unknown quirk flag 0x%lx for device %04x:%04x\n",
2565 if (strcmp(field, "*") == 0)
2566 vid = 0;
2574 if (strcmp(field, "*") == 0)
2575 pid = 0;
2583 if ((vid != 0 && vid != chip_vid) ||
2584 (pid != 0 && pid != chip_pid))
2588 mask_flags = 0;
2589 unmask_flags = 0;