Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

V4L/DVB (5576): Improve / fix support for PAL-60 in cx25840

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>

authored by

Servaas Vandenberghe and committed by
Mauro Carvalho Chehab
ba70d59b 5c808e64

+2 -2
+2 -2
drivers/media/video/cx25840/cx25840-core.c
··· 555 555 { 556 556 struct v4l2_pix_format *pix; 557 557 int HSC, VSC, Vsrc, Hsrc, filter, Vlines; 558 - int is_pal = !(cx25840_get_v4lstd(client) & V4L2_STD_NTSC); 558 + int is_50Hz = !(cx25840_get_v4lstd(client) & V4L2_STD_525_60); 559 559 560 560 switch (fmt->type) { 561 561 case V4L2_BUF_TYPE_VIDEO_CAPTURE: ··· 567 567 Hsrc = (cx25840_read(client, 0x472) & 0x3f) << 4; 568 568 Hsrc |= (cx25840_read(client, 0x471) & 0xf0) >> 4; 569 569 570 - Vlines = pix->height + (is_pal ? 4 : 7); 570 + Vlines = pix->height + (is_50Hz ? 4 : 7); 571 571 572 572 if ((pix->width * 16 < Hsrc) || (Hsrc < pix->width) || 573 573 (Vlines * 8 < Vsrc) || (Vsrc < Vlines)) {