From 5393db43f46e3228e4f84dd47050aeadaee23c0b Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Sun, 14 Mar 2010 10:16:46 -0300 Subject: V4L/DVB: cx25840: support new vbi ops to set/get VBI format Also removed the bogus zeroing of fmt.sliced when setting up raw VBI. Switching between raw and sliced VBI changed in 2.6.28 and this memset should have been removed at that time. It was never noticed because the bridge driver will fill in the fmt.vbi values anyway. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/cx25840/cx25840-core.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'drivers/media/video/cx25840/cx25840-core.c') diff --git a/drivers/media/video/cx25840/cx25840-core.c b/drivers/media/video/cx25840/cx25840-core.c index a0f6f82993b..a20df8c184e 100644 --- a/drivers/media/video/cx25840/cx25840-core.c +++ b/drivers/media/video/cx25840/cx25840-core.c @@ -1018,7 +1018,7 @@ static int cx25840_g_fmt(struct v4l2_subdev *sd, struct v4l2_format *fmt) { switch (fmt->type) { case V4L2_BUF_TYPE_SLICED_VBI_CAPTURE: - return cx25840_vbi_g_fmt(sd, fmt); + return cx25840_g_sliced_fmt(sd, &fmt->fmt.sliced); default: return -EINVAL; } @@ -1080,10 +1080,10 @@ static int cx25840_s_fmt(struct v4l2_subdev *sd, struct v4l2_format *fmt) break; case V4L2_BUF_TYPE_SLICED_VBI_CAPTURE: - return cx25840_vbi_s_fmt(sd, fmt); + return cx25840_s_sliced_fmt(sd, &fmt->fmt.sliced); case V4L2_BUF_TYPE_VBI_CAPTURE: - return cx25840_vbi_s_fmt(sd, fmt); + return cx25840_s_raw_fmt(sd, &fmt->fmt.vbi); default: return -EINVAL; @@ -1640,6 +1640,9 @@ static const struct v4l2_subdev_video_ops cx25840_video_ops = { static const struct v4l2_subdev_vbi_ops cx25840_vbi_ops = { .decode_vbi_line = cx25840_decode_vbi_line, + .s_raw_fmt = cx25840_s_raw_fmt, + .s_sliced_fmt = cx25840_s_sliced_fmt, + .g_sliced_fmt = cx25840_g_sliced_fmt, }; static const struct v4l2_subdev_ops cx25840_ops = { -- cgit v1.2.2