diff options
author | Devin Heitmueller <dheitmueller@kernellabs.com> | 2009-09-10 23:40:18 -0400 |
---|---|---|
committer | Devin Heitmueller <dheitmueller@kernellabs.com> | 2009-09-10 23:40:18 -0400 |
commit | 2726f365e349962c9a313686a5c0f9b3989d5dbd (patch) | |
tree | fb0ab401aadf1f4a3858e0fd69933632945d4675 /linux | |
parent | 60e9021e45939ad296d3688928ddca19e0ebe65d (diff) | |
download | mediapointer-dvb-s2-2726f365e349962c9a313686a5c0f9b3989d5dbd.tar.gz mediapointer-dvb-s2-2726f365e349962c9a313686a5c0f9b3989d5dbd.tar.bz2 |
em28xx: implement g_std v4l call
From: Devin Heitmueller <dheitmueller@kernellabs.com>
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.
Priority: normal
Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Diffstat (limited to 'linux')
-rw-r--r-- | linux/drivers/media/video/em28xx/em28xx-video.c | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/linux/drivers/media/video/em28xx/em28xx-video.c b/linux/drivers/media/video/em28xx/em28xx-video.c index a4f09dff3..d00e78659 100644 --- a/linux/drivers/media/video/em28xx/em28xx-video.c +++ b/linux/drivers/media/video/em28xx/em28xx-video.c @@ -1170,6 +1170,22 @@ out: return rc; } +static int vidioc_g_std(struct file *file, void *priv, v4l2_std_id *norm) +{ + struct em28xx_fh *fh = priv; + struct em28xx *dev = fh->dev; + struct v4l2_format f; + int rc; + + rc = check_dev(dev); + if (rc < 0) + return rc; + + *norm = dev->norm; + + return 0; +} + static int vidioc_s_std(struct file *file, void *priv, v4l2_std_id *norm) { struct em28xx_fh *fh = priv; @@ -2405,6 +2421,7 @@ static const struct v4l2_ioctl_ops video_ioctl_ops = { .vidioc_querybuf = vidioc_querybuf, .vidioc_qbuf = vidioc_qbuf, .vidioc_dqbuf = vidioc_dqbuf, + .vidioc_g_std = vidioc_g_std, .vidioc_s_std = vidioc_s_std, .vidioc_g_parm = vidioc_g_parm, .vidioc_s_parm = vidioc_s_parm, @@ -2438,9 +2455,7 @@ static const struct video_device em28xx_video_template = { .minor = -1, .tvnorms = V4L2_STD_ALL, - /* FIXME: we need this to be NTSC for VBI to work - it should - be moved to a per-board definition */ - .current_norm = V4L2_STD_NTSC, + .current_norm = V4L2_STD_PAL, }; static const struct v4l2_file_operations radio_fops = { |