diff options
Diffstat (limited to 'include/media/v4l2-event.h')
-rw-r--r-- | include/media/v4l2-event.h | 36 |
1 files changed, 1 insertions, 35 deletions
diff --git a/include/media/v4l2-event.h b/include/media/v4l2-event.h index 6741910c3a18..17833e886e11 100644 --- a/include/media/v4l2-event.h +++ b/include/media/v4l2-event.h | |||
@@ -24,40 +24,6 @@ | |||
24 | #include <linux/videodev2.h> | 24 | #include <linux/videodev2.h> |
25 | #include <linux/wait.h> | 25 | #include <linux/wait.h> |
26 | 26 | ||
27 | /* | ||
28 | * Overview: | ||
29 | * | ||
30 | * Events are subscribed per-filehandle. An event specification consists of a | ||
31 | * type and is optionally associated with an object identified through the | ||
32 | * 'id' field. So an event is uniquely identified by the (type, id) tuple. | ||
33 | * | ||
34 | * The v4l2-fh struct has a list of subscribed events. The v4l2_subscribed_event | ||
35 | * struct is added to that list, one for every subscribed event. | ||
36 | * | ||
37 | * Each v4l2_subscribed_event struct ends with an array of v4l2_kevent structs. | ||
38 | * This array (ringbuffer, really) is used to store any events raised by the | ||
39 | * driver. The v4l2_kevent struct links into the 'available' list of the | ||
40 | * v4l2_fh struct so VIDIOC_DQEVENT will know which event to dequeue first. | ||
41 | * | ||
42 | * Finally, if the event subscription is associated with a particular object | ||
43 | * such as a V4L2 control, then that object needs to know about that as well | ||
44 | * so that an event can be raised by that object. So the 'node' field can | ||
45 | * be used to link the v4l2_subscribed_event struct into a list of that | ||
46 | * object. | ||
47 | * | ||
48 | * So to summarize: | ||
49 | * | ||
50 | * struct v4l2_fh has two lists: one of the subscribed events, and one of the | ||
51 | * pending events. | ||
52 | * | ||
53 | * struct v4l2_subscribed_event has a ringbuffer of raised (pending) events of | ||
54 | * that particular type. | ||
55 | * | ||
56 | * If struct v4l2_subscribed_event is associated with a specific object, then | ||
57 | * that object will have an internal list of struct v4l2_subscribed_event so | ||
58 | * it knows who subscribed an event to that object. | ||
59 | */ | ||
60 | |||
61 | struct v4l2_fh; | 27 | struct v4l2_fh; |
62 | struct v4l2_subdev; | 28 | struct v4l2_subdev; |
63 | struct v4l2_subscribed_event; | 29 | struct v4l2_subscribed_event; |
@@ -218,7 +184,7 @@ int v4l2_event_subdev_unsubscribe(struct v4l2_subdev *sd, | |||
218 | struct v4l2_event_subscription *sub); | 184 | struct v4l2_event_subscription *sub); |
219 | /** | 185 | /** |
220 | * v4l2_src_change_event_subscribe - helper function that calls | 186 | * v4l2_src_change_event_subscribe - helper function that calls |
221 | * v4l2_event_subscribe() if the event is %V4L2_EVENT_SOURCE_CHANGE. | 187 | * v4l2_event_subscribe() if the event is %V4L2_EVENT_SOURCE_CHANGE. |
222 | * | 188 | * |
223 | * @fh: pointer to struct v4l2_fh | 189 | * @fh: pointer to struct v4l2_fh |
224 | * @sub: pointer to &struct v4l2_event_subscription | 190 | * @sub: pointer to &struct v4l2_event_subscription |