diff options
-rw-r--r-- | linux/drivers/media/video/cx88/cx88-core.c | 25 | ||||
-rw-r--r-- | linux/drivers/media/video/tda9887.c | 4 |
2 files changed, 12 insertions, 17 deletions
diff --git a/linux/drivers/media/video/cx88/cx88-core.c b/linux/drivers/media/video/cx88/cx88-core.c index 00080018a..c2e6df733 100644 --- a/linux/drivers/media/video/cx88/cx88-core.c +++ b/linux/drivers/media/video/cx88/cx88-core.c @@ -688,29 +688,24 @@ static unsigned int inline norm_vdelay(struct cx88_tvnorm *norm) static unsigned int inline norm_fsc8(struct cx88_tvnorm *norm) { - if (norm->id & V4L2_STD_PAL_M) - return 28604892; // 3.575611 MHz - - /* Does PAL/N' use the same carrier freq? */ - if (norm->id & (V4L2_STD_PAL_N | V4L2_STD_PAL_Nc)) - return 28656448; // 3.582056 MHz - - if (norm->id & V4L2_STD_NTSC) - return 28636360; // 3.57954545 MHz +/- 10 Hz + static const unsigned int ntsc = 28636360; + static const unsigned int pal = 35468950; + static const unsigned int palm = 28604892; - /* SECAM have also different sub carrier for chroma. Maybe their - freqs should also be here to improve video quality */ + if (norm->id & V4L2_STD_PAL_M) + return palm; - return 35468950; // 4.43361875 MHz + return (norm->id & V4L2_STD_625_50) ? pal : ntsc; } static unsigned int inline norm_htotal(struct cx88_tvnorm *norm) { + /* Should always be Line Draw Time / (4*FSC) */ - unsigned int fsc4=norm_fsc8(norm)/2; + if (norm->id & V4L2_STD_PAL_M) + return 909; - /* returns 4*FSC / frames per seconds / vtotal */ - return (norm->id & V4L2_STD_625_50) ? fsc4/25/625 : fsc4*30000/1001/525; + return (norm->id & V4L2_STD_625_50) ? 1135 : 910; } static unsigned int inline norm_vbipack(struct cx88_tvnorm *norm) diff --git a/linux/drivers/media/video/tda9887.c b/linux/drivers/media/video/tda9887.c index 26ecd7ddb..a1577cff9 100644 --- a/linux/drivers/media/video/tda9887.c +++ b/linux/drivers/media/video/tda9887.c @@ -120,8 +120,8 @@ struct tvnorm { static struct tvnorm tvnorms[] = { { - .std = V4L2_STD_PAL_BG | V4L2_STD_PAL_H | V4L2_STD_PAL_N | V4L2_STD_PAL_60, - .name = "PAL-BGHN60", + .std = V4L2_STD_PAL_BG | V4L2_STD_PAL_H | V4L2_STD_PAL_N, + .name = "PAL-BGHN", .b = ( cNegativeFmTV | cQSS ), .c = ( cDeemphasisON | |