aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/usb/pwc
diff options
context:
space:
mode:
authorKamil Debski <[email protected]>2013-01-25 09:29:57 +0000
committerMauro Carvalho Chehab <[email protected]>2013-03-05 17:53:05 +0000
commit6aa69f99b2ecc7f9b387fcf22d30e6601b58819f (patch)
tree4cfb60434345720acec8f88a754ffe7f6bf86176 /drivers/media/usb/pwc
parent[media] v4l: Define video buffer flag for the COPY timestamp type (diff)
downloadkernel-6aa69f99b2ecc7f9b387fcf22d30e6601b58819f.tar.gz
kernel-6aa69f99b2ecc7f9b387fcf22d30e6601b58819f.zip
[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 <[email protected]> Signed-off-by: Kyungmin Park <[email protected]> Reviewed-by: Sylwester Nawrocki <[email protected]> Acked-by: Hans Verkuil <[email protected]> Signed-off-by: Sylwester Nawrocki <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Diffstat (limited to 'drivers/media/usb/pwc')
-rw-r--r--drivers/media/usb/pwc/pwc-if.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/media/usb/pwc/pwc-if.c b/drivers/media/usb/pwc/pwc-if.c
index 5ec15cb1ed26..77bbf7889659 100644
--- a/drivers/media/usb/pwc/pwc-if.c
+++ b/drivers/media/usb/pwc/pwc-if.c
@@ -1001,6 +1001,7 @@ static int usb_pwc_probe(struct usb_interface *intf, const struct usb_device_id
pdev->vb_queue.buf_struct_size = sizeof(struct pwc_frame_buf);
pdev->vb_queue.ops = &pwc_vb_queue_ops;
pdev->vb_queue.mem_ops = &vb2_vmalloc_memops;
+ pdev->vb_queue.timestamp_type = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC;
rc = vb2_queue_init(&pdev->vb_queue);
if (rc < 0) {
PWC_ERROR("Oops, could not initialize vb2 queue.\n");