From: Sakari Ailus Date: Mon, 10 Feb 2014 22:26:44 +0000 (-0300) Subject: upstream: [media] uvcvideo: Tell the user space we're using start-of-exposure timestamps X-Git-Tag: submit/tizen/20141121.110247~950 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d57d4a03588b7010e5a813770ff197f493bd7f08;p=platform%2Fkernel%2Flinux-3.10.git upstream: [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 Acked-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/usb/uvc/uvc_queue.c b/drivers/media/usb/uvc/uvc_queue.c index 39df7f9..ef1619a 100644 --- a/drivers/media/usb/uvc/uvc_queue.c +++ b/drivers/media/usb/uvc/uvc_queue.c @@ -146,7 +146,8 @@ int uvc_queue_init(struct uvc_video_queue *queue, enum v4l2_buf_type type, queue->queue.buf_struct_size = sizeof(struct uvc_buffer); queue->queue.ops = &uvc_queue_qops; queue->queue.mem_ops = &vb2_vmalloc_memops; - queue->queue.timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC; + queue->queue.timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC + | V4L2_BUF_FLAG_TSTAMP_SRC_SOE; ret = vb2_queue_init(&queue->queue); if (ret) return ret;