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 <[email protected]>

--- 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,

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to