]>
Commit | Line | Data |
---|---|---|
0996517c HV |
1 | /* |
2 | V4L2 controls support header. | |
3 | ||
4 | Copyright (C) 2010 Hans Verkuil <hverkuil@xs4all.nl> | |
5 | ||
6 | This program is free software; you can redistribute it and/or modify | |
7 | it under the terms of the GNU General Public License as published by | |
8 | the Free Software Foundation; either version 2 of the License, or | |
9 | (at your option) any later version. | |
10 | ||
11 | This program is distributed in the hope that it will be useful, | |
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | GNU General Public License for more details. | |
15 | ||
16 | You should have received a copy of the GNU General Public License | |
17 | along with this program; if not, write to the Free Software | |
18 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
19 | */ | |
20 | ||
21 | #ifndef _V4L2_CTRLS_H | |
22 | #define _V4L2_CTRLS_H | |
23 | ||
24 | #include <linux/list.h> | |
a19dec6e | 25 | #include <linux/mutex.h> |
01c40c04 | 26 | #include <linux/videodev2.h> |
0996517c HV |
27 | |
28 | /* forward references */ | |
528f0f78 | 29 | struct file; |
0996517c | 30 | struct v4l2_ctrl_handler; |
eb5b16ef | 31 | struct v4l2_ctrl_helper; |
0996517c HV |
32 | struct v4l2_ctrl; |
33 | struct video_device; | |
34 | struct v4l2_subdev; | |
77068d36 | 35 | struct v4l2_subscribed_event; |
6e239399 | 36 | struct v4l2_fh; |
a26243b0 | 37 | struct poll_table_struct; |
0996517c | 38 | |
8c2721d5 MCC |
39 | /** |
40 | * union v4l2_ctrl_ptr - A pointer to a control value. | |
0176077a HV |
41 | * @p_s32: Pointer to a 32-bit signed value. |
42 | * @p_s64: Pointer to a 64-bit signed value. | |
dda4a4d5 HV |
43 | * @p_u8: Pointer to a 8-bit unsigned value. |
44 | * @p_u16: Pointer to a 16-bit unsigned value. | |
811c5081 | 45 | * @p_u32: Pointer to a 32-bit unsigned value. |
0176077a HV |
46 | * @p_char: Pointer to a string. |
47 | * @p: Pointer to a compound value. | |
48 | */ | |
49 | union v4l2_ctrl_ptr { | |
50 | s32 *p_s32; | |
51 | s64 *p_s64; | |
dda4a4d5 HV |
52 | u8 *p_u8; |
53 | u16 *p_u16; | |
811c5081 | 54 | u32 *p_u32; |
0176077a HV |
55 | char *p_char; |
56 | void *p; | |
57 | }; | |
58 | ||
8c2721d5 MCC |
59 | /** |
60 | * struct v4l2_ctrl_ops - The control operations that the driver has to provide. | |
61 | * @g_volatile_ctrl: Get a new value for this control. Generally only relevant | |
62 | * for volatile (and usually read-only) controls such as a control | |
63 | * that returns the current signal strength which changes | |
64 | * continuously. | |
65 | * If not set, then the currently cached value will be returned. | |
66 | * @try_ctrl: Test whether the control's value is valid. Only relevant when | |
67 | * the usual min/max/step checks are not sufficient. | |
68 | * @s_ctrl: Actually set the new control value. s_ctrl is compulsory. The | |
69 | * ctrl->handler->lock is held when these ops are called, so no | |
70 | * one else can access controls owned by that handler. | |
71 | */ | |
0996517c HV |
72 | struct v4l2_ctrl_ops { |
73 | int (*g_volatile_ctrl)(struct v4l2_ctrl *ctrl); | |
74 | int (*try_ctrl)(struct v4l2_ctrl *ctrl); | |
75 | int (*s_ctrl)(struct v4l2_ctrl *ctrl); | |
76 | }; | |
77 | ||
8c2721d5 MCC |
78 | /** |
79 | * struct v4l2_ctrl_type_ops - The control type operations that the driver | |
80 | * has to provide. | |
81 | * | |
82 | * @equal: return true if both values are equal. | |
83 | * @init: initialize the value. | |
84 | * @log: log the value. | |
85 | * @validate: validate the value. Return 0 on success and a negative value otherwise. | |
86 | */ | |
0176077a | 87 | struct v4l2_ctrl_type_ops { |
998e7659 | 88 | bool (*equal)(const struct v4l2_ctrl *ctrl, u32 idx, |
0176077a HV |
89 | union v4l2_ctrl_ptr ptr1, |
90 | union v4l2_ctrl_ptr ptr2); | |
998e7659 | 91 | void (*init)(const struct v4l2_ctrl *ctrl, u32 idx, |
0176077a HV |
92 | union v4l2_ctrl_ptr ptr); |
93 | void (*log)(const struct v4l2_ctrl *ctrl); | |
998e7659 | 94 | int (*validate)(const struct v4l2_ctrl *ctrl, u32 idx, |
0176077a HV |
95 | union v4l2_ctrl_ptr ptr); |
96 | }; | |
97 | ||
8ac7a949 HV |
98 | typedef void (*v4l2_ctrl_notify_fnc)(struct v4l2_ctrl *ctrl, void *priv); |
99 | ||
8c2721d5 MCC |
100 | /** |
101 | * struct v4l2_ctrl - The control structure. | |
102 | * @node: The list node. | |
103 | * @ev_subs: The list of control event subscriptions. | |
104 | * @handler: The handler that owns the control. | |
105 | * @cluster: Point to start of cluster array. | |
106 | * @ncontrols: Number of controls in cluster array. | |
107 | * @done: Internal flag: set for each processed control. | |
108 | * @is_new: Set when the user specified a new value for this control. It | |
109 | * is also set when called from v4l2_ctrl_handler_setup. Drivers | |
110 | * should never set this flag. | |
111 | * @has_changed: Set when the current value differs from the new value. Drivers | |
112 | * should never use this flag. | |
113 | * @is_private: If set, then this control is private to its handler and it | |
114 | * will not be added to any other handlers. Drivers can set | |
115 | * this flag. | |
116 | * @is_auto: If set, then this control selects whether the other cluster | |
117 | * members are in 'automatic' mode or 'manual' mode. This is | |
118 | * used for autogain/gain type clusters. Drivers should never | |
119 | * set this flag directly. | |
120 | * @is_int: If set, then this control has a simple integer value (i.e. it | |
121 | * uses ctrl->val). | |
122 | * @is_string: If set, then this control has type V4L2_CTRL_TYPE_STRING. | |
123 | * @is_ptr: If set, then this control is an array and/or has type >= V4L2_CTRL_COMPOUND_TYPES | |
124 | * and/or has type V4L2_CTRL_TYPE_STRING. In other words, struct | |
125 | * v4l2_ext_control uses field p to point to the data. | |
126 | * @is_array: If set, then this control contains an N-dimensional array. | |
127 | * @has_volatiles: If set, then one or more members of the cluster are volatile. | |
128 | * Drivers should never touch this flag. | |
129 | * @call_notify: If set, then call the handler's notify function whenever the | |
130 | * control's value changes. | |
131 | * @manual_mode_value: If the is_auto flag is set, then this is the value | |
132 | * of the auto control that determines if that control is in | |
133 | * manual mode. So if the value of the auto control equals this | |
134 | * value, then the whole cluster is in manual mode. Drivers should | |
135 | * never set this flag directly. | |
136 | * @ops: The control ops. | |
137 | * @type_ops: The control type ops. | |
138 | * @id: The control ID. | |
139 | * @name: The control name. | |
140 | * @type: The control type. | |
141 | * @minimum: The control's minimum value. | |
142 | * @maximum: The control's maximum value. | |
143 | * @default_value: The control's default value. | |
144 | * @step: The control's step value for non-menu controls. | |
145 | * @elems: The number of elements in the N-dimensional array. | |
146 | * @elem_size: The size in bytes of the control. | |
147 | * @dims: The size of each dimension. | |
148 | * @nr_of_dims:The number of dimensions in @dims. | |
149 | * @menu_skip_mask: The control's skip mask for menu controls. This makes it | |
150 | * easy to skip menu items that are not valid. If bit X is set, | |
151 | * then menu item X is skipped. Of course, this only works for | |
152 | * menus with <= 32 menu items. There are no menus that come | |
153 | * close to that number, so this is OK. Should we ever need more, | |
154 | * then this will have to be extended to a u64 or a bit array. | |
155 | * @qmenu: A const char * array for all menu items. Array entries that are | |
156 | * empty strings ("") correspond to non-existing menu items (this | |
157 | * is in addition to the menu_skip_mask above). The last entry | |
158 | * must be NULL. | |
159 | * @flags: The control's flags. | |
160 | * @cur: The control's current value. | |
161 | * @val: The control's new s32 value. | |
162 | * @val64: The control's new s64 value. | |
163 | * @priv: The control's private pointer. For use by the driver. It is | |
164 | * untouched by the control framework. Note that this pointer is | |
165 | * not freed when the control is deleted. Should this be needed | |
166 | * then a new internal bitfield can be added to tell the framework | |
167 | * to free this pointer. | |
168 | */ | |
0996517c HV |
169 | struct v4l2_ctrl { |
170 | /* Administrative fields */ | |
171 | struct list_head node; | |
77068d36 | 172 | struct list_head ev_subs; |
0996517c HV |
173 | struct v4l2_ctrl_handler *handler; |
174 | struct v4l2_ctrl **cluster; | |
175 | unsigned ncontrols; | |
0996517c HV |
176 | unsigned int done:1; |
177 | ||
2a863793 | 178 | unsigned int is_new:1; |
9ea1b7a4 | 179 | unsigned int has_changed:1; |
0996517c | 180 | unsigned int is_private:1; |
72d877ca | 181 | unsigned int is_auto:1; |
d9a25471 HV |
182 | unsigned int is_int:1; |
183 | unsigned int is_string:1; | |
184 | unsigned int is_ptr:1; | |
998e7659 | 185 | unsigned int is_array:1; |
5626b8c7 | 186 | unsigned int has_volatiles:1; |
8ac7a949 | 187 | unsigned int call_notify:1; |
82a7c049 | 188 | unsigned int manual_mode_value:8; |
0996517c HV |
189 | |
190 | const struct v4l2_ctrl_ops *ops; | |
0176077a | 191 | const struct v4l2_ctrl_type_ops *type_ops; |
0996517c HV |
192 | u32 id; |
193 | const char *name; | |
194 | enum v4l2_ctrl_type type; | |
0ba2aeb6 | 195 | s64 minimum, maximum, default_value; |
20d88eef | 196 | u32 elems; |
d9a25471 | 197 | u32 elem_size; |
20d88eef HV |
198 | u32 dims[V4L2_CTRL_MAX_DIMS]; |
199 | u32 nr_of_dims; | |
0996517c | 200 | union { |
0ba2aeb6 HV |
201 | u64 step; |
202 | u64 menu_skip_mask; | |
0996517c | 203 | }; |
ce580fe5 SA |
204 | union { |
205 | const char * const *qmenu; | |
206 | const s64 *qmenu_int; | |
207 | }; | |
0996517c | 208 | unsigned long flags; |
d9a25471 | 209 | void *priv; |
2a9ec373 HV |
210 | s32 val; |
211 | struct { | |
0996517c | 212 | s32 val; |
d9a25471 | 213 | } cur; |
0176077a HV |
214 | |
215 | union v4l2_ctrl_ptr p_new; | |
216 | union v4l2_ctrl_ptr p_cur; | |
0996517c HV |
217 | }; |
218 | ||
8c2721d5 MCC |
219 | /** |
220 | * struct v4l2_ctrl_ref - The control reference. | |
221 | * @node: List node for the sorted list. | |
222 | * @next: Single-link list node for the hash. | |
223 | * @ctrl: The actual control information. | |
224 | * @helper: Pointer to helper struct. Used internally in prepare_ext_ctrls(). | |
225 | * | |
226 | * Each control handler has a list of these refs. The list_head is used to | |
227 | * keep a sorted-by-control-ID list of all controls, while the next pointer | |
228 | * is used to link the control in the hash's bucket. | |
229 | */ | |
0996517c HV |
230 | struct v4l2_ctrl_ref { |
231 | struct list_head node; | |
232 | struct v4l2_ctrl_ref *next; | |
233 | struct v4l2_ctrl *ctrl; | |
eb5b16ef | 234 | struct v4l2_ctrl_helper *helper; |
0996517c HV |
235 | }; |
236 | ||
8c2721d5 MCC |
237 | /** |
238 | * struct v4l2_ctrl_handler - The control handler keeps track of all the | |
239 | * controls: both the controls owned by the handler and those inherited | |
240 | * from other handlers. | |
241 | * @_lock: Default for "lock". | |
242 | * @lock: Lock to control access to this handler and its controls. | |
243 | * May be replaced by the user right after init. | |
244 | * @ctrls: The list of controls owned by this handler. | |
245 | * @ctrl_refs: The list of control references. | |
246 | * @cached: The last found control reference. It is common that the same | |
247 | * control is needed multiple times, so this is a simple | |
248 | * optimization. | |
249 | * @buckets: Buckets for the hashing. Allows for quick control lookup. | |
250 | * @notify: A notify callback that is called whenever the control changes value. | |
251 | * Note that the handler's lock is held when the notify function | |
252 | * is called! | |
253 | * @notify_priv: Passed as argument to the v4l2_ctrl notify callback. | |
254 | * @nr_of_buckets: Total number of buckets in the array. | |
255 | * @error: The error code of the first failed control addition. | |
256 | */ | |
0996517c | 257 | struct v4l2_ctrl_handler { |
77e7c4e6 SA |
258 | struct mutex _lock; |
259 | struct mutex *lock; | |
0996517c HV |
260 | struct list_head ctrls; |
261 | struct list_head ctrl_refs; | |
262 | struct v4l2_ctrl_ref *cached; | |
263 | struct v4l2_ctrl_ref **buckets; | |
8ac7a949 HV |
264 | v4l2_ctrl_notify_fnc notify; |
265 | void *notify_priv; | |
0996517c HV |
266 | u16 nr_of_buckets; |
267 | int error; | |
268 | }; | |
269 | ||
8c2721d5 MCC |
270 | /** |
271 | * struct v4l2_ctrl_config - Control configuration structure. | |
272 | * @ops: The control ops. | |
273 | * @type_ops: The control type ops. Only needed for compound controls. | |
274 | * @id: The control ID. | |
275 | * @name: The control name. | |
276 | * @type: The control type. | |
277 | * @min: The control's minimum value. | |
278 | * @max: The control's maximum value. | |
279 | * @step: The control's step value for non-menu controls. | |
280 | * @def: The control's default value. | |
281 | * @dims: The size of each dimension. | |
282 | * @elem_size: The size in bytes of the control. | |
283 | * @flags: The control's flags. | |
284 | * @menu_skip_mask: The control's skip mask for menu controls. This makes it | |
285 | * easy to skip menu items that are not valid. If bit X is set, | |
286 | * then menu item X is skipped. Of course, this only works for | |
287 | * menus with <= 64 menu items. There are no menus that come | |
288 | * close to that number, so this is OK. Should we ever need more, | |
289 | * then this will have to be extended to a bit array. | |
290 | * @qmenu: A const char * array for all menu items. Array entries that are | |
291 | * empty strings ("") correspond to non-existing menu items (this | |
292 | * is in addition to the menu_skip_mask above). The last entry | |
293 | * must be NULL. | |
294 | * @is_private: If set, then this control is private to its handler and it | |
295 | * will not be added to any other handlers. | |
296 | */ | |
0996517c HV |
297 | struct v4l2_ctrl_config { |
298 | const struct v4l2_ctrl_ops *ops; | |
0176077a | 299 | const struct v4l2_ctrl_type_ops *type_ops; |
0996517c HV |
300 | u32 id; |
301 | const char *name; | |
302 | enum v4l2_ctrl_type type; | |
0ba2aeb6 HV |
303 | s64 min; |
304 | s64 max; | |
305 | u64 step; | |
306 | s64 def; | |
20d88eef | 307 | u32 dims[V4L2_CTRL_MAX_DIMS]; |
d9a25471 | 308 | u32 elem_size; |
0996517c | 309 | u32 flags; |
0ba2aeb6 | 310 | u64 menu_skip_mask; |
513521ea | 311 | const char * const *qmenu; |
ce580fe5 | 312 | const s64 *qmenu_int; |
0996517c | 313 | unsigned int is_private:1; |
0996517c HV |
314 | }; |
315 | ||
8c2721d5 MCC |
316 | /** |
317 | * v4l2_ctrl_fill() - Fill in the control fields based on the control ID. | |
318 | * | |
319 | * This works for all standard V4L2 controls. | |
320 | * For non-standard controls it will only fill in the given arguments | |
321 | * and @name will be NULL. | |
322 | * | |
323 | * This function will overwrite the contents of @name, @type and @flags. | |
324 | * The contents of @min, @max, @step and @def may be modified depending on | |
325 | * the type. | |
326 | * | |
327 | * Do not use in drivers! It is used internally for backwards compatibility | |
328 | * control handling only. Once all drivers are converted to use the new | |
329 | * control framework this function will no longer be exported. | |
330 | */ | |
0996517c | 331 | void v4l2_ctrl_fill(u32 id, const char **name, enum v4l2_ctrl_type *type, |
0ba2aeb6 | 332 | s64 *min, s64 *max, u64 *step, s64 *def, u32 *flags); |
0996517c HV |
333 | |
334 | ||
8c2721d5 MCC |
335 | /** |
336 | * v4l2_ctrl_handler_init_class() - Initialize the control handler. | |
337 | * @hdl: The control handler. | |
338 | * @nr_of_controls_hint: A hint of how many controls this handler is | |
339 | * expected to refer to. This is the total number, so including | |
340 | * any inherited controls. It doesn't have to be precise, but if | |
341 | * it is way off, then you either waste memory (too many buckets | |
342 | * are allocated) or the control lookup becomes slower (not enough | |
343 | * buckets are allocated, so there are more slow list lookups). | |
344 | * It will always work, though. | |
345 | * @key: Used by the lock validator if CONFIG_LOCKDEP is set. | |
346 | * @name: Used by the lock validator if CONFIG_LOCKDEP is set. | |
347 | * | |
348 | * Returns an error if the buckets could not be allocated. This error will | |
349 | * also be stored in @hdl->error. | |
350 | * | |
351 | * Never use this call directly, always use the v4l2_ctrl_handler_init | |
352 | * macro that hides the @key and @name arguments. | |
353 | */ | |
6cd247ef AW |
354 | int v4l2_ctrl_handler_init_class(struct v4l2_ctrl_handler *hdl, |
355 | unsigned nr_of_controls_hint, | |
356 | struct lock_class_key *key, const char *name); | |
357 | ||
358 | #ifdef CONFIG_LOCKDEP | |
359 | #define v4l2_ctrl_handler_init(hdl, nr_of_controls_hint) \ | |
360 | ( \ | |
361 | ({ \ | |
362 | static struct lock_class_key _key; \ | |
363 | v4l2_ctrl_handler_init_class(hdl, nr_of_controls_hint, \ | |
364 | &_key, \ | |
365 | KBUILD_BASENAME ":" \ | |
366 | __stringify(__LINE__) ":" \ | |
367 | "(" #hdl ")->_lock"); \ | |
368 | }) \ | |
369 | ) | |
370 | #else | |
371 | #define v4l2_ctrl_handler_init(hdl, nr_of_controls_hint) \ | |
372 | v4l2_ctrl_handler_init_class(hdl, nr_of_controls_hint, NULL, NULL) | |
373 | #endif | |
0996517c | 374 | |
8c2721d5 MCC |
375 | /** |
376 | * v4l2_ctrl_handler_free() - Free all controls owned by the handler and free | |
377 | * the control list. | |
378 | * @hdl: The control handler. | |
379 | * | |
380 | * Does nothing if @hdl == NULL. | |
381 | */ | |
0996517c HV |
382 | void v4l2_ctrl_handler_free(struct v4l2_ctrl_handler *hdl); |
383 | ||
8c2721d5 MCC |
384 | /** |
385 | * v4l2_ctrl_lock() - Helper function to lock the handler | |
386 | * associated with the control. | |
387 | * @ctrl: The control to lock. | |
388 | */ | |
605b3840 SA |
389 | static inline void v4l2_ctrl_lock(struct v4l2_ctrl *ctrl) |
390 | { | |
391 | mutex_lock(ctrl->handler->lock); | |
392 | } | |
393 | ||
8c2721d5 MCC |
394 | /** |
395 | * v4l2_ctrl_unlock() - Helper function to unlock the handler | |
396 | * associated with the control. | |
397 | * @ctrl: The control to unlock. | |
398 | */ | |
605b3840 SA |
399 | static inline void v4l2_ctrl_unlock(struct v4l2_ctrl *ctrl) |
400 | { | |
401 | mutex_unlock(ctrl->handler->lock); | |
402 | } | |
403 | ||
8c2721d5 MCC |
404 | /** |
405 | * v4l2_ctrl_handler_setup() - Call the s_ctrl op for all controls belonging | |
406 | * to the handler to initialize the hardware to the current control values. | |
407 | * @hdl: The control handler. | |
408 | * | |
409 | * Button controls will be skipped, as are read-only controls. | |
410 | * | |
411 | * If @hdl == NULL, then this just returns 0. | |
412 | */ | |
0996517c HV |
413 | int v4l2_ctrl_handler_setup(struct v4l2_ctrl_handler *hdl); |
414 | ||
8c2721d5 MCC |
415 | /** |
416 | * v4l2_ctrl_handler_log_status() - Log all controls owned by the handler. | |
417 | * @hdl: The control handler. | |
418 | * @prefix: The prefix to use when logging the control values. If the | |
419 | * prefix does not end with a space, then ": " will be added | |
420 | * after the prefix. If @prefix == NULL, then no prefix will be | |
421 | * used. | |
422 | * | |
423 | * For use with VIDIOC_LOG_STATUS. | |
424 | * | |
425 | * Does nothing if @hdl == NULL. | |
426 | */ | |
0996517c HV |
427 | void v4l2_ctrl_handler_log_status(struct v4l2_ctrl_handler *hdl, |
428 | const char *prefix); | |
429 | ||
8c2721d5 MCC |
430 | /** |
431 | * v4l2_ctrl_new_custom() - Allocate and initialize a new custom V4L2 | |
432 | * control. | |
433 | * @hdl: The control handler. | |
434 | * @cfg: The control's configuration data. | |
435 | * @priv: The control's driver-specific private data. | |
436 | * | |
437 | * If the &v4l2_ctrl struct could not be allocated then NULL is returned | |
438 | * and @hdl->error is set to the error code (if it wasn't set already). | |
439 | */ | |
0996517c HV |
440 | struct v4l2_ctrl *v4l2_ctrl_new_custom(struct v4l2_ctrl_handler *hdl, |
441 | const struct v4l2_ctrl_config *cfg, void *priv); | |
442 | ||
8c2721d5 MCC |
443 | /** |
444 | * v4l2_ctrl_new_std() - Allocate and initialize a new standard V4L2 non-menu control. | |
445 | * @hdl: The control handler. | |
446 | * @ops: The control ops. | |
447 | * @id: The control ID. | |
448 | * @min: The control's minimum value. | |
449 | * @max: The control's maximum value. | |
450 | * @step: The control's step value | |
451 | * @def: The control's default value. | |
452 | * | |
453 | * If the &v4l2_ctrl struct could not be allocated, or the control | |
454 | * ID is not known, then NULL is returned and @hdl->error is set to the | |
455 | * appropriate error code (if it wasn't set already). | |
456 | * | |
457 | * If @id refers to a menu control, then this function will return NULL. | |
458 | * | |
459 | * Use v4l2_ctrl_new_std_menu() when adding menu controls. | |
460 | */ | |
0996517c HV |
461 | struct v4l2_ctrl *v4l2_ctrl_new_std(struct v4l2_ctrl_handler *hdl, |
462 | const struct v4l2_ctrl_ops *ops, | |
0ba2aeb6 | 463 | u32 id, s64 min, s64 max, u64 step, s64 def); |
0996517c | 464 | |
8c2721d5 MCC |
465 | /** |
466 | * v4l2_ctrl_new_std_menu() - Allocate and initialize a new standard V4L2 menu control. | |
467 | * @hdl: The control handler. | |
468 | * @ops: The control ops. | |
469 | * @id: The control ID. | |
470 | * @max: The control's maximum value. | |
471 | * @mask: The control's skip mask for menu controls. This makes it | |
472 | * easy to skip menu items that are not valid. If bit X is set, | |
473 | * then menu item X is skipped. Of course, this only works for | |
474 | * menus with <= 64 menu items. There are no menus that come | |
475 | * close to that number, so this is OK. Should we ever need more, | |
476 | * then this will have to be extended to a bit array. | |
477 | * @def: The control's default value. | |
478 | * | |
479 | * Same as v4l2_ctrl_new_std(), but @min is set to 0 and the @mask value | |
480 | * determines which menu items are to be skipped. | |
481 | * | |
482 | * If @id refers to a non-menu control, then this function will return NULL. | |
483 | */ | |
0996517c HV |
484 | struct v4l2_ctrl *v4l2_ctrl_new_std_menu(struct v4l2_ctrl_handler *hdl, |
485 | const struct v4l2_ctrl_ops *ops, | |
0ba2aeb6 | 486 | u32 id, u8 max, u64 mask, u8 def); |
0996517c | 487 | |
8c2721d5 MCC |
488 | /** |
489 | * v4l2_ctrl_new_std_menu_items() - Create a new standard V4L2 menu control | |
490 | * with driver specific menu. | |
491 | * @hdl: The control handler. | |
492 | * @ops: The control ops. | |
493 | * @id: The control ID. | |
494 | * @max: The control's maximum value. | |
495 | * @mask: The control's skip mask for menu controls. This makes it | |
496 | * easy to skip menu items that are not valid. If bit X is set, | |
497 | * then menu item X is skipped. Of course, this only works for | |
498 | * menus with <= 64 menu items. There are no menus that come | |
499 | * close to that number, so this is OK. Should we ever need more, | |
500 | * then this will have to be extended to a bit array. | |
501 | * @def: The control's default value. | |
502 | * @qmenu: The new menu. | |
503 | * | |
504 | * Same as v4l2_ctrl_new_std_menu(), but @qmenu will be the driver specific | |
505 | * menu of this control. | |
506 | * | |
507 | */ | |
117a711a | 508 | struct v4l2_ctrl *v4l2_ctrl_new_std_menu_items(struct v4l2_ctrl_handler *hdl, |
0ba2aeb6 HV |
509 | const struct v4l2_ctrl_ops *ops, u32 id, u8 max, |
510 | u64 mask, u8 def, const char * const *qmenu); | |
117a711a | 511 | |
8c2721d5 MCC |
512 | /** |
513 | * v4l2_ctrl_new_int_menu() - Create a new standard V4L2 integer menu control. | |
514 | * @hdl: The control handler. | |
515 | * @ops: The control ops. | |
516 | * @id: The control ID. | |
517 | * @max: The control's maximum value. | |
518 | * @def: The control's default value. | |
519 | * @qmenu_int: The control's menu entries. | |
520 | * | |
521 | * Same as v4l2_ctrl_new_std_menu(), but @mask is set to 0 and it additionaly | |
522 | * takes as an argument an array of integers determining the menu items. | |
523 | * | |
524 | * If @id refers to a non-integer-menu control, then this function will return NULL. | |
525 | */ | |
515f3287 SN |
526 | struct v4l2_ctrl *v4l2_ctrl_new_int_menu(struct v4l2_ctrl_handler *hdl, |
527 | const struct v4l2_ctrl_ops *ops, | |
0ba2aeb6 | 528 | u32 id, u8 max, u8 def, const s64 *qmenu_int); |
515f3287 | 529 | |
8c2721d5 MCC |
530 | /** |
531 | * v4l2_ctrl_add_ctrl() - Add a control from another handler to this handler. | |
532 | * @hdl: The control handler. | |
533 | * @ctrl: The control to add. | |
534 | * | |
535 | * It will return NULL if it was unable to add the control reference. | |
536 | * If the control already belonged to the handler, then it will do | |
537 | * nothing and just return @ctrl. | |
538 | */ | |
0996517c HV |
539 | struct v4l2_ctrl *v4l2_ctrl_add_ctrl(struct v4l2_ctrl_handler *hdl, |
540 | struct v4l2_ctrl *ctrl); | |
541 | ||
8c2721d5 MCC |
542 | /** |
543 | * v4l2_ctrl_add_handler() - Add all controls from handler @add to | |
544 | * handler @hdl. | |
545 | * @hdl: The control handler. | |
546 | * @add: The control handler whose controls you want to add to | |
547 | * the @hdl control handler. | |
548 | * @filter: This function will filter which controls should be added. | |
549 | * | |
550 | * Does nothing if either of the two handlers is a NULL pointer. | |
551 | * If @filter is NULL, then all controls are added. Otherwise only those | |
552 | * controls for which @filter returns true will be added. | |
553 | * In case of an error @hdl->error will be set to the error code (if it | |
554 | * wasn't set already). | |
555 | */ | |
0996517c | 556 | int v4l2_ctrl_add_handler(struct v4l2_ctrl_handler *hdl, |
34a6b7d0 HV |
557 | struct v4l2_ctrl_handler *add, |
558 | bool (*filter)(const struct v4l2_ctrl *ctrl)); | |
0996517c | 559 | |
8c2721d5 MCC |
560 | /** |
561 | * v4l2_ctrl_radio_filter() - Standard filter for radio controls. | |
562 | * @ctrl: The control that is filtered. | |
563 | * | |
564 | * This will return true for any controls that are valid for radio device | |
565 | * nodes. Those are all of the V4L2_CID_AUDIO_* user controls and all FM | |
566 | * transmitter class controls. | |
567 | * | |
568 | * This function is to be used with v4l2_ctrl_add_handler(). | |
569 | */ | |
34a6b7d0 | 570 | bool v4l2_ctrl_radio_filter(const struct v4l2_ctrl *ctrl); |
0996517c | 571 | |
8c2721d5 MCC |
572 | /** |
573 | * v4l2_ctrl_cluster() - Mark all controls in the cluster as belonging to that cluster. | |
574 | * @ncontrols: The number of controls in this cluster. | |
575 | * @controls: The cluster control array of size @ncontrols. | |
576 | */ | |
0996517c HV |
577 | void v4l2_ctrl_cluster(unsigned ncontrols, struct v4l2_ctrl **controls); |
578 | ||
579 | ||
8c2721d5 MCC |
580 | /** |
581 | * v4l2_ctrl_auto_cluster() - Mark all controls in the cluster as belonging to | |
582 | * that cluster and set it up for autofoo/foo-type handling. | |
583 | * @ncontrols: The number of controls in this cluster. | |
584 | * @controls: The cluster control array of size @ncontrols. The first control | |
585 | * must be the 'auto' control (e.g. autogain, autoexposure, etc.) | |
586 | * @manual_val: The value for the first control in the cluster that equals the | |
587 | * manual setting. | |
588 | * @set_volatile: If true, then all controls except the first auto control will | |
589 | * be volatile. | |
590 | * | |
591 | * Use for control groups where one control selects some automatic feature and | |
592 | * the other controls are only active whenever the automatic feature is turned | |
593 | * off (manual mode). Typical examples: autogain vs gain, auto-whitebalance vs | |
594 | * red and blue balance, etc. | |
595 | * | |
596 | * The behavior of such controls is as follows: | |
597 | * | |
598 | * When the autofoo control is set to automatic, then any manual controls | |
599 | * are set to inactive and any reads will call g_volatile_ctrl (if the control | |
600 | * was marked volatile). | |
601 | * | |
602 | * When the autofoo control is set to manual, then any manual controls will | |
603 | * be marked active, and any reads will just return the current value without | |
604 | * going through g_volatile_ctrl. | |
605 | * | |
606 | * In addition, this function will set the V4L2_CTRL_FLAG_UPDATE flag | |
607 | * on the autofoo control and V4L2_CTRL_FLAG_INACTIVE on the foo control(s) | |
608 | * if autofoo is in auto mode. | |
609 | */ | |
72d877ca HV |
610 | void v4l2_ctrl_auto_cluster(unsigned ncontrols, struct v4l2_ctrl **controls, |
611 | u8 manual_val, bool set_volatile); | |
612 | ||
613 | ||
8c2721d5 MCC |
614 | /** |
615 | * v4l2_ctrl_find() - Find a control with the given ID. | |
616 | * @hdl: The control handler. | |
617 | * @id: The control ID to find. | |
618 | * | |
619 | * If @hdl == NULL this will return NULL as well. Will lock the handler so | |
620 | * do not use from inside &v4l2_ctrl_ops. | |
621 | */ | |
0996517c HV |
622 | struct v4l2_ctrl *v4l2_ctrl_find(struct v4l2_ctrl_handler *hdl, u32 id); |
623 | ||
8c2721d5 MCC |
624 | /** |
625 | * v4l2_ctrl_activate() - Make the control active or inactive. | |
626 | * @ctrl: The control to (de)activate. | |
627 | * @active: True if the control should become active. | |
628 | * | |
629 | * This sets or clears the V4L2_CTRL_FLAG_INACTIVE flag atomically. | |
630 | * Does nothing if @ctrl == NULL. | |
631 | * This will usually be called from within the s_ctrl op. | |
632 | * The V4L2_EVENT_CTRL event will be generated afterwards. | |
633 | * | |
634 | * This function assumes that the control handler is locked. | |
635 | */ | |
0996517c HV |
636 | void v4l2_ctrl_activate(struct v4l2_ctrl *ctrl, bool active); |
637 | ||
8c2721d5 MCC |
638 | /** |
639 | * v4l2_ctrl_grab() - Mark the control as grabbed or not grabbed. | |
640 | * @ctrl: The control to (de)activate. | |
641 | * @grabbed: True if the control should become grabbed. | |
642 | * | |
643 | * This sets or clears the V4L2_CTRL_FLAG_GRABBED flag atomically. | |
644 | * Does nothing if @ctrl == NULL. | |
645 | * The V4L2_EVENT_CTRL event will be generated afterwards. | |
646 | * This will usually be called when starting or stopping streaming in the | |
647 | * driver. | |
648 | * | |
649 | * This function assumes that the control handler is not locked and will | |
650 | * take the lock itself. | |
651 | */ | |
0996517c HV |
652 | void v4l2_ctrl_grab(struct v4l2_ctrl *ctrl, bool grabbed); |
653 | ||
5a573925 | 654 | |
8c2721d5 MCC |
655 | /** |
656 | *__v4l2_ctrl_modify_range() - Unlocked variant of v4l2_ctrl_modify_range() | |
657 | * | |
658 | * @ctrl: The control to update. | |
659 | * @min: The control's minimum value. | |
660 | * @max: The control's maximum value. | |
661 | * @step: The control's step value | |
662 | * @def: The control's default value. | |
663 | * | |
664 | * Update the range of a control on the fly. This works for control types | |
665 | * INTEGER, BOOLEAN, MENU, INTEGER MENU and BITMASK. For menu controls the | |
666 | * @step value is interpreted as a menu_skip_mask. | |
667 | * | |
668 | * An error is returned if one of the range arguments is invalid for this | |
669 | * control type. | |
670 | * | |
671 | * This function assumes that the control handler is not locked and will | |
672 | * take the lock itself. | |
673 | */ | |
5a573925 SA |
674 | int __v4l2_ctrl_modify_range(struct v4l2_ctrl *ctrl, |
675 | s64 min, s64 max, u64 step, s64 def); | |
676 | ||
8c2721d5 MCC |
677 | /** |
678 | * v4l2_ctrl_modify_range() - Update the range of a control. | |
679 | * @ctrl: The control to update. | |
680 | * @min: The control's minimum value. | |
681 | * @max: The control's maximum value. | |
682 | * @step: The control's step value | |
683 | * @def: The control's default value. | |
684 | * | |
685 | * Update the range of a control on the fly. This works for control types | |
686 | * INTEGER, BOOLEAN, MENU, INTEGER MENU and BITMASK. For menu controls the | |
687 | * @step value is interpreted as a menu_skip_mask. | |
688 | * | |
689 | * An error is returned if one of the range arguments is invalid for this | |
690 | * control type. | |
691 | * | |
692 | * This function assumes that the control handler is not locked and will | |
693 | * take the lock itself. | |
694 | */ | |
5a573925 SA |
695 | static inline int v4l2_ctrl_modify_range(struct v4l2_ctrl *ctrl, |
696 | s64 min, s64 max, u64 step, s64 def) | |
697 | { | |
698 | int rval; | |
699 | ||
700 | v4l2_ctrl_lock(ctrl); | |
701 | rval = __v4l2_ctrl_modify_range(ctrl, min, max, step, def); | |
702 | v4l2_ctrl_unlock(ctrl); | |
703 | ||
704 | return rval; | |
705 | } | |
2ccbe779 | 706 | |
8c2721d5 MCC |
707 | /** |
708 | * v4l2_ctrl_notify() - Function to set a notify callback for a control. | |
709 | * @ctrl: The control. | |
710 | * @notify: The callback function. | |
711 | * @priv: The callback private handle, passed as argument to the callback. | |
712 | * | |
713 | * This function sets a callback function for the control. If @ctrl is NULL, | |
714 | * then it will do nothing. If @notify is NULL, then the notify callback will | |
715 | * be removed. | |
716 | * | |
717 | * There can be only one notify. If another already exists, then a WARN_ON | |
718 | * will be issued and the function will do nothing. | |
719 | */ | |
8ac7a949 HV |
720 | void v4l2_ctrl_notify(struct v4l2_ctrl *ctrl, v4l2_ctrl_notify_fnc notify, void *priv); |
721 | ||
8c2721d5 MCC |
722 | /** |
723 | * v4l2_ctrl_get_name() - Get the name of the control | |
79fbc209 HV |
724 | * @id: The control ID. |
725 | * | |
726 | * This function returns the name of the given control ID or NULL if it isn't | |
727 | * a known control. | |
728 | */ | |
729 | const char *v4l2_ctrl_get_name(u32 id); | |
730 | ||
8c2721d5 MCC |
731 | /** |
732 | * v4l2_ctrl_get_menu() - Get the menu string array of the control | |
79fbc209 HV |
733 | * @id: The control ID. |
734 | * | |
735 | * This function returns the NULL-terminated menu string array name of the | |
736 | * given control ID or NULL if it isn't a known menu control. | |
737 | */ | |
738 | const char * const *v4l2_ctrl_get_menu(u32 id); | |
739 | ||
8c2721d5 MCC |
740 | /** |
741 | * v4l2_ctrl_get_int_menu() - Get the integer menu array of the control | |
79fbc209 HV |
742 | * @id: The control ID. |
743 | * @len: The size of the integer array. | |
744 | * | |
745 | * This function returns the integer array of the given control ID or NULL if it | |
746 | * if it isn't a known integer menu control. | |
747 | */ | |
748 | const s64 *v4l2_ctrl_get_int_menu(u32 id, u32 *len); | |
749 | ||
8c2721d5 MCC |
750 | /** |
751 | * v4l2_ctrl_g_ctrl() - Helper function to get the control's value from within a driver. | |
752 | * @ctrl: The control. | |
753 | * | |
754 | * This returns the control's value safely by going through the control | |
755 | * framework. This function will lock the control's handler, so it cannot be | |
756 | * used from within the &v4l2_ctrl_ops functions. | |
757 | * | |
758 | * This function is for integer type controls only. | |
759 | */ | |
0996517c HV |
760 | s32 v4l2_ctrl_g_ctrl(struct v4l2_ctrl *ctrl); |
761 | ||
8c2721d5 MCC |
762 | /** |
763 | * __v4l2_ctrl_s_ctrl() - Unlocked variant of v4l2_ctrl_s_ctrl(). | |
764 | * @ctrl: The control. | |
765 | * @val: The new value. | |
766 | * | |
767 | * This set the control's new value safely by going through the control | |
768 | * framework. This function will lock the control's handler, so it cannot be | |
769 | * used from within the &v4l2_ctrl_ops functions. | |
770 | * | |
771 | * This function is for integer type controls only. | |
772 | */ | |
0c4348ad | 773 | int __v4l2_ctrl_s_ctrl(struct v4l2_ctrl *ctrl, s32 val); |
8c2721d5 | 774 | |
0996517c | 775 | /** v4l2_ctrl_s_ctrl() - Helper function to set the control's value from within a driver. |
8c2721d5 MCC |
776 | * @ctrl: The control. |
777 | * @val: The new value. | |
778 | * | |
779 | * This set the control's new value safely by going through the control | |
780 | * framework. This function will lock the control's handler, so it cannot be | |
781 | * used from within the &v4l2_ctrl_ops functions. | |
782 | * | |
783 | * This function is for integer type controls only. | |
784 | */ | |
0c4348ad SA |
785 | static inline int v4l2_ctrl_s_ctrl(struct v4l2_ctrl *ctrl, s32 val) |
786 | { | |
787 | int rval; | |
788 | ||
789 | v4l2_ctrl_lock(ctrl); | |
790 | rval = __v4l2_ctrl_s_ctrl(ctrl, val); | |
791 | v4l2_ctrl_unlock(ctrl); | |
792 | ||
793 | return rval; | |
794 | } | |
0996517c | 795 | |
8c2721d5 MCC |
796 | /** |
797 | * v4l2_ctrl_g_ctrl_int64() - Helper function to get a 64-bit control's value | |
798 | * from within a driver. | |
799 | * @ctrl: The control. | |
800 | * | |
801 | * This returns the control's value safely by going through the control | |
802 | * framework. This function will lock the control's handler, so it cannot be | |
803 | * used from within the &v4l2_ctrl_ops functions. | |
804 | * | |
805 | * This function is for 64-bit integer type controls only. | |
806 | */ | |
03d5285b LP |
807 | s64 v4l2_ctrl_g_ctrl_int64(struct v4l2_ctrl *ctrl); |
808 | ||
8c2721d5 MCC |
809 | /** |
810 | * __v4l2_ctrl_s_ctrl_int64() - Unlocked variant of v4l2_ctrl_s_ctrl_int64(). | |
811 | * | |
812 | * @ctrl: The control. | |
813 | * @val: The new value. | |
814 | * | |
815 | * This set the control's new value safely by going through the control | |
816 | * framework. This function will lock the control's handler, so it cannot be | |
817 | * used from within the &v4l2_ctrl_ops functions. | |
818 | * | |
819 | * This function is for 64-bit integer type controls only. | |
820 | */ | |
0c4348ad SA |
821 | int __v4l2_ctrl_s_ctrl_int64(struct v4l2_ctrl *ctrl, s64 val); |
822 | ||
8c2721d5 MCC |
823 | /** v4l2_ctrl_s_ctrl_int64() - Helper function to set a 64-bit control's value |
824 | * from within a driver. | |
825 | * | |
826 | * @ctrl: The control. | |
827 | * @val: The new value. | |
828 | * | |
829 | * This set the control's new value safely by going through the control | |
830 | * framework. This function will lock the control's handler, so it cannot be | |
831 | * used from within the &v4l2_ctrl_ops functions. | |
832 | * | |
833 | * This function is for 64-bit integer type controls only. | |
834 | */ | |
0c4348ad SA |
835 | static inline int v4l2_ctrl_s_ctrl_int64(struct v4l2_ctrl *ctrl, s64 val) |
836 | { | |
837 | int rval; | |
838 | ||
839 | v4l2_ctrl_lock(ctrl); | |
840 | rval = __v4l2_ctrl_s_ctrl_int64(ctrl, val); | |
841 | v4l2_ctrl_unlock(ctrl); | |
842 | ||
843 | return rval; | |
844 | } | |
03d5285b | 845 | |
8c2721d5 MCC |
846 | /** __v4l2_ctrl_s_ctrl_string() - Unlocked variant of v4l2_ctrl_s_ctrl_string(). |
847 | * | |
848 | * @ctrl: The control. | |
849 | * @s: The new string. | |
850 | * | |
851 | * This set the control's new string safely by going through the control | |
852 | * framework. This function will lock the control's handler, so it cannot be | |
853 | * used from within the &v4l2_ctrl_ops functions. | |
854 | * | |
855 | * This function is for string type controls only. | |
856 | */ | |
5d0360a4 HV |
857 | int __v4l2_ctrl_s_ctrl_string(struct v4l2_ctrl *ctrl, const char *s); |
858 | ||
8c2721d5 MCC |
859 | /** v4l2_ctrl_s_ctrl_string() - Helper function to set a control's string value |
860 | * from within a driver. | |
861 | * | |
862 | * @ctrl: The control. | |
863 | * @s: The new string. | |
864 | * | |
865 | * This set the control's new string safely by going through the control | |
866 | * framework. This function will lock the control's handler, so it cannot be | |
867 | * used from within the &v4l2_ctrl_ops functions. | |
868 | * | |
869 | * This function is for string type controls only. | |
870 | */ | |
5d0360a4 HV |
871 | static inline int v4l2_ctrl_s_ctrl_string(struct v4l2_ctrl *ctrl, const char *s) |
872 | { | |
873 | int rval; | |
874 | ||
875 | v4l2_ctrl_lock(ctrl); | |
876 | rval = __v4l2_ctrl_s_ctrl_string(ctrl, s); | |
877 | v4l2_ctrl_unlock(ctrl); | |
878 | ||
879 | return rval; | |
880 | } | |
881 | ||
ce727574 | 882 | /* Internal helper functions that deal with control events. */ |
3e366149 HG |
883 | extern const struct v4l2_subscribed_event_ops v4l2_ctrl_sub_ev_ops; |
884 | void v4l2_ctrl_replace(struct v4l2_event *old, const struct v4l2_event *new); | |
885 | void v4l2_ctrl_merge(const struct v4l2_event *old, struct v4l2_event *new); | |
6e239399 | 886 | |
e2ecb257 HV |
887 | /* Can be used as a vidioc_log_status function that just dumps all controls |
888 | associated with the filehandle. */ | |
889 | int v4l2_ctrl_log_status(struct file *file, void *fh); | |
890 | ||
a26243b0 HV |
891 | /* Can be used as a vidioc_subscribe_event function that just subscribes |
892 | control events. */ | |
893 | int v4l2_ctrl_subscribe_event(struct v4l2_fh *fh, | |
85f5fe39 | 894 | const struct v4l2_event_subscription *sub); |
a26243b0 HV |
895 | |
896 | /* Can be used as a poll function that just polls for control events. */ | |
897 | unsigned int v4l2_ctrl_poll(struct file *file, struct poll_table_struct *wait); | |
898 | ||
0996517c HV |
899 | /* Helpers for ioctl_ops. If hdl == NULL then they will all return -EINVAL. */ |
900 | int v4l2_queryctrl(struct v4l2_ctrl_handler *hdl, struct v4l2_queryctrl *qc); | |
d9a25471 | 901 | int v4l2_query_ext_ctrl(struct v4l2_ctrl_handler *hdl, struct v4l2_query_ext_ctrl *qc); |
0996517c HV |
902 | int v4l2_querymenu(struct v4l2_ctrl_handler *hdl, struct v4l2_querymenu *qm); |
903 | int v4l2_g_ctrl(struct v4l2_ctrl_handler *hdl, struct v4l2_control *ctrl); | |
ab892bac HV |
904 | int v4l2_s_ctrl(struct v4l2_fh *fh, struct v4l2_ctrl_handler *hdl, |
905 | struct v4l2_control *ctrl); | |
0996517c HV |
906 | int v4l2_g_ext_ctrls(struct v4l2_ctrl_handler *hdl, struct v4l2_ext_controls *c); |
907 | int v4l2_try_ext_ctrls(struct v4l2_ctrl_handler *hdl, struct v4l2_ext_controls *c); | |
ab892bac HV |
908 | int v4l2_s_ext_ctrls(struct v4l2_fh *fh, struct v4l2_ctrl_handler *hdl, |
909 | struct v4l2_ext_controls *c); | |
0996517c HV |
910 | |
911 | /* Helpers for subdevices. If the associated ctrl_handler == NULL then they | |
912 | will all return -EINVAL. */ | |
913 | int v4l2_subdev_queryctrl(struct v4l2_subdev *sd, struct v4l2_queryctrl *qc); | |
914 | int v4l2_subdev_querymenu(struct v4l2_subdev *sd, struct v4l2_querymenu *qm); | |
915 | int v4l2_subdev_g_ext_ctrls(struct v4l2_subdev *sd, struct v4l2_ext_controls *cs); | |
916 | int v4l2_subdev_try_ext_ctrls(struct v4l2_subdev *sd, struct v4l2_ext_controls *cs); | |
917 | int v4l2_subdev_s_ext_ctrls(struct v4l2_subdev *sd, struct v4l2_ext_controls *cs); | |
918 | int v4l2_subdev_g_ctrl(struct v4l2_subdev *sd, struct v4l2_control *ctrl); | |
919 | int v4l2_subdev_s_ctrl(struct v4l2_subdev *sd, struct v4l2_control *ctrl); | |
920 | ||
22fa4279 SN |
921 | /* Can be used as a subscribe_event function that just subscribes control |
922 | events. */ | |
923 | int v4l2_ctrl_subdev_subscribe_event(struct v4l2_subdev *sd, struct v4l2_fh *fh, | |
924 | struct v4l2_event_subscription *sub); | |
925 | ||
ffa9b9f0 SN |
926 | /* Log all controls owned by subdev's control handler. */ |
927 | int v4l2_ctrl_subdev_log_status(struct v4l2_subdev *sd); | |
928 | ||
0996517c | 929 | #endif |