The patch number 12748 was added via Devin Heitmueller 
<dheitmuel...@kernellabs.com>
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
        Linux Media Mailing List <linux-me...@vger.kernel.org>

------

From: Devin Heitmueller  <dheitmuel...@kernellabs.com>
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.

Priority: normal

Signed-off-by: Devin Heitmueller <dheitmuel...@kernellabs.com>


---

 linux/drivers/media/video/em28xx/em28xx-video.c |   21 +++++++++++++---
 1 file changed, 18 insertions(+), 3 deletions(-)

diff -r 7ac15dcf23ec -r 6c0f2dd54f28 
linux/drivers/media/video/em28xx/em28xx-video.c
--- a/linux/drivers/media/video/em28xx/em28xx-video.c   Thu Sep 10 23:08:44 
2009 -0400
+++ b/linux/drivers/media/video/em28xx/em28xx-video.c   Thu Sep 10 23:40:18 
2009 -0400
@@ -1170,6 +1170,22 @@
        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 @@
        .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 @@
        .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 = {


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/6c0f2dd54f2850ebb504838906edebf3be8a6dc7

_______________________________________________
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to