diff options
author | Laurent Pinchart <laurent.pinchart@skynet.be> | 2008-11-12 11:46:43 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-12-29 17:53:36 -0200 |
commit | 23867b2511140ae5693587d2b15badbcc632e3cc (patch) | |
tree | e49a03ae6392882708c59aac447998fc18c059c1 /drivers/media/video/uvc/uvc_v4l2.c | |
parent | 9bc6218dc1dc7bd421f3d141241c8e0e70c4e92b (diff) |
V4L/DVB (9661): uvcvideo: Commit streaming parameters when enabling the video stream
Sonix-based cameras seem to require the host to commit video streaming
parameters before selecting the alternate endpoint. While most applications
issue a VIDIOC_S_FMT ioctl before starting streaming, this is not required
by the V4L2 specification.
The problem has been noticed on Ubuntu 8.10 with applications using libv4l.
The library blocks VIDIOC_S_FMT calls when the requested format is identical
to the currently selected format. As the driver commits video streaming
parameters when initialising the device, only the first run of a
libv4l-enabled application would succeed.
For the sake of completeness, experiment showed that the camera keeps sending
12 bytes isochronous packets (header only, no data) without toggling the FID
bit if video streaming parameters haven't been committed before selecting the
alternate endpoint.
Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/uvc/uvc_v4l2.c')
-rw-r--r-- | drivers/media/video/uvc/uvc_v4l2.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/drivers/media/video/uvc/uvc_v4l2.c b/drivers/media/video/uvc/uvc_v4l2.c index 624bf74de67..01b48a87a9b 100644 --- a/drivers/media/video/uvc/uvc_v4l2.c +++ b/drivers/media/video/uvc/uvc_v4l2.c @@ -252,9 +252,6 @@ static int uvc_v4l2_set_format(struct uvc_video_device *video, if (ret < 0) return ret; - if ((ret = uvc_commit_video(video, &probe)) < 0) - return ret; - memcpy(&video->streaming->ctrl, &probe, sizeof probe); video->streaming->cur_format = format; video->streaming->cur_frame = frame; @@ -315,10 +312,6 @@ static int uvc_v4l2_set_streamparm(struct uvc_video_device *video, if ((ret = uvc_probe_video(video, &probe)) < 0) return ret; - /* Commit the new settings. */ - if ((ret = uvc_commit_video(video, &probe)) < 0) - return ret; - memcpy(&video->streaming->ctrl, &probe, sizeof probe); /* Return the actual frame period. */ |