All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] gspca: add g_std/s_std methods
@ 2009-08-09 20:13 Olaf Titz
  2009-08-11 17:42 ` Jean-Francois Moine
  0 siblings, 1 reply; 3+ messages in thread
From: Olaf Titz @ 2009-08-09 20:13 UTC (permalink / raw)
  To: moinejf; +Cc: linux-media

Some applications are unhappy about getting EINVAL errors for query/set
TV standard operations, especially (or only?) when working over the
v4l1compat.so bridge. This patch adds the appropriate methods to the
gspca driver (claim to support all TV modes, setting TV mode does nothing).

Signed-off-by: Olaf Titz <olaf@bigred.inka.de>

--- a/linux/drivers/media/video/gspca/gspca.c   Sat Aug 08 03:28:41 2009
-0300
+++ b/linux/drivers/media/video/gspca/gspca.c   Sun Aug 09 22:00:03 2009
+0200
@@ -1249,6 +1249,7 @@
        if (input->index != 0)
                return -EINVAL;
        input->type = V4L2_INPUT_TYPE_CAMERA;
+       input->std = V4L2_STD_ALL;
        input->status = gspca_dev->cam.input_flags;
        strncpy(input->name, gspca_dev->sd_desc->name,
                sizeof input->name);
@@ -1624,6 +1625,17 @@
        return ret;
 }

+static int vidioc_g_std(struct file *file, void *priv, v4l2_std_id *norm)
+{
+       *norm = V4L2_STD_UNKNOWN;
+       return 0;
+}
+
+static int vidioc_s_std(struct file *file, void *priv, v4l2_std_id *norm)
+{
+       return 0;
+}
+
 /*
  * wait for a video frame
  *
@@ -1958,6 +1970,8 @@
        .vidioc_s_fmt_vid_cap   = vidioc_s_fmt_vid_cap,
        .vidioc_streamon        = vidioc_streamon,
        .vidioc_queryctrl       = vidioc_queryctrl,
+       .vidioc_g_std           = vidioc_g_std,
+       .vidioc_s_std           = vidioc_s_std,
        .vidioc_g_ctrl          = vidioc_g_ctrl,
        .vidioc_s_ctrl          = vidioc_s_ctrl,
        .vidioc_g_audio         = vidioc_g_audio,


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-08-11 18:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-09 20:13 [PATCH] gspca: add g_std/s_std methods Olaf Titz
2009-08-11 17:42 ` Jean-Francois Moine
2009-08-11 18:41   ` Olaf Titz

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.