aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/usb/uvc/uvc_queue.c
diff options
context:
space:
mode:
authorKamil Debski <k.debski@samsung.com>2013-01-25 04:29:57 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2013-03-05 12:53:05 -0500
commit6aa69f99b2ecc7f9b387fcf22d30e6601b58819f (patch)
tree4cfb60434345720acec8f88a754ffe7f6bf86176 /drivers/media/usb/uvc/uvc_queue.c
parent53bf0f446bc387eabdd535dca080789cc74607f4 (diff)
[media] vb2: Add support for non monotonic timestamps
Not all drivers use monotonic timestamps. This patch adds a way to set the timestamp type per every queue. In addition, set proper timestamp type in drivers that I am sure that use either MONOTONIC or COPY timestamps. Other drivers will correctly report UNKNOWN timestamp type instead of assuming that all drivers use monotonic timestamps. Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/usb/uvc/uvc_queue.c')
-rw-r--r--drivers/media/usb/uvc/uvc_queue.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/media/usb/uvc/uvc_queue.c b/drivers/media/usb/uvc/uvc_queue.c
index 6c233a54ce40..cd962be860ca 100644
--- a/drivers/media/usb/uvc/uvc_queue.c
+++ b/drivers/media/usb/uvc/uvc_queue.c
@@ -149,6 +149,7 @@ int uvc_queue_init(struct uvc_video_queue *queue, enum v4l2_buf_type type,
149 queue->queue.buf_struct_size = sizeof(struct uvc_buffer); 149 queue->queue.buf_struct_size = sizeof(struct uvc_buffer);
150 queue->queue.ops = &uvc_queue_qops; 150 queue->queue.ops = &uvc_queue_qops;
151 queue->queue.mem_ops = &vb2_vmalloc_memops; 151 queue->queue.mem_ops = &vb2_vmalloc_memops;
152 queue->queue.timestamp_type = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC;
152 ret = vb2_queue_init(&queue->queue); 153 ret = vb2_queue_init(&queue->queue);
153 if (ret) 154 if (ret)
154 return ret; 155 return ret;