aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/common/saa7146_fops.c
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2012-05-01 10:28:20 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-05-14 13:58:39 -0400
commitfca3469aa844e2ae993445aa5f41397003199be7 (patch)
tree84484f23df213f2c2ff147536639f6f43106e06c /drivers/media/common/saa7146_fops.c
parentfd74d6eb4c2c1caa18208df32d9d38b5fe9738fc (diff)
[media] saa7146: move vbi fields from saa7146_fh to saa7146_vv
This fields are global and don't belong in a fh struct. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/common/saa7146_fops.c')
-rw-r--r--drivers/media/common/saa7146_fops.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/media/common/saa7146_fops.c b/drivers/media/common/saa7146_fops.c
index b8d0d7df5d67..776dfc35be57 100644
--- a/drivers/media/common/saa7146_fops.c
+++ b/drivers/media/common/saa7146_fops.c
@@ -437,6 +437,7 @@ int saa7146_vv_init(struct saa7146_dev* dev, struct saa7146_ext_vv *ext_vv)
437{ 437{
438 struct v4l2_ctrl_handler *hdl = &dev->ctrl_handler; 438 struct v4l2_ctrl_handler *hdl = &dev->ctrl_handler;
439 struct v4l2_pix_format *fmt; 439 struct v4l2_pix_format *fmt;
440 struct v4l2_vbi_format *vbi;
440 struct saa7146_vv *vv; 441 struct saa7146_vv *vv;
441 int err; 442 int err;
442 443
@@ -514,6 +515,20 @@ int saa7146_vv_init(struct saa7146_dev* dev, struct saa7146_ext_vv *ext_vv)
514 fmt->bytesperline = 3 * fmt->width; 515 fmt->bytesperline = 3 * fmt->width;
515 fmt->sizeimage = fmt->bytesperline * fmt->height; 516 fmt->sizeimage = fmt->bytesperline * fmt->height;
516 517
518 vbi = &vv->vbi_fmt;
519 vbi->sampling_rate = 27000000;
520 vbi->offset = 248; /* todo */
521 vbi->samples_per_line = 720 * 2;
522 vbi->sample_format = V4L2_PIX_FMT_GREY;
523
524 /* fixme: this only works for PAL */
525 vbi->start[0] = 5;
526 vbi->count[0] = 16;
527 vbi->start[1] = 312;
528 vbi->count[1] = 16;
529
530 init_timer(&vv->vbi_read_timeout);
531
517 vv->ov_fb.capability = V4L2_FBUF_CAP_LIST_CLIPPING; 532 vv->ov_fb.capability = V4L2_FBUF_CAP_LIST_CLIPPING;
518 vv->ov_fb.flags = V4L2_FBUF_FLAG_PRIMARY; 533 vv->ov_fb.flags = V4L2_FBUF_FLAG_PRIMARY;
519 dev->vv_data = vv; 534 dev->vv_data = vv;