aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/em28xx/em28xx-video.c
diff options
context:
space:
mode:
authorDevin Heitmueller <dheitmueller@kernellabs.com>2009-09-10 23:40:18 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-09-18 22:47:45 -0400
commit19bf00384a6d5bbe5d7b8afbcc25772e3675d423 (patch)
tree96795db5dccfb329e53b4e3e33fe2f81fe7fed57 /drivers/media/video/em28xx/em28xx-video.c
parent0414614aab32d84da2bb092eb83b5e456946022d (diff)
V4L/DVB (12748): em28xx: implement g_std v4l call
We need to implement the g_std call, or else the default norm always gets returned, which breaks VBI capturing if you had changed the standard to NTSC using s_std. I had temporarily changed the default norm to NTSC so that zvbi-ntsc-cc wouldn't choke, so now that we are returning the correct value, switch it back to PAL as the default. This work was sponsored by EyeMagnet Limited. Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/em28xx/em28xx-video.c')
-rw-r--r--drivers/media/video/em28xx/em28xx-video.c21
1 files changed, 18 insertions, 3 deletions
diff --git a/drivers/media/video/em28xx/em28xx-video.c b/drivers/media/video/em28xx/em28xx-video.c
index 8955b7b5365f..486db84092e3 100644
--- a/drivers/media/video/em28xx/em28xx-video.c
+++ b/drivers/media/video/em28xx/em28xx-video.c
@@ -1140,6 +1140,22 @@ out:
1140 return rc; 1140 return rc;
1141} 1141}
1142 1142
1143static int vidioc_g_std(struct file *file, void *priv, v4l2_std_id *norm)
1144{
1145 struct em28xx_fh *fh = priv;
1146 struct em28xx *dev = fh->dev;
1147 struct v4l2_format f;
1148 int rc;
1149
1150 rc = check_dev(dev);
1151 if (rc < 0)
1152 return rc;
1153
1154 *norm = dev->norm;
1155
1156 return 0;
1157}
1158
1143static int vidioc_s_std(struct file *file, void *priv, v4l2_std_id *norm) 1159static int vidioc_s_std(struct file *file, void *priv, v4l2_std_id *norm)
1144{ 1160{
1145 struct em28xx_fh *fh = priv; 1161 struct em28xx_fh *fh = priv;
@@ -2354,6 +2370,7 @@ static const struct v4l2_ioctl_ops video_ioctl_ops = {
2354 .vidioc_querybuf = vidioc_querybuf, 2370 .vidioc_querybuf = vidioc_querybuf,
2355 .vidioc_qbuf = vidioc_qbuf, 2371 .vidioc_qbuf = vidioc_qbuf,
2356 .vidioc_dqbuf = vidioc_dqbuf, 2372 .vidioc_dqbuf = vidioc_dqbuf,
2373 .vidioc_g_std = vidioc_g_std,
2357 .vidioc_s_std = vidioc_s_std, 2374 .vidioc_s_std = vidioc_s_std,
2358 .vidioc_g_parm = vidioc_g_parm, 2375 .vidioc_g_parm = vidioc_g_parm,
2359 .vidioc_s_parm = vidioc_s_parm, 2376 .vidioc_s_parm = vidioc_s_parm,
@@ -2387,9 +2404,7 @@ static const struct video_device em28xx_video_template = {
2387 .minor = -1, 2404 .minor = -1,
2388 2405
2389 .tvnorms = V4L2_STD_ALL, 2406 .tvnorms = V4L2_STD_ALL,
2390 /* FIXME: we need this to be NTSC for VBI to work - it should 2407 .current_norm = V4L2_STD_PAL,
2391 be moved to a per-board definition */
2392 .current_norm = V4L2_STD_NTSC,
2393}; 2408};
2394 2409
2395static const struct v4l2_file_operations radio_fops = { 2410static const struct v4l2_file_operations radio_fops = {