]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
[media] uvcvideo: Fix clock param realtime setting
authorOlivier Langlois <olivier@trillion01.com>
Fri, 28 Mar 2014 05:42:38 +0000 (02:42 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Fri, 23 May 2014 14:27:37 +0000 (11:27 -0300)
commit3b35fc81e7ec552147a4fd843d0da0bbbe4ef253
tree01c98705b324f770984ecfbad7870c1a4c63c63c
parentf8918ba071bbd7e3b9a3f6400d4bcfd893bc5dc9
[media] uvcvideo: Fix clock param realtime setting

timestamps in v4l2 buffers returned to userspace are updated in
uvc_video_clock_update() which uses timestamps fetched from
uvc_video_clock_decode() by calling unconditionally ktime_get_ts().

Hence setting the module clock param to realtime has no effect before
this patch.

This has been tested with ffmpeg:

ffmpeg -y -f v4l2 -input_format yuyv422 -video_size 640x480 -framerate 30 -i /dev/video0 \
 -f alsa -acodec pcm_s16le -ar 16000 -ac 1 -i default \
 -c:v libx264 -preset ultrafast \
 -c:a libfdk_aac \
 out.mkv

and inspecting the v4l2 input starting timestamp.

Cc: Stable <stable@vger.kernel.org>
Signed-off-by: Olivier Langlois <olivier@trillion01.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
drivers/media/usb/uvc/uvc_video.c