diff options
| -rw-r--r-- | drivers/media/pci/bt8xx/bttv-driver.c | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/drivers/media/pci/bt8xx/bttv-driver.c b/drivers/media/pci/bt8xx/bttv-driver.c index ccd18e4ee789..54579e4c740b 100644 --- a/drivers/media/pci/bt8xx/bttv-driver.c +++ b/drivers/media/pci/bt8xx/bttv-driver.c | |||
| @@ -250,17 +250,19 @@ static u8 SRAM_Table[][60] = | |||
| 250 | vdelay start of active video in 2 * field lines relative to | 250 | vdelay start of active video in 2 * field lines relative to |
| 251 | trailing edge of /VRESET pulse (VDELAY register). | 251 | trailing edge of /VRESET pulse (VDELAY register). |
| 252 | sheight height of active video in 2 * field lines. | 252 | sheight height of active video in 2 * field lines. |
| 253 | extraheight Added to sheight for cropcap.bounds.height only | ||
| 253 | videostart0 ITU-R frame line number of the line corresponding | 254 | videostart0 ITU-R frame line number of the line corresponding |
| 254 | to vdelay in the first field. */ | 255 | to vdelay in the first field. */ |
| 255 | #define CROPCAP(minhdelayx1, hdelayx1, swidth, totalwidth, sqwidth, \ | 256 | #define CROPCAP(minhdelayx1, hdelayx1, swidth, totalwidth, sqwidth, \ |
| 256 | vdelay, sheight, videostart0) \ | 257 | vdelay, sheight, extraheight, videostart0) \ |
| 257 | .cropcap.bounds.left = minhdelayx1, \ | 258 | .cropcap.bounds.left = minhdelayx1, \ |
| 258 | /* * 2 because vertically we count field lines times two, */ \ | 259 | /* * 2 because vertically we count field lines times two, */ \ |
| 259 | /* e.g. 23 * 2 to 23 * 2 + 576 in PAL-BGHI defrect. */ \ | 260 | /* e.g. 23 * 2 to 23 * 2 + 576 in PAL-BGHI defrect. */ \ |
| 260 | .cropcap.bounds.top = (videostart0) * 2 - (vdelay) + MIN_VDELAY, \ | 261 | .cropcap.bounds.top = (videostart0) * 2 - (vdelay) + MIN_VDELAY, \ |
| 261 | /* 4 is a safety margin at the end of the line. */ \ | 262 | /* 4 is a safety margin at the end of the line. */ \ |
| 262 | .cropcap.bounds.width = (totalwidth) - (minhdelayx1) - 4, \ | 263 | .cropcap.bounds.width = (totalwidth) - (minhdelayx1) - 4, \ |
| 263 | .cropcap.bounds.height = (sheight) + (vdelay) - MIN_VDELAY, \ | 264 | .cropcap.bounds.height = (sheight) + (extraheight) + (vdelay) - \ |
| 265 | MIN_VDELAY, \ | ||
| 264 | .cropcap.defrect.left = hdelayx1, \ | 266 | .cropcap.defrect.left = hdelayx1, \ |
| 265 | .cropcap.defrect.top = (videostart0) * 2, \ | 267 | .cropcap.defrect.top = (videostart0) * 2, \ |
| 266 | .cropcap.defrect.width = swidth, \ | 268 | .cropcap.defrect.width = swidth, \ |
| @@ -301,9 +303,10 @@ const struct bttv_tvnorm bttv_tvnorms[] = { | |||
| 301 | /* totalwidth */ 1135, | 303 | /* totalwidth */ 1135, |
| 302 | /* sqwidth */ 944, | 304 | /* sqwidth */ 944, |
| 303 | /* vdelay */ 0x20, | 305 | /* vdelay */ 0x20, |
| 304 | /* bt878 (and bt848?) can capture another | 306 | /* sheight */ 576, |
| 305 | line below active video. */ | 307 | /* bt878 (and bt848?) can capture another |
| 306 | /* sheight */ (576 + 2) + 0x20 - 2, | 308 | line below active video. */ |
| 309 | /* extraheight */ 2, | ||
| 307 | /* videostart0 */ 23) | 310 | /* videostart0 */ 23) |
| 308 | },{ | 311 | },{ |
| 309 | .v4l2_id = V4L2_STD_NTSC_M | V4L2_STD_NTSC_M_KR, | 312 | .v4l2_id = V4L2_STD_NTSC_M | V4L2_STD_NTSC_M_KR, |
| @@ -330,6 +333,7 @@ const struct bttv_tvnorm bttv_tvnorms[] = { | |||
| 330 | /* sqwidth */ 780, | 333 | /* sqwidth */ 780, |
| 331 | /* vdelay */ 0x1a, | 334 | /* vdelay */ 0x1a, |
| 332 | /* sheight */ 480, | 335 | /* sheight */ 480, |
| 336 | /* extraheight */ 0, | ||
| 333 | /* videostart0 */ 23) | 337 | /* videostart0 */ 23) |
| 334 | },{ | 338 | },{ |
| 335 | .v4l2_id = V4L2_STD_SECAM, | 339 | .v4l2_id = V4L2_STD_SECAM, |
| @@ -355,6 +359,7 @@ const struct bttv_tvnorm bttv_tvnorms[] = { | |||
| 355 | /* sqwidth */ 944, | 359 | /* sqwidth */ 944, |
| 356 | /* vdelay */ 0x20, | 360 | /* vdelay */ 0x20, |
| 357 | /* sheight */ 576, | 361 | /* sheight */ 576, |
| 362 | /* extraheight */ 0, | ||
| 358 | /* videostart0 */ 23) | 363 | /* videostart0 */ 23) |
| 359 | },{ | 364 | },{ |
| 360 | .v4l2_id = V4L2_STD_PAL_Nc, | 365 | .v4l2_id = V4L2_STD_PAL_Nc, |
| @@ -380,6 +385,7 @@ const struct bttv_tvnorm bttv_tvnorms[] = { | |||
| 380 | /* sqwidth */ 780, | 385 | /* sqwidth */ 780, |
| 381 | /* vdelay */ 0x1a, | 386 | /* vdelay */ 0x1a, |
| 382 | /* sheight */ 576, | 387 | /* sheight */ 576, |
| 388 | /* extraheight */ 0, | ||
| 383 | /* videostart0 */ 23) | 389 | /* videostart0 */ 23) |
| 384 | },{ | 390 | },{ |
| 385 | .v4l2_id = V4L2_STD_PAL_M, | 391 | .v4l2_id = V4L2_STD_PAL_M, |
| @@ -405,6 +411,7 @@ const struct bttv_tvnorm bttv_tvnorms[] = { | |||
| 405 | /* sqwidth */ 780, | 411 | /* sqwidth */ 780, |
| 406 | /* vdelay */ 0x1a, | 412 | /* vdelay */ 0x1a, |
| 407 | /* sheight */ 480, | 413 | /* sheight */ 480, |
| 414 | /* extraheight */ 0, | ||
| 408 | /* videostart0 */ 23) | 415 | /* videostart0 */ 23) |
| 409 | },{ | 416 | },{ |
| 410 | .v4l2_id = V4L2_STD_PAL_N, | 417 | .v4l2_id = V4L2_STD_PAL_N, |
| @@ -430,6 +437,7 @@ const struct bttv_tvnorm bttv_tvnorms[] = { | |||
| 430 | /* sqwidth */ 944, | 437 | /* sqwidth */ 944, |
| 431 | /* vdelay */ 0x20, | 438 | /* vdelay */ 0x20, |
| 432 | /* sheight */ 576, | 439 | /* sheight */ 576, |
| 440 | /* extraheight */ 0, | ||
| 433 | /* videostart0 */ 23) | 441 | /* videostart0 */ 23) |
| 434 | },{ | 442 | },{ |
| 435 | .v4l2_id = V4L2_STD_NTSC_M_JP, | 443 | .v4l2_id = V4L2_STD_NTSC_M_JP, |
| @@ -455,6 +463,7 @@ const struct bttv_tvnorm bttv_tvnorms[] = { | |||
| 455 | /* sqwidth */ 780, | 463 | /* sqwidth */ 780, |
| 456 | /* vdelay */ 0x16, | 464 | /* vdelay */ 0x16, |
| 457 | /* sheight */ 480, | 465 | /* sheight */ 480, |
| 466 | /* extraheight */ 0, | ||
| 458 | /* videostart0 */ 23) | 467 | /* videostart0 */ 23) |
| 459 | },{ | 468 | },{ |
| 460 | /* that one hopefully works with the strange timing | 469 | /* that one hopefully works with the strange timing |
| @@ -484,6 +493,7 @@ const struct bttv_tvnorm bttv_tvnorms[] = { | |||
| 484 | /* sqwidth */ 944, | 493 | /* sqwidth */ 944, |
| 485 | /* vdelay */ 0x1a, | 494 | /* vdelay */ 0x1a, |
| 486 | /* sheight */ 480, | 495 | /* sheight */ 480, |
| 496 | /* extraheight */ 0, | ||
| 487 | /* videostart0 */ 23) | 497 | /* videostart0 */ 23) |
| 488 | } | 498 | } |
| 489 | }; | 499 | }; |
