]> pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
V4L/DVB (5576): Improve / fix support for PAL-60 in cx25840
authorServaas Vandenberghe <vdb128@picaros.org>
Sun, 29 Apr 2007 19:27:30 +0000 (16:27 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Wed, 9 May 2007 13:12:34 +0000 (10:12 -0300)
This causes the cx25840 module to treat V4L2_STD_PAL_60 similar to
other 60Hz timings, and it fixes a wrongly-named variable (timings are
independant of color system).

Acked-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
drivers/media/video/cx25840/cx25840-core.c

index 1757a588970fc242717128f707765029a9862eac..67bda9f9a44bfa48998de9f3566ef57da7222ded 100644 (file)
@@ -555,7 +555,7 @@ static int set_v4lfmt(struct i2c_client *client, struct v4l2_format *fmt)
 {
        struct v4l2_pix_format *pix;
        int HSC, VSC, Vsrc, Hsrc, filter, Vlines;
-       int is_pal = !(cx25840_get_v4lstd(client) & V4L2_STD_NTSC);
+       int is_50Hz = !(cx25840_get_v4lstd(client) & V4L2_STD_525_60);
 
        switch (fmt->type) {
        case V4L2_BUF_TYPE_VIDEO_CAPTURE:
@@ -567,7 +567,7 @@ static int set_v4lfmt(struct i2c_client *client, struct v4l2_format *fmt)
                Hsrc = (cx25840_read(client, 0x472) & 0x3f) << 4;
                Hsrc |= (cx25840_read(client, 0x471) & 0xf0) >> 4;
 
-               Vlines = pix->height + (is_pal ? 4 : 7);
+               Vlines = pix->height + (is_50Hz ? 4 : 7);
 
                if ((pix->width * 16 < Hsrc) || (Hsrc < pix->width) ||
                    (Vlines * 8 < Vsrc) || (Vsrc < Vlines)) {