|| ||Sakari Ailus <email@example.com> |
|| ||"firstname.lastname@example.org" <email@example.com> |
|| ||[RFC v2 0/7] V4L2 file handles and event interface |
|| ||Tue, 22 Dec 2009 18:42:59 +0200|
|| ||Laurent Pinchart <firstname.lastname@example.org>,
Hans Verkuil <email@example.com>,
"Ivan T. Ivanov" <firstname.lastname@example.org>,
Guru Raj <email@example.com>|
|| ||Article, Thread
Here's the second version of the V4L2 file handle and event interface
patchset. Still RFC since I'd like to get more feedback on it.
The first patch adds the V4L2 file handle support and the rest are for V4L2
The patchset works with the OMAP 3 ISP driver. Patches for OMAP 3 ISP are
not part of this patchset but are available in Gitorious (branch is called
The major change since the last one v4l2_fh structure is now part of
driver's own file handle. It's used as file->private_data as well. I did
this based on Hans Verkuil's suggestion. Sequence numbers and event queue
length limitation is there as well. There are countless of smaller changes,
A few notes on the patches:
- I don't like the locking too much. Perhaps the file handle specific lock
(events->lock) could be dropped in favour of the lock for v4l2_file_handle
- Poll. The V4L2 specifiction says:
"When the application did not call VIDIOC_QBUF or
VIDIOC_STREAMON yet the poll() function succeeds, but sets the
POLLERR flag in the revents field."
The current events for OMAP 3 ISP are related to streaming but not all
might be in future. For example there might be some radio or DVB related
- Sequence numbers are local to file handles.
- Subscribing V4L2_EVENT_ALL causes any other events to be unsubscribed.
- If V4L2_EVENT_ALL has been subscribed, unsubscribing any one of the
events leads to V4L2_EVENT_ALL to be unsubscribed. This problem would be
difficult to work around since this would require the event system to be
aware of the driver private events as well.
- If events are missed, the sequence number is incremented in any
case. This way the user space knows events have been missed.
Comments would be very, very welcome.