aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/saa7115.c
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2008-10-04 07:05:30 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-10-13 07:08:01 -0400
commita8b864354e060dda1000e62d1fea7c1274581caf (patch)
tree7b1e70dc49c1605a7cdad6b460ea9f602a24b161 /drivers/media/video/saa7115.c
parent3c7b933bea2ee380d54b57b99dee42b1726a4eaa (diff)
V4L/DVB (9162): ivtv: fix raw/sliced VBI mixup
The service_set field was used in saa7115 and cx25840 to determine whether raw or sliced VBI was desired. This is incorrect since it is perfectly valid to select sliced VBI with a service_set of 0. Instead these drivers should checked on VIDIOC_S_FMT whether the type field matches the raw or sliced VBI type. Updated ivtv accordingly. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/saa7115.c')
-rw-r--r--drivers/media/video/saa7115.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/media/video/saa7115.c b/drivers/media/video/saa7115.c
index 4ed7d65dd634..c8e9cb3db30a 100644
--- a/drivers/media/video/saa7115.c
+++ b/drivers/media/video/saa7115.c
@@ -1057,7 +1057,7 @@ static void saa711x_set_lcr(struct i2c_client *client, struct v4l2_sliced_vbi_fo
1057 for (i = 0; i <= 23; i++) 1057 for (i = 0; i <= 23; i++)
1058 lcr[i] = 0xff; 1058 lcr[i] = 0xff;
1059 1059
1060 if (fmt->service_set == 0) { 1060 if (fmt == NULL) {
1061 /* raw VBI */ 1061 /* raw VBI */
1062 if (is_50hz) 1062 if (is_50hz)
1063 for (i = 6; i <= 23; i++) 1063 for (i = 6; i <= 23; i++)
@@ -1113,7 +1113,7 @@ static void saa711x_set_lcr(struct i2c_client *client, struct v4l2_sliced_vbi_fo
1113 } 1113 }
1114 1114
1115 /* enable/disable raw VBI capturing */ 1115 /* enable/disable raw VBI capturing */
1116 saa711x_writeregs(client, fmt->service_set == 0 ? 1116 saa711x_writeregs(client, fmt == NULL ?
1117 saa7115_cfg_vbi_on : 1117 saa7115_cfg_vbi_on :
1118 saa7115_cfg_vbi_off); 1118 saa7115_cfg_vbi_off);
1119} 1119}
@@ -1153,6 +1153,10 @@ static int saa711x_set_v4lfmt(struct i2c_client *client, struct v4l2_format *fmt
1153 saa711x_set_lcr(client, &fmt->fmt.sliced); 1153 saa711x_set_lcr(client, &fmt->fmt.sliced);
1154 return 0; 1154 return 0;
1155 } 1155 }
1156 if (fmt->type == V4L2_BUF_TYPE_VBI_CAPTURE) {
1157 saa711x_set_lcr(client, NULL);
1158 return 0;
1159 }
1156 if (fmt->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) 1160 if (fmt->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
1157 return -EINVAL; 1161 return -EINVAL;
1158 1162