aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorDevin Heitmueller <dheitmueller@hauppauge.com>2010-07-08 12:12:47 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-10-20 23:17:18 -0400
commitadc0356e9ba59b9b014a58c9e117b10c9ce522d9 (patch)
treecc46f8592970fc817ac4b7372c5f7d3ca373fee1 /drivers/media
parentdd067a8de79fcc75b3fbd84aba398c9296b47cb2 (diff)
[media] cx231xx: Fix VBI parameters for sampling rate and offset
The VBI sampling rate and offset were incorrectly specified, which resulted in CC data not being rendered under zvbi or tvtime. Set the fields correctly. Signed-off-by: Devin Heitmueller <dheitmueller@hauppauge.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/video/cx231xx/cx231xx-video.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/media/video/cx231xx/cx231xx-video.c b/drivers/media/video/cx231xx/cx231xx-video.c
index 9a42ccbcb46f..585c0316a48c 100644
--- a/drivers/media/video/cx231xx/cx231xx-video.c
+++ b/drivers/media/video/cx231xx/cx231xx-video.c
@@ -2020,12 +2020,10 @@ static int vidioc_g_fmt_vbi_cap(struct file *file, void *priv,
2020{ 2020{
2021 struct cx231xx_fh *fh = priv; 2021 struct cx231xx_fh *fh = priv;
2022 struct cx231xx *dev = fh->dev; 2022 struct cx231xx *dev = fh->dev;
2023 2023 f->fmt.vbi.sampling_rate = 6750000 * 4;
2024 f->fmt.vbi.sampling_rate = (dev->norm & V4L2_STD_625_50) ?
2025 35468950 : 28636363;
2026 f->fmt.vbi.samples_per_line = VBI_LINE_LENGTH; 2024 f->fmt.vbi.samples_per_line = VBI_LINE_LENGTH;
2027 f->fmt.vbi.sample_format = V4L2_PIX_FMT_GREY; 2025 f->fmt.vbi.sample_format = V4L2_PIX_FMT_GREY;
2028 f->fmt.vbi.offset = 64 * 4; 2026 f->fmt.vbi.offset = 0;
2029 f->fmt.vbi.start[0] = (dev->norm & V4L2_STD_625_50) ? 2027 f->fmt.vbi.start[0] = (dev->norm & V4L2_STD_625_50) ?
2030 PAL_VBI_START_LINE : NTSC_VBI_START_LINE; 2028 PAL_VBI_START_LINE : NTSC_VBI_START_LINE;
2031 f->fmt.vbi.count[0] = (dev->norm & V4L2_STD_625_50) ? 2029 f->fmt.vbi.count[0] = (dev->norm & V4L2_STD_625_50) ?
@@ -2050,11 +2048,10 @@ static int vidioc_try_fmt_vbi_cap(struct file *file, void *priv,
2050 } 2048 }
2051 2049
2052 f->type = V4L2_BUF_TYPE_VBI_CAPTURE; 2050 f->type = V4L2_BUF_TYPE_VBI_CAPTURE;
2053 f->fmt.vbi.sampling_rate = (dev->norm & V4L2_STD_625_50) ? 2051 f->fmt.vbi.sampling_rate = 6750000 * 4;
2054 35468950 : 28636363;
2055 f->fmt.vbi.samples_per_line = VBI_LINE_LENGTH; 2052 f->fmt.vbi.samples_per_line = VBI_LINE_LENGTH;
2056 f->fmt.vbi.sample_format = V4L2_PIX_FMT_GREY; 2053 f->fmt.vbi.sample_format = V4L2_PIX_FMT_GREY;
2057 f->fmt.vbi.offset = 244; 2054 f->fmt.vbi.offset = 0;
2058 f->fmt.vbi.flags = 0; 2055 f->fmt.vbi.flags = 0;
2059 f->fmt.vbi.start[0] = (dev->norm & V4L2_STD_625_50) ? 2056 f->fmt.vbi.start[0] = (dev->norm & V4L2_STD_625_50) ?
2060 PAL_VBI_START_LINE : NTSC_VBI_START_LINE; 2057 PAL_VBI_START_LINE : NTSC_VBI_START_LINE;