summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/cx88
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2006-12-15 17:46:53 -0200
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-12-15 17:46:53 -0200
commitd0f2036ec4877863739bed422ec66a985e443956 (patch)
tree380e64dd71ec95311411a8512a7487d118202f1b /linux/drivers/media/video/cx88
parent2bf10f4704af48d1f3b0d403ef9dc13114a8afca (diff)
downloadmediapointer-dvb-s2-d0f2036ec4877863739bed422ec66a985e443956.tar.gz
mediapointer-dvb-s2-d0f2036ec4877863739bed422ec66a985e443956.tar.bz2
usbvision memory fixes
From: Thierry MERLE <thierry.merle@free.fr> - fix decompression buffer allocation not done at first driver open - simplification of USB sbuf allocation (use of usb_buffer_alloc) - replaced vmalloc by vmalloc_32 (for homogeneity) - add of saa7111 (i2cAddr=0x48) detection printout in attach_inform Signed-off-by: Thierry MERLE <thierry.merle@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux/drivers/media/video/cx88')
-rw-r--r--linux/drivers/media/video/cx88/cx88-core.c25
1 files changed, 15 insertions, 10 deletions
diff --git a/linux/drivers/media/video/cx88/cx88-core.c b/linux/drivers/media/video/cx88/cx88-core.c
index c2e6df733..00080018a 100644
--- a/linux/drivers/media/video/cx88/cx88-core.c
+++ b/linux/drivers/media/video/cx88/cx88-core.c
@@ -688,24 +688,29 @@ static unsigned int inline norm_vdelay(struct cx88_tvnorm *norm)
static unsigned int inline norm_fsc8(struct cx88_tvnorm *norm)
{
- static const unsigned int ntsc = 28636360;
- static const unsigned int pal = 35468950;
- static const unsigned int palm = 28604892;
-
if (norm->id & V4L2_STD_PAL_M)
- return palm;
+ 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
- return (norm->id & V4L2_STD_625_50) ? pal : ntsc;
+ /* SECAM have also different sub carrier for chroma. Maybe their
+ freqs should also be here to improve video quality */
+
+ return 35468950; // 4.43361875 MHz
}
static unsigned int inline norm_htotal(struct cx88_tvnorm *norm)
{
- /* Should always be Line Draw Time / (4*FSC) */
- if (norm->id & V4L2_STD_PAL_M)
- return 909;
+ unsigned int fsc4=norm_fsc8(norm)/2;
- return (norm->id & V4L2_STD_625_50) ? 1135 : 910;
+ /* returns 4*FSC / frames per seconds / vtotal */
+ return (norm->id & V4L2_STD_625_50) ? fsc4/25/625 : fsc4*30000/1001/525;
}
static unsigned int inline norm_vbipack(struct cx88_tvnorm *norm)