Lines Matching +full:hall +full:- +full:channel
1 // SPDX-License-Identifier: GPL-2.0-or-later
38 int probed_ifnum = get_iface_desc(iface->altsetting)->bInterfaceNumber; in create_composite_quirk()
42 for (quirk = quirk_comp->data; quirk->ifnum >= 0; ++quirk) { in create_composite_quirk()
43 iface = usb_ifnum_to_if(chip->dev, quirk->ifnum); in create_composite_quirk()
46 if (quirk->ifnum != probed_ifnum && in create_composite_quirk()
54 for (quirk = quirk_comp->data; quirk->ifnum >= 0; ++quirk) { in create_composite_quirk()
55 iface = usb_ifnum_to_if(chip->dev, quirk->ifnum); in create_composite_quirk()
58 if (quirk->ifnum != probed_ifnum && in create_composite_quirk()
99 alts = &iface->altsetting[0]; in create_standard_audio_quirk()
101 err = snd_usb_parse_audio_interface(chip, altsd->bInterfaceNumber); in create_standard_audio_quirk()
104 altsd->bInterfaceNumber, err); in create_standard_audio_quirk()
108 usb_set_interface(chip->dev, altsd->bInterfaceNumber, 0); in create_standard_audio_quirk()
120 stream = (fp->endpoint & USB_DIR_IN) ? in add_audio_stream_from_fixed_fmt()
129 err = snd_usb_add_endpoint(chip, fp->endpoint, in add_audio_stream_from_fixed_fmt()
134 if (fp->sync_ep) { in add_audio_stream_from_fixed_fmt()
135 err = snd_usb_add_endpoint(chip, fp->sync_ep, in add_audio_stream_from_fixed_fmt()
136 fp->implicit_fb ? in add_audio_stream_from_fixed_fmt()
160 fp = kmemdup(quirk->data, sizeof(*fp), GFP_KERNEL); in create_fixed_stream_quirk()
162 return -ENOMEM; in create_fixed_stream_quirk()
164 INIT_LIST_HEAD(&fp->list); in create_fixed_stream_quirk()
165 if (fp->nr_rates > MAX_NR_RATES) { in create_fixed_stream_quirk()
167 return -EINVAL; in create_fixed_stream_quirk()
169 if (fp->nr_rates > 0) { in create_fixed_stream_quirk()
170 rate_table = kmemdup_array(fp->rate_table, fp->nr_rates, sizeof(int), in create_fixed_stream_quirk()
174 return -ENOMEM; in create_fixed_stream_quirk()
176 fp->rate_table = rate_table; in create_fixed_stream_quirk()
179 if (fp->iface != get_iface_desc(&iface->altsetting[0])->bInterfaceNumber || in create_fixed_stream_quirk()
180 fp->altset_idx >= iface->num_altsetting) { in create_fixed_stream_quirk()
181 err = -EINVAL; in create_fixed_stream_quirk()
184 alts = &iface->altsetting[fp->altset_idx]; in create_fixed_stream_quirk()
186 if (altsd->bNumEndpoints <= fp->ep_idx) { in create_fixed_stream_quirk()
187 err = -EINVAL; in create_fixed_stream_quirk()
191 fp->protocol = altsd->bInterfaceProtocol; in create_fixed_stream_quirk()
193 if (fp->datainterval == 0) in create_fixed_stream_quirk()
194 fp->datainterval = snd_usb_parse_datainterval(chip, alts); in create_fixed_stream_quirk()
195 if (fp->maxpacksize == 0) in create_fixed_stream_quirk()
196 fp->maxpacksize = le16_to_cpu(get_endpoint(alts, fp->ep_idx)->wMaxPacketSize); in create_fixed_stream_quirk()
197 if (!fp->fmt_type) in create_fixed_stream_quirk()
198 fp->fmt_type = UAC_FORMAT_TYPE_I; in create_fixed_stream_quirk()
204 usb_set_interface(chip->dev, fp->iface, 0); in create_fixed_stream_quirk()
206 snd_usb_init_sample_rate(chip, fp, fp->rate_max); in create_fixed_stream_quirk()
210 list_del(&fp->list); /* unlink for avoiding double-free */ in create_fixed_stream_quirk()
233 /* must have a non-zero altsetting for streaming */ in create_auto_pcm_quirk()
234 if (iface->num_altsetting < 2) in create_auto_pcm_quirk()
235 return -ENODEV; in create_auto_pcm_quirk()
236 alts = &iface->altsetting[1]; in create_auto_pcm_quirk()
240 if (altsd->bNumEndpoints < 1) in create_auto_pcm_quirk()
241 return -ENODEV; in create_auto_pcm_quirk()
244 return -ENODEV; in create_auto_pcm_quirk()
247 ashd = snd_usb_find_csint_desc(alts->extra, alts->extralen, NULL, in create_auto_pcm_quirk()
249 fmtd = snd_usb_find_csint_desc(alts->extra, alts->extralen, NULL, in create_auto_pcm_quirk()
251 if (!ashd || ashd->bLength < 7 || in create_auto_pcm_quirk()
252 !fmtd || fmtd->bLength < 8) in create_auto_pcm_quirk()
253 return -ENODEV; in create_auto_pcm_quirk()
270 injd = snd_usb_find_csint_desc(alts->extra, alts->extralen, in create_yamaha_midi_quirk()
272 outjd = snd_usb_find_csint_desc(alts->extra, alts->extralen, in create_yamaha_midi_quirk()
275 return -ENODEV; in create_yamaha_midi_quirk()
278 return -ENODEV; in create_yamaha_midi_quirk()
279 if (injd && (injd->bLength < 5 || in create_yamaha_midi_quirk()
280 (injd->bJackType != USB_MS_EMBEDDED && in create_yamaha_midi_quirk()
281 injd->bJackType != USB_MS_EXTERNAL))) in create_yamaha_midi_quirk()
282 return -ENODEV; in create_yamaha_midi_quirk()
283 if (outjd && (outjd->bLength < 6 || in create_yamaha_midi_quirk()
284 (outjd->bJackType != USB_MS_EMBEDDED && in create_yamaha_midi_quirk()
285 outjd->bJackType != USB_MS_EXTERNAL))) in create_yamaha_midi_quirk()
286 return -ENODEV; in create_yamaha_midi_quirk()
300 /* might have a vendor-specific descriptor <06 24 F1 02 ...> */ in create_roland_midi_quirk()
302 roland_desc = snd_usb_find_csint_desc(alts->extra, in create_roland_midi_quirk()
303 alts->extralen, in create_roland_midi_quirk()
306 return -ENODEV; in create_roland_midi_quirk()
323 mshd = (struct usb_ms_header_descriptor *)alts->extra; in create_std_midi_quirk()
324 if (alts->extralen < 7 || in create_std_midi_quirk()
325 mshd->bLength < 7 || in create_std_midi_quirk()
326 mshd->bDescriptorType != USB_DT_CS_INTERFACE || in create_std_midi_quirk()
327 mshd->bDescriptorSubtype != USB_MS_HEADER) in create_std_midi_quirk()
328 return -ENODEV; in create_std_midi_quirk()
330 msepd = (struct usb_ms_endpoint_descriptor *)alts->endpoint[0].extra; in create_std_midi_quirk()
331 if (alts->endpoint[0].extralen < 4 || in create_std_midi_quirk()
332 msepd->bLength < 4 || in create_std_midi_quirk()
333 msepd->bDescriptorType != USB_DT_CS_ENDPOINT || in create_std_midi_quirk()
334 msepd->bDescriptorSubtype != UAC_MS_GENERAL || in create_std_midi_quirk()
335 msepd->bNumEmbMIDIJack < 1 || in create_std_midi_quirk()
336 msepd->bNumEmbMIDIJack > 16) in create_std_midi_quirk()
337 return -ENODEV; in create_std_midi_quirk()
351 alts = &iface->altsetting[0]; in create_auto_midi_quirk()
355 if (altsd->bNumEndpoints < 1) in create_auto_midi_quirk()
356 return -ENODEV; in create_auto_midi_quirk()
360 return -ENODEV; in create_auto_midi_quirk()
362 switch (USB_ID_VENDOR(chip->usb_id)) { in create_auto_midi_quirk()
365 if (err != -ENODEV) in create_auto_midi_quirk()
370 if (err != -ENODEV) in create_auto_midi_quirk()
386 if (err == -ENODEV) in create_autodetect_quirk()
392 * Create a stream for an Edirol UA-700/UA-25/UA-4FX interface.
414 if (iface->num_altsetting < 2) in create_uaxx_quirk()
415 return -ENXIO; in create_uaxx_quirk()
416 alts = &iface->altsetting[1]; in create_uaxx_quirk()
419 if (altsd->bNumEndpoints == 2) { in create_uaxx_quirk()
437 chip->usb_id == USB_ID(0x0582, 0x002b) in create_uaxx_quirk()
439 return __snd_usbmidi_create(chip->card, iface, in create_uaxx_quirk()
440 &chip->midi_list, quirk, in create_uaxx_quirk()
441 chip->usb_id, in create_uaxx_quirk()
442 &chip->num_rawmidis); in create_uaxx_quirk()
445 if (altsd->bNumEndpoints != 1) in create_uaxx_quirk()
446 return -ENXIO; in create_uaxx_quirk()
450 return -ENOMEM; in create_uaxx_quirk()
452 fp->iface = altsd->bInterfaceNumber; in create_uaxx_quirk()
453 fp->endpoint = get_endpoint(alts, 0)->bEndpointAddress; in create_uaxx_quirk()
454 fp->ep_attr = get_endpoint(alts, 0)->bmAttributes; in create_uaxx_quirk()
455 fp->datainterval = 0; in create_uaxx_quirk()
456 fp->maxpacksize = le16_to_cpu(get_endpoint(alts, 0)->wMaxPacketSize); in create_uaxx_quirk()
457 INIT_LIST_HEAD(&fp->list); in create_uaxx_quirk()
459 switch (fp->maxpacksize) { in create_uaxx_quirk()
461 fp->rate_max = fp->rate_min = 44100; in create_uaxx_quirk()
465 fp->rate_max = fp->rate_min = 48000; in create_uaxx_quirk()
469 fp->rate_max = fp->rate_min = 96000; in create_uaxx_quirk()
474 return -ENXIO; in create_uaxx_quirk()
479 list_del(&fp->list); /* unlink for avoiding double-free */ in create_uaxx_quirk()
483 usb_set_interface(chip->dev, fp->iface, 0); in create_uaxx_quirk()
495 if (quirk->ifnum < 0) in create_standard_mixer_quirk()
498 return snd_usb_create_mixer(chip, quirk->ifnum); in create_standard_mixer_quirk()
502 * audio-interface quirks
540 if (quirk->type < QUIRK_TYPE_COUNT) { in snd_usb_create_quirk()
541 return quirk_funcs[quirk->type](chip, iface, driver, quirk); in snd_usb_create_quirk()
543 usb_audio_err(chip, "invalid quirk type %d\n", quirk->type); in snd_usb_create_quirk()
544 return -ENXIO; in snd_usb_create_quirk()
557 struct usb_host_config *config = dev->actconfig; in snd_usb_extigy_boot_quirk()
560 if (le16_to_cpu(get_cfg_desc(config)->wTotalLength) == EXTIGY_FIRMWARE_SIZE_OLD || in snd_usb_extigy_boot_quirk()
561 le16_to_cpu(get_cfg_desc(config)->wTotalLength) == EXTIGY_FIRMWARE_SIZE_NEW) { in snd_usb_extigy_boot_quirk()
562 dev_dbg(&dev->dev, "sending Extigy boot sequence...\n"); in snd_usb_extigy_boot_quirk()
567 dev_dbg(&dev->dev, "error sending boot message: %d\n", err); 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()
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()
577 le16_to_cpu(get_cfg_desc(config)->wTotalLength)); in snd_usb_extigy_boot_quirk()
578 return -ENODEV; /* quit this anyway */ in snd_usb_extigy_boot_quirk()
594 return -ENODEV; in snd_usb_audigy2nx_boot_quirk()
603 if (dev->actconfig->desc.bConfigurationValue == 1) { in snd_usb_fasttrackpro_boot_quirk()
604 dev_info(&dev->dev, in snd_usb_fasttrackpro_boot_quirk()
613 dev_dbg(&dev->dev, in snd_usb_fasttrackpro_boot_quirk()
619 return -ENODEV; in snd_usb_fasttrackpro_boot_quirk()
621 dev_info(&dev->dev, "Fast Track Pro config OK\n"); in snd_usb_fasttrackpro_boot_quirk()
627 * C-Media CM106/CM106+ have four 16-bit internal registers that are nicely
645 * Enable line-out driver mode, set headphone source to front in snd_usb_cm106_boot_quirk()
776 /* REG5: de-assert AD/DA reset signals */ in snd_usb_cm6206_boot_quirk()
828 return -EINVAL; in snd_usb_accessmusic_boot_quirk()
831 return -ENOMEM; in snd_usb_accessmusic_boot_quirk()
844 * they come up as vendor-specific device when first connected.
865 /* return -EAGAIN, so the creation of an audio interface for this in snd_usb_nativeinstruments_boot_quirk()
868 return -EAGAIN; in snd_usb_nativeinstruments_boot_quirk()
903 struct usb_host_config *config = dev->actconfig; in snd_usb_mbox2_boot_quirk()
909 fwsize = le16_to_cpu(get_cfg_desc(config)->wTotalLength); in snd_usb_mbox2_boot_quirk()
912 dev_err(&dev->dev, "Invalid firmware size=%d.\n", fwsize); in snd_usb_mbox2_boot_quirk()
913 return -ENODEV; in snd_usb_mbox2_boot_quirk()
916 dev_dbg(&dev->dev, "Sending Digidesign Mbox 2 boot sequence...\n"); in snd_usb_mbox2_boot_quirk()
923 /* Control magic - load onboard firmware */ 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()
933 return -ENODEV; in snd_usb_mbox2_boot_quirk()
936 dev_dbg(&dev->dev, "device initialised!\n"); 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()
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()
948 le16_to_cpu(get_cfg_desc(config)->wTotalLength)); in snd_usb_mbox2_boot_quirk()
952 dev_info(&dev->dev, "Digidesign Mbox 2: 24bit 48kHz"); in snd_usb_mbox2_boot_quirk()
961 dev_dbg(&dev->dev, "Waiting for Axe-Fx III to boot up...\n"); in snd_usb_axefx3_boot_quirk()
963 /* If the Axe-Fx III has not fully booted, it will timeout when trying in snd_usb_axefx3_boot_quirk()
965 * used here to detect when the Axe-Fx III has finished booting as the in snd_usb_axefx3_boot_quirk()
972 dev_err(&dev->dev, in snd_usb_axefx3_boot_quirk()
973 "failed waiting for Axe-Fx III to boot: %d\n", err); in snd_usb_axefx3_boot_quirk()
977 dev_dbg(&dev->dev, "Axe-Fx III is now ready\n"); in snd_usb_axefx3_boot_quirk()
981 dev_dbg(&dev->dev, in snd_usb_axefx3_boot_quirk()
982 "error stopping Axe-Fx III interface: %d\n", err); in snd_usb_axefx3_boot_quirk()
1012 /* Analogue input 1 left channel: */ in mbox3_setup_defaults()
1015 /* Analogue input 1 right channel: */ in mbox3_setup_defaults()
1018 /* Analogue input 2 left channel: */ in mbox3_setup_defaults()
1021 /* Analogue input 2 right channel: */ in mbox3_setup_defaults()
1024 /* Analogue input 3 left channel: */ in mbox3_setup_defaults()
1027 /* Analogue input 3 right channel: */ in mbox3_setup_defaults()
1030 /* Analogue input 4 left channel: */ in mbox3_setup_defaults()
1033 /* Analogue input 4 right channel: */ in mbox3_setup_defaults()
1040 /* Analogue software return 1 left channel: */ in mbox3_setup_defaults()
1045 /* Analogue software return 1 right channel: */ in mbox3_setup_defaults()
1050 /* Analogue software return 2 left channel: */ in mbox3_setup_defaults()
1055 /* Analogue software return 2 right channel: */ in mbox3_setup_defaults()
1061 /* Analogue software return 3 left channel: */ in mbox3_setup_defaults()
1064 /* Analogue software return 3 right channel: */ in mbox3_setup_defaults()
1067 /* Analogue software return 4 left channel: */ in mbox3_setup_defaults()
1070 /* Analogue software return 4 right channel: */ in mbox3_setup_defaults()
1077 /* Analogue fx return left channel: */ in mbox3_setup_defaults()
1080 /* Analogue fx return right channel: */ in mbox3_setup_defaults()
1131 /* S/PDIF hardware input 1 left channel */ in mbox3_setup_defaults()
1134 /* S/PDIF hardware input 1 right channel */ in mbox3_setup_defaults()
1137 /* S/PDIF hardware input 2 left channel */ in mbox3_setup_defaults()
1140 /* S/PDIF hardware input 2 right channel */ in mbox3_setup_defaults()
1143 /* S/PDIF hardware input 3 left channel */ in mbox3_setup_defaults()
1146 /* S/PDIF hardware input 3 right channel */ in mbox3_setup_defaults()
1149 /* S/PDIF hardware input 4 left channel */ in mbox3_setup_defaults()
1152 /* S/PDIF hardware input 4 right channel */ in mbox3_setup_defaults()
1155 /* S/PDIF software return 1 left channel */ in mbox3_setup_defaults()
1158 /* S/PDIF software return 1 right channel */ in mbox3_setup_defaults()
1161 /* S/PDIF software return 2 left channel */ in mbox3_setup_defaults()
1164 /* S/PDIF software return 2 right channel */ in mbox3_setup_defaults()
1170 /* S/PDIF software return 3 left channel */ in mbox3_setup_defaults()
1176 /* S/PDIF software return 3 right channel */ in mbox3_setup_defaults()
1179 /* S/PDIF software return 4 left channel */ in mbox3_setup_defaults()
1185 /* S/PDIF software return 4 right channel */ in mbox3_setup_defaults()
1191 /* S/PDIF fx returns left channel */ in mbox3_setup_defaults()
1194 /* S/PDIF fx returns right channel */ in mbox3_setup_defaults()
1202 /* Hall 1 = 0x03 */ in mbox3_setup_defaults()
1203 /* Hall 2 = 0x04 */ in mbox3_setup_defaults()
1251 struct usb_host_config *config = dev->actconfig; in snd_usb_mbox3_boot_quirk()
1255 descriptor_size = le16_to_cpu(get_cfg_desc(config)->wTotalLength); in snd_usb_mbox3_boot_quirk()
1258 dev_err(&dev->dev, "MBOX3: Invalid descriptor size=%d.\n", descriptor_size); in snd_usb_mbox3_boot_quirk()
1259 return -ENODEV; in snd_usb_mbox3_boot_quirk()
1262 dev_dbg(&dev->dev, "MBOX3: device initialised!\n"); in snd_usb_mbox3_boot_quirk()
1265 &dev->descriptor, sizeof(dev->descriptor)); in snd_usb_mbox3_boot_quirk()
1266 config = dev->actconfig; in snd_usb_mbox3_boot_quirk()
1268 dev_dbg(&dev->dev, "MBOX3: error usb_get_descriptor: %d\n", err); in snd_usb_mbox3_boot_quirk()
1272 dev_dbg(&dev->dev, "MBOX3: error usb_reset_configuration: %d\n", err); in snd_usb_mbox3_boot_quirk()
1274 dev_dbg(&dev->dev, "MBOX3: new boot length = %d\n", in snd_usb_mbox3_boot_quirk()
1275 le16_to_cpu(get_cfg_desc(config)->wTotalLength)); in snd_usb_mbox3_boot_quirk()
1278 dev_info(&dev->dev, "MBOX3: Initialized."); in snd_usb_mbox3_boot_quirk()
1291 return -EINVAL; in snd_usb_motu_microbookii_communicate()
1303 return -EINVAL; in snd_usb_motu_microbookii_communicate()
1327 return -ENOMEM; in snd_usb_motu_microbookii_boot_quirk()
1329 dev_info(&dev->dev, "Waiting for MOTU Microbook II to boot up...\n"); in snd_usb_motu_microbookii_boot_quirk()
1338 dev_err(&dev->dev, in snd_usb_motu_microbookii_boot_quirk()
1347 dev_err(&dev->dev, in snd_usb_motu_microbookii_boot_quirk()
1349 err = -ENODEV; in snd_usb_motu_microbookii_boot_quirk()
1360 dev_err(&dev->dev, in snd_usb_motu_microbookii_boot_quirk()
1372 if (actual_length == 12 && buf[actual_length - 1] == 1) in snd_usb_motu_microbookii_boot_quirk()
1378 dev_info(&dev->dev, "MOTU MicroBook II ready\n"); in snd_usb_motu_microbookii_boot_quirk()
1417 #define MAUDIO_SET_COMPATIBLE 0x80 /* use only "win-compatible" interfaces */
1419 #define MAUDIO_SET_96K 0x04 /* 48-96kHz rate if set, 8-48kHz otherwise */
1434 usb_set_interface(chip->dev, iface, 0); in quattro_skip_setting_quirk()
1435 if (chip->setup & MAUDIO_SET) { in quattro_skip_setting_quirk()
1436 if (chip->setup & MAUDIO_SET_COMPATIBLE) { in quattro_skip_setting_quirk()
1443 if ((chip->setup & MAUDIO_SET_96K) && altno != 1) in quattro_skip_setting_quirk()
1445 mask = chip->setup & MAUDIO_SET_MASK; in quattro_skip_setting_quirk()
1456 altno, iface, chip->setup); in quattro_skip_setting_quirk()
1467 usb_set_interface(chip->dev, iface, 0); in audiophile_skip_setting_quirk()
1469 if (chip->setup & MAUDIO_SET) { in audiophile_skip_setting_quirk()
1471 if ((chip->setup & MAUDIO_SET_DTS) && altno != 6) in audiophile_skip_setting_quirk()
1473 if ((chip->setup & MAUDIO_SET_96K) && altno != 1) in audiophile_skip_setting_quirk()
1475 mask = chip->setup & MAUDIO_SET_MASK; in audiophile_skip_setting_quirk()
1495 usb_set_interface(chip->dev, iface, 0); in fasttrackpro_skip_setting_quirk()
1500 if (chip->setup & (MAUDIO_SET | MAUDIO_SET_24B)) { in fasttrackpro_skip_setting_quirk()
1501 if (chip->setup & MAUDIO_SET_96K) { in fasttrackpro_skip_setting_quirk()
1504 } else if (chip->setup & MAUDIO_SET_DI) { in fasttrackpro_skip_setting_quirk()
1516 /* keep only 16-Bit mode */ in fasttrackpro_skip_setting_quirk()
1523 altno, iface, chip->setup); in fasttrackpro_skip_setting_quirk()
1549 if ((chip->setup == 0 || chip->setup > 2) && altno != 2) in s1810c_skip_setting_quirk()
1551 else if (chip->setup == 1 && altno != 1) in s1810c_skip_setting_quirk()
1553 else if (chip->setup == 2 && altno != 3) in s1810c_skip_setting_quirk()
1564 if (chip->usb_id == USB_ID(0x0763, 0x2003)) in snd_usb_apply_interface_quirk()
1567 if (chip->usb_id == USB_ID(0x0763, 0x2001)) in snd_usb_apply_interface_quirk()
1570 if (chip->usb_id == USB_ID(0x0763, 0x2012)) in snd_usb_apply_interface_quirk()
1573 if (chip->usb_id == USB_ID(0x194f, 0x010c)) in snd_usb_apply_interface_quirk()
1587 /* SB Extigy needs special boot-up sequence */ in snd_usb_apply_boot_quirk()
1592 /* SB Audigy 2 NX needs its own boot-up magic, too */ in snd_usb_apply_boot_quirk()
1596 /* C-Media CM106 / Turtle Beach Audio Advantage Roadie */ in snd_usb_apply_boot_quirk()
1600 /* C-Media CM6206 / CM106-Like Sound Device */ in snd_usb_apply_boot_quirk()
1624 case USB_ID(0x0763, 0x2012): /* M-Audio Fast Track Pro USB */ in snd_usb_apply_boot_quirk()
1628 case USB_ID(0x2466, 0x8010): /* Fractal Audio Axe-Fx 3 */ in snd_usb_apply_boot_quirk()
1632 * For some reason interface 3 with vendor-spec class is in snd_usb_apply_boot_quirk()
1635 if (get_iface_desc(intf->altsetting)->bInterfaceClass == in snd_usb_apply_boot_quirk()
1637 get_iface_desc(intf->altsetting)->bInterfaceNumber < 3) in snd_usb_apply_boot_quirk()
1661 * check if the device uses big-endian samples
1666 /* it depends on altsetting whether the device is big-endian or not */ in snd_usb_is_big_endian_format()
1667 switch (chip->usb_id) { in snd_usb_is_big_endian_format()
1668 case USB_ID(0x0763, 0x2001): /* M-Audio Quattro: captured data only */ in snd_usb_is_big_endian_format()
1669 if (fp->altsetting == 2 || fp->altsetting == 3 || in snd_usb_is_big_endian_format()
1670 fp->altsetting == 5 || fp->altsetting == 6) in snd_usb_is_big_endian_format()
1673 case USB_ID(0x0763, 0x2003): /* M-Audio Audiophile USB */ in snd_usb_is_big_endian_format()
1674 if (chip->setup == 0x00 || in snd_usb_is_big_endian_format()
1675 fp->altsetting == 1 || fp->altsetting == 2 || in snd_usb_is_big_endian_format()
1676 fp->altsetting == 3) in snd_usb_is_big_endian_format()
1679 case USB_ID(0x0763, 0x2012): /* M-Audio Fast Track Pro */ in snd_usb_is_big_endian_format()
1680 if (fp->altsetting == 2 || fp->altsetting == 3 || in snd_usb_is_big_endian_format()
1681 fp->altsetting == 5 || fp->altsetting == 6) in snd_usb_is_big_endian_format()
1689 * For E-Mu 0404USB/0202USB/TrackerPre/0204 sample rate should be set for device,
1711 if (subs->direction == SNDRV_PCM_STREAM_PLAYBACK) { in set_format_emu_quirk()
1712 if (subs->stream->substream[SNDRV_PCM_STREAM_CAPTURE].cur_audiofmt) in set_format_emu_quirk()
1716 switch (fmt->rate_min) { in set_format_emu_quirk()
1736 snd_emuusb_set_samplerate(subs->stream->chip, emu_samplerate_id); in set_format_emu_quirk()
1737 subs->pkt_offset_adj = (emu_samplerate_id >= EMU_QUIRK_SR_176400HZ) ? 4 : 0; in set_format_emu_quirk()
1743 unsigned int cur_rate = subs->data_endpoint->cur_rate; in pioneer_djm_set_format_quirk()
1749 usb_set_interface(subs->dev, 0, 1); in pioneer_djm_set_format_quirk()
1750 // we should derive windex from fmt-sync_ep but it's not set in pioneer_djm_set_format_quirk()
1751 snd_usb_ctl_msg(subs->stream->chip->dev, in pioneer_djm_set_format_quirk()
1752 usb_sndctrlpipe(subs->stream->chip->dev, 0), in pioneer_djm_set_format_quirk()
1762 u32 new_rate = subs->data_endpoint->cur_rate; in mbox3_set_format_quirk()
1766 snd_usb_ctl_msg(subs->dev, usb_rcvctrlpipe(subs->dev, 0), in mbox3_set_format_quirk()
1769 dev_dbg(&subs->dev->dev, in mbox3_set_format_quirk()
1772 dev_dbg(&subs->dev->dev, in mbox3_set_format_quirk()
1779 dev_info(&subs->dev->dev, in mbox3_set_format_quirk()
1782 snd_usb_ctl_msg(subs->dev, usb_sndctrlpipe(subs->dev, 0), in mbox3_set_format_quirk()
1786 snd_usb_ctl_msg(subs->dev, usb_sndctrlpipe(subs->dev, 0), in mbox3_set_format_quirk()
1791 snd_usb_ctl_msg(subs->dev, usb_rcvctrlpipe(subs->dev, 0), in mbox3_set_format_quirk()
1794 dev_warn(&subs->dev->dev, "MBOX3: Couldn't set the sample rate"); in mbox3_set_format_quirk()
1805 unsigned int cur_rate = subs->data_endpoint->cur_rate; in rme_digiface_set_format_quirk()
1816 return -EINVAL; in rme_digiface_set_format_quirk()
1823 snd_usb_ctl_msg(subs->stream->chip->dev, in rme_digiface_set_format_quirk()
1824 usb_sndctrlpipe(subs->stream->chip->dev, 0), in rme_digiface_set_format_quirk()
1832 switch (subs->stream->chip->usb_id) { in snd_usb_set_format_quirk()
1833 case USB_ID(0x041e, 0x3f02): /* E-Mu 0202 USB */ in snd_usb_set_format_quirk()
1834 case USB_ID(0x041e, 0x3f04): /* E-Mu 0404 USB */ in snd_usb_set_format_quirk()
1835 case USB_ID(0x041e, 0x3f0a): /* E-Mu Tracker Pre */ in snd_usb_set_format_quirk()
1836 case USB_ID(0x041e, 0x3f19): /* E-Mu 0204 USB */ in snd_usb_set_format_quirk()
1841 subs->stream_offset_adj = 2; in snd_usb_set_format_quirk()
1843 case USB_ID(0x2b73, 0x0013): /* Pioneer DJM-450 */ in snd_usb_set_format_quirk()
1846 case USB_ID(0x08e4, 0x017f): /* Pioneer DJM-750 */ in snd_usb_set_format_quirk()
1847 case USB_ID(0x08e4, 0x0163): /* Pioneer DJM-850 */ in snd_usb_set_format_quirk()
1862 struct usb_device *dev = chip->dev; in snd_usb_select_mode_quirk()
1865 if (chip->quirk_flags & QUIRK_FLAG_ITF_USB_DSD_DAC) { in snd_usb_select_mode_quirk()
1869 err = usb_set_interface(dev, fmt->iface, 0); in snd_usb_select_mode_quirk()
1876 if (fmt->formats & SNDRV_PCM_FMTBIT_DSD_U32_BE) { in snd_usb_select_mode_quirk()
1905 if (USB_ID_VENDOR(ep->chip->usb_id) == 0x23ba && in snd_usb_endpoint_start_quirk()
1906 ep->type == SND_USB_ENDPOINT_TYPE_SYNC) in snd_usb_endpoint_start_quirk()
1907 ep->skip_packets = 4; in snd_usb_endpoint_start_quirk()
1910 * M-Audio Fast Track C400/C600 - when packets are not skipped, real in snd_usb_endpoint_start_quirk()
1911 * world latency varies by approx. +/- 50 frames (at 96kHz) each time in snd_usb_endpoint_start_quirk()
1913 * start up, the real world latency is stable within +/- 1 frame (also in snd_usb_endpoint_start_quirk()
1916 if ((ep->chip->usb_id == USB_ID(0x0763, 0x2030) || in snd_usb_endpoint_start_quirk()
1917 ep->chip->usb_id == USB_ID(0x0763, 0x2031)) && in snd_usb_endpoint_start_quirk()
1918 ep->type == SND_USB_ENDPOINT_TYPE_DATA) in snd_usb_endpoint_start_quirk()
1919 ep->skip_packets = 16; in snd_usb_endpoint_start_quirk()
1922 if ((ep->chip->usb_id == USB_ID(0x0644, 0x8038) || /* TEAC UD-H01 */ in snd_usb_endpoint_start_quirk()
1923 ep->chip->usb_id == USB_ID(0x1852, 0x5034)) && /* T+A Dac8 */ in snd_usb_endpoint_start_quirk()
1924 ep->syncmaxsize == 4) in snd_usb_endpoint_start_quirk()
1925 ep->tenor_fb_quirk = 1; in snd_usb_endpoint_start_quirk()
1933 struct snd_usb_audio *chip = dev_get_drvdata(&dev->dev); in snd_usb_ctl_msg_quirk()
1938 if (chip->quirk_flags & QUIRK_FLAG_CTL_MSG_DELAY) in snd_usb_ctl_msg_quirk()
1940 else if (chip->quirk_flags & QUIRK_FLAG_CTL_MSG_DELAY_1M) in snd_usb_ctl_msg_quirk()
1942 else if (chip->quirk_flags & QUIRK_FLAG_CTL_MSG_DELAY_5M) in snd_usb_ctl_msg_quirk()
1948 * augment the PCM format bit-field for DSD types. The UAC standards
1949 * don't have a designated bit field to denote DSD-capable interfaces,
1960 if (USB_ID_VENDOR(chip->usb_id) == 0x23ba && in snd_usb_interface_dsd_format_quirks()
1961 USB_ID_PRODUCT(chip->usb_id) < 0x0110) { in snd_usb_interface_dsd_format_quirks()
1962 switch (fp->altsetting) { in snd_usb_interface_dsd_format_quirks()
1964 fp->dsd_dop = true; in snd_usb_interface_dsd_format_quirks()
1967 fp->dsd_bitrev = true; in snd_usb_interface_dsd_format_quirks()
1970 fp->dsd_bitrev = true; in snd_usb_interface_dsd_format_quirks()
1976 switch (chip->usb_id) { in snd_usb_interface_dsd_format_quirks()
1978 case USB_ID(0x20b1, 0x3089): /* Mola-Mola DAC */ in snd_usb_interface_dsd_format_quirks()
1982 case USB_ID(0x2772, 0x0230): /* Pro-Ject Pre Box S2 Digital */ in snd_usb_interface_dsd_format_quirks()
1983 if (fp->altsetting == 2) in snd_usb_interface_dsd_format_quirks()
1988 case USB_ID(0x10cb, 0x0103): /* The Bit Opus #3; with fp->dsd_raw */ in snd_usb_interface_dsd_format_quirks()
1989 case USB_ID(0x16d0, 0x06b2): /* NuPrime DAC-10 */ in snd_usb_interface_dsd_format_quirks()
1990 case USB_ID(0x16d0, 0x06b4): /* NuPrime Audio HD-AVP/AVA */ in snd_usb_interface_dsd_format_quirks()
1992 case USB_ID(0x16d0, 0x09d8): /* NuPrime IDA-8 */ in snd_usb_interface_dsd_format_quirks()
1993 case USB_ID(0x16d0, 0x09db): /* NuPrime Audio DAC-9 */ in snd_usb_interface_dsd_format_quirks()
2000 case USB_ID(0x2622, 0x0041): /* Audiolab M-DAC+ */ in snd_usb_interface_dsd_format_quirks()
2001 case USB_ID(0x278b, 0x5100): /* Rotel RC-1590 */ in snd_usb_interface_dsd_format_quirks()
2002 case USB_ID(0x27f7, 0x3002): /* W4S DAC-2v2SE */ in snd_usb_interface_dsd_format_quirks()
2005 if (fp->altsetting == 3) in snd_usb_interface_dsd_format_quirks()
2010 case USB_ID(0x16d0, 0x071a): /* Amanero - Combo384 */ in snd_usb_interface_dsd_format_quirks()
2011 if (fp->altsetting == 2) { in snd_usb_interface_dsd_format_quirks()
2012 switch (le16_to_cpu(chip->dev->descriptor.bcdDevice)) { in snd_usb_interface_dsd_format_quirks()
2024 if (fp->altsetting == 2) in snd_usb_interface_dsd_format_quirks()
2032 /* ITF-USB DSD based DACs */ in snd_usb_interface_dsd_format_quirks()
2033 if (chip->quirk_flags & QUIRK_FLAG_ITF_USB_DSD_DAC) { in snd_usb_interface_dsd_format_quirks()
2034 iface = usb_ifnum_to_if(chip->dev, fp->iface); in snd_usb_interface_dsd_format_quirks()
2037 * three (0-2), in snd_usb_interface_dsd_format_quirks()
2039 * four (0-3). in snd_usb_interface_dsd_format_quirks()
2041 if (fp->altsetting == iface->num_altsetting - 1) in snd_usb_interface_dsd_format_quirks()
2045 /* Mostly generic method to detect many DSD-capable implementations */ in snd_usb_interface_dsd_format_quirks()
2046 if ((chip->quirk_flags & QUIRK_FLAG_DSD_RAW) && fp->dsd_raw) in snd_usb_interface_dsd_format_quirks()
2056 switch (chip->usb_id) { in snd_usb_audioformat_attributes_quirk()
2061 fp->attributes &= ~UAC_EP_CS_ATTR_SAMPLE_RATE; in snd_usb_audioformat_attributes_quirk()
2064 case USB_ID(0x0763, 0x2003): /* M-Audio Audiophile USB */ in snd_usb_audioformat_attributes_quirk()
2066 fp->attributes |= UAC_EP_CS_ATTR_SAMPLE_RATE; in snd_usb_audioformat_attributes_quirk()
2068 case USB_ID(0x0763, 0x2001): /* M-Audio Quattro USB */ in snd_usb_audioformat_attributes_quirk()
2069 case USB_ID(0x0763, 0x2012): /* M-Audio Fast Track Pro USB */ in snd_usb_audioformat_attributes_quirk()
2074 * plantronics headset and Griffin iMic have set adaptive-in in snd_usb_audioformat_attributes_quirk()
2077 fp->ep_attr &= ~USB_ENDPOINT_SYNCTYPE; in snd_usb_audioformat_attributes_quirk()
2079 fp->ep_attr |= USB_ENDPOINT_SYNC_ADAPTIVE; in snd_usb_audioformat_attributes_quirk()
2081 fp->ep_attr |= USB_ENDPOINT_SYNC_SYNC; in snd_usb_audioformat_attributes_quirk()
2089 fp->attributes &= ~UAC_EP_CS_ATTR_FILL_MAX; in snd_usb_audioformat_attributes_quirk()
2093 fp->attributes |= UAC_EP_CS_ATTR_FILL_MAX; in snd_usb_audioformat_attributes_quirk()
2098 fp->attributes &= ~UAC_EP_CS_ATTR_PITCH_CONTROL; in snd_usb_audioformat_attributes_quirk()
2134 DEVICE_FLG(0x0499, 0x3108, /* Yamaha YIT-W12TX */
2142 DEVICE_FLG(0x054c, 0x0b8c, /* Sony WALKMAN NW-A45 DAC */
2154 DEVICE_FLG(0x0644, 0x8043, /* TEAC UD-501/UD-501V2/UD-503/NT-503 */
2157 DEVICE_FLG(0x0644, 0x8044, /* Esoteric D-05X */
2160 DEVICE_FLG(0x0644, 0x804a, /* TEAC UD-301 */
2165 DEVICE_FLG(0x0644, 0x806b, /* TEAC UD-701 */
2172 DEVICE_FLG(0x0711, 0x5800, /* MCT Trigger 5 USB-to-HDMI */
2176 DEVICE_FLG(0x0763, 0x2030, /* M-Audio Fast Track C400 */
2178 DEVICE_FLG(0x0763, 0x2031, /* M-Audio Fast Track C600 */
2194 DEVICE_FLG(0x0fd9, 0x0008, /* Hauppauge HVR-950Q */
2208 DEVICE_FLG(0x154e, 0x1002, /* Denon DCD-1500RE */
2210 DEVICE_FLG(0x154e, 0x1003, /* Denon DA-300USB */
2212 DEVICE_FLG(0x154e, 0x3005, /* Marantz HD-DAC1 */
2214 DEVICE_FLG(0x154e, 0x3006, /* Marantz SA-14S1 */
2216 DEVICE_FLG(0x154e, 0x300b, /* Marantz SA-KI RUBY / SA-12 */
2218 DEVICE_FLG(0x154e, 0x500e, /* Denon DN-X1600 */
2222 DEVICE_FLG(0x17aa, 0x1046, /* Lenovo ThinkStation P620 Rear Line-in, Line-out and Microphone */
2226 DEVICE_FLG(0x1852, 0x5062, /* Luxman D-08u */
2228 DEVICE_FLG(0x1852, 0x5065, /* Luxman DA-06 */
2232 DEVICE_FLG(0x19f7, 0x0035, /* RODE NT-USB+ */
2238 DEVICE_FLG(0x2040, 0x7200, /* Hauppauge HVR-950Q */
2240 DEVICE_FLG(0x2040, 0x7201, /* Hauppauge HVR-950Q-MXL */
2242 DEVICE_FLG(0x2040, 0x7210, /* Hauppauge HVR-950Q */
2244 DEVICE_FLG(0x2040, 0x7211, /* Hauppauge HVR-950Q-MXL */
2246 DEVICE_FLG(0x2040, 0x7213, /* Hauppauge HVR-950Q */
2248 DEVICE_FLG(0x2040, 0x7217, /* Hauppauge HVR-950Q */
2250 DEVICE_FLG(0x2040, 0x721b, /* Hauppauge HVR-950Q */
2252 DEVICE_FLG(0x2040, 0x721e, /* Hauppauge HVR-950Q */
2254 DEVICE_FLG(0x2040, 0x721f, /* Hauppauge HVR-950Q */
2256 DEVICE_FLG(0x2040, 0x7240, /* Hauppauge HVR-850 */
2258 DEVICE_FLG(0x2040, 0x7260, /* Hauppauge HVR-950Q */
2260 DEVICE_FLG(0x2040, 0x7270, /* Hauppauge HVR-950Q */
2262 DEVICE_FLG(0x2040, 0x7280, /* Hauppauge HVR-950Q */
2264 DEVICE_FLG(0x2040, 0x7281, /* Hauppauge HVR-950Q-MXL */
2270 DEVICE_FLG(0x21b4, 0x0230, /* Ayre QB-9 Twenty */
2272 DEVICE_FLG(0x21b4, 0x0232, /* Ayre QX-5 Twenty */
2280 DEVICE_FLG(0x2b53, 0x0023, /* Fiero SC-01 (firmware v1.0.0 @ 48 kHz) */
2282 DEVICE_FLG(0x2b53, 0x0024, /* Fiero SC-01 (firmware v1.0.0 @ 96 kHz) */
2284 DEVICE_FLG(0x2b53, 0x0031, /* Fiero SC-01 (firmware v1.1.0) */
2286 DEVICE_FLG(0x2d95, 0x8011, /* VIVO USB-C HEADSET */
2288 DEVICE_FLG(0x2d95, 0x8021, /* VIVO USB-C-XE710 HEADSET */
2361 for (p = quirk_flags_table; p->id; p++) { in snd_usb_init_quirk_flags()
2362 if (chip->usb_id == p->id || in snd_usb_init_quirk_flags()
2363 (!USB_ID_PRODUCT(p->id) && in snd_usb_init_quirk_flags()
2364 USB_ID_VENDOR(chip->usb_id) == USB_ID_VENDOR(p->id))) { in snd_usb_init_quirk_flags()
2367 p->flags, USB_ID_VENDOR(chip->usb_id), in snd_usb_init_quirk_flags()
2368 USB_ID_PRODUCT(chip->usb_id)); in snd_usb_init_quirk_flags()
2369 chip->quirk_flags |= p->flags; in snd_usb_init_quirk_flags()