mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-27 11:19:37 +00:00
ALSA: usb-audio: Clean up quirk entries with macros
Introduced a couple of macros to simplify some quirk entries. Just cosmetic, no functional changes. Link: https://lore.kernel.org/r/20200527061227.24915-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
6d28484026
commit
8191743d5f
1 changed files with 30 additions and 63 deletions
|
@ -25,6 +25,21 @@
|
||||||
.idProduct = prod, \
|
.idProduct = prod, \
|
||||||
.bInterfaceClass = USB_CLASS_VENDOR_SPEC
|
.bInterfaceClass = USB_CLASS_VENDOR_SPEC
|
||||||
|
|
||||||
|
#define QUIRK_RENAME_DEVICE(_vendor, _device) \
|
||||||
|
.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { \
|
||||||
|
.vendor_name = _vendor, \
|
||||||
|
.product_name = _device, \
|
||||||
|
.ifnum = QUIRK_NO_INTERFACE \
|
||||||
|
}
|
||||||
|
|
||||||
|
#define QUIRK_DEVICE_PROFILE(_vendor, _device, _profile) \
|
||||||
|
.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { \
|
||||||
|
.vendor_name = _vendor, \
|
||||||
|
.product_name = _device, \
|
||||||
|
.profile_name = _profile, \
|
||||||
|
.ifnum = QUIRK_NO_INTERFACE \
|
||||||
|
}
|
||||||
|
|
||||||
/* FTDI devices */
|
/* FTDI devices */
|
||||||
{
|
{
|
||||||
USB_DEVICE(0x0403, 0xb8d8),
|
USB_DEVICE(0x0403, 0xb8d8),
|
||||||
|
@ -61,20 +76,12 @@
|
||||||
/* Creative/E-Mu devices */
|
/* Creative/E-Mu devices */
|
||||||
{
|
{
|
||||||
USB_DEVICE(0x041e, 0x3010),
|
USB_DEVICE(0x041e, 0x3010),
|
||||||
.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
|
QUIRK_RENAME_DEVICE("Creative Labs", "Sound Blaster MP3+")
|
||||||
.vendor_name = "Creative Labs",
|
|
||||||
.product_name = "Sound Blaster MP3+",
|
|
||||||
.ifnum = QUIRK_NO_INTERFACE
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
/* Creative/Toshiba Multimedia Center SB-0500 */
|
/* Creative/Toshiba Multimedia Center SB-0500 */
|
||||||
{
|
{
|
||||||
USB_DEVICE(0x041e, 0x3048),
|
USB_DEVICE(0x041e, 0x3048),
|
||||||
.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
|
QUIRK_RENAME_DEVICE("Toshiba", "SB-0500")
|
||||||
.vendor_name = "Toshiba",
|
|
||||||
.product_name = "SB-0500",
|
|
||||||
.ifnum = QUIRK_NO_INTERFACE
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
/* E-Mu 0202 USB */
|
/* E-Mu 0202 USB */
|
||||||
|
@ -207,11 +214,7 @@
|
||||||
.idProduct = 0x0990,
|
.idProduct = 0x0990,
|
||||||
.bInterfaceClass = USB_CLASS_AUDIO,
|
.bInterfaceClass = USB_CLASS_AUDIO,
|
||||||
.bInterfaceSubClass = USB_SUBCLASS_AUDIOCONTROL,
|
.bInterfaceSubClass = USB_SUBCLASS_AUDIOCONTROL,
|
||||||
.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
|
QUIRK_RENAME_DEVICE("Logitech, Inc.", "QuickCam Pro 9000")
|
||||||
.vendor_name = "Logitech, Inc.",
|
|
||||||
.product_name = "QuickCam Pro 9000",
|
|
||||||
.ifnum = QUIRK_NO_INTERFACE
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -2596,11 +2599,7 @@ YAMAHA_DEVICE(0x7010, "UB99"),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
USB_DEVICE(0x0ccd, 0x0028),
|
USB_DEVICE(0x0ccd, 0x0028),
|
||||||
.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
|
QUIRK_RENAME_DEVICE("TerraTec", "Aureon5.1MkII")
|
||||||
.vendor_name = "TerraTec",
|
|
||||||
.product_name = "Aureon5.1MkII",
|
|
||||||
.ifnum = QUIRK_NO_INTERFACE
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
USB_DEVICE(0x0ccd, 0x0035),
|
USB_DEVICE(0x0ccd, 0x0035),
|
||||||
|
@ -2615,19 +2614,11 @@ YAMAHA_DEVICE(0x7010, "UB99"),
|
||||||
/* Stanton/N2IT Final Scratch v1 device ('Scratchamp') */
|
/* Stanton/N2IT Final Scratch v1 device ('Scratchamp') */
|
||||||
{
|
{
|
||||||
USB_DEVICE(0x103d, 0x0100),
|
USB_DEVICE(0x103d, 0x0100),
|
||||||
.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
|
QUIRK_RENAME_DEVICE("Stanton", "ScratchAmp")
|
||||||
.vendor_name = "Stanton",
|
|
||||||
.product_name = "ScratchAmp",
|
|
||||||
.ifnum = QUIRK_NO_INTERFACE
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
USB_DEVICE(0x103d, 0x0101),
|
USB_DEVICE(0x103d, 0x0101),
|
||||||
.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
|
QUIRK_RENAME_DEVICE("Stanton", "ScratchAmp")
|
||||||
.vendor_name = "Stanton",
|
|
||||||
.product_name = "ScratchAmp",
|
|
||||||
.ifnum = QUIRK_NO_INTERFACE
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/* Novation EMS devices */
|
/* Novation EMS devices */
|
||||||
|
@ -2788,11 +2779,7 @@ YAMAHA_DEVICE(0x7010, "UB99"),
|
||||||
{
|
{
|
||||||
/* aka. Serato Scratch Live DJ Box */
|
/* aka. Serato Scratch Live DJ Box */
|
||||||
USB_DEVICE(0x13e5, 0x0001),
|
USB_DEVICE(0x13e5, 0x0001),
|
||||||
.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
|
QUIRK_RENAME_DEVICE("Rane", "SL-1")
|
||||||
.vendor_name = "Rane",
|
|
||||||
.product_name = "SL-1",
|
|
||||||
.ifnum = QUIRK_NO_INTERFACE
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/* Native Instruments MK2 series */
|
/* Native Instruments MK2 series */
|
||||||
|
@ -3259,10 +3246,7 @@ AU0828_DEVICE(0x2040, 0x7270, "Hauppauge", "HVR-950Q"),
|
||||||
* is also used by the CM106 based cards, so make it unique.
|
* is also used by the CM106 based cards, so make it unique.
|
||||||
*/
|
*/
|
||||||
USB_DEVICE(0x0d8c, 0x0103),
|
USB_DEVICE(0x0d8c, 0x0103),
|
||||||
.driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
|
QUIRK_RENAME_DEVICE(NULL, "Audio Advantage MicroII")
|
||||||
.product_name = "Audio Advantage MicroII",
|
|
||||||
.ifnum = QUIRK_NO_INTERFACE
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/* disabled due to regression for other devices;
|
/* disabled due to regression for other devices;
|
||||||
|
@ -3368,12 +3352,7 @@ AU0828_DEVICE(0x2040, 0x7270, "Hauppauge", "HVR-950Q"),
|
||||||
/* Dell WD15 Dock */
|
/* Dell WD15 Dock */
|
||||||
{
|
{
|
||||||
USB_DEVICE(0x0bda, 0x4014),
|
USB_DEVICE(0x0bda, 0x4014),
|
||||||
.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
|
QUIRK_DEVICE_PROFILE("Dell", "WD15 Dock", "Dell-WD15-Dock")
|
||||||
.vendor_name = "Dell",
|
|
||||||
.product_name = "WD15 Dock",
|
|
||||||
.profile_name = "Dell-WD15-Dock",
|
|
||||||
.ifnum = QUIRK_NO_INTERFACE
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
/* Dell WD19 Dock */
|
/* Dell WD19 Dock */
|
||||||
{
|
{
|
||||||
|
@ -3553,12 +3532,8 @@ AU0828_DEVICE(0x2040, 0x7270, "Hauppauge", "HVR-950Q"),
|
||||||
|
|
||||||
#define ALC1220_VB_DESKTOP(vend, prod) { \
|
#define ALC1220_VB_DESKTOP(vend, prod) { \
|
||||||
USB_DEVICE(vend, prod), \
|
USB_DEVICE(vend, prod), \
|
||||||
.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { \
|
QUIRK_DEVICE_PROFILE("Realtek", "ALC1220-VB-DT", \
|
||||||
.vendor_name = "Realtek", \
|
"Realtek-ALC1220-VB-Desktop") \
|
||||||
.product_name = "ALC1220-VB-DT", \
|
|
||||||
.profile_name = "Realtek-ALC1220-VB-Desktop", \
|
|
||||||
.ifnum = QUIRK_NO_INTERFACE \
|
|
||||||
} \
|
|
||||||
}
|
}
|
||||||
ALC1220_VB_DESKTOP(0x0414, 0xa002), /* Gigabyte TRX40 Aorus Pro WiFi */
|
ALC1220_VB_DESKTOP(0x0414, 0xa002), /* Gigabyte TRX40 Aorus Pro WiFi */
|
||||||
ALC1220_VB_DESKTOP(0x0db0, 0x0d64), /* MSI TRX40 Creator */
|
ALC1220_VB_DESKTOP(0x0db0, 0x0d64), /* MSI TRX40 Creator */
|
||||||
|
@ -3574,21 +3549,13 @@ ALC1220_VB_DESKTOP(0x26ce, 0x0a01), /* Asrock TRX40 Creator */
|
||||||
*/
|
*/
|
||||||
{
|
{
|
||||||
USB_DEVICE(0x0414, 0xa000),
|
USB_DEVICE(0x0414, 0xa000),
|
||||||
.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
|
QUIRK_DEVICE_PROFILE("Gigabyte", "Aorus Master Front Headphone",
|
||||||
.vendor_name = "Gigabyte",
|
"Gigabyte-Aorus-Master-Front-Headphone")
|
||||||
.product_name = "Aorus Master Front Headphone",
|
|
||||||
.profile_name = "Gigabyte-Aorus-Master-Front-Headphone",
|
|
||||||
.ifnum = QUIRK_NO_INTERFACE
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
USB_DEVICE(0x0414, 0xa001),
|
USB_DEVICE(0x0414, 0xa001),
|
||||||
.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
|
QUIRK_DEVICE_PROFILE("Gigabyte", "Aorus Master Main Audio",
|
||||||
.vendor_name = "Gigabyte",
|
"Gigabyte-Aorus-Master-Main-Audio")
|
||||||
.product_name = "Aorus Master Main Audio",
|
|
||||||
.profile_name = "Gigabyte-Aorus-Master-Main-Audio",
|
|
||||||
.ifnum = QUIRK_NO_INTERFACE
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
#undef USB_DEVICE_VENDOR_SPEC
|
#undef USB_DEVICE_VENDOR_SPEC
|
||||||
|
|
Loading…
Reference in a new issue