25
25
.idProduct = prod, \
26
26
.bInterfaceClass = USB_CLASS_VENDOR_SPEC
27
27
28
+ #define QUIRK_RENAME_DEVICE (_vendor , _device ) \
29
+ .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { \
30
+ .vendor_name = _vendor, \
31
+ .product_name = _device, \
32
+ .ifnum = QUIRK_NO_INTERFACE \
33
+ }
34
+
35
+ #define QUIRK_DEVICE_PROFILE (_vendor , _device , _profile ) \
36
+ .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { \
37
+ .vendor_name = _vendor, \
38
+ .product_name = _device, \
39
+ .profile_name = _profile, \
40
+ .ifnum = QUIRK_NO_INTERFACE \
41
+ }
42
+
28
43
/* FTDI devices */
29
44
{
30
45
USB_DEVICE (0x0403 , 0xb8d8 ),
61
76
/* Creative/E-Mu devices */
62
77
{
63
78
USB_DEVICE (0x041e , 0x3010 ),
64
- .driver_info = (unsigned long ) & (const struct snd_usb_audio_quirk ) {
65
- .vendor_name = "Creative Labs" ,
66
- .product_name = "Sound Blaster MP3+" ,
67
- .ifnum = QUIRK_NO_INTERFACE
68
- }
79
+ QUIRK_RENAME_DEVICE ("Creative Labs" , "Sound Blaster MP3+" )
69
80
},
70
81
/* Creative/Toshiba Multimedia Center SB-0500 */
71
82
{
72
83
USB_DEVICE (0x041e , 0x3048 ),
73
- .driver_info = (unsigned long ) & (const struct snd_usb_audio_quirk ) {
74
- .vendor_name = "Toshiba" ,
75
- .product_name = "SB-0500" ,
76
- .ifnum = QUIRK_NO_INTERFACE
77
- }
84
+ QUIRK_RENAME_DEVICE ("Toshiba" , "SB-0500" )
78
85
},
79
86
{
80
87
/* E-Mu 0202 USB */
207
214
.idProduct = 0x0990 ,
208
215
.bInterfaceClass = USB_CLASS_AUDIO ,
209
216
.bInterfaceSubClass = USB_SUBCLASS_AUDIOCONTROL ,
210
- .driver_info = (unsigned long ) & (const struct snd_usb_audio_quirk ) {
211
- .vendor_name = "Logitech, Inc." ,
212
- .product_name = "QuickCam Pro 9000" ,
213
- .ifnum = QUIRK_NO_INTERFACE
214
- }
217
+ QUIRK_RENAME_DEVICE ("Logitech, Inc." , "QuickCam Pro 9000" )
215
218
},
216
219
217
220
/*
@@ -2596,11 +2599,7 @@ YAMAHA_DEVICE(0x7010, "UB99"),
2596
2599
},
2597
2600
{
2598
2601
USB_DEVICE (0x0ccd , 0x0028 ),
2599
- .driver_info = (unsigned long ) & (const struct snd_usb_audio_quirk ) {
2600
- .vendor_name = "TerraTec" ,
2601
- .product_name = "Aureon5.1MkII" ,
2602
- .ifnum = QUIRK_NO_INTERFACE
2603
- }
2602
+ QUIRK_RENAME_DEVICE ("TerraTec" , "Aureon5.1MkII" )
2604
2603
},
2605
2604
{
2606
2605
USB_DEVICE (0x0ccd , 0x0035 ),
@@ -2615,19 +2614,11 @@ YAMAHA_DEVICE(0x7010, "UB99"),
2615
2614
/* Stanton/N2IT Final Scratch v1 device ('Scratchamp') */
2616
2615
{
2617
2616
USB_DEVICE (0x103d , 0x0100 ),
2618
- .driver_info = (unsigned long ) & (const struct snd_usb_audio_quirk ) {
2619
- .vendor_name = "Stanton" ,
2620
- .product_name = "ScratchAmp" ,
2621
- .ifnum = QUIRK_NO_INTERFACE
2622
- }
2617
+ QUIRK_RENAME_DEVICE ("Stanton" , "ScratchAmp" )
2623
2618
},
2624
2619
{
2625
2620
USB_DEVICE (0x103d , 0x0101 ),
2626
- .driver_info = (unsigned long ) & (const struct snd_usb_audio_quirk ) {
2627
- .vendor_name = "Stanton" ,
2628
- .product_name = "ScratchAmp" ,
2629
- .ifnum = QUIRK_NO_INTERFACE
2630
- }
2621
+ QUIRK_RENAME_DEVICE ("Stanton" , "ScratchAmp" )
2631
2622
},
2632
2623
2633
2624
/* Novation EMS devices */
@@ -2788,11 +2779,7 @@ YAMAHA_DEVICE(0x7010, "UB99"),
2788
2779
{
2789
2780
/* aka. Serato Scratch Live DJ Box */
2790
2781
USB_DEVICE (0x13e5 , 0x0001 ),
2791
- .driver_info = (unsigned long ) & (const struct snd_usb_audio_quirk ) {
2792
- .vendor_name = "Rane" ,
2793
- .product_name = "SL-1" ,
2794
- .ifnum = QUIRK_NO_INTERFACE
2795
- }
2782
+ QUIRK_RENAME_DEVICE ("Rane" , "SL-1" )
2796
2783
},
2797
2784
2798
2785
/* Native Instruments MK2 series */
@@ -3259,10 +3246,7 @@ AU0828_DEVICE(0x2040, 0x7270, "Hauppauge", "HVR-950Q"),
3259
3246
* is also used by the CM106 based cards, so make it unique.
3260
3247
*/
3261
3248
USB_DEVICE (0x0d8c , 0x0103 ),
3262
- .driver_info = (unsigned long ) & (const struct snd_usb_audio_quirk ) {
3263
- .product_name = "Audio Advantage MicroII" ,
3264
- .ifnum = QUIRK_NO_INTERFACE
3265
- }
3249
+ QUIRK_RENAME_DEVICE (NULL , "Audio Advantage MicroII" )
3266
3250
},
3267
3251
3268
3252
/* disabled due to regression for other devices;
@@ -3368,12 +3352,7 @@ AU0828_DEVICE(0x2040, 0x7270, "Hauppauge", "HVR-950Q"),
3368
3352
/* Dell WD15 Dock */
3369
3353
{
3370
3354
USB_DEVICE (0x0bda , 0x4014 ),
3371
- .driver_info = (unsigned long ) & (const struct snd_usb_audio_quirk ) {
3372
- .vendor_name = "Dell" ,
3373
- .product_name = "WD15 Dock" ,
3374
- .profile_name = "Dell-WD15-Dock" ,
3375
- .ifnum = QUIRK_NO_INTERFACE
3376
- }
3355
+ QUIRK_DEVICE_PROFILE ("Dell" , "WD15 Dock" , "Dell-WD15-Dock" )
3377
3356
},
3378
3357
/* Dell WD19 Dock */
3379
3358
{
@@ -3553,12 +3532,8 @@ AU0828_DEVICE(0x2040, 0x7270, "Hauppauge", "HVR-950Q"),
3553
3532
3554
3533
#define ALC1220_VB_DESKTOP (vend , prod ) { \
3555
3534
USB_DEVICE (vend , prod ), \
3556
- .driver_info = (unsigned long ) & (const struct snd_usb_audio_quirk ) { \
3557
- .vendor_name = "Realtek" , \
3558
- .product_name = "ALC1220-VB-DT" , \
3559
- .profile_name = "Realtek-ALC1220-VB-Desktop" , \
3560
- .ifnum = QUIRK_NO_INTERFACE \
3561
- } \
3535
+ QUIRK_DEVICE_PROFILE ("Realtek" , "ALC1220-VB-DT" , \
3536
+ "Realtek-ALC1220-VB-Desktop" ) \
3562
3537
}
3563
3538
ALC1220_VB_DESKTOP (0x0414 , 0xa002 ), /* Gigabyte TRX40 Aorus Pro WiFi */
3564
3539
ALC1220_VB_DESKTOP (0x0db0 , 0x0d64 ), /* MSI TRX40 Creator */
@@ -3574,21 +3549,13 @@ ALC1220_VB_DESKTOP(0x26ce, 0x0a01), /* Asrock TRX40 Creator */
3574
3549
*/
3575
3550
{
3576
3551
USB_DEVICE (0x0414 , 0xa000 ),
3577
- .driver_info = (unsigned long ) & (const struct snd_usb_audio_quirk ) {
3578
- .vendor_name = "Gigabyte" ,
3579
- .product_name = "Aorus Master Front Headphone" ,
3580
- .profile_name = "Gigabyte-Aorus-Master-Front-Headphone" ,
3581
- .ifnum = QUIRK_NO_INTERFACE
3582
- }
3552
+ QUIRK_DEVICE_PROFILE ("Gigabyte" , "Aorus Master Front Headphone" ,
3553
+ "Gigabyte-Aorus-Master-Front-Headphone" )
3583
3554
},
3584
3555
{
3585
3556
USB_DEVICE (0x0414 , 0xa001 ),
3586
- .driver_info = (unsigned long ) & (const struct snd_usb_audio_quirk ) {
3587
- .vendor_name = "Gigabyte" ,
3588
- .product_name = "Aorus Master Main Audio" ,
3589
- .profile_name = "Gigabyte-Aorus-Master-Main-Audio" ,
3590
- .ifnum = QUIRK_NO_INTERFACE
3591
- }
3557
+ QUIRK_DEVICE_PROFILE ("Gigabyte" , "Aorus Master Main Audio" ,
3558
+ "Gigabyte-Aorus-Master-Main-Audio" )
3592
3559
},
3593
3560
3594
3561
#undef USB_DEVICE_VENDOR_SPEC
0 commit comments