Commit df8c9981 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab Committed by Luis Henriques

[media] sound: simplify au0828 quirk table

commit 5d1f00a2 upstream.

Add a macro to simplify au0828 quirk table. That makes easier
to check it against the USB IDs at drivers/media/usb/au0828/au0828-cards.c.
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
Signed-off-by: default avatarLuis Henriques <luis.henriques@canonical.com>
parent a329a74d
...@@ -36,6 +36,11 @@ static void hvr950q_cs5340_audio(void *priv, int enable) ...@@ -36,6 +36,11 @@ static void hvr950q_cs5340_audio(void *priv, int enable)
au0828_clear(dev, REG_000, 0x10); au0828_clear(dev, REG_000, 0x10);
} }
/*
* WARNING: There's a quirks table at sound/usb/quirks-table.h
* that should also be updated every time a new device with V4L2 support
* is added here.
*/
struct au0828_board au0828_boards[] = { struct au0828_board au0828_boards[] = {
[AU0828_BOARD_UNKNOWN] = { [AU0828_BOARD_UNKNOWN] = {
.name = "Unknown board", .name = "Unknown board",
......
...@@ -2804,133 +2804,37 @@ YAMAHA_DEVICE(0x7010, "UB99"), ...@@ -2804,133 +2804,37 @@ YAMAHA_DEVICE(0x7010, "UB99"),
} }
}, },
/* Hauppauge HVR-950Q and HVR-850 */ /*
{ * Auvitek au0828 devices with audio interface.
USB_DEVICE_VENDOR_SPEC(0x2040, 0x7200), * This should be kept in sync with drivers/media/usb/au0828/au0828-cards.c
.match_flags = USB_DEVICE_ID_MATCH_DEVICE | * Please notice that some drivers are DVB only, and don't need to be
USB_DEVICE_ID_MATCH_INT_CLASS | * here. That's the case, for example, of DVICO_FUSIONHDTV7.
USB_DEVICE_ID_MATCH_INT_SUBCLASS, */
.bInterfaceClass = USB_CLASS_AUDIO,
.bInterfaceSubClass = USB_SUBCLASS_AUDIOCONTROL, #define AU0828_DEVICE(vid, pid, vname, pname) { \
.driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) { USB_DEVICE_VENDOR_SPEC(vid, pid), \
.vendor_name = "Hauppauge", .match_flags = USB_DEVICE_ID_MATCH_DEVICE | \
.product_name = "HVR-950Q", USB_DEVICE_ID_MATCH_INT_CLASS | \
.ifnum = QUIRK_ANY_INTERFACE, USB_DEVICE_ID_MATCH_INT_SUBCLASS, \
.type = QUIRK_AUDIO_ALIGN_TRANSFER, .bInterfaceClass = USB_CLASS_AUDIO, \
} .bInterfaceSubClass = USB_SUBCLASS_AUDIOCONTROL, \
}, .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) { \
{ .vendor_name = vname, \
USB_DEVICE_VENDOR_SPEC(0x2040, 0x7210), .product_name = pname, \
.match_flags = USB_DEVICE_ID_MATCH_DEVICE | .ifnum = QUIRK_ANY_INTERFACE, \
USB_DEVICE_ID_MATCH_INT_CLASS | .type = QUIRK_AUDIO_ALIGN_TRANSFER, \
USB_DEVICE_ID_MATCH_INT_SUBCLASS, } \
.bInterfaceClass = USB_CLASS_AUDIO, }
.bInterfaceSubClass = USB_SUBCLASS_AUDIOCONTROL,
.driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) { AU0828_DEVICE(0x2040, 0x7200, "Hauppauge", "HVR-950Q"),
.vendor_name = "Hauppauge", AU0828_DEVICE(0x2040, 0x7210, "Hauppauge", "HVR-950Q"),
.product_name = "HVR-950Q", AU0828_DEVICE(0x2040, 0x7217, "Hauppauge", "HVR-950Q"),
.ifnum = QUIRK_ANY_INTERFACE, AU0828_DEVICE(0x2040, 0x721b, "Hauppauge", "HVR-950Q"),
.type = QUIRK_AUDIO_ALIGN_TRANSFER, AU0828_DEVICE(0x2040, 0x721e, "Hauppauge", "HVR-950Q"),
} AU0828_DEVICE(0x2040, 0x721f, "Hauppauge", "HVR-950Q"),
}, AU0828_DEVICE(0x2040, 0x7240, "Hauppauge", "HVR-850"),
{ AU0828_DEVICE(0x2040, 0x7280, "Hauppauge", "HVR-950Q"),
USB_DEVICE_VENDOR_SPEC(0x2040, 0x7217), AU0828_DEVICE(0x0fd9, 0x0008, "Hauppauge", "HVR-950Q"),
.match_flags = USB_DEVICE_ID_MATCH_DEVICE |
USB_DEVICE_ID_MATCH_INT_CLASS |
USB_DEVICE_ID_MATCH_INT_SUBCLASS,
.bInterfaceClass = USB_CLASS_AUDIO,
.bInterfaceSubClass = USB_SUBCLASS_AUDIOCONTROL,
.driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
.vendor_name = "Hauppauge",
.product_name = "HVR-950Q",
.ifnum = QUIRK_ANY_INTERFACE,
.type = QUIRK_AUDIO_ALIGN_TRANSFER,
}
},
{
USB_DEVICE_VENDOR_SPEC(0x2040, 0x721b),
.match_flags = USB_DEVICE_ID_MATCH_DEVICE |
USB_DEVICE_ID_MATCH_INT_CLASS |
USB_DEVICE_ID_MATCH_INT_SUBCLASS,
.bInterfaceClass = USB_CLASS_AUDIO,
.bInterfaceSubClass = USB_SUBCLASS_AUDIOCONTROL,
.driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
.vendor_name = "Hauppauge",
.product_name = "HVR-950Q",
.ifnum = QUIRK_ANY_INTERFACE,
.type = QUIRK_AUDIO_ALIGN_TRANSFER,
}
},
{
USB_DEVICE_VENDOR_SPEC(0x2040, 0x721e),
.match_flags = USB_DEVICE_ID_MATCH_DEVICE |
USB_DEVICE_ID_MATCH_INT_CLASS |
USB_DEVICE_ID_MATCH_INT_SUBCLASS,
.bInterfaceClass = USB_CLASS_AUDIO,
.bInterfaceSubClass = USB_SUBCLASS_AUDIOCONTROL,
.driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
.vendor_name = "Hauppauge",
.product_name = "HVR-950Q",
.ifnum = QUIRK_ANY_INTERFACE,
.type = QUIRK_AUDIO_ALIGN_TRANSFER,
}
},
{
USB_DEVICE_VENDOR_SPEC(0x2040, 0x721f),
.match_flags = USB_DEVICE_ID_MATCH_DEVICE |
USB_DEVICE_ID_MATCH_INT_CLASS |
USB_DEVICE_ID_MATCH_INT_SUBCLASS,
.bInterfaceClass = USB_CLASS_AUDIO,
.bInterfaceSubClass = USB_SUBCLASS_AUDIOCONTROL,
.driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
.vendor_name = "Hauppauge",
.product_name = "HVR-950Q",
.ifnum = QUIRK_ANY_INTERFACE,
.type = QUIRK_AUDIO_ALIGN_TRANSFER,
}
},
{
USB_DEVICE_VENDOR_SPEC(0x2040, 0x7240),
.match_flags = USB_DEVICE_ID_MATCH_DEVICE |
USB_DEVICE_ID_MATCH_INT_CLASS |
USB_DEVICE_ID_MATCH_INT_SUBCLASS,
.bInterfaceClass = USB_CLASS_AUDIO,
.bInterfaceSubClass = USB_SUBCLASS_AUDIOCONTROL,
.driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
.vendor_name = "Hauppauge",
.product_name = "HVR-850",
.ifnum = QUIRK_ANY_INTERFACE,
.type = QUIRK_AUDIO_ALIGN_TRANSFER,
}
},
{
USB_DEVICE_VENDOR_SPEC(0x2040, 0x7280),
.match_flags = USB_DEVICE_ID_MATCH_DEVICE |
USB_DEVICE_ID_MATCH_INT_CLASS |
USB_DEVICE_ID_MATCH_INT_SUBCLASS,
.bInterfaceClass = USB_CLASS_AUDIO,
.bInterfaceSubClass = USB_SUBCLASS_AUDIOCONTROL,
.driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
.vendor_name = "Hauppauge",
.product_name = "HVR-950Q",
.ifnum = QUIRK_ANY_INTERFACE,
.type = QUIRK_AUDIO_ALIGN_TRANSFER,
}
},
{
USB_DEVICE_VENDOR_SPEC(0x0fd9, 0x0008),
.match_flags = USB_DEVICE_ID_MATCH_DEVICE |
USB_DEVICE_ID_MATCH_INT_CLASS |
USB_DEVICE_ID_MATCH_INT_SUBCLASS,
.bInterfaceClass = USB_CLASS_AUDIO,
.bInterfaceSubClass = USB_SUBCLASS_AUDIOCONTROL,
.driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
.vendor_name = "Hauppauge",
.product_name = "HVR-950Q",
.ifnum = QUIRK_ANY_INTERFACE,
.type = QUIRK_AUDIO_ALIGN_TRANSFER,
}
},
/* Digidesign Mbox */ /* Digidesign Mbox */
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment