Linux Media Controller development
 help / color / mirror / Atom feed
* [PATCH] em28xx: set the timestamp type for video and vbi vb2_queues
@ 2013-03-09 10:53 Frank Schäfer
  2013-03-09 11:05 ` Hans Verkuil
  0 siblings, 1 reply; 2+ messages in thread
From: Frank Schäfer @ 2013-03-09 10:53 UTC (permalink / raw)
  To: mchehab; +Cc: linux-media, Frank Schäfer

The em28xx driver obtains the timestamps using function v4l2_get_timestamp(),
which produces a montonic timestamp.

Fixes the warnings appearing in the system log since commit 6aa69f99
"[media] vb2: Add support for non monotonic timestamps"

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
---
 drivers/media/usb/em28xx/em28xx-video.c |    2 ++
 1 Datei geändert, 2 Zeilen hinzugefügt(+)

diff --git a/drivers/media/usb/em28xx/em28xx-video.c b/drivers/media/usb/em28xx/em28xx-video.c
index 93fc620..d585c19 100644
--- a/drivers/media/usb/em28xx/em28xx-video.c
+++ b/drivers/media/usb/em28xx/em28xx-video.c
@@ -700,6 +700,7 @@ int em28xx_vb2_setup(struct em28xx *dev)
 	q = &dev->vb_vidq;
 	q->type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
 	q->io_modes = VB2_READ | VB2_MMAP | VB2_USERPTR | VB2_DMABUF;
+	q->timestamp_type = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC;
 	q->drv_priv = dev;
 	q->buf_struct_size = sizeof(struct em28xx_buffer);
 	q->ops = &em28xx_video_qops;
@@ -713,6 +714,7 @@ int em28xx_vb2_setup(struct em28xx *dev)
 	q = &dev->vb_vbiq;
 	q->type = V4L2_BUF_TYPE_VBI_CAPTURE;
 	q->io_modes = VB2_READ | VB2_MMAP | VB2_USERPTR;
+	q->timestamp_type = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC;
 	q->drv_priv = dev;
 	q->buf_struct_size = sizeof(struct em28xx_buffer);
 	q->ops = &em28xx_vbi_qops;
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] em28xx: set the timestamp type for video and vbi vb2_queues
  2013-03-09 10:53 [PATCH] em28xx: set the timestamp type for video and vbi vb2_queues Frank Schäfer
@ 2013-03-09 11:05 ` Hans Verkuil
  0 siblings, 0 replies; 2+ messages in thread
From: Hans Verkuil @ 2013-03-09 11:05 UTC (permalink / raw)
  To: Frank Schäfer; +Cc: mchehab, linux-media

On Sat March 9 2013 11:53:01 Frank Schäfer wrote:
> The em28xx driver obtains the timestamps using function v4l2_get_timestamp(),
> which produces a montonic timestamp.
> 
> Fixes the warnings appearing in the system log since commit 6aa69f99
> "[media] vb2: Add support for non monotonic timestamps"
> 
> Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>

Acked-by: Hans Verkuil <hans.verkuil@cisco.com>

Regards,

	Hans

> ---
>  drivers/media/usb/em28xx/em28xx-video.c |    2 ++
>  1 Datei geändert, 2 Zeilen hinzugefügt(+)
> 
> diff --git a/drivers/media/usb/em28xx/em28xx-video.c b/drivers/media/usb/em28xx/em28xx-video.c
> index 93fc620..d585c19 100644
> --- a/drivers/media/usb/em28xx/em28xx-video.c
> +++ b/drivers/media/usb/em28xx/em28xx-video.c
> @@ -700,6 +700,7 @@ int em28xx_vb2_setup(struct em28xx *dev)
>  	q = &dev->vb_vidq;
>  	q->type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
>  	q->io_modes = VB2_READ | VB2_MMAP | VB2_USERPTR | VB2_DMABUF;
> +	q->timestamp_type = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC;
>  	q->drv_priv = dev;
>  	q->buf_struct_size = sizeof(struct em28xx_buffer);
>  	q->ops = &em28xx_video_qops;
> @@ -713,6 +714,7 @@ int em28xx_vb2_setup(struct em28xx *dev)
>  	q = &dev->vb_vbiq;
>  	q->type = V4L2_BUF_TYPE_VBI_CAPTURE;
>  	q->io_modes = VB2_READ | VB2_MMAP | VB2_USERPTR;
> +	q->timestamp_type = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC;
>  	q->drv_priv = dev;
>  	q->buf_struct_size = sizeof(struct em28xx_buffer);
>  	q->ops = &em28xx_vbi_qops;
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-03-09 11:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-09 10:53 [PATCH] em28xx: set the timestamp type for video and vbi vb2_queues Frank Schäfer
2013-03-09 11:05 ` Hans Verkuil

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox