1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17#include <linux/init.h>
18#include <linux/slab.h>
19#include <linux/usb.h>
20#include <linux/usb/audio.h>
21
22#include <sound/control.h>
23#include <sound/core.h>
24#include <sound/info.h>
25#include <sound/pcm.h>
26
27#include "usbaudio.h"
28#include "card.h"
29#include "mixer.h"
30#include "mixer_quirks.h"
31#include "midi.h"
32#include "quirks.h"
33#include "helper.h"
34#include "endpoint.h"
35#include "pcm.h"
36#include "clock.h"
37#include "stream.h"
38
39
40
41
42static int create_composite_quirk(struct snd_usb_audio *chip,
43 struct usb_interface *iface,
44 struct usb_driver *driver,
45 const struct snd_usb_audio_quirk *quirk)
46{
47 int probed_ifnum = get_iface_desc(iface->altsetting)->bInterfaceNumber;
48 int err;
49
50 for (quirk = quirk->data; quirk->ifnum >= 0; ++quirk) {
51 iface = usb_ifnum_to_if(chip->dev, quirk->ifnum);
52 if (!iface)
53 continue;
54 if (quirk->ifnum != probed_ifnum &&
55 usb_interface_claimed(iface))
56 continue;
57 err = snd_usb_create_quirk(chip, iface, driver, quirk);
58 if (err < 0)
59 return err;
60 if (quirk->ifnum != probed_ifnum)
61 usb_driver_claim_interface(driver, iface, (void *)-1L);
62 }
63 return 0;
64}
65
66static int ignore_interface_quirk(struct snd_usb_audio *chip,
67 struct usb_interface *iface,
68 struct usb_driver *driver,
69 const struct snd_usb_audio_quirk *quirk)
70{
71 return 0;
72}
73
74
75
76
77
78
79static int create_align_transfer_quirk(struct snd_usb_audio *chip,
80 struct usb_interface *iface,
81 struct usb_driver *driver,
82 const struct snd_usb_audio_quirk *quirk)
83{
84 chip->txfr_quirk = 1;
85 return 1;
86}
87
88static int create_any_midi_quirk(struct snd_usb_audio *chip,
89 struct usb_interface *intf,
90 struct usb_driver *driver,
91 const struct snd_usb_audio_quirk *quirk)
92{
93 return snd_usbmidi_create(chip->card, intf, &chip->midi_list, quirk);
94}
95
96
97
98
99static int create_standard_audio_quirk(struct snd_usb_audio *chip,
100 struct usb_interface *iface,
101 struct usb_driver *driver,
102 const struct snd_usb_audio_quirk *quirk)
103{
104 struct usb_host_interface *alts;
105 struct usb_interface_descriptor *altsd;
106 int err;
107
108 alts = &iface->altsetting[0];
109 altsd = get_iface_desc(alts);
110 err = snd_usb_parse_audio_interface(chip, altsd->bInterfaceNumber);
111 if (err < 0) {
112 snd_printk(KERN_ERR "cannot setup if %d: error %d\n",
113 altsd->bInterfaceNumber, err);
114 return err;
115 }
116
117 usb_set_interface(chip->dev, altsd->bInterfaceNumber, 0);
118 return 0;
119}
120
121
122
123
124static int create_fixed_stream_quirk(struct snd_usb_audio *chip,
125 struct usb_interface *iface,
126 struct usb_driver *driver,
127 const struct snd_usb_audio_quirk *quirk)
128{
129 struct audioformat *fp;
130 struct usb_host_interface *alts;
131 int stream, err;
132 unsigned *rate_table = NULL;
133
134 fp = kmemdup(quirk->data, sizeof(*fp), GFP_KERNEL);
135 if (! fp) {
136 snd_printk(KERN_ERR "cannot memdup\n");
137 return -ENOMEM;
138 }
139 if (fp->nr_rates > 0) {
140 rate_table = kmemdup(fp->rate_table,
141 sizeof(int) * fp->nr_rates, GFP_KERNEL);
142 if (!rate_table) {
143 kfree(fp);
144 return -ENOMEM;
145 }
146 fp->rate_table = rate_table;
147 }
148
149 stream = (fp->endpoint & USB_DIR_IN)
150 ? SNDRV_PCM_STREAM_CAPTURE : SNDRV_PCM_STREAM_PLAYBACK;
151 err = snd_usb_add_audio_stream(chip, stream, fp);
152 if (err < 0) {
153 kfree(fp);
154 kfree(rate_table);
155 return err;
156 }
157 if (fp->iface != get_iface_desc(&iface->altsetting[0])->bInterfaceNumber ||
158 fp->altset_idx >= iface->num_altsetting) {
159 kfree(fp);
160 kfree(rate_table);
161 return -EINVAL;
162 }
163 alts = &iface->altsetting[fp->altset_idx];
164 fp->datainterval = snd_usb_parse_datainterval(chip, alts);
165 fp->maxpacksize = le16_to_cpu(get_endpoint(alts, 0)->wMaxPacketSize);
166 usb_set_interface(chip->dev, fp->iface, 0);
167 snd_usb_init_pitch(chip, fp->iface, alts, fp);
168 snd_usb_init_sample_rate(chip, fp->iface, alts, fp, fp->rate_max);
169 return 0;
170}
171
172
173
174
175
176static int create_uaxx_quirk(struct snd_usb_audio *chip,
177 struct usb_interface *iface,
178 struct usb_driver *driver,
179 const struct snd_usb_audio_quirk *quirk)
180{
181 static const struct audioformat ua_format = {
182 .formats = SNDRV_PCM_FMTBIT_S24_3LE,
183 .channels = 2,
184 .fmt_type = UAC_FORMAT_TYPE_I,
185 .altsetting = 1,
186 .altset_idx = 1,
187 .rates = SNDRV_PCM_RATE_CONTINUOUS,
188 };
189 struct usb_host_interface *alts;
190 struct usb_interface_descriptor *altsd;
191 struct audioformat *fp;
192 int stream, err;
193
194
195 if (iface->num_altsetting < 2)
196 return -ENXIO;
197 alts = &iface->altsetting[1];
198 altsd = get_iface_desc(alts);
199
200 if (altsd->bNumEndpoints == 2) {
201 static const struct snd_usb_midi_endpoint_info ua700_ep = {
202 .out_cables = 0x0003,
203 .in_cables = 0x0003
204 };
205 static const struct snd_usb_audio_quirk ua700_quirk = {
206 .type = QUIRK_MIDI_FIXED_ENDPOINT,
207 .data = &ua700_ep
208 };
209 static const struct snd_usb_midi_endpoint_info uaxx_ep = {
210 .out_cables = 0x0001,
211 .in_cables = 0x0001
212 };
213 static const struct snd_usb_audio_quirk uaxx_quirk = {
214 .type = QUIRK_MIDI_FIXED_ENDPOINT,
215 .data = &uaxx_ep
216 };
217 const struct snd_usb_audio_quirk *quirk =
218 chip->usb_id == USB_ID(0x0582, 0x002b)
219 ? &ua700_quirk : &uaxx_quirk;
220 return snd_usbmidi_create(chip->card, iface,
221 &chip->midi_list, quirk);
222 }
223
224 if (altsd->bNumEndpoints != 1)
225 return -ENXIO;
226
227 fp = kmemdup(&ua_format, sizeof(*fp), GFP_KERNEL);
228 if (!fp)
229 return -ENOMEM;
230
231 fp->iface = altsd->bInterfaceNumber;
232 fp->endpoint = get_endpoint(alts, 0)->bEndpointAddress;
233 fp->ep_attr = get_endpoint(alts, 0)->bmAttributes;
234 fp->datainterval = 0;
235 fp->maxpacksize = le16_to_cpu(get_endpoint(alts, 0)->wMaxPacketSize);
236
237 switch (fp->maxpacksize) {
238 case 0x120:
239 fp->rate_max = fp->rate_min = 44100;
240 break;
241 case 0x138:
242 case 0x140:
243 fp->rate_max = fp->rate_min = 48000;
244 break;
245 case 0x258:
246 case 0x260:
247 fp->rate_max = fp->rate_min = 96000;
248 break;
249 default:
250 snd_printk(KERN_ERR "unknown sample rate\n");
251 kfree(fp);
252 return -ENXIO;
253 }
254
255 stream = (fp->endpoint & USB_DIR_IN)
256 ? SNDRV_PCM_STREAM_CAPTURE : SNDRV_PCM_STREAM_PLAYBACK;
257 err = snd_usb_add_audio_stream(chip, stream, fp);
258 if (err < 0) {
259 kfree(fp);
260 return err;
261 }
262 usb_set_interface(chip->dev, fp->iface, 0);
263 return 0;
264}
265
266
267
268
269static int create_standard_mixer_quirk(struct snd_usb_audio *chip,
270 struct usb_interface *iface,
271 struct usb_driver *driver,
272 const struct snd_usb_audio_quirk *quirk)
273{
274 if (quirk->ifnum < 0)
275 return 0;
276
277 return snd_usb_create_mixer(chip, quirk->ifnum, 0);
278}
279
280
281
282
283
284
285
286
287
288int snd_usb_create_quirk(struct snd_usb_audio *chip,
289 struct usb_interface *iface,
290 struct usb_driver *driver,
291 const struct snd_usb_audio_quirk *quirk)
292{
293 typedef int (*quirk_func_t)(struct snd_usb_audio *,
294 struct usb_interface *,
295 struct usb_driver *,
296 const struct snd_usb_audio_quirk *);
297 static const quirk_func_t quirk_funcs[] = {
298 [QUIRK_IGNORE_INTERFACE] = ignore_interface_quirk,
299 [QUIRK_COMPOSITE] = create_composite_quirk,
300 [QUIRK_MIDI_STANDARD_INTERFACE] = create_any_midi_quirk,
301 [QUIRK_MIDI_FIXED_ENDPOINT] = create_any_midi_quirk,
302 [QUIRK_MIDI_YAMAHA] = create_any_midi_quirk,
303 [QUIRK_MIDI_MIDIMAN] = create_any_midi_quirk,
304 [QUIRK_MIDI_NOVATION] = create_any_midi_quirk,
305 [QUIRK_MIDI_RAW_BYTES] = create_any_midi_quirk,
306 [QUIRK_MIDI_EMAGIC] = create_any_midi_quirk,
307 [QUIRK_MIDI_CME] = create_any_midi_quirk,
308 [QUIRK_MIDI_AKAI] = create_any_midi_quirk,
309 [QUIRK_MIDI_FTDI] = create_any_midi_quirk,
310 [QUIRK_AUDIO_STANDARD_INTERFACE] = create_standard_audio_quirk,
311 [QUIRK_AUDIO_FIXED_ENDPOINT] = create_fixed_stream_quirk,
312 [QUIRK_AUDIO_EDIROL_UAXX] = create_uaxx_quirk,
313 [QUIRK_AUDIO_ALIGN_TRANSFER] = create_align_transfer_quirk,
314 [QUIRK_AUDIO_STANDARD_MIXER] = create_standard_mixer_quirk,
315 };
316
317 if (quirk->type < QUIRK_TYPE_COUNT) {
318 return quirk_funcs[quirk->type](chip, iface, driver, quirk);
319 } else {
320 snd_printd(KERN_ERR "invalid quirk type %d\n", quirk->type);
321 return -ENXIO;
322 }
323}
324
325
326
327
328
329#define EXTIGY_FIRMWARE_SIZE_OLD 794
330#define EXTIGY_FIRMWARE_SIZE_NEW 483
331
332static int snd_usb_extigy_boot_quirk(struct usb_device *dev, struct usb_interface *intf)
333{
334 struct usb_host_config *config = dev->actconfig;
335 int err;
336
337 if (le16_to_cpu(get_cfg_desc(config)->wTotalLength) == EXTIGY_FIRMWARE_SIZE_OLD ||
338 le16_to_cpu(get_cfg_desc(config)->wTotalLength) == EXTIGY_FIRMWARE_SIZE_NEW) {
339 snd_printdd("sending Extigy boot sequence...\n");
340
341 err = snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev,0),
342 0x10, 0x43, 0x0001, 0x000a, NULL, 0);
343 if (err < 0) snd_printdd("error sending boot message: %d\n", err);
344 err = usb_get_descriptor(dev, USB_DT_DEVICE, 0,
345 &dev->descriptor, sizeof(dev->descriptor));
346 config = dev->actconfig;
347 if (err < 0) snd_printdd("error usb_get_descriptor: %d\n", err);
348 err = usb_reset_configuration(dev);
349 if (err < 0) snd_printdd("error usb_reset_configuration: %d\n", err);
350 snd_printdd("extigy_boot: new boot length = %d\n",
351 le16_to_cpu(get_cfg_desc(config)->wTotalLength));
352 return -ENODEV;
353 }
354 return 0;
355}
356
357static int snd_usb_audigy2nx_boot_quirk(struct usb_device *dev)
358{
359 u8 buf = 1;
360
361 snd_usb_ctl_msg(dev, usb_rcvctrlpipe(dev, 0), 0x2a,
362 USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_OTHER,
363 0, 0, &buf, 1);
364 if (buf == 0) {
365 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), 0x29,
366 USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_OTHER,
367 1, 2000, NULL, 0);
368 return -ENODEV;
369 }
370 return 0;
371}
372
373static int snd_usb_fasttrackpro_boot_quirk(struct usb_device *dev)
374{
375 int err;
376
377 if (dev->actconfig->desc.bConfigurationValue == 1) {
378 snd_printk(KERN_INFO "usb-audio: "
379 "Fast Track Pro switching to config #2\n");
380
381
382
383
384
385 err = usb_driver_set_configuration(dev, 2);
386 if (err < 0) {
387 snd_printdd("error usb_driver_set_configuration: %d\n",
388 err);
389 return -ENODEV;
390 }
391 } else
392 snd_printk(KERN_INFO "usb-audio: Fast Track Pro config OK\n");
393
394 return 0;
395}
396
397
398
399
400
401static int snd_usb_cm106_write_int_reg(struct usb_device *dev, int reg, u16 value)
402{
403 u8 buf[4];
404 buf[0] = 0x20;
405 buf[1] = value & 0xff;
406 buf[2] = (value >> 8) & 0xff;
407 buf[3] = reg;
408 return snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), USB_REQ_SET_CONFIGURATION,
409 USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_ENDPOINT,
410 0, 0, &buf, 4);
411}
412
413static int snd_usb_cm106_boot_quirk(struct usb_device *dev)
414{
415
416
417
418
419 return snd_usb_cm106_write_int_reg(dev, 2, 0x8004);
420}
421
422
423
424
425
426
427
428static int snd_usb_cm6206_boot_quirk(struct usb_device *dev)
429{
430 int err = 0, reg;
431 int val[] = {0x2004, 0x3000, 0xf800, 0x143f, 0x0000, 0x3000};
432
433 for (reg = 0; reg < ARRAY_SIZE(val); reg++) {
434 err = snd_usb_cm106_write_int_reg(dev, reg, val[reg]);
435 if (err < 0)
436 return err;
437 }
438
439 return err;
440}
441
442
443
444
445
446
447
448
449static int snd_usb_accessmusic_boot_quirk(struct usb_device *dev)
450{
451 int err, actual_length;
452
453
454 static const u8 seq[] = { 0x4e, 0x73, 0x52, 0x01 };
455
456 void *buf = kmemdup(seq, ARRAY_SIZE(seq), GFP_KERNEL);
457 if (!buf)
458 return -ENOMEM;
459 err = usb_interrupt_msg(dev, usb_sndintpipe(dev, 0x05), buf,
460 ARRAY_SIZE(seq), &actual_length, 1000);
461 kfree(buf);
462 if (err < 0)
463 return err;
464
465 return 0;
466}
467
468
469
470
471
472
473
474
475
476
477
478
479static int snd_usb_nativeinstruments_boot_quirk(struct usb_device *dev)
480{
481 int ret = usb_control_msg(dev, usb_sndctrlpipe(dev, 0),
482 0xaf, USB_TYPE_VENDOR | USB_RECIP_DEVICE,
483 cpu_to_le16(1), 0, NULL, 0, 1000);
484
485 if (ret < 0)
486 return ret;
487
488 usb_reset_device(dev);
489
490
491
492
493 return -EAGAIN;
494}
495
496
497
498
499#define MAUDIO_SET 0x01
500#define MAUDIO_SET_COMPATIBLE 0x80
501#define MAUDIO_SET_DTS 0x02
502#define MAUDIO_SET_96K 0x04
503#define MAUDIO_SET_24B 0x08
504#define MAUDIO_SET_DI 0x10
505#define MAUDIO_SET_MASK 0x1f
506#define MAUDIO_SET_24B_48K_DI 0x19
507#define MAUDIO_SET_24B_48K_NOTDI 0x09
508#define MAUDIO_SET_16B_48K_DI 0x11
509#define MAUDIO_SET_16B_48K_NOTDI 0x01
510
511static int quattro_skip_setting_quirk(struct snd_usb_audio *chip,
512 int iface, int altno)
513{
514
515
516
517 usb_set_interface(chip->dev, iface, 0);
518 if (chip->setup & MAUDIO_SET) {
519 if (chip->setup & MAUDIO_SET_COMPATIBLE) {
520 if (iface != 1 && iface != 2)
521 return 1;
522 } else {
523 unsigned int mask;
524 if (iface == 1 || iface == 2)
525 return 1;
526 if ((chip->setup & MAUDIO_SET_96K) && altno != 1)
527 return 1;
528 mask = chip->setup & MAUDIO_SET_MASK;
529 if (mask == MAUDIO_SET_24B_48K_DI && altno != 2)
530 return 1;
531 if (mask == MAUDIO_SET_24B_48K_NOTDI && altno != 3)
532 return 1;
533 if (mask == MAUDIO_SET_16B_48K_NOTDI && altno != 4)
534 return 1;
535 }
536 }
537 snd_printdd(KERN_INFO
538 "using altsetting %d for interface %d config %d\n",
539 altno, iface, chip->setup);
540 return 0;
541}
542
543static int audiophile_skip_setting_quirk(struct snd_usb_audio *chip,
544 int iface,
545 int altno)
546{
547
548
549
550 usb_set_interface(chip->dev, iface, 0);
551
552 if (chip->setup & MAUDIO_SET) {
553 unsigned int mask;
554 if ((chip->setup & MAUDIO_SET_DTS) && altno != 6)
555 return 1;
556 if ((chip->setup & MAUDIO_SET_96K) && altno != 1)
557 return 1;
558 mask = chip->setup & MAUDIO_SET_MASK;
559 if (mask == MAUDIO_SET_24B_48K_DI && altno != 2)
560 return 1;
561 if (mask == MAUDIO_SET_24B_48K_NOTDI && altno != 3)
562 return 1;
563 if (mask == MAUDIO_SET_16B_48K_DI && altno != 4)
564 return 1;
565 if (mask == MAUDIO_SET_16B_48K_NOTDI && altno != 5)
566 return 1;
567 }
568
569 return 0;
570}
571
572
573static int fasttrackpro_skip_setting_quirk(struct snd_usb_audio *chip,
574 int iface, int altno)
575{
576
577
578
579 usb_set_interface(chip->dev, iface, 0);
580
581
582
583
584 if (chip->setup & (MAUDIO_SET | MAUDIO_SET_24B)) {
585 if (chip->setup & MAUDIO_SET_96K) {
586 if (altno != 3 && altno != 6)
587 return 1;
588 } else if (chip->setup & MAUDIO_SET_DI) {
589 if (iface == 4)
590 return 1;
591 if (altno != 2 && altno != 5)
592 return 1;
593 } else {
594 if (iface == 5)
595 return 1;
596 if (altno != 2 && altno != 5)
597 return 1;
598 }
599 } else {
600
601 if (altno != 1)
602 return 1;
603 }
604
605 snd_printdd(KERN_INFO
606 "using altsetting %d for interface %d config %d\n",
607 altno, iface, chip->setup);
608 return 0;
609}
610
611int snd_usb_apply_interface_quirk(struct snd_usb_audio *chip,
612 int iface,
613 int altno)
614{
615
616 if (chip->usb_id == USB_ID(0x0763, 0x2003))
617 return audiophile_skip_setting_quirk(chip, iface, altno);
618
619 if (chip->usb_id == USB_ID(0x0763, 0x2001))
620 return quattro_skip_setting_quirk(chip, iface, altno);
621
622 if (chip->usb_id == USB_ID(0x0763, 0x2012))
623 return fasttrackpro_skip_setting_quirk(chip, iface, altno);
624
625 return 0;
626}
627
628int snd_usb_apply_boot_quirk(struct usb_device *dev,
629 struct usb_interface *intf,
630 const struct snd_usb_audio_quirk *quirk)
631{
632 u32 id = USB_ID(le16_to_cpu(dev->descriptor.idVendor),
633 le16_to_cpu(dev->descriptor.idProduct));
634
635 switch (id) {
636 case USB_ID(0x041e, 0x3000):
637
638
639 return snd_usb_extigy_boot_quirk(dev, intf);
640
641 case USB_ID(0x041e, 0x3020):
642
643 return snd_usb_audigy2nx_boot_quirk(dev);
644
645 case USB_ID(0x10f5, 0x0200):
646
647 return snd_usb_cm106_boot_quirk(dev);
648
649 case USB_ID(0x0d8c, 0x0102):
650
651 case USB_ID(0x0ccd, 0x00b1):
652 return snd_usb_cm6206_boot_quirk(dev);
653
654 case USB_ID(0x133e, 0x0815):
655
656 return snd_usb_accessmusic_boot_quirk(dev);
657
658 case USB_ID(0x17cc, 0x1000):
659 case USB_ID(0x17cc, 0x1010):
660 case USB_ID(0x17cc, 0x1020):
661 return snd_usb_nativeinstruments_boot_quirk(dev);
662 case USB_ID(0x0763, 0x2012):
663 return snd_usb_fasttrackpro_boot_quirk(dev);
664 }
665
666 return 0;
667}
668
669
670
671
672int snd_usb_is_big_endian_format(struct snd_usb_audio *chip, struct audioformat *fp)
673{
674
675 switch (chip->usb_id) {
676 case USB_ID(0x0763, 0x2001):
677 if (fp->altsetting == 2 || fp->altsetting == 3 ||
678 fp->altsetting == 5 || fp->altsetting == 6)
679 return 1;
680 break;
681 case USB_ID(0x0763, 0x2003):
682 if (chip->setup == 0x00 ||
683 fp->altsetting == 1 || fp->altsetting == 2 ||
684 fp->altsetting == 3)
685 return 1;
686 break;
687 case USB_ID(0x0763, 0x2012):
688 if (fp->altsetting == 2 || fp->altsetting == 3 ||
689 fp->altsetting == 5 || fp->altsetting == 6)
690 return 1;
691 break;
692 }
693 return 0;
694}
695
696
697
698
699
700
701enum {
702 EMU_QUIRK_SR_44100HZ = 0,
703 EMU_QUIRK_SR_48000HZ,
704 EMU_QUIRK_SR_88200HZ,
705 EMU_QUIRK_SR_96000HZ,
706 EMU_QUIRK_SR_176400HZ,
707 EMU_QUIRK_SR_192000HZ
708};
709
710static void set_format_emu_quirk(struct snd_usb_substream *subs,
711 struct audioformat *fmt)
712{
713 unsigned char emu_samplerate_id = 0;
714
715
716
717
718
719 if (subs->direction == SNDRV_PCM_STREAM_PLAYBACK) {
720 if (subs->stream->substream[SNDRV_PCM_STREAM_CAPTURE].interface != -1)
721 return;
722 }
723
724 switch (fmt->rate_min) {
725 case 48000:
726 emu_samplerate_id = EMU_QUIRK_SR_48000HZ;
727 break;
728 case 88200:
729 emu_samplerate_id = EMU_QUIRK_SR_88200HZ;
730 break;
731 case 96000:
732 emu_samplerate_id = EMU_QUIRK_SR_96000HZ;
733 break;
734 case 176400:
735 emu_samplerate_id = EMU_QUIRK_SR_176400HZ;
736 break;
737 case 192000:
738 emu_samplerate_id = EMU_QUIRK_SR_192000HZ;
739 break;
740 default:
741 emu_samplerate_id = EMU_QUIRK_SR_44100HZ;
742 break;
743 }
744 snd_emuusb_set_samplerate(subs->stream->chip, emu_samplerate_id);
745}
746
747void snd_usb_set_format_quirk(struct snd_usb_substream *subs,
748 struct audioformat *fmt)
749{
750 switch (subs->stream->chip->usb_id) {
751 case USB_ID(0x041e, 0x3f02):
752 case USB_ID(0x041e, 0x3f04):
753 case USB_ID(0x041e, 0x3f0a):
754 case USB_ID(0x041e, 0x3f19):
755 set_format_emu_quirk(subs, fmt);
756 break;
757 }
758}
759
760