Commit c682b3a7 authored by Trent Piepho's avatar Trent Piepho Committed by Mauro Carvalho Chehab

V4L/DVB (5517): Usbvision: store the device database more efficiently

One bit wide bitfields need to declared unsigned to have the range 0 to
1, or they have the range -1 to 0.

A few techniques to reduce the driver's size by about 1700 bytes on ia32,
probably more on x86-64.

Put the biggest fields first, less padding is necessary that way.

Put fields with a limited range into a smaller type.  For example
VideoChannels will fit in 3 bits, and TunerType can use 8 bits.

Vin_Reg1, Vin_Reg2, and Dvi_yuv define values for 8-bit registers, but
they can't just go into an 8-bit field with no changes, since -1 was used
as a flag to indicate a value was not present.  So what we do is create a
one-bit flag for each one to indicate if a value is or is not present.

This only takes 9 bits and has the added advantage that when the register
isn't overridden (Vin_Reg[12] never are) it doesn't need to appear in the
structure definition since the default value for the flag will be zero.
Signed-off-by: default avatarTrent Piepho <xyzzy@speakeasy.org>
Acked-by: default avatarThierry MERLE <thierry.merle@free.fr>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@infradead.org>
parent f7ca6256
...@@ -42,11 +42,8 @@ struct usbvision_device_data_st usbvision_device_data[] = { ...@@ -42,11 +42,8 @@ struct usbvision_device_data_st usbvision_device_data[] = {
.vbi = 1, .vbi = 1,
.Tuner = 1, .Tuner = 1,
.TunerType = TUNER_PHILIPS_NTSC_M, .TunerType = TUNER_PHILIPS_NTSC_M,
.Vin_Reg1 = -1,
.Vin_Reg2 = -1,
.X_Offset = -1, .X_Offset = -1,
.Y_Offset = -1, .Y_Offset = -1,
.Dvi_yuv = -1,
.ModelString = "Custom Dummy USBVision Device", .ModelString = "Custom Dummy USBVision Device",
}, },
[XANBOO] = { [XANBOO] = {
...@@ -59,11 +56,8 @@ struct usbvision_device_data_st usbvision_device_data[] = { ...@@ -59,11 +56,8 @@ struct usbvision_device_data_st usbvision_device_data[] = {
.vbi = 1, .vbi = 1,
.Tuner = 0, .Tuner = 0,
.TunerType = 0, .TunerType = 0,
.Vin_Reg1 = -1,
.Vin_Reg2 = -1,
.X_Offset = -1, .X_Offset = -1,
.Y_Offset = -1, .Y_Offset = -1,
.Dvi_yuv = -1,
.ModelString = "Xanboo", .ModelString = "Xanboo",
}, },
[BELKIN_VIDEOBUS_II] = { [BELKIN_VIDEOBUS_II] = {
...@@ -76,10 +70,9 @@ struct usbvision_device_data_st usbvision_device_data[] = { ...@@ -76,10 +70,9 @@ struct usbvision_device_data_st usbvision_device_data[] = {
.vbi = 1, .vbi = 1,
.Tuner = 0, .Tuner = 0,
.TunerType = 0, .TunerType = 0,
.Vin_Reg1 = -1,
.Vin_Reg2 = -1,
.X_Offset = 0, .X_Offset = 0,
.Y_Offset = 3, .Y_Offset = 3,
.Dvi_yuv_override = 1,
.Dvi_yuv = 7, .Dvi_yuv = 7,
.ModelString = "Belkin USB VideoBus II Adapter", .ModelString = "Belkin USB VideoBus II Adapter",
}, },
...@@ -93,11 +86,8 @@ struct usbvision_device_data_st usbvision_device_data[] = { ...@@ -93,11 +86,8 @@ struct usbvision_device_data_st usbvision_device_data[] = {
.vbi = 1, .vbi = 1,
.Tuner = 0, .Tuner = 0,
.TunerType = 0, .TunerType = 0,
.Vin_Reg1 = -1,
.Vin_Reg2 = -1,
.X_Offset = -1, .X_Offset = -1,
.Y_Offset = -1, .Y_Offset = -1,
.Dvi_yuv = -1,
.ModelString = "Belkin Components USB VideoBus", .ModelString = "Belkin Components USB VideoBus",
}, },
[BELKIN_USB_VIDEOBUS_II] = { [BELKIN_USB_VIDEOBUS_II] = {
...@@ -110,10 +100,9 @@ struct usbvision_device_data_st usbvision_device_data[] = { ...@@ -110,10 +100,9 @@ struct usbvision_device_data_st usbvision_device_data[] = {
.vbi = 1, .vbi = 1,
.Tuner = 0, .Tuner = 0,
.TunerType = 0, .TunerType = 0,
.Vin_Reg1 = -1,
.Vin_Reg2 = -1,
.X_Offset = 0, .X_Offset = 0,
.Y_Offset = 3, .Y_Offset = 3,
.Dvi_yuv_override = 1,
.Dvi_yuv = 7, .Dvi_yuv = 7,
.ModelString = "Belkin USB VideoBus II", .ModelString = "Belkin USB VideoBus II",
}, },
...@@ -127,10 +116,9 @@ struct usbvision_device_data_st usbvision_device_data[] = { ...@@ -127,10 +116,9 @@ struct usbvision_device_data_st usbvision_device_data[] = {
.vbi = 1, .vbi = 1,
.Tuner = 0, .Tuner = 0,
.TunerType = 0, .TunerType = 0,
.Vin_Reg1 = -1,
.Vin_Reg2 = -1,
.X_Offset = -1, .X_Offset = -1,
.Y_Offset = -1, .Y_Offset = -1,
.Dvi_yuv_override = 1,
.Dvi_yuv = 7, .Dvi_yuv = 7,
.ModelString = "echoFX InterView Lite", .ModelString = "echoFX InterView Lite",
}, },
...@@ -144,11 +132,8 @@ struct usbvision_device_data_st usbvision_device_data[] = { ...@@ -144,11 +132,8 @@ struct usbvision_device_data_st usbvision_device_data[] = {
.vbi = 1, .vbi = 1,
.Tuner = 0, .Tuner = 0,
.TunerType = 0, .TunerType = 0,
.Vin_Reg1 = -1,
.Vin_Reg2 = -1,
.X_Offset = -1, .X_Offset = -1,
.Y_Offset = -1, .Y_Offset = -1,
.Dvi_yuv = -1,
.ModelString = "USBGear USBG-V1 resp. HAMA USB", .ModelString = "USBGear USBG-V1 resp. HAMA USB",
}, },
[D_LINK_V100] = { [D_LINK_V100] = {
...@@ -161,10 +146,9 @@ struct usbvision_device_data_st usbvision_device_data[] = { ...@@ -161,10 +146,9 @@ struct usbvision_device_data_st usbvision_device_data[] = {
.vbi = 1, .vbi = 1,
.Tuner = 0, .Tuner = 0,
.TunerType = 0, .TunerType = 0,
.Vin_Reg1 = -1,
.Vin_Reg2 = -1,
.X_Offset = 0, .X_Offset = 0,
.Y_Offset = 3, .Y_Offset = 3,
.Dvi_yuv_override = 1,
.Dvi_yuv = 7, .Dvi_yuv = 7,
.ModelString = "D-Link V100", .ModelString = "D-Link V100",
}, },
...@@ -178,11 +162,8 @@ struct usbvision_device_data_st usbvision_device_data[] = { ...@@ -178,11 +162,8 @@ struct usbvision_device_data_st usbvision_device_data[] = {
.vbi = 1, .vbi = 1,
.Tuner = 0, .Tuner = 0,
.TunerType = 0, .TunerType = 0,
.Vin_Reg1 = -1,
.Vin_Reg2 = -1,
.X_Offset = -1, .X_Offset = -1,
.Y_Offset = -1, .Y_Offset = -1,
.Dvi_yuv = -1,
.ModelString = "X10 USB Camera", .ModelString = "X10 USB Camera",
}, },
[HPG_WINTV_LIVE_PAL_BG] = { [HPG_WINTV_LIVE_PAL_BG] = {
...@@ -195,10 +176,9 @@ struct usbvision_device_data_st usbvision_device_data[] = { ...@@ -195,10 +176,9 @@ struct usbvision_device_data_st usbvision_device_data[] = {
.vbi = 1, .vbi = 1,
.Tuner = 0, .Tuner = 0,
.TunerType = 0, .TunerType = 0,
.Vin_Reg1 = -1,
.Vin_Reg2 = -1,
.X_Offset = -1, .X_Offset = -1,
.Y_Offset = 3, .Y_Offset = 3,
.Dvi_yuv_override = 1,
.Dvi_yuv = 7, .Dvi_yuv = 7,
.ModelString = "Hauppauge WinTV USB Live (PAL B/G)", .ModelString = "Hauppauge WinTV USB Live (PAL B/G)",
}, },
...@@ -212,10 +192,9 @@ struct usbvision_device_data_st usbvision_device_data[] = { ...@@ -212,10 +192,9 @@ struct usbvision_device_data_st usbvision_device_data[] = {
.vbi = 1, .vbi = 1,
.Tuner = 0, .Tuner = 0,
.TunerType = 0, .TunerType = 0,
.Vin_Reg1 = -1,
.Vin_Reg2 = -1,
.X_Offset = 0, .X_Offset = 0,
.Y_Offset = 3, .Y_Offset = 3,
.Dvi_yuv_override = 1,
.Dvi_yuv = 7, .Dvi_yuv = 7,
.ModelString = "Hauppauge WinTV USB Live Pro (NTSC M/N)", .ModelString = "Hauppauge WinTV USB Live Pro (NTSC M/N)",
}, },
...@@ -229,10 +208,9 @@ struct usbvision_device_data_st usbvision_device_data[] = { ...@@ -229,10 +208,9 @@ struct usbvision_device_data_st usbvision_device_data[] = {
.vbi = 1, .vbi = 1,
.Tuner = 0, .Tuner = 0,
.TunerType = 0, .TunerType = 0,
.Vin_Reg1 = -1,
.Vin_Reg2 = -1,
.X_Offset = 0, .X_Offset = 0,
.Y_Offset = 3, .Y_Offset = 3,
.Dvi_yuv_override = 1,
.Dvi_yuv = 7, .Dvi_yuv = 7,
.ModelString = "Zoran Co. PMD (Nogatech) AV-grabber Manhattan", .ModelString = "Zoran Co. PMD (Nogatech) AV-grabber Manhattan",
}, },
...@@ -246,11 +224,8 @@ struct usbvision_device_data_st usbvision_device_data[] = { ...@@ -246,11 +224,8 @@ struct usbvision_device_data_st usbvision_device_data[] = {
.vbi = 1, .vbi = 1,
.Tuner = 1, .Tuner = 1,
.TunerType = TUNER_PHILIPS_NTSC_M, .TunerType = TUNER_PHILIPS_NTSC_M,
.Vin_Reg1 = -1,
.Vin_Reg2 = -1,
.X_Offset = -1, .X_Offset = -1,
.Y_Offset = 20, .Y_Offset = 20,
.Dvi_yuv = -1,
.ModelString = "Nogatech USB-TV (NTSC) FM", .ModelString = "Nogatech USB-TV (NTSC) FM",
}, },
[PNY_USB_TV_NTSC_FM] = { [PNY_USB_TV_NTSC_FM] = {
...@@ -263,11 +238,8 @@ struct usbvision_device_data_st usbvision_device_data[] = { ...@@ -263,11 +238,8 @@ struct usbvision_device_data_st usbvision_device_data[] = {
.vbi = 1, .vbi = 1,
.Tuner = 1, .Tuner = 1,
.TunerType = TUNER_PHILIPS_NTSC_M, .TunerType = TUNER_PHILIPS_NTSC_M,
.Vin_Reg1 = -1,
.Vin_Reg2 = -1,
.X_Offset = -1, .X_Offset = -1,
.Y_Offset = 20, .Y_Offset = 20,
.Dvi_yuv = -1,
.ModelString = "PNY USB-TV (NTSC) FM", .ModelString = "PNY USB-TV (NTSC) FM",
}, },
[PV_PLAYTV_USB_PRO_PAL_FM] = { [PV_PLAYTV_USB_PRO_PAL_FM] = {
...@@ -280,10 +252,9 @@ struct usbvision_device_data_st usbvision_device_data[] = { ...@@ -280,10 +252,9 @@ struct usbvision_device_data_st usbvision_device_data[] = {
.vbi = 1, .vbi = 1,
.Tuner = 1, .Tuner = 1,
.TunerType = TUNER_PHILIPS_PAL, .TunerType = TUNER_PHILIPS_PAL,
.Vin_Reg1 = -1,
.Vin_Reg2 = -1,
.X_Offset = 0, .X_Offset = 0,
.Y_Offset = 3, .Y_Offset = 3,
.Dvi_yuv_override = 1,
.Dvi_yuv = 7, .Dvi_yuv = 7,
.ModelString = "PixelView PlayTv-USB PRO (PAL) FM", .ModelString = "PixelView PlayTv-USB PRO (PAL) FM",
}, },
...@@ -297,10 +268,9 @@ struct usbvision_device_data_st usbvision_device_data[] = { ...@@ -297,10 +268,9 @@ struct usbvision_device_data_st usbvision_device_data[] = {
.vbi = 1, .vbi = 1,
.Tuner = 1, .Tuner = 1,
.TunerType = TUNER_PHILIPS_PAL, .TunerType = TUNER_PHILIPS_PAL,
.Vin_Reg1 = -1,
.Vin_Reg2 = -1,
.X_Offset = 0, .X_Offset = 0,
.Y_Offset = 3, .Y_Offset = 3,
.Dvi_yuv_override = 1,
.Dvi_yuv = 7, .Dvi_yuv = 7,
.ModelString = "ZTV ZT-721 2.4GHz USB A/V Receiver", .ModelString = "ZTV ZT-721 2.4GHz USB A/V Receiver",
}, },
...@@ -314,11 +284,8 @@ struct usbvision_device_data_st usbvision_device_data[] = { ...@@ -314,11 +284,8 @@ struct usbvision_device_data_st usbvision_device_data[] = {
.vbi = 1, .vbi = 1,
.Tuner = 1, .Tuner = 1,
.TunerType = TUNER_PHILIPS_NTSC_M, .TunerType = TUNER_PHILIPS_NTSC_M,
.Vin_Reg1 = -1,
.Vin_Reg2 = -1,
.X_Offset = -1, .X_Offset = -1,
.Y_Offset = 20, .Y_Offset = 20,
.Dvi_yuv = -1,
.ModelString = "Hauppauge WinTV USB (NTSC M/N)", .ModelString = "Hauppauge WinTV USB (NTSC M/N)",
}, },
[HPG_WINTV_PAL_BG] = { [HPG_WINTV_PAL_BG] = {
...@@ -331,11 +298,8 @@ struct usbvision_device_data_st usbvision_device_data[] = { ...@@ -331,11 +298,8 @@ struct usbvision_device_data_st usbvision_device_data[] = {
.vbi = 1, .vbi = 1,
.Tuner = 1, .Tuner = 1,
.TunerType = TUNER_PHILIPS_PAL, .TunerType = TUNER_PHILIPS_PAL,
.Vin_Reg1 = -1,
.Vin_Reg2 = -1,
.X_Offset = -1, .X_Offset = -1,
.Y_Offset = -1, .Y_Offset = -1,
.Dvi_yuv = -1,
.ModelString = "Hauppauge WinTV USB (PAL B/G)", .ModelString = "Hauppauge WinTV USB (PAL B/G)",
}, },
[HPG_WINTV_PAL_I] = { [HPG_WINTV_PAL_I] = {
...@@ -348,11 +312,8 @@ struct usbvision_device_data_st usbvision_device_data[] = { ...@@ -348,11 +312,8 @@ struct usbvision_device_data_st usbvision_device_data[] = {
.vbi = 1, .vbi = 1,
.Tuner = 1, .Tuner = 1,
.TunerType = TUNER_PHILIPS_PAL, .TunerType = TUNER_PHILIPS_PAL,
.Vin_Reg1 = -1,
.Vin_Reg2 = -1,
.X_Offset = -1, .X_Offset = -1,
.Y_Offset = -1, .Y_Offset = -1,
.Dvi_yuv = -1,
.ModelString = "Hauppauge WinTV USB (PAL I)", .ModelString = "Hauppauge WinTV USB (PAL I)",
}, },
[HPG_WINTV_PAL_SECAM_L] = { [HPG_WINTV_PAL_SECAM_L] = {
...@@ -365,11 +326,8 @@ struct usbvision_device_data_st usbvision_device_data[] = { ...@@ -365,11 +326,8 @@ struct usbvision_device_data_st usbvision_device_data[] = {
.vbi = 1, .vbi = 1,
.Tuner = 1, .Tuner = 1,
.TunerType = TUNER_PHILIPS_SECAM, .TunerType = TUNER_PHILIPS_SECAM,
.Vin_Reg1 = -1,
.Vin_Reg2 = -1,
.X_Offset = -1, .X_Offset = -1,
.Y_Offset = -1, .Y_Offset = -1,
.Dvi_yuv = -1,
.ModelString = "Hauppauge WinTV USB (PAL/SECAM L)", .ModelString = "Hauppauge WinTV USB (PAL/SECAM L)",
}, },
[HPG_WINTV_PAL_D_K] = { [HPG_WINTV_PAL_D_K] = {
...@@ -382,11 +340,8 @@ struct usbvision_device_data_st usbvision_device_data[] = { ...@@ -382,11 +340,8 @@ struct usbvision_device_data_st usbvision_device_data[] = {
.vbi = 1, .vbi = 1,
.Tuner = 1, .Tuner = 1,
.TunerType = TUNER_PHILIPS_PAL, .TunerType = TUNER_PHILIPS_PAL,
.Vin_Reg1 = -1,
.Vin_Reg2 = -1,
.X_Offset = -1, .X_Offset = -1,
.Y_Offset = -1, .Y_Offset = -1,
.Dvi_yuv = -1,
.ModelString = "Hauppauge WinTV USB (PAL D/K)", .ModelString = "Hauppauge WinTV USB (PAL D/K)",
}, },
[HPG_WINTV_NTSC_FM] = { [HPG_WINTV_NTSC_FM] = {
...@@ -399,11 +354,8 @@ struct usbvision_device_data_st usbvision_device_data[] = { ...@@ -399,11 +354,8 @@ struct usbvision_device_data_st usbvision_device_data[] = {
.vbi = 1, .vbi = 1,
.Tuner = 1, .Tuner = 1,
.TunerType = TUNER_PHILIPS_NTSC_M, .TunerType = TUNER_PHILIPS_NTSC_M,
.Vin_Reg1 = -1,
.Vin_Reg2 = -1,
.X_Offset = -1, .X_Offset = -1,
.Y_Offset = -1, .Y_Offset = -1,
.Dvi_yuv = -1,
.ModelString = "Hauppauge WinTV USB (NTSC FM)", .ModelString = "Hauppauge WinTV USB (NTSC FM)",
}, },
[HPG_WINTV_PAL_BG_FM] = { [HPG_WINTV_PAL_BG_FM] = {
...@@ -416,11 +368,8 @@ struct usbvision_device_data_st usbvision_device_data[] = { ...@@ -416,11 +368,8 @@ struct usbvision_device_data_st usbvision_device_data[] = {
.vbi = 1, .vbi = 1,
.Tuner = 1, .Tuner = 1,
.TunerType = TUNER_PHILIPS_PAL, .TunerType = TUNER_PHILIPS_PAL,
.Vin_Reg1 = -1,
.Vin_Reg2 = -1,
.X_Offset = -1, .X_Offset = -1,
.Y_Offset = -1, .Y_Offset = -1,
.Dvi_yuv = -1,
.ModelString = "Hauppauge WinTV USB (PAL B/G FM)", .ModelString = "Hauppauge WinTV USB (PAL B/G FM)",
}, },
[HPG_WINTV_PAL_I_FM] = { [HPG_WINTV_PAL_I_FM] = {
...@@ -433,11 +382,8 @@ struct usbvision_device_data_st usbvision_device_data[] = { ...@@ -433,11 +382,8 @@ struct usbvision_device_data_st usbvision_device_data[] = {
.vbi = 1, .vbi = 1,
.Tuner = 1, .Tuner = 1,
.TunerType = TUNER_PHILIPS_PAL, .TunerType = TUNER_PHILIPS_PAL,
.Vin_Reg1 = -1,
.Vin_Reg2 = -1,
.X_Offset = -1, .X_Offset = -1,
.Y_Offset = -1, .Y_Offset = -1,
.Dvi_yuv = -1,
.ModelString = "Hauppauge WinTV USB (PAL I FM)", .ModelString = "Hauppauge WinTV USB (PAL I FM)",
}, },
[HPG_WINTV_PAL_D_K_FM] = { [HPG_WINTV_PAL_D_K_FM] = {
...@@ -450,11 +396,8 @@ struct usbvision_device_data_st usbvision_device_data[] = { ...@@ -450,11 +396,8 @@ struct usbvision_device_data_st usbvision_device_data[] = {
.vbi = 1, .vbi = 1,
.Tuner = 1, .Tuner = 1,
.TunerType = TUNER_PHILIPS_PAL, .TunerType = TUNER_PHILIPS_PAL,
.Vin_Reg1 = -1,
.Vin_Reg2 = -1,
.X_Offset = -1, .X_Offset = -1,
.Y_Offset = -1, .Y_Offset = -1,
.Dvi_yuv = -1,
.ModelString = "Hauppauge WinTV USB (PAL D/K FM)", .ModelString = "Hauppauge WinTV USB (PAL D/K FM)",
}, },
[HPG_WINTV_PRO_NTSC_MN] = { [HPG_WINTV_PRO_NTSC_MN] = {
...@@ -467,10 +410,9 @@ struct usbvision_device_data_st usbvision_device_data[] = { ...@@ -467,10 +410,9 @@ struct usbvision_device_data_st usbvision_device_data[] = {
.vbi = 1, .vbi = 1,
.Tuner = 1, .Tuner = 1,
.TunerType = TUNER_MICROTUNE_4049FM5, .TunerType = TUNER_MICROTUNE_4049FM5,
.Vin_Reg1 = -1,
.Vin_Reg2 = -1,
.X_Offset = 0, .X_Offset = 0,
.Y_Offset = 3, .Y_Offset = 3,
.Dvi_yuv_override = 1,
.Dvi_yuv = 7, .Dvi_yuv = 7,
.ModelString = "Hauppauge WinTV USB Pro (NTSC M/N)", .ModelString = "Hauppauge WinTV USB Pro (NTSC M/N)",
}, },
...@@ -484,10 +426,9 @@ struct usbvision_device_data_st usbvision_device_data[] = { ...@@ -484,10 +426,9 @@ struct usbvision_device_data_st usbvision_device_data[] = {
.vbi = 1, .vbi = 1,
.Tuner = 1, .Tuner = 1,
.TunerType = TUNER_MICROTUNE_4049FM5, .TunerType = TUNER_MICROTUNE_4049FM5,
.Vin_Reg1 = -1,
.Vin_Reg2 = -1,
.X_Offset = 0, .X_Offset = 0,
.Y_Offset = 3, .Y_Offset = 3,
.Dvi_yuv_override = 1,
.Dvi_yuv = 7, .Dvi_yuv = 7,
.ModelString = "Hauppauge WinTV USB Pro (NTSC M/N) V2", .ModelString = "Hauppauge WinTV USB Pro (NTSC M/N) V2",
}, },
...@@ -501,10 +442,9 @@ struct usbvision_device_data_st usbvision_device_data[] = { ...@@ -501,10 +442,9 @@ struct usbvision_device_data_st usbvision_device_data[] = {
.vbi = 1, .vbi = 1,
.Tuner = 1, .Tuner = 1,
.TunerType = TUNER_PHILIPS_FM1216ME_MK3, .TunerType = TUNER_PHILIPS_FM1216ME_MK3,
.Vin_Reg1 = -1,
.Vin_Reg2 = -1,
.X_Offset = 0, .X_Offset = 0,
.Y_Offset = 3, .Y_Offset = 3,
.Dvi_yuv_override = 1,
.Dvi_yuv = 7, .Dvi_yuv = 7,
.ModelString = "Hauppauge WinTV USB Pro (PAL/SECAM B/G/I/D/K/L)", .ModelString = "Hauppauge WinTV USB Pro (PAL/SECAM B/G/I/D/K/L)",
}, },
...@@ -518,10 +458,9 @@ struct usbvision_device_data_st usbvision_device_data[] = { ...@@ -518,10 +458,9 @@ struct usbvision_device_data_st usbvision_device_data[] = {
.vbi = 1, .vbi = 1,
.Tuner = 1, .Tuner = 1,
.TunerType = TUNER_PHILIPS_NTSC_M, .TunerType = TUNER_PHILIPS_NTSC_M,
.Vin_Reg1 = -1,
.Vin_Reg2 = -1,
.X_Offset = 0, .X_Offset = 0,
.Y_Offset = 3, .Y_Offset = 3,
.Dvi_yuv_override = 1,
.Dvi_yuv = 7, .Dvi_yuv = 7,
.ModelString = "Hauppauge WinTV USB Pro (NTSC M/N) V3", .ModelString = "Hauppauge WinTV USB Pro (NTSC M/N) V3",
}, },
...@@ -535,10 +474,9 @@ struct usbvision_device_data_st usbvision_device_data[] = { ...@@ -535,10 +474,9 @@ struct usbvision_device_data_st usbvision_device_data[] = {
.vbi = 1, .vbi = 1,
.Tuner = 1, .Tuner = 1,
.TunerType = TUNER_PHILIPS_PAL, .TunerType = TUNER_PHILIPS_PAL,
.Vin_Reg1 = -1,
.Vin_Reg2 = -1,
.X_Offset = 0, .X_Offset = 0,
.Y_Offset = 3, .Y_Offset = 3,
.Dvi_yuv_override = 1,
.Dvi_yuv = 7, .Dvi_yuv = 7,
.ModelString = "Hauppauge WinTV USB Pro (PAL B/G)", .ModelString = "Hauppauge WinTV USB Pro (PAL B/G)",
}, },
...@@ -552,10 +490,9 @@ struct usbvision_device_data_st usbvision_device_data[] = { ...@@ -552,10 +490,9 @@ struct usbvision_device_data_st usbvision_device_data[] = {
.vbi = 1, .vbi = 1,
.Tuner = 1, .Tuner = 1,
.TunerType = TUNER_PHILIPS_PAL, .TunerType = TUNER_PHILIPS_PAL,
.Vin_Reg1 = -1,
.Vin_Reg2 = -1,
.X_Offset = 0, .X_Offset = 0,
.Y_Offset = 3, .Y_Offset = 3,
.Dvi_yuv_override = 1,
.Dvi_yuv = 7, .Dvi_yuv = 7,
.ModelString = "Hauppauge WinTV USB Pro (PAL I)", .ModelString = "Hauppauge WinTV USB Pro (PAL I)",
}, },
...@@ -569,10 +506,9 @@ struct usbvision_device_data_st usbvision_device_data[] = { ...@@ -569,10 +506,9 @@ struct usbvision_device_data_st usbvision_device_data[] = {
.vbi = 1, .vbi = 1,
.Tuner = 1, .Tuner = 1,
.TunerType = TUNER_PHILIPS_SECAM, .TunerType = TUNER_PHILIPS_SECAM,
.Vin_Reg1 = -1,
.Vin_Reg2 = -1,
.X_Offset = 0, .X_Offset = 0,
.Y_Offset = 3, .Y_Offset = 3,
.Dvi_yuv_override = 1,
.Dvi_yuv = 7, .Dvi_yuv = 7,
.ModelString = "Hauppauge WinTV USB Pro (PAL/SECAM L)", .ModelString = "Hauppauge WinTV USB Pro (PAL/SECAM L)",
}, },
...@@ -586,10 +522,9 @@ struct usbvision_device_data_st usbvision_device_data[] = { ...@@ -586,10 +522,9 @@ struct usbvision_device_data_st usbvision_device_data[] = {
.vbi = 1, .vbi = 1,
.Tuner = 1, .Tuner = 1,
.TunerType = TUNER_PHILIPS_PAL, .TunerType = TUNER_PHILIPS_PAL,
.Vin_Reg1 = -1,
.Vin_Reg2 = -1,
.X_Offset = 0, .X_Offset = 0,
.Y_Offset = 3, .Y_Offset = 3,
.Dvi_yuv_override = 1,
.Dvi_yuv = 7, .Dvi_yuv = 7,
.ModelString = "Hauppauge WinTV USB Pro (PAL D/K)", .ModelString = "Hauppauge WinTV USB Pro (PAL D/K)",
}, },
...@@ -603,10 +538,9 @@ struct usbvision_device_data_st usbvision_device_data[] = { ...@@ -603,10 +538,9 @@ struct usbvision_device_data_st usbvision_device_data[] = {
.vbi = 1, .vbi = 1,
.Tuner = 1, .Tuner = 1,
.TunerType = TUNER_PHILIPS_SECAM, .TunerType = TUNER_PHILIPS_SECAM,
.Vin_Reg1 = -1,
.Vin_Reg2 = -1,
.X_Offset = 0, .X_Offset = 0,
.Y_Offset = 3, .Y_Offset = 3,
.Dvi_yuv_override = 1,
.Dvi_yuv = 7, .Dvi_yuv = 7,
.ModelString = "Hauppauge WinTV USB Pro (PAL/SECAM BGDK/I/L)", .ModelString = "Hauppauge WinTV USB Pro (PAL/SECAM BGDK/I/L)",
}, },
...@@ -620,10 +554,9 @@ struct usbvision_device_data_st usbvision_device_data[] = { ...@@ -620,10 +554,9 @@ struct usbvision_device_data_st usbvision_device_data[] = {
.vbi = 1, .vbi = 1,
.Tuner = 1, .Tuner = 1,
.TunerType = TUNER_PHILIPS_SECAM, .TunerType = TUNER_PHILIPS_SECAM,
.Vin_Reg1 = -1,
.Vin_Reg2 = -1,
.X_Offset = 0, .X_Offset = 0,
.Y_Offset = 3, .Y_Offset = 3,
.Dvi_yuv_override = 1,
.Dvi_yuv = 7, .Dvi_yuv = 7,
.ModelString = "Hauppauge WinTV USB Pro (PAL/SECAM BGDK/I/L) V2", .ModelString = "Hauppauge WinTV USB Pro (PAL/SECAM BGDK/I/L) V2",
}, },
...@@ -637,10 +570,9 @@ struct usbvision_device_data_st usbvision_device_data[] = { ...@@ -637,10 +570,9 @@ struct usbvision_device_data_st usbvision_device_data[] = {
.vbi = 1, .vbi = 1,
.Tuner = 1, .Tuner = 1,
.TunerType = TUNER_ALPS_TSBE1_PAL, .TunerType = TUNER_ALPS_TSBE1_PAL,
.Vin_Reg1 = -1,
.Vin_Reg2 = -1,
.X_Offset = 0, .X_Offset = 0,
.Y_Offset = 3, .Y_Offset = 3,
.Dvi_yuv_override = 1,
.Dvi_yuv = 7, .Dvi_yuv = 7,
.ModelString = "Hauppauge WinTV USB Pro (PAL B/G) V2", .ModelString = "Hauppauge WinTV USB Pro (PAL B/G) V2",
}, },
...@@ -654,10 +586,9 @@ struct usbvision_device_data_st usbvision_device_data[] = { ...@@ -654,10 +586,9 @@ struct usbvision_device_data_st usbvision_device_data[] = {
.vbi = 1, .vbi = 1,
.Tuner = 1, .Tuner = 1,
.TunerType = TUNER_ALPS_TSBE1_PAL, .TunerType = TUNER_ALPS_TSBE1_PAL,
.Vin_Reg1 = -1,
.Vin_Reg2 = -1,
.X_Offset = 0, .X_Offset = 0,
.Y_Offset = 3, .Y_Offset = 3,
.Dvi_yuv_override = 1,
.Dvi_yuv = 7, .Dvi_yuv = 7,
.ModelString = "Hauppauge WinTV USB Pro (PAL B/G,D/K)", .ModelString = "Hauppauge WinTV USB Pro (PAL B/G,D/K)",
}, },
...@@ -671,10 +602,9 @@ struct usbvision_device_data_st usbvision_device_data[] = { ...@@ -671,10 +602,9 @@ struct usbvision_device_data_st usbvision_device_data[] = {
.vbi = 1, .vbi = 1,
.Tuner = 1, .Tuner = 1,
.TunerType = TUNER_PHILIPS_PAL, .TunerType = TUNER_PHILIPS_PAL,
.Vin_Reg1 = -1,
.Vin_Reg2 = -1,
.X_Offset = 0, .X_Offset = 0,
.Y_Offset = 3, .Y_Offset = 3,
.Dvi_yuv_override = 1,
.Dvi_yuv = 7, .Dvi_yuv = 7,
.ModelString = "Hauppauge WinTV USB Pro (PAL I,D/K)", .ModelString = "Hauppauge WinTV USB Pro (PAL I,D/K)",
}, },
...@@ -688,10 +618,9 @@ struct usbvision_device_data_st usbvision_device_data[] = { ...@@ -688,10 +618,9 @@ struct usbvision_device_data_st usbvision_device_data[] = {
.vbi = 1, .vbi = 1,
.Tuner = 1, .Tuner = 1,
.TunerType = TUNER_PHILIPS_NTSC_M, .TunerType = TUNER_PHILIPS_NTSC_M,
.Vin_Reg1 = -1,
.Vin_Reg2 = -1,
.X_Offset = 0, .X_Offset = 0,
.Y_Offset = 3, .Y_Offset = 3,
.Dvi_yuv_override = 1,
.Dvi_yuv = 7, .Dvi_yuv = 7,
.ModelString = "Hauppauge WinTV USB Pro (NTSC M/N FM)", .ModelString = "Hauppauge WinTV USB Pro (NTSC M/N FM)",
}, },
...@@ -705,10 +634,9 @@ struct usbvision_device_data_st usbvision_device_data[] = { ...@@ -705,10 +634,9 @@ struct usbvision_device_data_st usbvision_device_data[] = {
.vbi = 1, .vbi = 1,
.Tuner = 1, .Tuner = 1,
.TunerType = TUNER_PHILIPS_PAL, .TunerType = TUNER_PHILIPS_PAL,
.Vin_Reg1 = -1,
.Vin_Reg2 = -1,
.X_Offset = 0, .X_Offset = 0,
.Y_Offset = 3, .Y_Offset = 3,
.Dvi_yuv_override = 1,
.Dvi_yuv = 7, .Dvi_yuv = 7,
.ModelString = "Hauppauge WinTV USB Pro (PAL B/G FM)", .ModelString = "Hauppauge WinTV USB Pro (PAL B/G FM)",
}, },
...@@ -722,10 +650,9 @@ struct usbvision_device_data_st usbvision_device_data[] = { ...@@ -722,10 +650,9 @@ struct usbvision_device_data_st usbvision_device_data[] = {
.vbi = 1, .vbi = 1,
.Tuner = 1, .Tuner = 1,
.TunerType = TUNER_PHILIPS_PAL, .TunerType = TUNER_PHILIPS_PAL,
.Vin_Reg1 = -1,
.Vin_Reg2 = -1,
.X_Offset = 0, .X_Offset = 0,
.Y_Offset = 3, .Y_Offset = 3,
.Dvi_yuv_override = 1,
.Dvi_yuv = 7, .Dvi_yuv = 7,
.ModelString = "Hauppauge WinTV USB Pro (PAL I FM)", .ModelString = "Hauppauge WinTV USB Pro (PAL I FM)",
}, },
...@@ -739,10 +666,9 @@ struct usbvision_device_data_st usbvision_device_data[] = { ...@@ -739,10 +666,9 @@ struct usbvision_device_data_st usbvision_device_data[] = {
.vbi = 1, .vbi = 1,
.Tuner = 1, .Tuner = 1,
.TunerType = TUNER_PHILIPS_PAL, .TunerType = TUNER_PHILIPS_PAL,
.Vin_Reg1 = -1,
.Vin_Reg2 = -1,
.X_Offset = 0, .X_Offset = 0,
.Y_Offset = 3, .Y_Offset = 3,
.Dvi_yuv_override = 1,
.Dvi_yuv = 7, .Dvi_yuv = 7,
.ModelString = "Hauppauge WinTV USB Pro (PAL D/K FM)", .ModelString = "Hauppauge WinTV USB Pro (PAL D/K FM)",
}, },
...@@ -756,10 +682,9 @@ struct usbvision_device_data_st usbvision_device_data[] = { ...@@ -756,10 +682,9 @@ struct usbvision_device_data_st usbvision_device_data[] = {
.vbi = 1, .vbi = 1,
.Tuner = 1, .Tuner = 1,
.TunerType = TUNER_MICROTUNE_4049FM5, .TunerType = TUNER_MICROTUNE_4049FM5,
.Vin_Reg1 = -1,
.Vin_Reg2 = -1,
.X_Offset = 0, .X_Offset = 0,
.Y_Offset = 3, .Y_Offset = 3,
.Dvi_yuv_override = 1,
.Dvi_yuv = 7, .Dvi_yuv = 7,
.ModelString = "Hauppauge WinTV USB Pro (Temic PAL/SECAM B/G/I/D/K/L FM)", .ModelString = "Hauppauge WinTV USB Pro (Temic PAL/SECAM B/G/I/D/K/L FM)",
}, },
...@@ -773,10 +698,9 @@ struct usbvision_device_data_st usbvision_device_data[] = { ...@@ -773,10 +698,9 @@ struct usbvision_device_data_st usbvision_device_data[] = {
.vbi = 1, .vbi = 1,
.Tuner = 1, .Tuner = 1,
.TunerType = TUNER_MICROTUNE_4049FM5, .TunerType = TUNER_MICROTUNE_4049FM5,
.Vin_Reg1 = -1,
.Vin_Reg2 = -1,
.X_Offset = 0, .X_Offset = 0,
.Y_Offset = 3, .Y_Offset = 3,
.Dvi_yuv_override = 1,
.Dvi_yuv = 7, .Dvi_yuv = 7,
.ModelString = "Hauppauge WinTV USB Pro (Temic PAL B/G FM)", .ModelString = "Hauppauge WinTV USB Pro (Temic PAL B/G FM)",
}, },
...@@ -790,10 +714,9 @@ struct usbvision_device_data_st usbvision_device_data[] = { ...@@ -790,10 +714,9 @@ struct usbvision_device_data_st usbvision_device_data[] = {
.vbi = 1, .vbi = 1,
.Tuner = 1, .Tuner = 1,
.TunerType = TUNER_PHILIPS_FM1216ME_MK3, .TunerType = TUNER_PHILIPS_FM1216ME_MK3,
.Vin_Reg1 = -1,
.Vin_Reg2 = -1,
.X_Offset = 0, .X_Offset = 0,
.Y_Offset = 3, .Y_Offset = 3,
.Dvi_yuv_override = 1,
.Dvi_yuv = 7, .Dvi_yuv = 7,
.ModelString = "Hauppauge WinTV USB Pro (PAL/SECAM B/G/I/D/K/L FM)", .ModelString = "Hauppauge WinTV USB Pro (PAL/SECAM B/G/I/D/K/L FM)",
}, },
...@@ -807,10 +730,9 @@ struct usbvision_device_data_st usbvision_device_data[] = { ...@@ -807,10 +730,9 @@ struct usbvision_device_data_st usbvision_device_data[] = {
.vbi = 1, .vbi = 1,
.Tuner = 1, .Tuner = 1,
.TunerType = TUNER_PHILIPS_NTSC_M, .TunerType = TUNER_PHILIPS_NTSC_M,
.Vin_Reg1 = -1,
.Vin_Reg2 = -1,
.X_Offset = 0, .X_Offset = 0,
.Y_Offset = 3, .Y_Offset = 3,
.Dvi_yuv_override = 1,
.Dvi_yuv = 7, .Dvi_yuv = 7,
.ModelString = "Hauppauge WinTV USB Pro (NTSC M/N FM) V2", .ModelString = "Hauppauge WinTV USB Pro (NTSC M/N FM) V2",
}, },
...@@ -824,11 +746,8 @@ struct usbvision_device_data_st usbvision_device_data[] = { ...@@ -824,11 +746,8 @@ struct usbvision_device_data_st usbvision_device_data[] = {
.vbi = 1, .vbi = 1,
.Tuner = 1, .Tuner = 1,
.TunerType = TUNER_PHILIPS_NTSC_M, .TunerType = TUNER_PHILIPS_NTSC_M,
.Vin_Reg1 = -1,
.Vin_Reg2 = -1,
.X_Offset = 5, .X_Offset = 5,
.Y_Offset = 5, .Y_Offset = 5,
.Dvi_yuv = -1,
.ModelString = "Camtel Technology USB TV Genie Pro FM Model TVB330", .ModelString = "Camtel Technology USB TV Genie Pro FM Model TVB330",
}, },
[DIGITAL_VIDEO_CREATOR_I] = { [DIGITAL_VIDEO_CREATOR_I] = {
...@@ -841,10 +760,9 @@ struct usbvision_device_data_st usbvision_device_data[] = { ...@@ -841,10 +760,9 @@ struct usbvision_device_data_st usbvision_device_data[] = {
.vbi = 1, .vbi = 1,
.Tuner = 0, .Tuner = 0,
.TunerType = 0, .TunerType = 0,
.Vin_Reg1 = -1,
.Vin_Reg2 = -1,
.X_Offset = 0, .X_Offset = 0,
.Y_Offset = 3, .Y_Offset = 3,
.Dvi_yuv_override = 1,
.Dvi_yuv = 7, .Dvi_yuv = 7,
.ModelString = "Digital Video Creator I", .ModelString = "Digital Video Creator I",
}, },
...@@ -858,10 +776,9 @@ struct usbvision_device_data_st usbvision_device_data[] = { ...@@ -858,10 +776,9 @@ struct usbvision_device_data_st usbvision_device_data[] = {
.vbi = 1, .vbi = 1,
.Tuner = 0, .Tuner = 0,
.TunerType = 0, .TunerType = 0,
.Vin_Reg1 = -1,
.Vin_Reg2 = -1,
.X_Offset = 82, .X_Offset = 82,
.Y_Offset = 20, .Y_Offset = 20,
.Dvi_yuv_override = 1,
.Dvi_yuv = 7, .Dvi_yuv = 7,
.ModelString = "Global Village GV-007 (NTSC)", .ModelString = "Global Village GV-007 (NTSC)",
}, },
...@@ -875,10 +792,9 @@ struct usbvision_device_data_st usbvision_device_data[] = { ...@@ -875,10 +792,9 @@ struct usbvision_device_data_st usbvision_device_data[] = {
.vbi = 1, .vbi = 1,
.Tuner = 0, .Tuner = 0,
.TunerType = 0, .TunerType = 0,
.Vin_Reg1 = -1,
.Vin_Reg2 = -1,
.X_Offset = 0, .X_Offset = 0,
.Y_Offset = 3, .Y_Offset = 3,
.Dvi_yuv_override = 1,
.Dvi_yuv = 7, .Dvi_yuv = 7,
.ModelString = "Dazzle Fusion Model DVC-50 Rev 1 (NTSC)", .ModelString = "Dazzle Fusion Model DVC-50 Rev 1 (NTSC)",
}, },
...@@ -892,10 +808,9 @@ struct usbvision_device_data_st usbvision_device_data[] = { ...@@ -892,10 +808,9 @@ struct usbvision_device_data_st usbvision_device_data[] = {
.vbi = 1, .vbi = 1,
.Tuner = 0, .Tuner = 0,
.TunerType = 0, .TunerType = 0,
.Vin_Reg1 = -1,
.Vin_Reg2 = -1,
.X_Offset = 0, .X_Offset = 0,
.Y_Offset = 3, .Y_Offset = 3,
.Dvi_yuv_override = 1,
.Dvi_yuv = 7, .Dvi_yuv = 7,
.ModelString = "Dazzle Fusion Model DVC-80 Rev 1 (PAL)", .ModelString = "Dazzle Fusion Model DVC-80 Rev 1 (PAL)",
}, },
...@@ -909,10 +824,9 @@ struct usbvision_device_data_st usbvision_device_data[] = { ...@@ -909,10 +824,9 @@ struct usbvision_device_data_st usbvision_device_data[] = {
.vbi = 1, .vbi = 1,
.Tuner = 0, .Tuner = 0,
.TunerType = 0, .TunerType = 0,
.Vin_Reg1 = -1,
.Vin_Reg2 = -1,
.X_Offset = 0, .X_Offset = 0,
.Y_Offset = 3, .Y_Offset = 3,
.Dvi_yuv_override = 1,
.Dvi_yuv = 7, .Dvi_yuv = 7,
.ModelString = "Dazzle Fusion Model DVC-90 Rev 1 (SECAM)", .ModelString = "Dazzle Fusion Model DVC-90 Rev 1 (SECAM)",
}, },
...@@ -926,10 +840,9 @@ struct usbvision_device_data_st usbvision_device_data[] = { ...@@ -926,10 +840,9 @@ struct usbvision_device_data_st usbvision_device_data[] = {
.vbi = 1, .vbi = 1,
.Tuner = 1, .Tuner = 1,
.TunerType = TUNER_PHILIPS_FM1216ME_MK3, .TunerType = TUNER_PHILIPS_FM1216ME_MK3,
.Vin_Reg1 = -1,
.Vin_Reg2 = -1,
.X_Offset = 0, .X_Offset = 0,
.Y_Offset = 3, .Y_Offset = 3,
.Dvi_yuv_override = 1,
.Dvi_yuv = 7, .Dvi_yuv = 7,
.ModelString = "Eskape Labs MyTV2Go", .ModelString = "Eskape Labs MyTV2Go",
}, },
...@@ -943,11 +856,8 @@ struct usbvision_device_data_st usbvision_device_data[] = { ...@@ -943,11 +856,8 @@ struct usbvision_device_data_st usbvision_device_data[] = {
.vbi = 0, .vbi = 0,
.Tuner = 1, .Tuner = 1,
.TunerType = TUNER_TEMIC_4066FY5_PAL_I, .TunerType = TUNER_TEMIC_4066FY5_PAL_I,
.Vin_Reg1 = -1,
.Vin_Reg2 = -1,
.X_Offset = -1, .X_Offset = -1,
.Y_Offset = -1, .Y_Offset = -1,
.Dvi_yuv = -1,
.ModelString = "Pinnacle Studio PCTV USB (PAL)", .ModelString = "Pinnacle Studio PCTV USB (PAL)",
}, },
[PINNA_PCTV_USB_SECAM] = { [PINNA_PCTV_USB_SECAM] = {
...@@ -960,11 +870,8 @@ struct usbvision_device_data_st usbvision_device_data[] = { ...@@ -960,11 +870,8 @@ struct usbvision_device_data_st usbvision_device_data[] = {
.vbi = 1, .vbi = 1,
.Tuner = 1, .Tuner = 1,
.TunerType = TUNER_PHILIPS_SECAM, .TunerType = TUNER_PHILIPS_SECAM,
.Vin_Reg1 = -1,
.Vin_Reg2 = -1,
.X_Offset = -1, .X_Offset = -1,
.Y_Offset = -1, .Y_Offset = -1,
.Dvi_yuv = -1,
.ModelString = "Pinnacle Studio PCTV USB (SECAM)", .ModelString = "Pinnacle Studio PCTV USB (SECAM)",
}, },
[PINNA_PCTV_USB_PAL_FM] = { [PINNA_PCTV_USB_PAL_FM] = {
...@@ -977,11 +884,8 @@ struct usbvision_device_data_st usbvision_device_data[] = { ...@@ -977,11 +884,8 @@ struct usbvision_device_data_st usbvision_device_data[] = {
.vbi = 1, .vbi = 1,
.Tuner = 1, .Tuner = 1,
.TunerType = TUNER_PHILIPS_PAL, .TunerType = TUNER_PHILIPS_PAL,
.Vin_Reg1 = -1,
.Vin_Reg2 = -1,
.X_Offset = 128, .X_Offset = 128,
.Y_Offset = 23, .Y_Offset = 23,
.Dvi_yuv = -1,
.ModelString = "Pinnacle Studio PCTV USB (PAL) FM", .ModelString = "Pinnacle Studio PCTV USB (PAL) FM",
}, },
[MIRO_PCTV_USB] = { [MIRO_PCTV_USB] = {
...@@ -994,11 +898,8 @@ struct usbvision_device_data_st usbvision_device_data[] = { ...@@ -994,11 +898,8 @@ struct usbvision_device_data_st usbvision_device_data[] = {
.vbi = 1, .vbi = 1,
.Tuner = 1, .Tuner = 1,
.TunerType = TUNER_PHILIPS_PAL, .TunerType = TUNER_PHILIPS_PAL,
.Vin_Reg1 = -1,
.Vin_Reg2 = -1,
.X_Offset = -1, .X_Offset = -1,
.Y_Offset = -1, .Y_Offset = -1,
.Dvi_yuv = -1,
.ModelString = "Miro PCTV USB", .ModelString = "Miro PCTV USB",
}, },
[PINNA_PCTV_USB_NTSC_FM] = { [PINNA_PCTV_USB_NTSC_FM] = {
...@@ -1011,11 +912,8 @@ struct usbvision_device_data_st usbvision_device_data[] = { ...@@ -1011,11 +912,8 @@ struct usbvision_device_data_st usbvision_device_data[] = {
.vbi = 1, .vbi = 1,
.Tuner = 1, .Tuner = 1,
.TunerType = TUNER_PHILIPS_NTSC_M, .TunerType = TUNER_PHILIPS_NTSC_M,
.Vin_Reg1 = -1,
.Vin_Reg2 = -1,
.X_Offset = -1, .X_Offset = -1,
.Y_Offset = -1, .Y_Offset = -1,
.Dvi_yuv = -1,
.ModelString = "Pinnacle Studio PCTV USB (NTSC) FM", .ModelString = "Pinnacle Studio PCTV USB (NTSC) FM",
}, },
[PINNA_PCTV_USB_PAL_FM_V2] = { [PINNA_PCTV_USB_PAL_FM_V2] = {
...@@ -1028,10 +926,9 @@ struct usbvision_device_data_st usbvision_device_data[] = { ...@@ -1028,10 +926,9 @@ struct usbvision_device_data_st usbvision_device_data[] = {
.vbi = 1, .vbi = 1,
.Tuner = 1, .Tuner = 1,
.TunerType = TUNER_TEMIC_4009FR5_PAL, .TunerType = TUNER_TEMIC_4009FR5_PAL,
.Vin_Reg1 = -1,
.Vin_Reg2 = -1,
.X_Offset = 0, .X_Offset = 0,
.Y_Offset = 3, .Y_Offset = 3,
.Dvi_yuv_override = 1,
.Dvi_yuv = 7, .Dvi_yuv = 7,
.ModelString = "Pinnacle Studio PCTV USB (PAL) FM V2", .ModelString = "Pinnacle Studio PCTV USB (PAL) FM V2",
}, },
...@@ -1045,10 +942,9 @@ struct usbvision_device_data_st usbvision_device_data[] = { ...@@ -1045,10 +942,9 @@ struct usbvision_device_data_st usbvision_device_data[] = {
.vbi = 1, .vbi = 1,
.Tuner = 1, .Tuner = 1,
.TunerType = TUNER_TEMIC_4039FR5_NTSC, .TunerType = TUNER_TEMIC_4039FR5_NTSC,
.Vin_Reg1 = -1,
.Vin_Reg2 = -1,
.X_Offset = 0, .X_Offset = 0,
.Y_Offset = 3, .Y_Offset = 3,
.Dvi_yuv_override = 1,
.Dvi_yuv = 7, .Dvi_yuv = 7,
.ModelString = "Pinnacle Studio PCTV USB (NTSC) FM V2", .ModelString = "Pinnacle Studio PCTV USB (NTSC) FM V2",
}, },
...@@ -1062,10 +958,9 @@ struct usbvision_device_data_st usbvision_device_data[] = { ...@@ -1062,10 +958,9 @@ struct usbvision_device_data_st usbvision_device_data[] = {
.vbi = 1, .vbi = 1,
.Tuner = 1, .Tuner = 1,
.TunerType = TUNER_TEMIC_4009FR5_PAL, .TunerType = TUNER_TEMIC_4009FR5_PAL,
.Vin_Reg1 = -1,
.Vin_Reg2 = -1,
.X_Offset = 0, .X_Offset = 0,
.Y_Offset = 3, .Y_Offset = 3,
.Dvi_yuv_override = 1,
.Dvi_yuv = 7, .Dvi_yuv = 7,
.ModelString = "Pinnacle Studio PCTV USB (PAL) FM V3", .ModelString = "Pinnacle Studio PCTV USB (PAL) FM V3",
}, },
...@@ -1079,10 +974,9 @@ struct usbvision_device_data_st usbvision_device_data[] = { ...@@ -1079,10 +974,9 @@ struct usbvision_device_data_st usbvision_device_data[] = {
.vbi = 1, .vbi = 1,
.Tuner = 0, .Tuner = 0,
.TunerType = 0, .TunerType = 0,
.Vin_Reg1 = -1,
.Vin_Reg2 = -1,
.X_Offset = 0, .X_Offset = 0,
.Y_Offset = 3, .Y_Offset = 3,
.Dvi_yuv_override = 1,
.Dvi_yuv = 7, .Dvi_yuv = 7,
.ModelString = "Pinnacle Studio Linx Video input cable (NTSC)", .ModelString = "Pinnacle Studio Linx Video input cable (NTSC)",
}, },
...@@ -1096,10 +990,9 @@ struct usbvision_device_data_st usbvision_device_data[] = { ...@@ -1096,10 +990,9 @@ struct usbvision_device_data_st usbvision_device_data[] = {
.vbi = 1, .vbi = 1,
.Tuner = 0, .Tuner = 0,
.TunerType = 0, .TunerType = 0,
.Vin_Reg1 = -1,
.Vin_Reg2 = -1,
.X_Offset = 0, .X_Offset = 0,
.Y_Offset = 3, .Y_Offset = 3,
.Dvi_yuv_override = 1,
.Dvi_yuv = 7, .Dvi_yuv = 7,
.ModelString = "Pinnacle Studio Linx Video input cable (PAL)", .ModelString = "Pinnacle Studio Linx Video input cable (PAL)",
}, },
...@@ -1113,10 +1006,9 @@ struct usbvision_device_data_st usbvision_device_data[] = { ...@@ -1113,10 +1006,9 @@ struct usbvision_device_data_st usbvision_device_data[] = {
.vbi = 1, .vbi = 1,
.Tuner = 1, .Tuner = 1,
.TunerType = TUNER_TEMIC_4009FR5_PAL, .TunerType = TUNER_TEMIC_4009FR5_PAL,
.Vin_Reg1 = -1,
.Vin_Reg2 = -1,
.X_Offset = 0, .X_Offset = 0,
.Y_Offset = 3, .Y_Offset = 3,
.Dvi_yuv_override = 1,
.Dvi_yuv = 7, .Dvi_yuv = 7,
.ModelString = "Pinnacle PCTV Bungee USB (PAL) FM", .ModelString = "Pinnacle PCTV Bungee USB (PAL) FM",
}, },
...@@ -1130,11 +1022,8 @@ struct usbvision_device_data_st usbvision_device_data[] = { ...@@ -1130,11 +1022,8 @@ struct usbvision_device_data_st usbvision_device_data[] = {
.vbi = 1, .vbi = 1,
.Tuner = 1, .Tuner = 1,
.TunerType = TUNER_PHILIPS_NTSC_M, .TunerType = TUNER_PHILIPS_NTSC_M,
.Vin_Reg1 = -1,
.Vin_Reg2 = -1,
.X_Offset = -1, .X_Offset = -1,
.Y_Offset = -1, .Y_Offset = -1,
.Dvi_yuv = -1,
.ModelString = "Hauppauge WinTv-USB", .ModelString = "Hauppauge WinTv-USB",
}, },
}; };
......
...@@ -2040,8 +2040,8 @@ int usbvision_set_input(struct usb_usbvision *usbvision) ...@@ -2040,8 +2040,8 @@ int usbvision_set_input(struct usb_usbvision *usbvision)
return 0; return 0;
/* Set input format expected from decoder*/ /* Set input format expected from decoder*/
if (usbvision_device_data[usbvision->DevModel].Vin_Reg1 >= 0) { if (usbvision_device_data[usbvision->DevModel].Vin_Reg1_override) {
value[0] = usbvision_device_data[usbvision->DevModel].Vin_Reg1 & 0xff; value[0] = usbvision_device_data[usbvision->DevModel].Vin_Reg1;
} else if(usbvision_device_data[usbvision->DevModel].Codec == CODEC_SAA7113) { } else if(usbvision_device_data[usbvision->DevModel].Codec == CODEC_SAA7113) {
/* SAA7113 uses 8 bit output */ /* SAA7113 uses 8 bit output */
value[0] = USBVISION_8_422_SYNC; value[0] = USBVISION_8_422_SYNC;
...@@ -2112,8 +2112,8 @@ int usbvision_set_input(struct usb_usbvision *usbvision) ...@@ -2112,8 +2112,8 @@ int usbvision_set_input(struct usb_usbvision *usbvision)
dvi_yuv_value = 0x00; /* U comes after V, Ya comes after U/V, Yb comes after Yb */ dvi_yuv_value = 0x00; /* U comes after V, Ya comes after U/V, Yb comes after Yb */
if(usbvision_device_data[usbvision->DevModel].Dvi_yuv >= 0){ if(usbvision_device_data[usbvision->DevModel].Dvi_yuv_override){
dvi_yuv_value = usbvision_device_data[usbvision->DevModel].Dvi_yuv & 0xff; dvi_yuv_value = usbvision_device_data[usbvision->DevModel].Dvi_yuv;
} }
else if(usbvision_device_data[usbvision->DevModel].Codec == CODEC_SAA7113) { else if(usbvision_device_data[usbvision->DevModel].Codec == CODEC_SAA7113) {
/* This changes as the fine sync control changes. Further investigation necessary */ /* This changes as the fine sync control changes. Further investigation necessary */
......
...@@ -1745,8 +1745,8 @@ static void usbvision_configure_video(struct usb_usbvision *usbvision) ...@@ -1745,8 +1745,8 @@ static void usbvision_configure_video(struct usb_usbvision *usbvision)
model = usbvision->DevModel; model = usbvision->DevModel;
usbvision->palette = usbvision_v4l2_format[2]; // V4L2_PIX_FMT_RGB24; usbvision->palette = usbvision_v4l2_format[2]; // V4L2_PIX_FMT_RGB24;
if (usbvision_device_data[usbvision->DevModel].Vin_Reg2 >= 0) { if (usbvision_device_data[usbvision->DevModel].Vin_Reg2_override) {
usbvision->Vin_Reg2_Preset = usbvision_device_data[usbvision->DevModel].Vin_Reg2 & 0xff; usbvision->Vin_Reg2_Preset = usbvision_device_data[usbvision->DevModel].Vin_Reg2;
} else { } else {
usbvision->Vin_Reg2_Preset = 0; usbvision->Vin_Reg2_Preset = 0;
} }
...@@ -1957,6 +1957,7 @@ static void customdevice_process(void) ...@@ -1957,6 +1957,7 @@ static void customdevice_process(void)
if(CustomDevice) if(CustomDevice)
{ {
char *parse=CustomDevice; char *parse=CustomDevice;
int tmp;
PDEBUG(DBG_PROBE, "CustomDevice=%s", CustomDevice); PDEBUG(DBG_PROBE, "CustomDevice=%s", CustomDevice);
...@@ -1996,10 +1997,11 @@ static void customdevice_process(void) ...@@ -1996,10 +1997,11 @@ static void customdevice_process(void)
sscanf(parse,"%d",&usbvision_device_data[0].Interface); sscanf(parse,"%d",&usbvision_device_data[0].Interface);
goto2next(parse); goto2next(parse);
PDEBUG(DBG_PROBE, "Interface=%d", usbvision_device_data[0].Interface); PDEBUG(DBG_PROBE, "Interface=%d", usbvision_device_data[0].Interface);
sscanf(parse,"%d",&usbvision_device_data[0].Codec); sscanf(parse,"%hd",&usbvision_device_data[0].Codec);
goto2next(parse); goto2next(parse);
PDEBUG(DBG_PROBE, "Codec=%d", usbvision_device_data[0].Codec); PDEBUG(DBG_PROBE, "Codec=%d", usbvision_device_data[0].Codec);
sscanf(parse,"%d",&usbvision_device_data[0].VideoChannels); sscanf(parse,"%d",&tmp);
usbvision_device_data[0].VideoChannels = tmp;
goto2next(parse); goto2next(parse);
PDEBUG(DBG_PROBE, "VideoChannels=%d", usbvision_device_data[0].VideoChannels); PDEBUG(DBG_PROBE, "VideoChannels=%d", usbvision_device_data[0].VideoChannels);
...@@ -2027,7 +2029,8 @@ static void customdevice_process(void) ...@@ -2027,7 +2029,8 @@ static void customdevice_process(void)
} }
goto2next(parse); goto2next(parse);
sscanf(parse,"%d",&usbvision_device_data[0].AudioChannels); sscanf(parse,"%d",&tmp);
usbvision_device_data[0].AudioChannels = tmp;
goto2next(parse); goto2next(parse);
PDEBUG(DBG_PROBE, "AudioChannels=%d", usbvision_device_data[0].AudioChannels); PDEBUG(DBG_PROBE, "AudioChannels=%d", usbvision_device_data[0].AudioChannels);
sscanf(parse,"%d",&radio); sscanf(parse,"%d",&radio);
...@@ -2038,22 +2041,34 @@ static void customdevice_process(void) ...@@ -2038,22 +2041,34 @@ static void customdevice_process(void)
usbvision_device_data[0].Tuner=(tuner?1:0); usbvision_device_data[0].Tuner=(tuner?1:0);
goto2next(parse); goto2next(parse);
PDEBUG(DBG_PROBE, "Tuner=%d", usbvision_device_data[0].Tuner); PDEBUG(DBG_PROBE, "Tuner=%d", usbvision_device_data[0].Tuner);
sscanf(parse,"%d",&usbvision_device_data[0].TunerType); sscanf(parse,"%hhu",&usbvision_device_data[0].TunerType);
goto2next(parse); goto2next(parse);
PDEBUG(DBG_PROBE, "TunerType=%d", usbvision_device_data[0].TunerType); PDEBUG(DBG_PROBE, "TunerType=%d", usbvision_device_data[0].TunerType);
sscanf(parse,"%d",&usbvision_device_data[0].Vin_Reg1); sscanf(parse,"%d",&tmp);
if(tmp>0) {
usbvision_device_data[0].Vin_Reg1_override = 1;
usbvision_device_data[0].Vin_Reg1 = tmp&0xff;
}
goto2next(parse); goto2next(parse);
PDEBUG(DBG_PROBE, "Vin_Reg1=%d", usbvision_device_data[0].Vin_Reg1); PDEBUG(DBG_PROBE, "Vin_Reg1=%d", usbvision_device_data[0].Vin_Reg1);
sscanf(parse,"%d",&usbvision_device_data[0].Vin_Reg2); sscanf(parse,"%d",&tmp);
if(tmp>0) {
usbvision_device_data[0].Vin_Reg2_override = 1;
usbvision_device_data[0].Vin_Reg2 = tmp&0xff;
}
goto2next(parse); goto2next(parse);
PDEBUG(DBG_PROBE, "Vin_Reg2=%d", usbvision_device_data[0].Vin_Reg2); PDEBUG(DBG_PROBE, "Vin_Reg2=%d", usbvision_device_data[0].Vin_Reg2);
sscanf(parse,"%d",&usbvision_device_data[0].X_Offset); sscanf(parse,"%hd",&usbvision_device_data[0].X_Offset);
goto2next(parse); goto2next(parse);
PDEBUG(DBG_PROBE, "X_Offset=%d", usbvision_device_data[0].X_Offset); PDEBUG(DBG_PROBE, "X_Offset=%d", usbvision_device_data[0].X_Offset);
sscanf(parse,"%d",&usbvision_device_data[0].Y_Offset); sscanf(parse,"%hd",&usbvision_device_data[0].Y_Offset);
goto2next(parse); goto2next(parse);
PDEBUG(DBG_PROBE, "Y_Offset=%d", usbvision_device_data[0].Y_Offset); PDEBUG(DBG_PROBE, "Y_Offset=%d", usbvision_device_data[0].Y_Offset);
sscanf(parse,"%d",&usbvision_device_data[0].Dvi_yuv); sscanf(parse,"%d",&tmp);
if(tmp>0) {
usbvision_device_data[0].Dvi_yuv_override = 1;
usbvision_device_data[0].Dvi_yuv = tmp&0xff;
}
PDEBUG(DBG_PROBE, "Dvi_yuv=%d", usbvision_device_data[0].Dvi_yuv); PDEBUG(DBG_PROBE, "Dvi_yuv=%d", usbvision_device_data[0].Dvi_yuv);
//add to usbvision_table also //add to usbvision_table also
......
...@@ -342,21 +342,24 @@ struct usbvision_frame { ...@@ -342,21 +342,24 @@ struct usbvision_frame {
#define BRIDGE_NT1005 1005 #define BRIDGE_NT1005 1005
struct usbvision_device_data_st { struct usbvision_device_data_st {
int Interface; /* to handle special interface number like BELKIN and Hauppauge WinTV-USB II */
int Codec;
int VideoChannels;
__u64 VideoNorm; __u64 VideoNorm;
int AudioChannels; const char *ModelString;
int Radio:1; int Interface; /* to handle special interface number like BELKIN and Hauppauge WinTV-USB II */
int vbi:1; __u16 Codec;
int Tuner:1; unsigned VideoChannels:3;
int TunerType; unsigned AudioChannels:2;
int Vin_Reg1; unsigned Radio:1;
int Vin_Reg2; unsigned vbi:1;
int X_Offset; unsigned Tuner:1;
int Y_Offset; unsigned Vin_Reg1_override:1; /* Override default value with */
int Dvi_yuv; unsigned Vin_Reg2_override:1; /* Vin_Reg1, Vin_Reg2, etc. */
char *ModelString; unsigned Dvi_yuv_override:1;
__u8 Vin_Reg1;
__u8 Vin_Reg2;
__u8 Dvi_yuv;
__u8 TunerType;
__s16 X_Offset;
__s16 Y_Offset;
}; };
/* Declared on usbvision-cards.c */ /* Declared on usbvision-cards.c */
......
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