summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2008-10-24 13:19:14 -0200
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-10-24 13:19:14 -0200
commitdfad04b41675b7df9a5bab9638af9f32e340c4d0 (patch)
tree3875d437790a6555f7a98b1e592a35e52b615561 /linux/drivers/media/video
parenta3051cccbd1392da4014779977273ee72ac0de5e (diff)
downloadmediapointer-dvb-s2-dfad04b41675b7df9a5bab9638af9f32e340c4d0.tar.gz
mediapointer-dvb-s2-dfad04b41675b7df9a5bab9638af9f32e340c4d0.tar.bz2
tvp5150: add support to enable raw vbi
From: Markus Rechberger <mrechberger@gmail.com> Priority: normal Signed-off-by: Markus Rechberger <mrechberger@sundtek.de> [mchehab@redhat.com: Fix bad whitespaces] Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'linux/drivers/media/video')
-rw-r--r--linux/drivers/media/video/tvp5150.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/linux/drivers/media/video/tvp5150.c b/linux/drivers/media/video/tvp5150.c
index 28c5c6761..ac8205d87 100644
--- a/linux/drivers/media/video/tvp5150.c
+++ b/linux/drivers/media/video/tvp5150.c
@@ -935,6 +935,21 @@ static int tvp5150_command(struct i2c_client *c,
int i;
fmt = arg;
+ /* raw vbi */
+ if (fmt->type == V4L2_BUF_TYPE_VBI_CAPTURE) {
+ /* this is for capturing 36 raw vbi lines
+ if there's a way to cut off the beginning 2 vbi lines
+ with the tvp5150 then the vbi line count could be lowered
+ to 17 lines/field again, although I couldn't find a register
+ which could do that cropping */
+ if (fmt->fmt.vbi.sample_format == V4L2_PIX_FMT_GREY)
+ tvp5150_write(c, TVP5150_LUMA_PROC_CTL_1, 0x70);
+ if (fmt->fmt.vbi.count[0] == 18 && fmt->fmt.vbi.count[1] == 18) {
+ tvp5150_write(c, TVP5150_VERT_BLANKING_START, 0x00);
+ tvp5150_write(c, TVP5150_VERT_BLANKING_STOP, 0x01);
+ }
+ break;
+ }
if (fmt->type != V4L2_BUF_TYPE_SLICED_VBI_CAPTURE)
return -EINVAL;
svbi = &fmt->fmt.sliced;