aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx25840/cx25840-core.c
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2010-03-14 09:16:46 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-05-19 11:58:47 -0400
commit5393db43f46e3228e4f84dd47050aeadaee23c0b (patch)
tree3d4a0e078d32184f846560e8cfc8596d76da69c8 /drivers/media/video/cx25840/cx25840-core.c
parent63d8adccecd404badcdbbf892765995fd028b3d0 (diff)
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 <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/cx25840/cx25840-core.c')
-rw-r--r--drivers/media/video/cx25840/cx25840-core.c9
1 files changed, 6 insertions, 3 deletions
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)
1018{ 1018{
1019 switch (fmt->type) { 1019 switch (fmt->type) {
1020 case V4L2_BUF_TYPE_SLICED_VBI_CAPTURE: 1020 case V4L2_BUF_TYPE_SLICED_VBI_CAPTURE:
1021 return cx25840_vbi_g_fmt(sd, fmt); 1021 return cx25840_g_sliced_fmt(sd, &fmt->fmt.sliced);
1022 default: 1022 default:
1023 return -EINVAL; 1023 return -EINVAL;
1024 } 1024 }
@@ -1080,10 +1080,10 @@ static int cx25840_s_fmt(struct v4l2_subdev *sd, struct v4l2_format *fmt)
1080 break; 1080 break;
1081 1081
1082 case V4L2_BUF_TYPE_SLICED_VBI_CAPTURE: 1082 case V4L2_BUF_TYPE_SLICED_VBI_CAPTURE:
1083 return cx25840_vbi_s_fmt(sd, fmt); 1083 return cx25840_s_sliced_fmt(sd, &fmt->fmt.sliced);
1084 1084
1085 case V4L2_BUF_TYPE_VBI_CAPTURE: 1085 case V4L2_BUF_TYPE_VBI_CAPTURE:
1086 return cx25840_vbi_s_fmt(sd, fmt); 1086 return cx25840_s_raw_fmt(sd, &fmt->fmt.vbi);
1087 1087
1088 default: 1088 default:
1089 return -EINVAL; 1089 return -EINVAL;
@@ -1640,6 +1640,9 @@ static const struct v4l2_subdev_video_ops cx25840_video_ops = {
1640 1640
1641static const struct v4l2_subdev_vbi_ops cx25840_vbi_ops = { 1641static const struct v4l2_subdev_vbi_ops cx25840_vbi_ops = {
1642 .decode_vbi_line = cx25840_decode_vbi_line, 1642 .decode_vbi_line = cx25840_decode_vbi_line,
1643 .s_raw_fmt = cx25840_s_raw_fmt,
1644 .s_sliced_fmt = cx25840_s_sliced_fmt,
1645 .g_sliced_fmt = cx25840_g_sliced_fmt,
1643}; 1646};
1644 1647
1645static const struct v4l2_subdev_ops cx25840_ops = { 1648static const struct v4l2_subdev_ops cx25840_ops = {