aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorTrent Piepho <xyzzy@speakeasy.org>2007-04-14 14:16:26 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-04-27 14:45:34 -0400
commitc682b3a7fb8ec69ac73511bbb6a378e40aa35f35 (patch)
tree443ac5b210222822c3f4883964defd2404601d7a /drivers/media
parentf7ca6256bc1db4fb44adda99e082f8c80ada8957 (diff)
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: Trent Piepho <xyzzy@speakeasy.org> Acked-by: Thierry MERLE <thierry.merle@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/video/usbvision/usbvision-cards.c195
-rw-r--r--drivers/media/video/usbvision/usbvision-core.c8
-rw-r--r--drivers/media/video/usbvision/usbvision-video.c37
-rw-r--r--drivers/media/video/usbvision/usbvision.h31
4 files changed, 89 insertions, 182 deletions
diff --git a/drivers/media/video/usbvision/usbvision-cards.c b/drivers/media/video/usbvision/usbvision-cards.c
index 4ba96349e76b..c632f125252c 100644
--- a/drivers/media/video/usbvision/usbvision-cards.c
+++ b/drivers/media/video/usbvision/usbvision-cards.c
@@ -42,11 +42,8 @@ struct usbvision_device_data_st usbvision_device_data[] = {
42 .vbi = 1, 42 .vbi = 1,
43 .Tuner = 1, 43 .Tuner = 1,
44 .TunerType = TUNER_PHILIPS_NTSC_M, 44 .TunerType = TUNER_PHILIPS_NTSC_M,
45 .Vin_Reg1 = -1,
46 .Vin_Reg2 = -1,
47 .X_Offset = -1, 45 .X_Offset = -1,
48 .Y_Offset = -1, 46 .Y_Offset = -1,
49 .Dvi_yuv = -1,
50 .ModelString = "Custom Dummy USBVision Device", 47 .ModelString = "Custom Dummy USBVision Device",
51 }, 48 },
52 [XANBOO] = { 49 [XANBOO] = {
@@ -59,11 +56,8 @@ struct usbvision_device_data_st usbvision_device_data[] = {
59 .vbi = 1, 56 .vbi = 1,
60 .Tuner = 0, 57 .Tuner = 0,
61 .TunerType = 0, 58 .TunerType = 0,
62 .Vin_Reg1 = -1,
63 .Vin_Reg2 = -1,
64 .X_Offset = -1, 59 .X_Offset = -1,
65 .Y_Offset = -1, 60 .Y_Offset = -1,
66 .Dvi_yuv = -1,
67 .ModelString = "Xanboo", 61 .ModelString = "Xanboo",
68 }, 62 },
69 [BELKIN_VIDEOBUS_II] = { 63 [BELKIN_VIDEOBUS_II] = {
@@ -76,10 +70,9 @@ struct usbvision_device_data_st usbvision_device_data[] = {
76 .vbi = 1, 70 .vbi = 1,
77 .Tuner = 0, 71 .Tuner = 0,
78 .TunerType = 0, 72 .TunerType = 0,
79 .Vin_Reg1 = -1,
80 .Vin_Reg2 = -1,
81 .X_Offset = 0, 73 .X_Offset = 0,
82 .Y_Offset = 3, 74 .Y_Offset = 3,
75 .Dvi_yuv_override = 1,
83 .Dvi_yuv = 7, 76 .Dvi_yuv = 7,
84 .ModelString = "Belkin USB VideoBus II Adapter", 77 .ModelString = "Belkin USB VideoBus II Adapter",
85 }, 78 },
@@ -93,11 +86,8 @@ struct usbvision_device_data_st usbvision_device_data[] = {
93 .vbi = 1, 86 .vbi = 1,
94 .Tuner = 0, 87 .Tuner = 0,
95 .TunerType = 0, 88 .TunerType = 0,
96 .Vin_Reg1 = -1,
97 .Vin_Reg2 = -1,
98 .X_Offset = -1, 89 .X_Offset = -1,
99 .Y_Offset = -1, 90 .Y_Offset = -1,
100 .Dvi_yuv = -1,
101 .ModelString = "Belkin Components USB VideoBus", 91 .ModelString = "Belkin Components USB VideoBus",
102 }, 92 },
103 [BELKIN_USB_VIDEOBUS_II] = { 93 [BELKIN_USB_VIDEOBUS_II] = {
@@ -110,10 +100,9 @@ struct usbvision_device_data_st usbvision_device_data[] = {
110 .vbi = 1, 100 .vbi = 1,
111 .Tuner = 0, 101 .Tuner = 0,
112 .TunerType = 0, 102 .TunerType = 0,
113 .Vin_Reg1 = -1,
114 .Vin_Reg2 = -1,
115 .X_Offset = 0, 103 .X_Offset = 0,
116 .Y_Offset = 3, 104 .Y_Offset = 3,
105 .Dvi_yuv_override = 1,
117 .Dvi_yuv = 7, 106 .Dvi_yuv = 7,
118 .ModelString = "Belkin USB VideoBus II", 107 .ModelString = "Belkin USB VideoBus II",
119 }, 108 },
@@ -127,10 +116,9 @@ struct usbvision_device_data_st usbvision_device_data[] = {
127 .vbi = 1, 116 .vbi = 1,
128 .Tuner = 0, 117 .Tuner = 0,
129 .TunerType = 0, 118 .TunerType = 0,
130 .Vin_Reg1 = -1,
131 .Vin_Reg2 = -1,
132 .X_Offset = -1, 119 .X_Offset = -1,
133 .Y_Offset = -1, 120 .Y_Offset = -1,
121 .Dvi_yuv_override = 1,
134 .Dvi_yuv = 7, 122 .Dvi_yuv = 7,
135 .ModelString = "echoFX InterView Lite", 123 .ModelString = "echoFX InterView Lite",
136 }, 124 },
@@ -144,11 +132,8 @@ struct usbvision_device_data_st usbvision_device_data[] = {
144 .vbi = 1, 132 .vbi = 1,
145 .Tuner = 0, 133 .Tuner = 0,
146 .TunerType = 0, 134 .TunerType = 0,
147 .Vin_Reg1 = -1,
148 .Vin_Reg2 = -1,
149 .X_Offset = -1, 135 .X_Offset = -1,
150 .Y_Offset = -1, 136 .Y_Offset = -1,
151 .Dvi_yuv = -1,
152 .ModelString = "USBGear USBG-V1 resp. HAMA USB", 137 .ModelString = "USBGear USBG-V1 resp. HAMA USB",
153 }, 138 },
154 [D_LINK_V100] = { 139 [D_LINK_V100] = {
@@ -161,10 +146,9 @@ struct usbvision_device_data_st usbvision_device_data[] = {
161 .vbi = 1, 146 .vbi = 1,
162 .Tuner = 0, 147 .Tuner = 0,
163 .TunerType = 0, 148 .TunerType = 0,
164 .Vin_Reg1 = -1,
165 .Vin_Reg2 = -1,
166 .X_Offset = 0, 149 .X_Offset = 0,
167 .Y_Offset = 3, 150 .Y_Offset = 3,
151 .Dvi_yuv_override = 1,
168 .Dvi_yuv = 7, 152 .Dvi_yuv = 7,
169 .ModelString = "D-Link V100", 153 .ModelString = "D-Link V100",
170 }, 154 },
@@ -178,11 +162,8 @@ struct usbvision_device_data_st usbvision_device_data[] = {
178 .vbi = 1, 162 .vbi = 1,
179 .Tuner = 0, 163 .Tuner = 0,
180 .TunerType = 0, 164 .TunerType = 0,
181 .Vin_Reg1 = -1,
182 .Vin_Reg2 = -1,
183 .X_Offset = -1, 165 .X_Offset = -1,
184 .Y_Offset = -1, 166 .Y_Offset = -1,
185 .Dvi_yuv = -1,
186 .ModelString = "X10 USB Camera", 167 .ModelString = "X10 USB Camera",
187 }, 168 },
188 [HPG_WINTV_LIVE_PAL_BG] = { 169 [HPG_WINTV_LIVE_PAL_BG] = {
@@ -195,10 +176,9 @@ struct usbvision_device_data_st usbvision_device_data[] = {
195 .vbi = 1, 176 .vbi = 1,
196 .Tuner = 0, 177 .Tuner = 0,
197 .TunerType = 0, 178 .TunerType = 0,
198 .Vin_Reg1 = -1,
199 .Vin_Reg2 = -1,
200 .X_Offset = -1, 179 .X_Offset = -1,
201 .Y_Offset = 3, 180 .Y_Offset = 3,
181 .Dvi_yuv_override = 1,
202 .Dvi_yuv = 7, 182 .Dvi_yuv = 7,
203 .ModelString = "Hauppauge WinTV USB Live (PAL B/G)", 183 .ModelString = "Hauppauge WinTV USB Live (PAL B/G)",
204 }, 184 },
@@ -212,10 +192,9 @@ struct usbvision_device_data_st usbvision_device_data[] = {
212 .vbi = 1, 192 .vbi = 1,
213 .Tuner = 0, 193 .Tuner = 0,
214 .TunerType = 0, 194 .TunerType = 0,
215 .Vin_Reg1 = -1,
216 .Vin_Reg2 = -1,
217 .X_Offset = 0, 195 .X_Offset = 0,
218 .Y_Offset = 3, 196 .Y_Offset = 3,
197 .Dvi_yuv_override = 1,
219 .Dvi_yuv = 7, 198 .Dvi_yuv = 7,
220 .ModelString = "Hauppauge WinTV USB Live Pro (NTSC M/N)", 199 .ModelString = "Hauppauge WinTV USB Live Pro (NTSC M/N)",
221 }, 200 },
@@ -229,10 +208,9 @@ struct usbvision_device_data_st usbvision_device_data[] = {
229 .vbi = 1, 208 .vbi = 1,
230 .Tuner = 0, 209 .Tuner = 0,
231 .TunerType = 0, 210 .TunerType = 0,
232 .Vin_Reg1 = -1,
233 .Vin_Reg2 = -1,
234 .X_Offset = 0, 211 .X_Offset = 0,
235 .Y_Offset = 3, 212 .Y_Offset = 3,
213 .Dvi_yuv_override = 1,
236 .Dvi_yuv = 7, 214 .Dvi_yuv = 7,
237 .ModelString = "Zoran Co. PMD (Nogatech) AV-grabber Manhattan", 215 .ModelString = "Zoran Co. PMD (Nogatech) AV-grabber Manhattan",
238 }, 216 },
@@ -246,11 +224,8 @@ struct usbvision_device_data_st usbvision_device_data[] = {
246 .vbi = 1, 224 .vbi = 1,
247 .Tuner = 1, 225 .Tuner = 1,
248 .TunerType = TUNER_PHILIPS_NTSC_M, 226 .TunerType = TUNER_PHILIPS_NTSC_M,
249 .Vin_Reg1 = -1,
250 .Vin_Reg2 = -1,
251 .X_Offset = -1, 227 .X_Offset = -1,
252 .Y_Offset = 20, 228 .Y_Offset = 20,
253 .Dvi_yuv = -1,
254 .ModelString = "Nogatech USB-TV (NTSC) FM", 229 .ModelString = "Nogatech USB-TV (NTSC) FM",
255 }, 230 },
256 [PNY_USB_TV_NTSC_FM] = { 231 [PNY_USB_TV_NTSC_FM] = {
@@ -263,11 +238,8 @@ struct usbvision_device_data_st usbvision_device_data[] = {
263 .vbi = 1, 238 .vbi = 1,
264 .Tuner = 1, 239 .Tuner = 1,
265 .TunerType = TUNER_PHILIPS_NTSC_M, 240 .TunerType = TUNER_PHILIPS_NTSC_M,
266 .Vin_Reg1 = -1,
267 .Vin_Reg2 = -1,
268 .X_Offset = -1, 241 .X_Offset = -1,
269 .Y_Offset = 20, 242 .Y_Offset = 20,
270 .Dvi_yuv = -1,
271 .ModelString = "PNY USB-TV (NTSC) FM", 243 .ModelString = "PNY USB-TV (NTSC) FM",
272 }, 244 },
273 [PV_PLAYTV_USB_PRO_PAL_FM] = { 245 [PV_PLAYTV_USB_PRO_PAL_FM] = {
@@ -280,10 +252,9 @@ struct usbvision_device_data_st usbvision_device_data[] = {
280 .vbi = 1, 252 .vbi = 1,
281 .Tuner = 1, 253 .Tuner = 1,
282 .TunerType = TUNER_PHILIPS_PAL, 254 .TunerType = TUNER_PHILIPS_PAL,
283 .Vin_Reg1 = -1,
284 .Vin_Reg2 = -1,
285 .X_Offset = 0, 255 .X_Offset = 0,
286 .Y_Offset = 3, 256 .Y_Offset = 3,
257 .Dvi_yuv_override = 1,
287 .Dvi_yuv = 7, 258 .Dvi_yuv = 7,
288 .ModelString = "PixelView PlayTv-USB PRO (PAL) FM", 259 .ModelString = "PixelView PlayTv-USB PRO (PAL) FM",
289 }, 260 },
@@ -297,10 +268,9 @@ struct usbvision_device_data_st usbvision_device_data[] = {
297 .vbi = 1, 268 .vbi = 1,
298 .Tuner = 1, 269 .Tuner = 1,
299 .TunerType = TUNER_PHILIPS_PAL, 270 .TunerType = TUNER_PHILIPS_PAL,
300 .Vin_Reg1 = -1,
301 .Vin_Reg2 = -1,
302 .X_Offset = 0, 271 .X_Offset = 0,
303 .Y_Offset = 3, 272 .Y_Offset = 3,
273 .Dvi_yuv_override = 1,
304 .Dvi_yuv = 7, 274 .Dvi_yuv = 7,
305 .ModelString = "ZTV ZT-721 2.4GHz USB A/V Receiver", 275 .ModelString = "ZTV ZT-721 2.4GHz USB A/V Receiver",
306 }, 276 },
@@ -314,11 +284,8 @@ struct usbvision_device_data_st usbvision_device_data[] = {
314 .vbi = 1, 284 .vbi = 1,
315 .Tuner = 1, 285 .Tuner = 1,
316 .TunerType = TUNER_PHILIPS_NTSC_M, 286 .TunerType = TUNER_PHILIPS_NTSC_M,
317 .Vin_Reg1 = -1,
318 .Vin_Reg2 = -1,
319 .X_Offset = -1, 287 .X_Offset = -1,
320 .Y_Offset = 20, 288 .Y_Offset = 20,
321 .Dvi_yuv = -1,
322 .ModelString = "Hauppauge WinTV USB (NTSC M/N)", 289 .ModelString = "Hauppauge WinTV USB (NTSC M/N)",
323 }, 290 },
324 [HPG_WINTV_PAL_BG] = { 291 [HPG_WINTV_PAL_BG] = {
@@ -331,11 +298,8 @@ struct usbvision_device_data_st usbvision_device_data[] = {
331 .vbi = 1, 298 .vbi = 1,
332 .Tuner = 1, 299 .Tuner = 1,
333 .TunerType = TUNER_PHILIPS_PAL, 300 .TunerType = TUNER_PHILIPS_PAL,
334 .Vin_Reg1 = -1,
335 .Vin_Reg2 = -1,
336 .X_Offset = -1, 301 .X_Offset = -1,
337 .Y_Offset = -1, 302 .Y_Offset = -1,
338 .Dvi_yuv = -1,
339 .ModelString = "Hauppauge WinTV USB (PAL B/G)", 303 .ModelString = "Hauppauge WinTV USB (PAL B/G)",
340 }, 304 },
341 [HPG_WINTV_PAL_I] = { 305 [HPG_WINTV_PAL_I] = {
@@ -348,11 +312,8 @@ struct usbvision_device_data_st usbvision_device_data[] = {
348 .vbi = 1, 312 .vbi = 1,
349 .Tuner = 1, 313 .Tuner = 1,
350 .TunerType = TUNER_PHILIPS_PAL, 314 .TunerType = TUNER_PHILIPS_PAL,
351 .Vin_Reg1 = -1,
352 .Vin_Reg2 = -1,
353 .X_Offset = -1, 315 .X_Offset = -1,
354 .Y_Offset = -1, 316 .Y_Offset = -1,
355 .Dvi_yuv = -1,
356 .ModelString = "Hauppauge WinTV USB (PAL I)", 317 .ModelString = "Hauppauge WinTV USB (PAL I)",
357 }, 318 },
358 [HPG_WINTV_PAL_SECAM_L] = { 319 [HPG_WINTV_PAL_SECAM_L] = {
@@ -365,11 +326,8 @@ struct usbvision_device_data_st usbvision_device_data[] = {
365 .vbi = 1, 326 .vbi = 1,
366 .Tuner = 1, 327 .Tuner = 1,
367 .TunerType = TUNER_PHILIPS_SECAM, 328 .TunerType = TUNER_PHILIPS_SECAM,
368 .Vin_Reg1 = -1,
369 .Vin_Reg2 = -1,
370 .X_Offset = -1, 329 .X_Offset = -1,
371 .Y_Offset = -1, 330 .Y_Offset = -1,
372 .Dvi_yuv = -1,
373 .ModelString = "Hauppauge WinTV USB (PAL/SECAM L)", 331 .ModelString = "Hauppauge WinTV USB (PAL/SECAM L)",
374 }, 332 },
375 [HPG_WINTV_PAL_D_K] = { 333 [HPG_WINTV_PAL_D_K] = {
@@ -382,11 +340,8 @@ struct usbvision_device_data_st usbvision_device_data[] = {
382 .vbi = 1, 340 .vbi = 1,
383 .Tuner = 1, 341 .Tuner = 1,
384 .TunerType = TUNER_PHILIPS_PAL, 342 .TunerType = TUNER_PHILIPS_PAL,
385 .Vin_Reg1 = -1,
386 .Vin_Reg2 = -1,
387 .X_Offset = -1, 343 .X_Offset = -1,
388 .Y_Offset = -1, 344 .Y_Offset = -1,
389 .Dvi_yuv = -1,
390 .ModelString = "Hauppauge WinTV USB (PAL D/K)", 345 .ModelString = "Hauppauge WinTV USB (PAL D/K)",
391 }, 346 },
392 [HPG_WINTV_NTSC_FM] = { 347 [HPG_WINTV_NTSC_FM] = {
@@ -399,11 +354,8 @@ struct usbvision_device_data_st usbvision_device_data[] = {
399 .vbi = 1, 354 .vbi = 1,
400 .Tuner = 1, 355 .Tuner = 1,
401 .TunerType = TUNER_PHILIPS_NTSC_M, 356 .TunerType = TUNER_PHILIPS_NTSC_M,
402 .Vin_Reg1 = -1,
403 .Vin_Reg2 = -1,
404 .X_Offset = -1, 357 .X_Offset = -1,
405 .Y_Offset = -1, 358 .Y_Offset = -1,
406 .Dvi_yuv = -1,
407 .ModelString = "Hauppauge WinTV USB (NTSC FM)", 359 .ModelString = "Hauppauge WinTV USB (NTSC FM)",
408 }, 360 },
409 [HPG_WINTV_PAL_BG_FM] = { 361 [HPG_WINTV_PAL_BG_FM] = {
@@ -416,11 +368,8 @@ struct usbvision_device_data_st usbvision_device_data[] = {
416 .vbi = 1, 368 .vbi = 1,
417 .Tuner = 1, 369 .Tuner = 1,
418 .TunerType = TUNER_PHILIPS_PAL, 370 .TunerType = TUNER_PHILIPS_PAL,
419 .Vin_Reg1 = -1,
420 .Vin_Reg2 = -1,
421 .X_Offset = -1, 371 .X_Offset = -1,
422 .Y_Offset = -1, 372 .Y_Offset = -1,
423 .Dvi_yuv = -1,
424 .ModelString = "Hauppauge WinTV USB (PAL B/G FM)", 373 .ModelString = "Hauppauge WinTV USB (PAL B/G FM)",
425 }, 374 },
426 [HPG_WINTV_PAL_I_FM] = { 375 [HPG_WINTV_PAL_I_FM] = {
@@ -433,11 +382,8 @@ struct usbvision_device_data_st usbvision_device_data[] = {
433 .vbi = 1, 382 .vbi = 1,
434 .Tuner = 1, 383 .Tuner = 1,
435 .TunerType = TUNER_PHILIPS_PAL, 384 .TunerType = TUNER_PHILIPS_PAL,
436 .Vin_Reg1 = -1,
437 .Vin_Reg2 = -1,
438 .X_Offset = -1, 385 .X_Offset = -1,
439 .Y_Offset = -1, 386 .Y_Offset = -1,
440 .Dvi_yuv = -1,
441 .ModelString = "Hauppauge WinTV USB (PAL I FM)", 387 .ModelString = "Hauppauge WinTV USB (PAL I FM)",
442 }, 388 },
443 [HPG_WINTV_PAL_D_K_FM] = { 389 [HPG_WINTV_PAL_D_K_FM] = {
@@ -450,11 +396,8 @@ struct usbvision_device_data_st usbvision_device_data[] = {
450 .vbi = 1, 396 .vbi = 1,
451 .Tuner = 1, 397 .Tuner = 1,
452 .TunerType = TUNER_PHILIPS_PAL, 398 .TunerType = TUNER_PHILIPS_PAL,
453 .Vin_Reg1 = -1,
454 .Vin_Reg2 = -1,
455 .X_Offset = -1, 399 .X_Offset = -1,
456 .Y_Offset = -1, 400 .Y_Offset = -1,
457 .Dvi_yuv = -1,
458 .ModelString = "Hauppauge WinTV USB (PAL D/K FM)", 401 .ModelString = "Hauppauge WinTV USB (PAL D/K FM)",
459 }, 402 },
460 [HPG_WINTV_PRO_NTSC_MN] = { 403 [HPG_WINTV_PRO_NTSC_MN] = {
@@ -467,10 +410,9 @@ struct usbvision_device_data_st usbvision_device_data[] = {
467 .vbi = 1, 410 .vbi = 1,
468 .Tuner = 1, 411 .Tuner = 1,
469 .TunerType = TUNER_MICROTUNE_4049FM5, 412 .TunerType = TUNER_MICROTUNE_4049FM5,
470 .Vin_Reg1 = -1,
471 .Vin_Reg2 = -1,
472 .X_Offset = 0, 413 .X_Offset = 0,
473 .Y_Offset = 3, 414 .Y_Offset = 3,
415 .Dvi_yuv_override = 1,
474 .Dvi_yuv = 7, 416 .Dvi_yuv = 7,
475 .ModelString = "Hauppauge WinTV USB Pro (NTSC M/N)", 417 .ModelString = "Hauppauge WinTV USB Pro (NTSC M/N)",
476 }, 418 },
@@ -484,10 +426,9 @@ struct usbvision_device_data_st usbvision_device_data[] = {
484 .vbi = 1, 426 .vbi = 1,
485 .Tuner = 1, 427 .Tuner = 1,
486 .TunerType = TUNER_MICROTUNE_4049FM5, 428 .TunerType = TUNER_MICROTUNE_4049FM5,
487 .Vin_Reg1 = -1,
488 .Vin_Reg2 = -1,
489 .X_Offset = 0, 429 .X_Offset = 0,
490 .Y_Offset = 3, 430 .Y_Offset = 3,
431 .Dvi_yuv_override = 1,
491 .Dvi_yuv = 7, 432 .Dvi_yuv = 7,
492 .ModelString = "Hauppauge WinTV USB Pro (NTSC M/N) V2", 433 .ModelString = "Hauppauge WinTV USB Pro (NTSC M/N) V2",
493 }, 434 },
@@ -501,10 +442,9 @@ struct usbvision_device_data_st usbvision_device_data[] = {
501 .vbi = 1, 442 .vbi = 1,
502 .Tuner = 1, 443 .Tuner = 1,
503 .TunerType = TUNER_PHILIPS_FM1216ME_MK3, 444 .TunerType = TUNER_PHILIPS_FM1216ME_MK3,
504 .Vin_Reg1 = -1,
505 .Vin_Reg2 = -1,
506 .X_Offset = 0, 445 .X_Offset = 0,
507 .Y_Offset = 3, 446 .Y_Offset = 3,
447 .Dvi_yuv_override = 1,
508 .Dvi_yuv = 7, 448 .Dvi_yuv = 7,
509 .ModelString = "Hauppauge WinTV USB Pro (PAL/SECAM B/G/I/D/K/L)", 449 .ModelString = "Hauppauge WinTV USB Pro (PAL/SECAM B/G/I/D/K/L)",
510 }, 450 },
@@ -518,10 +458,9 @@ struct usbvision_device_data_st usbvision_device_data[] = {
518 .vbi = 1, 458 .vbi = 1,
519 .Tuner = 1, 459 .Tuner = 1,
520 .TunerType = TUNER_PHILIPS_NTSC_M, 460 .TunerType = TUNER_PHILIPS_NTSC_M,
521 .Vin_Reg1 = -1,
522 .Vin_Reg2 = -1,
523 .X_Offset = 0, 461 .X_Offset = 0,
524 .Y_Offset = 3, 462 .Y_Offset = 3,
463 .Dvi_yuv_override = 1,
525 .Dvi_yuv = 7, 464 .Dvi_yuv = 7,
526 .ModelString = "Hauppauge WinTV USB Pro (NTSC M/N) V3", 465 .ModelString = "Hauppauge WinTV USB Pro (NTSC M/N) V3",
527 }, 466 },
@@ -535,10 +474,9 @@ struct usbvision_device_data_st usbvision_device_data[] = {
535 .vbi = 1, 474 .vbi = 1,
536 .Tuner = 1, 475 .Tuner = 1,
537 .TunerType = TUNER_PHILIPS_PAL, 476 .TunerType = TUNER_PHILIPS_PAL,
538 .Vin_Reg1 = -1,
539 .Vin_Reg2 = -1,
540 .X_Offset = 0, 477 .X_Offset = 0,
541 .Y_Offset = 3, 478 .Y_Offset = 3,
479 .Dvi_yuv_override = 1,
542 .Dvi_yuv = 7, 480 .Dvi_yuv = 7,
543 .ModelString = "Hauppauge WinTV USB Pro (PAL B/G)", 481 .ModelString = "Hauppauge WinTV USB Pro (PAL B/G)",
544 }, 482 },
@@ -552,10 +490,9 @@ struct usbvision_device_data_st usbvision_device_data[] = {
552 .vbi = 1, 490 .vbi = 1,
553 .Tuner = 1, 491 .Tuner = 1,
554 .TunerType = TUNER_PHILIPS_PAL, 492 .TunerType = TUNER_PHILIPS_PAL,
555 .Vin_Reg1 = -1,
556 .Vin_Reg2 = -1,
557 .X_Offset = 0, 493 .X_Offset = 0,
558 .Y_Offset = 3, 494 .Y_Offset = 3,
495 .Dvi_yuv_override = 1,
559 .Dvi_yuv = 7, 496 .Dvi_yuv = 7,
560 .ModelString = "Hauppauge WinTV USB Pro (PAL I)", 497 .ModelString = "Hauppauge WinTV USB Pro (PAL I)",
561 }, 498 },
@@ -569,10 +506,9 @@ struct usbvision_device_data_st usbvision_device_data[] = {
569 .vbi = 1, 506 .vbi = 1,
570 .Tuner = 1, 507 .Tuner = 1,
571 .TunerType = TUNER_PHILIPS_SECAM, 508 .TunerType = TUNER_PHILIPS_SECAM,
572 .Vin_Reg1 = -1,
573 .Vin_Reg2 = -1,
574 .X_Offset = 0, 509 .X_Offset = 0,
575 .Y_Offset = 3, 510 .Y_Offset = 3,
511 .Dvi_yuv_override = 1,
576 .Dvi_yuv = 7, 512 .Dvi_yuv = 7,
577 .ModelString = "Hauppauge WinTV USB Pro (PAL/SECAM L)", 513 .ModelString = "Hauppauge WinTV USB Pro (PAL/SECAM L)",
578 }, 514 },
@@ -586,10 +522,9 @@ struct usbvision_device_data_st usbvision_device_data[] = {
586 .vbi = 1, 522 .vbi = 1,
587 .Tuner = 1, 523 .Tuner = 1,
588 .TunerType = TUNER_PHILIPS_PAL, 524 .TunerType = TUNER_PHILIPS_PAL,
589 .Vin_Reg1 = -1,
590 .Vin_Reg2 = -1,
591 .X_Offset = 0, 525 .X_Offset = 0,
592 .Y_Offset = 3, 526 .Y_Offset = 3,
527 .Dvi_yuv_override = 1,
593 .Dvi_yuv = 7, 528 .Dvi_yuv = 7,
594 .ModelString = "Hauppauge WinTV USB Pro (PAL D/K)", 529 .ModelString = "Hauppauge WinTV USB Pro (PAL D/K)",
595 }, 530 },
@@ -603,10 +538,9 @@ struct usbvision_device_data_st usbvision_device_data[] = {
603 .vbi = 1, 538 .vbi = 1,
604 .Tuner = 1, 539 .Tuner = 1,
605 .TunerType = TUNER_PHILIPS_SECAM, 540 .TunerType = TUNER_PHILIPS_SECAM,
606 .Vin_Reg1 = -1,
607 .Vin_Reg2 = -1,
608 .X_Offset = 0, 541 .X_Offset = 0,
609 .Y_Offset = 3, 542 .Y_Offset = 3,
543 .Dvi_yuv_override = 1,
610 .Dvi_yuv = 7, 544 .Dvi_yuv = 7,
611 .ModelString = "Hauppauge WinTV USB Pro (PAL/SECAM BGDK/I/L)", 545 .ModelString = "Hauppauge WinTV USB Pro (PAL/SECAM BGDK/I/L)",
612 }, 546 },
@@ -620,10 +554,9 @@ struct usbvision_device_data_st usbvision_device_data[] = {
620 .vbi = 1, 554 .vbi = 1,
621 .Tuner = 1, 555 .Tuner = 1,
622 .TunerType = TUNER_PHILIPS_SECAM, 556 .TunerType = TUNER_PHILIPS_SECAM,
623 .Vin_Reg1 = -1,
624 .Vin_Reg2 = -1,
625 .X_Offset = 0, 557 .X_Offset = 0,
626 .Y_Offset = 3, 558 .Y_Offset = 3,
559 .Dvi_yuv_override = 1,
627 .Dvi_yuv = 7, 560 .Dvi_yuv = 7,
628 .ModelString = "Hauppauge WinTV USB Pro (PAL/SECAM BGDK/I/L) V2", 561 .ModelString = "Hauppauge WinTV USB Pro (PAL/SECAM BGDK/I/L) V2",
629 }, 562 },
@@ -637,10 +570,9 @@ struct usbvision_device_data_st usbvision_device_data[] = {
637 .vbi = 1, 570 .vbi = 1,
638 .Tuner = 1, 571 .Tuner = 1,
639 .TunerType = TUNER_ALPS_TSBE1_PAL, 572 .TunerType = TUNER_ALPS_TSBE1_PAL,
640 .Vin_Reg1 = -1,
641 .Vin_Reg2 = -1,
642 .X_Offset = 0, 573 .X_Offset = 0,
643 .Y_Offset = 3, 574 .Y_Offset = 3,
575 .Dvi_yuv_override = 1,
644 .Dvi_yuv = 7, 576 .Dvi_yuv = 7,
645 .ModelString = "Hauppauge WinTV USB Pro (PAL B/G) V2", 577 .ModelString = "Hauppauge WinTV USB Pro (PAL B/G) V2",
646 }, 578 },
@@ -654,10 +586,9 @@ struct usbvision_device_data_st usbvision_device_data[] = {
654 .vbi = 1, 586 .vbi = 1,
655 .Tuner = 1, 587 .Tuner = 1,
656 .TunerType = TUNER_ALPS_TSBE1_PAL, 588 .TunerType = TUNER_ALPS_TSBE1_PAL,
657 .Vin_Reg1 = -1,
658 .Vin_Reg2 = -1,
659 .X_Offset = 0, 589 .X_Offset = 0,
660 .Y_Offset = 3, 590 .Y_Offset = 3,
591 .Dvi_yuv_override = 1,
661 .Dvi_yuv = 7, 592 .Dvi_yuv = 7,
662 .ModelString = "Hauppauge WinTV USB Pro (PAL B/G,D/K)", 593 .ModelString = "Hauppauge WinTV USB Pro (PAL B/G,D/K)",
663 }, 594 },
@@ -671,10 +602,9 @@ struct usbvision_device_data_st usbvision_device_data[] = {
671 .vbi = 1, 602 .vbi = 1,
672 .Tuner = 1, 603 .Tuner = 1,
673 .TunerType = TUNER_PHILIPS_PAL, 604 .TunerType = TUNER_PHILIPS_PAL,
674 .Vin_Reg1 = -1,
675 .Vin_Reg2 = -1,
676 .X_Offset = 0, 605 .X_Offset = 0,
677 .Y_Offset = 3, 606 .Y_Offset = 3,
607 .Dvi_yuv_override = 1,
678 .Dvi_yuv = 7, 608 .Dvi_yuv = 7,
679 .ModelString = "Hauppauge WinTV USB Pro (PAL I,D/K)", 609 .ModelString = "Hauppauge WinTV USB Pro (PAL I,D/K)",
680 }, 610 },
@@ -688,10 +618,9 @@ struct usbvision_device_data_st usbvision_device_data[] = {
688 .vbi = 1, 618 .vbi = 1,
689 .Tuner = 1, 619 .Tuner = 1,
690 .TunerType = TUNER_PHILIPS_NTSC_M, 620 .TunerType = TUNER_PHILIPS_NTSC_M,
691 .Vin_Reg1 = -1,
692 .Vin_Reg2 = -1,
693 .X_Offset = 0, 621 .X_Offset = 0,
694 .Y_Offset = 3, 622 .Y_Offset = 3,
623 .Dvi_yuv_override = 1,
695 .Dvi_yuv = 7, 624 .Dvi_yuv = 7,
696 .ModelString = "Hauppauge WinTV USB Pro (NTSC M/N FM)", 625 .ModelString = "Hauppauge WinTV USB Pro (NTSC M/N FM)",
697 }, 626 },
@@ -705,10 +634,9 @@ struct usbvision_device_data_st usbvision_device_data[] = {
705 .vbi = 1, 634 .vbi = 1,
706 .Tuner = 1, 635 .Tuner = 1,
707 .TunerType = TUNER_PHILIPS_PAL, 636 .TunerType = TUNER_PHILIPS_PAL,
708 .Vin_Reg1 = -1,
709 .Vin_Reg2 = -1,
710 .X_Offset = 0, 637 .X_Offset = 0,
711 .Y_Offset = 3, 638 .Y_Offset = 3,
639 .Dvi_yuv_override = 1,
712 .Dvi_yuv = 7, 640 .Dvi_yuv = 7,
713 .ModelString = "Hauppauge WinTV USB Pro (PAL B/G FM)", 641 .ModelString = "Hauppauge WinTV USB Pro (PAL B/G FM)",
714 }, 642 },
@@ -722,10 +650,9 @@ struct usbvision_device_data_st usbvision_device_data[] = {
722 .vbi = 1, 650 .vbi = 1,
723 .Tuner = 1, 651 .Tuner = 1,
724 .TunerType = TUNER_PHILIPS_PAL, 652 .TunerType = TUNER_PHILIPS_PAL,
725 .Vin_Reg1 = -1,
726 .Vin_Reg2 = -1,
727 .X_Offset = 0, 653 .X_Offset = 0,
728 .Y_Offset = 3, 654 .Y_Offset = 3,
655 .Dvi_yuv_override = 1,
729 .Dvi_yuv = 7, 656 .Dvi_yuv = 7,
730 .ModelString = "Hauppauge WinTV USB Pro (PAL I FM)", 657 .ModelString = "Hauppauge WinTV USB Pro (PAL I FM)",
731 }, 658 },
@@ -739,10 +666,9 @@ struct usbvision_device_data_st usbvision_device_data[] = {
739 .vbi = 1, 666 .vbi = 1,
740 .Tuner = 1, 667 .Tuner = 1,
741 .TunerType = TUNER_PHILIPS_PAL, 668 .TunerType = TUNER_PHILIPS_PAL,
742 .Vin_Reg1 = -1,
743 .Vin_Reg2 = -1,
744 .X_Offset = 0, 669 .X_Offset = 0,
745 .Y_Offset = 3, 670 .Y_Offset = 3,
671 .Dvi_yuv_override = 1,
746 .Dvi_yuv = 7, 672 .Dvi_yuv = 7,
747 .ModelString = "Hauppauge WinTV USB Pro (PAL D/K FM)", 673 .ModelString = "Hauppauge WinTV USB Pro (PAL D/K FM)",
748 }, 674 },
@@ -756,10 +682,9 @@ struct usbvision_device_data_st usbvision_device_data[] = {
756 .vbi = 1, 682 .vbi = 1,
757 .Tuner = 1, 683 .Tuner = 1,
758 .TunerType = TUNER_MICROTUNE_4049FM5, 684 .TunerType = TUNER_MICROTUNE_4049FM5,
759 .Vin_Reg1 = -1,
760 .Vin_Reg2 = -1,
761 .X_Offset = 0, 685 .X_Offset = 0,
762 .Y_Offset = 3, 686 .Y_Offset = 3,
687 .Dvi_yuv_override = 1,
763 .Dvi_yuv = 7, 688 .Dvi_yuv = 7,
764 .ModelString = "Hauppauge WinTV USB Pro (Temic PAL/SECAM B/G/I/D/K/L FM)", 689 .ModelString = "Hauppauge WinTV USB Pro (Temic PAL/SECAM B/G/I/D/K/L FM)",
765 }, 690 },
@@ -773,10 +698,9 @@ struct usbvision_device_data_st usbvision_device_data[] = {
773 .vbi = 1, 698 .vbi = 1,
774 .Tuner = 1, 699 .Tuner = 1,
775 .TunerType = TUNER_MICROTUNE_4049FM5, 700 .TunerType = TUNER_MICROTUNE_4049FM5,
776 .Vin_Reg1 = -1,
777 .Vin_Reg2 = -1,
778 .X_Offset = 0, 701 .X_Offset = 0,
779 .Y_Offset = 3, 702 .Y_Offset = 3,
703 .Dvi_yuv_override = 1,
780 .Dvi_yuv = 7, 704 .Dvi_yuv = 7,
781 .ModelString = "Hauppauge WinTV USB Pro (Temic PAL B/G FM)", 705 .ModelString = "Hauppauge WinTV USB Pro (Temic PAL B/G FM)",
782 }, 706 },
@@ -790,10 +714,9 @@ struct usbvision_device_data_st usbvision_device_data[] = {
790 .vbi = 1, 714 .vbi = 1,
791 .Tuner = 1, 715 .Tuner = 1,
792 .TunerType = TUNER_PHILIPS_FM1216ME_MK3, 716 .TunerType = TUNER_PHILIPS_FM1216ME_MK3,
793 .Vin_Reg1 = -1,
794 .Vin_Reg2 = -1,
795 .X_Offset = 0, 717 .X_Offset = 0,
796 .Y_Offset = 3, 718 .Y_Offset = 3,
719 .Dvi_yuv_override = 1,
797 .Dvi_yuv = 7, 720 .Dvi_yuv = 7,
798 .ModelString = "Hauppauge WinTV USB Pro (PAL/SECAM B/G/I/D/K/L FM)", 721 .ModelString = "Hauppauge WinTV USB Pro (PAL/SECAM B/G/I/D/K/L FM)",
799 }, 722 },
@@ -807,10 +730,9 @@ struct usbvision_device_data_st usbvision_device_data[] = {
807 .vbi = 1, 730 .vbi = 1,
808 .Tuner = 1, 731 .Tuner = 1,
809 .TunerType = TUNER_PHILIPS_NTSC_M, 732 .TunerType = TUNER_PHILIPS_NTSC_M,
810 .Vin_Reg1 = -1,
811 .Vin_Reg2 = -1,
812 .X_Offset = 0, 733 .X_Offset = 0,
813 .Y_Offset = 3, 734 .Y_Offset = 3,
735 .Dvi_yuv_override = 1,
814 .Dvi_yuv = 7, 736 .Dvi_yuv = 7,
815 .ModelString = "Hauppauge WinTV USB Pro (NTSC M/N FM) V2", 737 .ModelString = "Hauppauge WinTV USB Pro (NTSC M/N FM) V2",
816 }, 738 },
@@ -824,11 +746,8 @@ struct usbvision_device_data_st usbvision_device_data[] = {
824 .vbi = 1, 746 .vbi = 1,
825 .Tuner = 1, 747 .Tuner = 1,
826 .TunerType = TUNER_PHILIPS_NTSC_M, 748 .TunerType = TUNER_PHILIPS_NTSC_M,
827 .Vin_Reg1 = -1,
828 .Vin_Reg2 = -1,
829 .X_Offset = 5, 749 .X_Offset = 5,
830 .Y_Offset = 5, 750 .Y_Offset = 5,
831 .Dvi_yuv = -1,
832 .ModelString = "Camtel Technology USB TV Genie Pro FM Model TVB330", 751 .ModelString = "Camtel Technology USB TV Genie Pro FM Model TVB330",
833 }, 752 },
834 [DIGITAL_VIDEO_CREATOR_I] = { 753 [DIGITAL_VIDEO_CREATOR_I] = {
@@ -841,10 +760,9 @@ struct usbvision_device_data_st usbvision_device_data[] = {
841 .vbi = 1, 760 .vbi = 1,
842 .Tuner = 0, 761 .Tuner = 0,
843 .TunerType = 0, 762 .TunerType = 0,
844 .Vin_Reg1 = -1,
845 .Vin_Reg2 = -1,
846 .X_Offset = 0, 763 .X_Offset = 0,
847 .Y_Offset = 3, 764 .Y_Offset = 3,
765 .Dvi_yuv_override = 1,
848 .Dvi_yuv = 7, 766 .Dvi_yuv = 7,
849 .ModelString = "Digital Video Creator I", 767 .ModelString = "Digital Video Creator I",
850 }, 768 },
@@ -858,10 +776,9 @@ struct usbvision_device_data_st usbvision_device_data[] = {
858 .vbi = 1, 776 .vbi = 1,
859 .Tuner = 0, 777 .Tuner = 0,
860 .TunerType = 0, 778 .TunerType = 0,
861 .Vin_Reg1 = -1,
862 .Vin_Reg2 = -1,
863 .X_Offset = 82, 779 .X_Offset = 82,
864 .Y_Offset = 20, 780 .Y_Offset = 20,
781 .Dvi_yuv_override = 1,
865 .Dvi_yuv = 7, 782 .Dvi_yuv = 7,
866 .ModelString = "Global Village GV-007 (NTSC)", 783 .ModelString = "Global Village GV-007 (NTSC)",
867 }, 784 },
@@ -875,10 +792,9 @@ struct usbvision_device_data_st usbvision_device_data[] = {
875 .vbi = 1, 792 .vbi = 1,
876 .Tuner = 0, 793 .Tuner = 0,
877 .TunerType = 0, 794 .TunerType = 0,
878 .Vin_Reg1 = -1,
879 .Vin_Reg2 = -1,
880 .X_Offset = 0, 795 .X_Offset = 0,
881 .Y_Offset = 3, 796 .Y_Offset = 3,
797 .Dvi_yuv_override = 1,
882 .Dvi_yuv = 7, 798 .Dvi_yuv = 7,
883 .ModelString = "Dazzle Fusion Model DVC-50 Rev 1 (NTSC)", 799 .ModelString = "Dazzle Fusion Model DVC-50 Rev 1 (NTSC)",
884 }, 800 },
@@ -892,10 +808,9 @@ struct usbvision_device_data_st usbvision_device_data[] = {
892 .vbi = 1, 808 .vbi = 1,
893 .Tuner = 0, 809 .Tuner = 0,
894 .TunerType = 0, 810 .TunerType = 0,
895 .Vin_Reg1 = -1,
896 .Vin_Reg2 = -1,
897 .X_Offset = 0, 811 .X_Offset = 0,
898 .Y_Offset = 3, 812 .Y_Offset = 3,
813 .Dvi_yuv_override = 1,
899 .Dvi_yuv = 7, 814 .Dvi_yuv = 7,
900 .ModelString = "Dazzle Fusion Model DVC-80 Rev 1 (PAL)", 815 .ModelString = "Dazzle Fusion Model DVC-80 Rev 1 (PAL)",
901 }, 816 },
@@ -909,10 +824,9 @@ struct usbvision_device_data_st usbvision_device_data[] = {
909 .vbi = 1, 824 .vbi = 1,
910 .Tuner = 0, 825 .Tuner = 0,
911 .TunerType = 0, 826 .TunerType = 0,
912 .Vin_Reg1 = -1,
913 .Vin_Reg2 = -1,
914 .X_Offset = 0, 827 .X_Offset = 0,
915 .Y_Offset = 3, 828 .Y_Offset = 3,
829 .Dvi_yuv_override = 1,
916 .Dvi_yuv = 7, 830 .Dvi_yuv = 7,
917 .ModelString = "Dazzle Fusion Model DVC-90 Rev 1 (SECAM)", 831 .ModelString = "Dazzle Fusion Model DVC-90 Rev 1 (SECAM)",
918 }, 832 },
@@ -926,10 +840,9 @@ struct usbvision_device_data_st usbvision_device_data[] = {
926 .vbi = 1, 840 .vbi = 1,
927 .Tuner = 1, 841 .Tuner = 1,
928 .TunerType = TUNER_PHILIPS_FM1216ME_MK3, 842 .TunerType = TUNER_PHILIPS_FM1216ME_MK3,
929 .Vin_Reg1 = -1,
930 .Vin_Reg2 = -1,
931 .X_Offset = 0, 843 .X_Offset = 0,
932 .Y_Offset = 3, 844 .Y_Offset = 3,
845 .Dvi_yuv_override = 1,
933 .Dvi_yuv = 7, 846 .Dvi_yuv = 7,
934 .ModelString = "Eskape Labs MyTV2Go", 847 .ModelString = "Eskape Labs MyTV2Go",
935 }, 848 },
@@ -943,11 +856,8 @@ struct usbvision_device_data_st usbvision_device_data[] = {
943 .vbi = 0, 856 .vbi = 0,
944 .Tuner = 1, 857 .Tuner = 1,
945 .TunerType = TUNER_TEMIC_4066FY5_PAL_I, 858 .TunerType = TUNER_TEMIC_4066FY5_PAL_I,
946 .Vin_Reg1 = -1,
947 .Vin_Reg2 = -1,
948 .X_Offset = -1, 859 .X_Offset = -1,
949 .Y_Offset = -1, 860 .Y_Offset = -1,
950 .Dvi_yuv = -1,
951 .ModelString = "Pinnacle Studio PCTV USB (PAL)", 861 .ModelString = "Pinnacle Studio PCTV USB (PAL)",
952 }, 862 },
953 [PINNA_PCTV_USB_SECAM] = { 863 [PINNA_PCTV_USB_SECAM] = {
@@ -960,11 +870,8 @@ struct usbvision_device_data_st usbvision_device_data[] = {
960 .vbi = 1, 870 .vbi = 1,
961 .Tuner = 1, 871 .Tuner = 1,
962 .TunerType = TUNER_PHILIPS_SECAM, 872 .TunerType = TUNER_PHILIPS_SECAM,
963 .Vin_Reg1 = -1,
964 .Vin_Reg2 = -1,
965 .X_Offset = -1, 873 .X_Offset = -1,
966 .Y_Offset = -1, 874 .Y_Offset = -1,
967 .Dvi_yuv = -1,
968 .ModelString = "Pinnacle Studio PCTV USB (SECAM)", 875 .ModelString = "Pinnacle Studio PCTV USB (SECAM)",
969 }, 876 },
970 [PINNA_PCTV_USB_PAL_FM] = { 877 [PINNA_PCTV_USB_PAL_FM] = {
@@ -977,11 +884,8 @@ struct usbvision_device_data_st usbvision_device_data[] = {
977 .vbi = 1, 884 .vbi = 1,
978 .Tuner = 1, 885 .Tuner = 1,
979 .TunerType = TUNER_PHILIPS_PAL, 886 .TunerType = TUNER_PHILIPS_PAL,
980 .Vin_Reg1 = -1,
981 .Vin_Reg2 = -1,
982 .X_Offset = 128, 887 .X_Offset = 128,
983 .Y_Offset = 23, 888 .Y_Offset = 23,
984 .Dvi_yuv = -1,
985 .ModelString = "Pinnacle Studio PCTV USB (PAL) FM", 889 .ModelString = "Pinnacle Studio PCTV USB (PAL) FM",
986 }, 890 },
987 [MIRO_PCTV_USB] = { 891 [MIRO_PCTV_USB] = {
@@ -994,11 +898,8 @@ struct usbvision_device_data_st usbvision_device_data[] = {
994 .vbi = 1, 898 .vbi = 1,
995 .Tuner = 1, 899 .Tuner = 1,
996 .TunerType = TUNER_PHILIPS_PAL, 900 .TunerType = TUNER_PHILIPS_PAL,
997 .Vin_Reg1 = -1,
998 .Vin_Reg2 = -1,
999 .X_Offset = -1, 901 .X_Offset = -1,
1000 .Y_Offset = -1, 902 .Y_Offset = -1,
1001 .Dvi_yuv = -1,
1002 .ModelString = "Miro PCTV USB", 903 .ModelString = "Miro PCTV USB",
1003 }, 904 },
1004 [PINNA_PCTV_USB_NTSC_FM] = { 905 [PINNA_PCTV_USB_NTSC_FM] = {
@@ -1011,11 +912,8 @@ struct usbvision_device_data_st usbvision_device_data[] = {
1011 .vbi = 1, 912 .vbi = 1,
1012 .Tuner = 1, 913 .Tuner = 1,
1013 .TunerType = TUNER_PHILIPS_NTSC_M, 914 .TunerType = TUNER_PHILIPS_NTSC_M,
1014 .Vin_Reg1 = -1,
1015 .Vin_Reg2 = -1,
1016 .X_Offset = -1, 915 .X_Offset = -1,
1017 .Y_Offset = -1, 916 .Y_Offset = -1,
1018 .Dvi_yuv = -1,
1019 .ModelString = "Pinnacle Studio PCTV USB (NTSC) FM", 917 .ModelString = "Pinnacle Studio PCTV USB (NTSC) FM",
1020 }, 918 },
1021 [PINNA_PCTV_USB_PAL_FM_V2] = { 919 [PINNA_PCTV_USB_PAL_FM_V2] = {
@@ -1028,10 +926,9 @@ struct usbvision_device_data_st usbvision_device_data[] = {
1028 .vbi = 1, 926 .vbi = 1,
1029 .Tuner = 1, 927 .Tuner = 1,
1030 .TunerType = TUNER_TEMIC_4009FR5_PAL, 928 .TunerType = TUNER_TEMIC_4009FR5_PAL,
1031 .Vin_Reg1 = -1,
1032 .Vin_Reg2 = -1,
1033 .X_Offset = 0, 929 .X_Offset = 0,
1034 .Y_Offset = 3, 930 .Y_Offset = 3,
931 .Dvi_yuv_override = 1,
1035 .Dvi_yuv = 7, 932 .Dvi_yuv = 7,
1036 .ModelString = "Pinnacle Studio PCTV USB (PAL) FM V2", 933 .ModelString = "Pinnacle Studio PCTV USB (PAL) FM V2",
1037 }, 934 },
@@ -1045,10 +942,9 @@ struct usbvision_device_data_st usbvision_device_data[] = {
1045 .vbi = 1, 942 .vbi = 1,
1046 .Tuner = 1, 943 .Tuner = 1,
1047 .TunerType = TUNER_TEMIC_4039FR5_NTSC, 944 .TunerType = TUNER_TEMIC_4039FR5_NTSC,
1048 .Vin_Reg1 = -1,
1049 .Vin_Reg2 = -1,
1050 .X_Offset = 0, 945 .X_Offset = 0,
1051 .Y_Offset = 3, 946 .Y_Offset = 3,
947 .Dvi_yuv_override = 1,
1052 .Dvi_yuv = 7, 948 .Dvi_yuv = 7,
1053 .ModelString = "Pinnacle Studio PCTV USB (NTSC) FM V2", 949 .ModelString = "Pinnacle Studio PCTV USB (NTSC) FM V2",
1054 }, 950 },
@@ -1062,10 +958,9 @@ struct usbvision_device_data_st usbvision_device_data[] = {
1062 .vbi = 1, 958 .vbi = 1,
1063 .Tuner = 1, 959 .Tuner = 1,
1064 .TunerType = TUNER_TEMIC_4009FR5_PAL, 960 .TunerType = TUNER_TEMIC_4009FR5_PAL,
1065 .Vin_Reg1 = -1,
1066 .Vin_Reg2 = -1,
1067 .X_Offset = 0, 961 .X_Offset = 0,
1068 .Y_Offset = 3, 962 .Y_Offset = 3,
963 .Dvi_yuv_override = 1,
1069 .Dvi_yuv = 7, 964 .Dvi_yuv = 7,
1070 .ModelString = "Pinnacle Studio PCTV USB (PAL) FM V3", 965 .ModelString = "Pinnacle Studio PCTV USB (PAL) FM V3",
1071 }, 966 },
@@ -1079,10 +974,9 @@ struct usbvision_device_data_st usbvision_device_data[] = {
1079 .vbi = 1, 974 .vbi = 1,
1080 .Tuner = 0, 975 .Tuner = 0,
1081 .TunerType = 0, 976 .TunerType = 0,
1082 .Vin_Reg1 = -1,
1083 .Vin_Reg2 = -1,
1084 .X_Offset = 0, 977 .X_Offset = 0,
1085 .Y_Offset = 3, 978 .Y_Offset = 3,
979 .Dvi_yuv_override = 1,
1086 .Dvi_yuv = 7, 980 .Dvi_yuv = 7,
1087 .ModelString = "Pinnacle Studio Linx Video input cable (NTSC)", 981 .ModelString = "Pinnacle Studio Linx Video input cable (NTSC)",
1088 }, 982 },
@@ -1096,10 +990,9 @@ struct usbvision_device_data_st usbvision_device_data[] = {
1096 .vbi = 1, 990 .vbi = 1,
1097 .Tuner = 0, 991 .Tuner = 0,
1098 .TunerType = 0, 992 .TunerType = 0,
1099 .Vin_Reg1 = -1,
1100 .Vin_Reg2 = -1,
1101 .X_Offset = 0, 993 .X_Offset = 0,
1102 .Y_Offset = 3, 994 .Y_Offset = 3,
995 .Dvi_yuv_override = 1,
1103 .Dvi_yuv = 7, 996 .Dvi_yuv = 7,
1104 .ModelString = "Pinnacle Studio Linx Video input cable (PAL)", 997 .ModelString = "Pinnacle Studio Linx Video input cable (PAL)",
1105 }, 998 },
@@ -1113,10 +1006,9 @@ struct usbvision_device_data_st usbvision_device_data[] = {
1113 .vbi = 1, 1006 .vbi = 1,
1114 .Tuner = 1, 1007 .Tuner = 1,
1115 .TunerType = TUNER_TEMIC_4009FR5_PAL, 1008 .TunerType = TUNER_TEMIC_4009FR5_PAL,
1116 .Vin_Reg1 = -1,
1117 .Vin_Reg2 = -1,
1118 .X_Offset = 0, 1009 .X_Offset = 0,
1119 .Y_Offset = 3, 1010 .Y_Offset = 3,
1011 .Dvi_yuv_override = 1,
1120 .Dvi_yuv = 7, 1012 .Dvi_yuv = 7,
1121 .ModelString = "Pinnacle PCTV Bungee USB (PAL) FM", 1013 .ModelString = "Pinnacle PCTV Bungee USB (PAL) FM",
1122 }, 1014 },
@@ -1130,11 +1022,8 @@ struct usbvision_device_data_st usbvision_device_data[] = {
1130 .vbi = 1, 1022 .vbi = 1,
1131 .Tuner = 1, 1023 .Tuner = 1,
1132 .TunerType = TUNER_PHILIPS_NTSC_M, 1024 .TunerType = TUNER_PHILIPS_NTSC_M,
1133 .Vin_Reg1 = -1,
1134 .Vin_Reg2 = -1,
1135 .X_Offset = -1, 1025 .X_Offset = -1,
1136 .Y_Offset = -1, 1026 .Y_Offset = -1,
1137 .Dvi_yuv = -1,
1138 .ModelString = "Hauppauge WinTv-USB", 1027 .ModelString = "Hauppauge WinTv-USB",
1139 }, 1028 },
1140}; 1029};
diff --git a/drivers/media/video/usbvision/usbvision-core.c b/drivers/media/video/usbvision/usbvision-core.c
index f2154dc072e2..fee4548a9cc7 100644
--- a/drivers/media/video/usbvision/usbvision-core.c
+++ b/drivers/media/video/usbvision/usbvision-core.c
@@ -2040,8 +2040,8 @@ int usbvision_set_input(struct usb_usbvision *usbvision)
2040 return 0; 2040 return 0;
2041 2041
2042 /* Set input format expected from decoder*/ 2042 /* Set input format expected from decoder*/
2043 if (usbvision_device_data[usbvision->DevModel].Vin_Reg1 >= 0) { 2043 if (usbvision_device_data[usbvision->DevModel].Vin_Reg1_override) {
2044 value[0] = usbvision_device_data[usbvision->DevModel].Vin_Reg1 & 0xff; 2044 value[0] = usbvision_device_data[usbvision->DevModel].Vin_Reg1;
2045 } else if(usbvision_device_data[usbvision->DevModel].Codec == CODEC_SAA7113) { 2045 } else if(usbvision_device_data[usbvision->DevModel].Codec == CODEC_SAA7113) {
2046 /* SAA7113 uses 8 bit output */ 2046 /* SAA7113 uses 8 bit output */
2047 value[0] = USBVISION_8_422_SYNC; 2047 value[0] = USBVISION_8_422_SYNC;
@@ -2112,8 +2112,8 @@ int usbvision_set_input(struct usb_usbvision *usbvision)
2112 2112
2113 dvi_yuv_value = 0x00; /* U comes after V, Ya comes after U/V, Yb comes after Yb */ 2113 dvi_yuv_value = 0x00; /* U comes after V, Ya comes after U/V, Yb comes after Yb */
2114 2114
2115 if(usbvision_device_data[usbvision->DevModel].Dvi_yuv >= 0){ 2115 if(usbvision_device_data[usbvision->DevModel].Dvi_yuv_override){
2116 dvi_yuv_value = usbvision_device_data[usbvision->DevModel].Dvi_yuv & 0xff; 2116 dvi_yuv_value = usbvision_device_data[usbvision->DevModel].Dvi_yuv;
2117 } 2117 }
2118 else if(usbvision_device_data[usbvision->DevModel].Codec == CODEC_SAA7113) { 2118 else if(usbvision_device_data[usbvision->DevModel].Codec == CODEC_SAA7113) {
2119 /* This changes as the fine sync control changes. Further investigation necessary */ 2119 /* This changes as the fine sync control changes. Further investigation necessary */
diff --git a/drivers/media/video/usbvision/usbvision-video.c b/drivers/media/video/usbvision/usbvision-video.c
index 49281ffa84cb..aa6509391bf9 100644
--- a/drivers/media/video/usbvision/usbvision-video.c
+++ b/drivers/media/video/usbvision/usbvision-video.c
@@ -1745,8 +1745,8 @@ static void usbvision_configure_video(struct usb_usbvision *usbvision)
1745 model = usbvision->DevModel; 1745 model = usbvision->DevModel;
1746 usbvision->palette = usbvision_v4l2_format[2]; // V4L2_PIX_FMT_RGB24; 1746 usbvision->palette = usbvision_v4l2_format[2]; // V4L2_PIX_FMT_RGB24;
1747 1747
1748 if (usbvision_device_data[usbvision->DevModel].Vin_Reg2 >= 0) { 1748 if (usbvision_device_data[usbvision->DevModel].Vin_Reg2_override) {
1749 usbvision->Vin_Reg2_Preset = usbvision_device_data[usbvision->DevModel].Vin_Reg2 & 0xff; 1749 usbvision->Vin_Reg2_Preset = usbvision_device_data[usbvision->DevModel].Vin_Reg2;
1750 } else { 1750 } else {
1751 usbvision->Vin_Reg2_Preset = 0; 1751 usbvision->Vin_Reg2_Preset = 0;
1752 } 1752 }
@@ -1957,6 +1957,7 @@ static void customdevice_process(void)
1957 if(CustomDevice) 1957 if(CustomDevice)
1958 { 1958 {
1959 char *parse=CustomDevice; 1959 char *parse=CustomDevice;
1960 int tmp;
1960 1961
1961 PDEBUG(DBG_PROBE, "CustomDevice=%s", CustomDevice); 1962 PDEBUG(DBG_PROBE, "CustomDevice=%s", CustomDevice);
1962 1963
@@ -1996,10 +1997,11 @@ static void customdevice_process(void)
1996 sscanf(parse,"%d",&usbvision_device_data[0].Interface); 1997 sscanf(parse,"%d",&usbvision_device_data[0].Interface);
1997 goto2next(parse); 1998 goto2next(parse);
1998 PDEBUG(DBG_PROBE, "Interface=%d", usbvision_device_data[0].Interface); 1999 PDEBUG(DBG_PROBE, "Interface=%d", usbvision_device_data[0].Interface);
1999 sscanf(parse,"%d",&usbvision_device_data[0].Codec); 2000 sscanf(parse,"%hd",&usbvision_device_data[0].Codec);
2000 goto2next(parse); 2001 goto2next(parse);
2001 PDEBUG(DBG_PROBE, "Codec=%d", usbvision_device_data[0].Codec); 2002 PDEBUG(DBG_PROBE, "Codec=%d", usbvision_device_data[0].Codec);
2002 sscanf(parse,"%d",&usbvision_device_data[0].VideoChannels); 2003 sscanf(parse,"%d",&tmp);
2004 usbvision_device_data[0].VideoChannels = tmp;
2003 goto2next(parse); 2005 goto2next(parse);
2004 PDEBUG(DBG_PROBE, "VideoChannels=%d", usbvision_device_data[0].VideoChannels); 2006 PDEBUG(DBG_PROBE, "VideoChannels=%d", usbvision_device_data[0].VideoChannels);
2005 2007
@@ -2027,7 +2029,8 @@ static void customdevice_process(void)
2027 } 2029 }
2028 goto2next(parse); 2030 goto2next(parse);
2029 2031
2030 sscanf(parse,"%d",&usbvision_device_data[0].AudioChannels); 2032 sscanf(parse,"%d",&tmp);
2033 usbvision_device_data[0].AudioChannels = tmp;
2031 goto2next(parse); 2034 goto2next(parse);
2032 PDEBUG(DBG_PROBE, "AudioChannels=%d", usbvision_device_data[0].AudioChannels); 2035 PDEBUG(DBG_PROBE, "AudioChannels=%d", usbvision_device_data[0].AudioChannels);
2033 sscanf(parse,"%d",&radio); 2036 sscanf(parse,"%d",&radio);
@@ -2038,22 +2041,34 @@ static void customdevice_process(void)
2038 usbvision_device_data[0].Tuner=(tuner?1:0); 2041 usbvision_device_data[0].Tuner=(tuner?1:0);
2039 goto2next(parse); 2042 goto2next(parse);
2040 PDEBUG(DBG_PROBE, "Tuner=%d", usbvision_device_data[0].Tuner); 2043 PDEBUG(DBG_PROBE, "Tuner=%d", usbvision_device_data[0].Tuner);
2041 sscanf(parse,"%d",&usbvision_device_data[0].TunerType); 2044 sscanf(parse,"%hhu",&usbvision_device_data[0].TunerType);
2042 goto2next(parse); 2045 goto2next(parse);
2043 PDEBUG(DBG_PROBE, "TunerType=%d", usbvision_device_data[0].TunerType); 2046 PDEBUG(DBG_PROBE, "TunerType=%d", usbvision_device_data[0].TunerType);
2044 sscanf(parse,"%d",&usbvision_device_data[0].Vin_Reg1); 2047 sscanf(parse,"%d",&tmp);
2048 if(tmp>0) {
2049 usbvision_device_data[0].Vin_Reg1_override = 1;
2050 usbvision_device_data[0].Vin_Reg1 = tmp&0xff;
2051 }
2045 goto2next(parse); 2052 goto2next(parse);
2046 PDEBUG(DBG_PROBE, "Vin_Reg1=%d", usbvision_device_data[0].Vin_Reg1); 2053 PDEBUG(DBG_PROBE, "Vin_Reg1=%d", usbvision_device_data[0].Vin_Reg1);
2047 sscanf(parse,"%d",&usbvision_device_data[0].Vin_Reg2); 2054 sscanf(parse,"%d",&tmp);
2055 if(tmp>0) {
2056 usbvision_device_data[0].Vin_Reg2_override = 1;
2057 usbvision_device_data[0].Vin_Reg2 = tmp&0xff;
2058 }
2048 goto2next(parse); 2059 goto2next(parse);
2049 PDEBUG(DBG_PROBE, "Vin_Reg2=%d", usbvision_device_data[0].Vin_Reg2); 2060 PDEBUG(DBG_PROBE, "Vin_Reg2=%d", usbvision_device_data[0].Vin_Reg2);
2050 sscanf(parse,"%d",&usbvision_device_data[0].X_Offset); 2061 sscanf(parse,"%hd",&usbvision_device_data[0].X_Offset);
2051 goto2next(parse); 2062 goto2next(parse);
2052 PDEBUG(DBG_PROBE, "X_Offset=%d", usbvision_device_data[0].X_Offset); 2063 PDEBUG(DBG_PROBE, "X_Offset=%d", usbvision_device_data[0].X_Offset);
2053 sscanf(parse,"%d",&usbvision_device_data[0].Y_Offset); 2064 sscanf(parse,"%hd",&usbvision_device_data[0].Y_Offset);
2054 goto2next(parse); 2065 goto2next(parse);
2055 PDEBUG(DBG_PROBE, "Y_Offset=%d", usbvision_device_data[0].Y_Offset); 2066 PDEBUG(DBG_PROBE, "Y_Offset=%d", usbvision_device_data[0].Y_Offset);
2056 sscanf(parse,"%d",&usbvision_device_data[0].Dvi_yuv); 2067 sscanf(parse,"%d",&tmp);
2068 if(tmp>0) {
2069 usbvision_device_data[0].Dvi_yuv_override = 1;
2070 usbvision_device_data[0].Dvi_yuv = tmp&0xff;
2071 }
2057 PDEBUG(DBG_PROBE, "Dvi_yuv=%d", usbvision_device_data[0].Dvi_yuv); 2072 PDEBUG(DBG_PROBE, "Dvi_yuv=%d", usbvision_device_data[0].Dvi_yuv);
2058 2073
2059 //add to usbvision_table also 2074 //add to usbvision_table also
diff --git a/drivers/media/video/usbvision/usbvision.h b/drivers/media/video/usbvision/usbvision.h
index b4412a5014ad..9cad77733400 100644
--- a/drivers/media/video/usbvision/usbvision.h
+++ b/drivers/media/video/usbvision/usbvision.h
@@ -342,21 +342,24 @@ struct usbvision_frame {
342#define BRIDGE_NT1005 1005 342#define BRIDGE_NT1005 1005
343 343
344struct usbvision_device_data_st { 344struct usbvision_device_data_st {
345 int Interface; /* to handle special interface number like BELKIN and Hauppauge WinTV-USB II */
346 int Codec;
347 int VideoChannels;
348 __u64 VideoNorm; 345 __u64 VideoNorm;
349 int AudioChannels; 346 const char *ModelString;
350 int Radio:1; 347 int Interface; /* to handle special interface number like BELKIN and Hauppauge WinTV-USB II */
351 int vbi:1; 348 __u16 Codec;
352 int Tuner:1; 349 unsigned VideoChannels:3;
353 int TunerType; 350 unsigned AudioChannels:2;
354 int Vin_Reg1; 351 unsigned Radio:1;
355 int Vin_Reg2; 352 unsigned vbi:1;
356 int X_Offset; 353 unsigned Tuner:1;
357 int Y_Offset; 354 unsigned Vin_Reg1_override:1; /* Override default value with */
358 int Dvi_yuv; 355 unsigned Vin_Reg2_override:1; /* Vin_Reg1, Vin_Reg2, etc. */
359 char *ModelString; 356 unsigned Dvi_yuv_override:1;
357 __u8 Vin_Reg1;
358 __u8 Vin_Reg2;
359 __u8 Dvi_yuv;
360 __u8 TunerType;
361 __s16 X_Offset;
362 __s16 Y_Offset;
360}; 363};
361 364
362/* Declared on usbvision-cards.c */ 365/* Declared on usbvision-cards.c */