aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/usb/uvc/uvc_queue.c
diff options
context:
space:
mode:
authorSakari Ailus <sakari.ailus@iki.fi>2014-02-10 17:26:44 -0500
committerMauro Carvalho Chehab <m.chehab@samsung.com>2014-03-05 14:34:50 -0500
commitc767492a58fde9f23be92744c059dd3f21814ed4 (patch)
tree0a8baa3ffa9f4d17a617a0ca1d23bc53e5e63ace /drivers/media/usb/uvc/uvc_queue.c
parent7ce6fd8f186ba6bd22886f5d935088ff80a74277 (diff)
[media] uvcvideo: Tell the user space we're using start-of-exposure timestamps
The UVC device provided timestamps are taken from the clock once the exposure of the frame has begun, not when the reception of the frame would have been finished as almost anywhere else. Show this to the user space by using V4L2_BUF_FLAG_TSTAMP_SRC_SOE buffer flag. Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/media/usb/uvc/uvc_queue.c')
-rw-r--r--drivers/media/usb/uvc/uvc_queue.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/media/usb/uvc/uvc_queue.c b/drivers/media/usb/uvc/uvc_queue.c
index 7c146167b103..935556e88ca5 100644
--- a/drivers/media/usb/uvc/uvc_queue.c
+++ b/drivers/media/usb/uvc/uvc_queue.c
@@ -151,7 +151,8 @@ int uvc_queue_init(struct uvc_video_queue *queue, enum v4l2_buf_type type,
151 queue->queue.buf_struct_size = sizeof(struct uvc_buffer); 151 queue->queue.buf_struct_size = sizeof(struct uvc_buffer);
152 queue->queue.ops = &uvc_queue_qops; 152 queue->queue.ops = &uvc_queue_qops;
153 queue->queue.mem_ops = &vb2_vmalloc_memops; 153 queue->queue.mem_ops = &vb2_vmalloc_memops;
154 queue->queue.timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC; 154 queue->queue.timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC
155 | V4L2_BUF_FLAG_TSTAMP_SRC_SOE;
155 ret = vb2_queue_init(&queue->queue); 156 ret = vb2_queue_init(&queue->queue);
156 if (ret) 157 if (ret)
157 return ret; 158 return ret;