[media] v4l: Add subdev sensor g_skip_frames operation
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Tue, 16 Nov 2010 04:21:06 +0000 (01:21 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Tue, 22 Mar 2011 07:53:34 +0000 (04:53 -0300)
Some buggy sensors generate corrupt frames when the stream is started.
This new operation return the number of corrupt frames to skip when
starting the stream.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
include/media/v4l2-subdev.h

index edeaf39..1562c4f 100644 (file)
@@ -341,9 +341,13 @@ struct v4l2_subdev_vbi_ops {
  *                   This is needed for some sensors, which always corrupt
  *                   several top lines of the output image, or which send their
  *                   metadata in them.
+ * @g_skip_frames: number of frames to skip at stream start. This is needed for
+ *                buggy sensors that generate faulty frames when they are
+ *                turned on.
  */
 struct v4l2_subdev_sensor_ops {
        int (*g_skip_top_lines)(struct v4l2_subdev *sd, u32 *lines);
+       int (*g_skip_frames)(struct v4l2_subdev *sd, u32 *frames);
 };
 
 /*