mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-19 10:44:14 +08:00
V4L/DVB (5515): Use a better format to represent usbvision supported boards
Changed usbvision cards table to allow: 1) Not repeat USB ID on two structs; 2) Not need to specify both usb and card description tables at the same order, removing some magic; Some cards had duplicated names. Fixed. A test for an specific board were doing by using a string comparation. The comparation were wrong. Also, it is not a good practice to recognize a board based on his string name. Acked-by: Thierry MERLE <thierry.merle@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
This commit is contained in:
parent
2c4d336468
commit
659ae56dcd
@ -24,16 +24,16 @@
|
||||
23 -> Hauppauge WinTV USB (PAL I FM) [0573:4d12]
|
||||
24 -> Hauppauge WinTV USB (PAL D/K FM) [0573:4d14]
|
||||
25 -> Hauppauge WinTV USB Pro (NTSC M/N) [0573:4d2a]
|
||||
26 -> Hauppauge WinTV USB Pro (NTSC M/N) [0573:4d2b]
|
||||
26 -> Hauppauge WinTV USB Pro (NTSC M/N) V2 [0573:4d2b]
|
||||
27 -> Hauppauge WinTV USB Pro (PAL/SECAM B/G/I/D/K/L) [0573:4d2c]
|
||||
28 -> Hauppauge WinTV USB Pro (NTSC M/N) [0573:4d20]
|
||||
28 -> Hauppauge WinTV USB Pro (NTSC M/N) V3 [0573:4d20]
|
||||
29 -> Hauppauge WinTV USB Pro (PAL B/G) [0573:4d21]
|
||||
30 -> Hauppauge WinTV USB Pro (PAL I) [0573:4d22]
|
||||
31 -> Hauppauge WinTV USB Pro (PAL/SECAM L) [0573:4d23]
|
||||
32 -> Hauppauge WinTV USB Pro (PAL D/K) [0573:4d24]
|
||||
33 -> Hauppauge WinTV USB Pro (PAL/SECAM BGDK/I/L) [0573:4d25]
|
||||
34 -> Hauppauge WinTV USB Pro (PAL/SECAM BGDK/I/L) [0573:4d26]
|
||||
35 -> Hauppauge WinTV USB Pro (PAL B/G) [0573:4d27]
|
||||
34 -> Hauppauge WinTV USB Pro (PAL/SECAM BGDK/I/L) V2 [0573:4d26]
|
||||
35 -> Hauppauge WinTV USB Pro (PAL B/G) V2 [0573:4d27]
|
||||
36 -> Hauppauge WinTV USB Pro (PAL B/G,D/K) [0573:4d28]
|
||||
37 -> Hauppauge WinTV USB Pro (PAL I,D/K) [0573:4d29]
|
||||
38 -> Hauppauge WinTV USB Pro (NTSC M/N FM) [0573:4d30]
|
||||
@ -43,7 +43,7 @@
|
||||
42 -> Hauppauge WinTV USB Pro (Temic PAL/SECAM B/G/I/D/K/L FM) [0573:4d35]
|
||||
43 -> Hauppauge WinTV USB Pro (Temic PAL B/G FM) [0573:4d36]
|
||||
44 -> Hauppauge WinTV USB Pro (PAL/SECAM B/G/I/D/K/L FM) [0573:4d37]
|
||||
45 -> Hauppauge WinTV USB Pro (NTSC M/N FM) [0573:4d38]
|
||||
45 -> Hauppauge WinTV USB Pro (NTSC M/N FM) V2 [0573:4d38]
|
||||
46 -> Camtel Technology USB TV Genie Pro FM Model TVB330 [0768:0006]
|
||||
47 -> Digital Video Creator I [07d0:0001]
|
||||
48 -> Global Village GV-007 (NTSC) [07d0:0002]
|
||||
@ -56,9 +56,9 @@
|
||||
55 -> Pinnacle Studio PCTV USB (PAL) FM [2304:0110]
|
||||
56 -> Miro PCTV USB [2304:0111]
|
||||
57 -> Pinnacle Studio PCTV USB (NTSC) FM [2304:0112]
|
||||
58 -> Pinnacle Studio PCTV USB (PAL) FM [2304:0210]
|
||||
59 -> Pinnacle Studio PCTV USB (NTSC) FM [2304:0212]
|
||||
60 -> Pinnacle Studio PCTV USB (PAL) FM [2304:0214]
|
||||
58 -> Pinnacle Studio PCTV USB (PAL) FM V2 [2304:0210]
|
||||
59 -> Pinnacle Studio PCTV USB (NTSC) FM V2 [2304:0212]
|
||||
60 -> Pinnacle Studio PCTV USB (PAL) FM V3 [2304:0214]
|
||||
61 -> Pinnacle Studio Linx Video input cable (NTSC) [2304:0300]
|
||||
62 -> Pinnacle Studio Linx Video input cable (PAL) [2304:0301]
|
||||
63 -> Pinnacle PCTV Bungee USB (PAL) FM [2304:0419]
|
||||
|
File diff suppressed because it is too large
Load Diff
65
drivers/media/video/usbvision/usbvision-cards.h
Normal file
65
drivers/media/video/usbvision/usbvision-cards.h
Normal file
@ -0,0 +1,65 @@
|
||||
#define DUMMY_DEVICE 0
|
||||
#define XANBOO 1
|
||||
#define BELKIN_VIDEOBUS_II 2
|
||||
#define BELKIN_VIDEOBUS 3
|
||||
#define BELKIN_USB_VIDEOBUS_II 4
|
||||
#define ECHOFX_INTERVIEW_LITE 5
|
||||
#define USBGEAR_USBG_V1 6
|
||||
#define D_LINK_V100 7
|
||||
#define X10_USB_CAMERA 8
|
||||
#define HPG_WINTV_LIVE_PAL_BG 9
|
||||
#define HPG_WINTV_LIVE_PRO_NTSC_MN 10
|
||||
#define ZORAN_PMD_NOGATECH 11
|
||||
#define NOGATECH_USB_TV_NTSC_FM 12
|
||||
#define PNY_USB_TV_NTSC_FM 13
|
||||
#define PV_PLAYTV_USB_PRO_PAL_FM 14
|
||||
#define ZT_721 15
|
||||
#define HPG_WINTV_NTSC_MN 16
|
||||
#define HPG_WINTV_PAL_BG 17
|
||||
#define HPG_WINTV_PAL_I 18
|
||||
#define HPG_WINTV_PAL_SECAM_L 19
|
||||
#define HPG_WINTV_PAL_D_K 20
|
||||
#define HPG_WINTV_NTSC_FM 21
|
||||
#define HPG_WINTV_PAL_BG_FM 22
|
||||
#define HPG_WINTV_PAL_I_FM 23
|
||||
#define HPG_WINTV_PAL_D_K_FM 24
|
||||
#define HPG_WINTV_PRO_NTSC_MN 25
|
||||
#define HPG_WINTV_PRO_NTSC_MN_V2 26
|
||||
#define HPG_WINTV_PRO_PAL 27
|
||||
#define HPG_WINTV_PRO_NTSC_MN_V3 28
|
||||
#define HPG_WINTV_PRO_PAL_BG 29
|
||||
#define HPG_WINTV_PRO_PAL_I 30
|
||||
#define HPG_WINTV_PRO_PAL_SECAM_L 31
|
||||
#define HPG_WINTV_PRO_PAL_D_K 32
|
||||
#define HPG_WINTV_PRO_PAL_SECAM 33
|
||||
#define HPG_WINTV_PRO_PAL_SECAM_V2 34
|
||||
#define HPG_WINTV_PRO_PAL_BG_V2 35
|
||||
#define HPG_WINTV_PRO_PAL_BG_D_K 36
|
||||
#define HPG_WINTV_PRO_PAL_I_D_K 37
|
||||
#define HPG_WINTV_PRO_NTSC_MN_FM 38
|
||||
#define HPG_WINTV_PRO_PAL_BG_FM 39
|
||||
#define HPG_WINTV_PRO_PAL_I_FM 40
|
||||
#define HPG_WINTV_PRO_PAL_D_K_FM 41
|
||||
#define HPG_WINTV_PRO_TEMIC_PAL_FM 42
|
||||
#define HPG_WINTV_PRO_TEMIC_PAL_BG_FM 43
|
||||
#define HPG_WINTV_PRO_PAL_FM 44
|
||||
#define HPG_WINTV_PRO_NTSC_MN_FM_V2 45
|
||||
#define CAMTEL_TVB330 46
|
||||
#define DIGITAL_VIDEO_CREATOR_I 47
|
||||
#define GLOBAL_VILLAGE_GV_007_NTSC 48
|
||||
#define DAZZLE_DVC_50_REV_1_NTSC 49
|
||||
#define DAZZLE_DVC_80_REV_1_PAL 50
|
||||
#define DAZZLE_DVC_90_REV_1_SECAM 51
|
||||
#define ESKAPE_LABS_MYTV2GO 52
|
||||
#define PINNA_PCTV_USB_PAL 53
|
||||
#define PINNA_PCTV_USB_SECAM 54
|
||||
#define PINNA_PCTV_USB_PAL_FM 55
|
||||
#define MIRO_PCTV_USB 56
|
||||
#define PINNA_PCTV_USB_NTSC_FM 57
|
||||
#define PINNA_PCTV_USB_PAL_FM_V2 58
|
||||
#define PINNA_PCTV_USB_NTSC_FM_V2 59
|
||||
#define PINNA_PCTV_USB_PAL_FM_V3 60
|
||||
#define PINNA_LINX_VD_IN_CAB_NTSC 61
|
||||
#define PINNA_LINX_VD_IN_CAB_PAL 62
|
||||
#define PINNA_PCTV_BUNGEE_PAL_FM 63
|
||||
#define HPG_WINTV 64
|
@ -76,6 +76,7 @@
|
||||
#endif
|
||||
|
||||
#include "usbvision.h"
|
||||
#include "usbvision-cards.h"
|
||||
|
||||
#define DRIVER_AUTHOR "Joerg Heckenbach <joerg@heckenbach-aw.de>, Dwaine Garden <DwaineGarden@rogers.com>"
|
||||
#define DRIVER_NAME "usbvision"
|
||||
@ -1775,7 +1776,8 @@ static void usbvision_configure_video(struct usb_usbvision *usbvision)
|
||||
* if it looks like USBVISION video device
|
||||
*
|
||||
*/
|
||||
static int __devinit usbvision_probe(struct usb_interface *intf, const struct usb_device_id *devid)
|
||||
static int __devinit usbvision_probe(struct usb_interface *intf,
|
||||
const struct usb_device_id *devid)
|
||||
{
|
||||
struct usb_device *dev = usb_get_dev(interface_to_usbdev(intf));
|
||||
struct usb_interface *uif;
|
||||
@ -1786,25 +1788,13 @@ static int __devinit usbvision_probe(struct usb_interface *intf, const struct us
|
||||
int model,i;
|
||||
|
||||
PDEBUG(DBG_PROBE, "VID=%#04x, PID=%#04x, ifnum=%u",
|
||||
dev->descriptor.idVendor, dev->descriptor.idProduct, ifnum);
|
||||
dev->descriptor.idVendor,
|
||||
dev->descriptor.idProduct, ifnum);
|
||||
|
||||
/* Is it an USBVISION video dev? */
|
||||
model = 0;
|
||||
for(model = 0; usbvision_device_data[model].idVendor; model++) {
|
||||
if (le16_to_cpu(dev->descriptor.idVendor) != usbvision_device_data[model].idVendor) {
|
||||
continue;
|
||||
}
|
||||
if (le16_to_cpu(dev->descriptor.idProduct) != usbvision_device_data[model].idProduct) {
|
||||
continue;
|
||||
}
|
||||
model = devid->driver_info;
|
||||
printk(KERN_INFO "%s: %s found\n", __FUNCTION__,
|
||||
usbvision_device_data[model].ModelString);
|
||||
|
||||
printk(KERN_INFO "%s: %s found\n", __FUNCTION__, usbvision_device_data[model].ModelString);
|
||||
break;
|
||||
}
|
||||
|
||||
if (usbvision_device_data[model].idVendor == 0) {
|
||||
return -ENODEV; //no matching device
|
||||
}
|
||||
if (usbvision_device_data[model].Interface >= 0) {
|
||||
interface = &dev->actconfig->interface[usbvision_device_data[model].Interface]->altsetting[0];
|
||||
}
|
||||
@ -1828,10 +1818,11 @@ static int __devinit usbvision_probe(struct usb_interface *intf, const struct us
|
||||
err("%s: couldn't allocate USBVision struct", __FUNCTION__);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
if (dev->descriptor.bNumConfigurations > 1) {
|
||||
usbvision->bridgeType = BRIDGE_NT1004;
|
||||
}
|
||||
else if (usbvision_device_data[model].ModelString == "Dazzle Fusion Model DVC-90 Rev 1 (SECAM)") {
|
||||
else if (model == DAZZLE_DVC_90_REV_1_SECAM) {
|
||||
usbvision->bridgeType = BRIDGE_NT1005;
|
||||
}
|
||||
else {
|
||||
@ -1958,6 +1949,8 @@ static struct usb_driver usbvision_driver = {
|
||||
*/
|
||||
static void customdevice_process(void)
|
||||
{
|
||||
unsigned int id_vend,id_prod;
|
||||
|
||||
usbvision_device_data[0]=usbvision_device_data[1];
|
||||
usbvision_table[0]=usbvision_table[1];
|
||||
|
||||
@ -1965,7 +1958,7 @@ static void customdevice_process(void)
|
||||
{
|
||||
char *parse=CustomDevice;
|
||||
|
||||
PDEBUG(DBG_PROBE, "CustomDevide=%s", CustomDevice);
|
||||
PDEBUG(DBG_PROBE, "CustomDevice=%s", CustomDevice);
|
||||
|
||||
/*format is CustomDevice="0x0573 0x4D31 0 7113 3 PAL 1 1 1 5 -1 -1 -1 -1 -1"
|
||||
usbvision_device_data[0].idVendor;
|
||||
@ -1990,13 +1983,16 @@ static void customdevice_process(void)
|
||||
usbvision_device_data[0].ModelString="USBVISION Custom Device";
|
||||
|
||||
parse+=2;
|
||||
sscanf(parse,"%x",&usbvision_device_data[0].idVendor);
|
||||
sscanf(parse,"%u",&id_vend);
|
||||
usbvision_table[0].idVendor=id_vend;
|
||||
|
||||
goto2next(parse);
|
||||
PDEBUG(DBG_PROBE, "idVendor=0x%.4X", usbvision_device_data[0].idVendor);
|
||||
PDEBUG(DBG_PROBE, "idVendor=0x%.4X", usbvision_table[0].idVendor);
|
||||
parse+=2;
|
||||
sscanf(parse,"%x",&usbvision_device_data[0].idProduct);
|
||||
sscanf(parse,"%u",&id_prod);
|
||||
usbvision_table[0].idProduct=id_prod;
|
||||
goto2next(parse);
|
||||
PDEBUG(DBG_PROBE, "idProduct=0x%.4X", usbvision_device_data[0].idProduct);
|
||||
PDEBUG(DBG_PROBE, "idProduct=0x%.4X", usbvision_table[0].idProduct);
|
||||
sscanf(parse,"%d",&usbvision_device_data[0].Interface);
|
||||
goto2next(parse);
|
||||
PDEBUG(DBG_PROBE, "Interface=%d", usbvision_device_data[0].Interface);
|
||||
@ -2060,9 +2056,6 @@ static void customdevice_process(void)
|
||||
|
||||
//add to usbvision_table also
|
||||
usbvision_table[0].match_flags=USB_DEVICE_ID_MATCH_DEVICE;
|
||||
usbvision_table[0].idVendor=usbvision_device_data[0].idVendor;
|
||||
usbvision_table[0].idProduct=usbvision_device_data[0].idProduct;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -342,8 +342,6 @@ struct usbvision_frame {
|
||||
#define BRIDGE_NT1005 1005
|
||||
|
||||
struct usbvision_device_data_st {
|
||||
int idVendor;
|
||||
int idProduct;
|
||||
int Interface; /* to handle special interface number like BELKIN and Hauppauge WinTV-USB II */
|
||||
int Codec;
|
||||
int VideoChannels;
|
||||
|
Loading…
Reference in New Issue
Block a user