v4l2-ctrls.h 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523
  1. /*
  2. V4L2 controls support header.
  3. Copyright (C) 2010 Hans Verkuil <hverkuil@xs4all.nl>
  4. This program is free software; you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation; either version 2 of the License, or
  7. (at your option) any later version.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with this program; if not, write to the Free Software
  14. Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  15. */
  16. #ifndef _V4L2_CTRLS_H
  17. #define _V4L2_CTRLS_H
  18. #include <linux/list.h>
  19. #include <linux/device.h>
  20. #include <linux/videodev2.h>
  21. /* forward references */
  22. struct v4l2_ctrl_handler;
  23. struct v4l2_ctrl_helper;
  24. struct v4l2_ctrl;
  25. struct video_device;
  26. struct v4l2_subdev;
  27. struct v4l2_subscribed_event;
  28. struct v4l2_fh;
  29. /** struct v4l2_ctrl_ops - The control operations that the driver has to provide.
  30. * @g_volatile_ctrl: Get a new value for this control. Generally only relevant
  31. * for volatile (and usually read-only) controls such as a control
  32. * that returns the current signal strength which changes
  33. * continuously.
  34. * If not set, then the currently cached value will be returned.
  35. * @try_ctrl: Test whether the control's value is valid. Only relevant when
  36. * the usual min/max/step checks are not sufficient.
  37. * @s_ctrl: Actually set the new control value. s_ctrl is compulsory. The
  38. * ctrl->handler->lock is held when these ops are called, so no
  39. * one else can access controls owned by that handler.
  40. */
  41. struct v4l2_ctrl_ops {
  42. int (*g_volatile_ctrl)(struct v4l2_ctrl *ctrl);
  43. int (*try_ctrl)(struct v4l2_ctrl *ctrl);
  44. int (*s_ctrl)(struct v4l2_ctrl *ctrl);
  45. };
  46. /** struct v4l2_ctrl - The control structure.
  47. * @node: The list node.
  48. * @ev_subs: The list of control event subscriptions.
  49. * @handler: The handler that owns the control.
  50. * @cluster: Point to start of cluster array.
  51. * @ncontrols: Number of controls in cluster array.
  52. * @done: Internal flag: set for each processed control.
  53. * @is_new: Set when the user specified a new value for this control. It
  54. * is also set when called from v4l2_ctrl_handler_setup. Drivers
  55. * should never set this flag.
  56. * @is_private: If set, then this control is private to its handler and it
  57. * will not be added to any other handlers. Drivers can set
  58. * this flag.
  59. * @is_volatile: If set, then this control is volatile. This means that the
  60. * control's current value cannot be cached and needs to be
  61. * retrieved through the g_volatile_ctrl op. Drivers can set
  62. * this flag.
  63. * @is_auto: If set, then this control selects whether the other cluster
  64. * members are in 'automatic' mode or 'manual' mode. This is
  65. * used for autogain/gain type clusters. Drivers should never
  66. * set this flag directly.
  67. * @manual_mode_value: If the is_auto flag is set, then this is the value
  68. * of the auto control that determines if that control is in
  69. * manual mode. So if the value of the auto control equals this
  70. * value, then the whole cluster is in manual mode. Drivers should
  71. * never set this flag directly.
  72. * @ops: The control ops.
  73. * @id: The control ID.
  74. * @name: The control name.
  75. * @type: The control type.
  76. * @minimum: The control's minimum value.
  77. * @maximum: The control's maximum value.
  78. * @default_value: The control's default value.
  79. * @step: The control's step value for non-menu controls.
  80. * @menu_skip_mask: The control's skip mask for menu controls. This makes it
  81. * easy to skip menu items that are not valid. If bit X is set,
  82. * then menu item X is skipped. Of course, this only works for
  83. * menus with <= 32 menu items. There are no menus that come
  84. * close to that number, so this is OK. Should we ever need more,
  85. * then this will have to be extended to a u64 or a bit array.
  86. * @qmenu: A const char * array for all menu items. Array entries that are
  87. * empty strings ("") correspond to non-existing menu items (this
  88. * is in addition to the menu_skip_mask above). The last entry
  89. * must be NULL.
  90. * @flags: The control's flags.
  91. * @cur: The control's current value.
  92. * @val: The control's new s32 value.
  93. * @val64: The control's new s64 value.
  94. * @string: The control's new string value.
  95. * @priv: The control's private pointer. For use by the driver. It is
  96. * untouched by the control framework. Note that this pointer is
  97. * not freed when the control is deleted. Should this be needed
  98. * then a new internal bitfield can be added to tell the framework
  99. * to free this pointer.
  100. */
  101. struct v4l2_ctrl {
  102. /* Administrative fields */
  103. struct list_head node;
  104. struct list_head ev_subs;
  105. struct v4l2_ctrl_handler *handler;
  106. struct v4l2_ctrl **cluster;
  107. unsigned ncontrols;
  108. unsigned int done:1;
  109. unsigned int is_new:1;
  110. unsigned int is_private:1;
  111. unsigned int is_volatile:1;
  112. unsigned int is_auto:1;
  113. unsigned int manual_mode_value:8;
  114. const struct v4l2_ctrl_ops *ops;
  115. u32 id;
  116. const char *name;
  117. enum v4l2_ctrl_type type;
  118. s32 minimum, maximum, default_value;
  119. union {
  120. u32 step;
  121. u32 menu_skip_mask;
  122. };
  123. const char * const *qmenu;
  124. unsigned long flags;
  125. union {
  126. s32 val;
  127. s64 val64;
  128. char *string;
  129. } cur;
  130. union {
  131. s32 val;
  132. s64 val64;
  133. char *string;
  134. };
  135. void *priv;
  136. };
  137. /** struct v4l2_ctrl_ref - The control reference.
  138. * @node: List node for the sorted list.
  139. * @next: Single-link list node for the hash.
  140. * @ctrl: The actual control information.
  141. * @helper: Pointer to helper struct. Used internally in prepare_ext_ctrls().
  142. *
  143. * Each control handler has a list of these refs. The list_head is used to
  144. * keep a sorted-by-control-ID list of all controls, while the next pointer
  145. * is used to link the control in the hash's bucket.
  146. */
  147. struct v4l2_ctrl_ref {
  148. struct list_head node;
  149. struct v4l2_ctrl_ref *next;
  150. struct v4l2_ctrl *ctrl;
  151. struct v4l2_ctrl_helper *helper;
  152. };
  153. /** struct v4l2_ctrl_handler - The control handler keeps track of all the
  154. * controls: both the controls owned by the handler and those inherited
  155. * from other handlers.
  156. * @lock: Lock to control access to this handler and its controls.
  157. * @ctrls: The list of controls owned by this handler.
  158. * @ctrl_refs: The list of control references.
  159. * @cached: The last found control reference. It is common that the same
  160. * control is needed multiple times, so this is a simple
  161. * optimization.
  162. * @buckets: Buckets for the hashing. Allows for quick control lookup.
  163. * @nr_of_buckets: Total number of buckets in the array.
  164. * @error: The error code of the first failed control addition.
  165. */
  166. struct v4l2_ctrl_handler {
  167. struct mutex lock;
  168. struct list_head ctrls;
  169. struct list_head ctrl_refs;
  170. struct v4l2_ctrl_ref *cached;
  171. struct v4l2_ctrl_ref **buckets;
  172. u16 nr_of_buckets;
  173. int error;
  174. };
  175. /** struct v4l2_ctrl_config - Control configuration structure.
  176. * @ops: The control ops.
  177. * @id: The control ID.
  178. * @name: The control name.
  179. * @type: The control type.
  180. * @min: The control's minimum value.
  181. * @max: The control's maximum value.
  182. * @step: The control's step value for non-menu controls.
  183. * @def: The control's default value.
  184. * @flags: The control's flags.
  185. * @menu_skip_mask: The control's skip mask for menu controls. This makes it
  186. * easy to skip menu items that are not valid. If bit X is set,
  187. * then menu item X is skipped. Of course, this only works for
  188. * menus with <= 32 menu items. There are no menus that come
  189. * close to that number, so this is OK. Should we ever need more,
  190. * then this will have to be extended to a u64 or a bit array.
  191. * @qmenu: A const char * array for all menu items. Array entries that are
  192. * empty strings ("") correspond to non-existing menu items (this
  193. * is in addition to the menu_skip_mask above). The last entry
  194. * must be NULL.
  195. * @is_private: If set, then this control is private to its handler and it
  196. * will not be added to any other handlers.
  197. * @is_volatile: If set, then this control is volatile. This means that the
  198. * control's current value cannot be cached and needs to be
  199. * retrieved through the g_volatile_ctrl op.
  200. */
  201. struct v4l2_ctrl_config {
  202. const struct v4l2_ctrl_ops *ops;
  203. u32 id;
  204. const char *name;
  205. enum v4l2_ctrl_type type;
  206. s32 min;
  207. s32 max;
  208. u32 step;
  209. s32 def;
  210. u32 flags;
  211. u32 menu_skip_mask;
  212. const char * const *qmenu;
  213. unsigned int is_private:1;
  214. unsigned int is_volatile:1;
  215. };
  216. /** v4l2_ctrl_fill() - Fill in the control fields based on the control ID.
  217. *
  218. * This works for all standard V4L2 controls.
  219. * For non-standard controls it will only fill in the given arguments
  220. * and @name will be NULL.
  221. *
  222. * This function will overwrite the contents of @name, @type and @flags.
  223. * The contents of @min, @max, @step and @def may be modified depending on
  224. * the type.
  225. *
  226. * Do not use in drivers! It is used internally for backwards compatibility
  227. * control handling only. Once all drivers are converted to use the new
  228. * control framework this function will no longer be exported.
  229. */
  230. void v4l2_ctrl_fill(u32 id, const char **name, enum v4l2_ctrl_type *type,
  231. s32 *min, s32 *max, s32 *step, s32 *def, u32 *flags);
  232. /** v4l2_ctrl_handler_init() - Initialize the control handler.
  233. * @hdl: The control handler.
  234. * @nr_of_controls_hint: A hint of how many controls this handler is
  235. * expected to refer to. This is the total number, so including
  236. * any inherited controls. It doesn't have to be precise, but if
  237. * it is way off, then you either waste memory (too many buckets
  238. * are allocated) or the control lookup becomes slower (not enough
  239. * buckets are allocated, so there are more slow list lookups).
  240. * It will always work, though.
  241. *
  242. * Returns an error if the buckets could not be allocated. This error will
  243. * also be stored in @hdl->error.
  244. */
  245. int v4l2_ctrl_handler_init(struct v4l2_ctrl_handler *hdl,
  246. unsigned nr_of_controls_hint);
  247. /** v4l2_ctrl_handler_free() - Free all controls owned by the handler and free
  248. * the control list.
  249. * @hdl: The control handler.
  250. *
  251. * Does nothing if @hdl == NULL.
  252. */
  253. void v4l2_ctrl_handler_free(struct v4l2_ctrl_handler *hdl);
  254. /** v4l2_ctrl_handler_setup() - Call the s_ctrl op for all controls belonging
  255. * to the handler to initialize the hardware to the current control values.
  256. * @hdl: The control handler.
  257. *
  258. * Button controls will be skipped, as are read-only controls.
  259. *
  260. * If @hdl == NULL, then this just returns 0.
  261. */
  262. int v4l2_ctrl_handler_setup(struct v4l2_ctrl_handler *hdl);
  263. /** v4l2_ctrl_handler_log_status() - Log all controls owned by the handler.
  264. * @hdl: The control handler.
  265. * @prefix: The prefix to use when logging the control values. If the
  266. * prefix does not end with a space, then ": " will be added
  267. * after the prefix. If @prefix == NULL, then no prefix will be
  268. * used.
  269. *
  270. * For use with VIDIOC_LOG_STATUS.
  271. *
  272. * Does nothing if @hdl == NULL.
  273. */
  274. void v4l2_ctrl_handler_log_status(struct v4l2_ctrl_handler *hdl,
  275. const char *prefix);
  276. /** v4l2_ctrl_new_custom() - Allocate and initialize a new custom V4L2
  277. * control.
  278. * @hdl: The control handler.
  279. * @cfg: The control's configuration data.
  280. * @priv: The control's driver-specific private data.
  281. *
  282. * If the &v4l2_ctrl struct could not be allocated then NULL is returned
  283. * and @hdl->error is set to the error code (if it wasn't set already).
  284. */
  285. struct v4l2_ctrl *v4l2_ctrl_new_custom(struct v4l2_ctrl_handler *hdl,
  286. const struct v4l2_ctrl_config *cfg, void *priv);
  287. /** v4l2_ctrl_new_std() - Allocate and initialize a new standard V4L2 non-menu control.
  288. * @hdl: The control handler.
  289. * @ops: The control ops.
  290. * @id: The control ID.
  291. * @min: The control's minimum value.
  292. * @max: The control's maximum value.
  293. * @step: The control's step value
  294. * @def: The control's default value.
  295. *
  296. * If the &v4l2_ctrl struct could not be allocated, or the control
  297. * ID is not known, then NULL is returned and @hdl->error is set to the
  298. * appropriate error code (if it wasn't set already).
  299. *
  300. * If @id refers to a menu control, then this function will return NULL.
  301. *
  302. * Use v4l2_ctrl_new_std_menu() when adding menu controls.
  303. */
  304. struct v4l2_ctrl *v4l2_ctrl_new_std(struct v4l2_ctrl_handler *hdl,
  305. const struct v4l2_ctrl_ops *ops,
  306. u32 id, s32 min, s32 max, u32 step, s32 def);
  307. /** v4l2_ctrl_new_std_menu() - Allocate and initialize a new standard V4L2 menu control.
  308. * @hdl: The control handler.
  309. * @ops: The control ops.
  310. * @id: The control ID.
  311. * @max: The control's maximum value.
  312. * @mask: The control's skip mask for menu controls. This makes it
  313. * easy to skip menu items that are not valid. If bit X is set,
  314. * then menu item X is skipped. Of course, this only works for
  315. * menus with <= 32 menu items. There are no menus that come
  316. * close to that number, so this is OK. Should we ever need more,
  317. * then this will have to be extended to a u64 or a bit array.
  318. * @def: The control's default value.
  319. *
  320. * Same as v4l2_ctrl_new_std(), but @min is set to 0 and the @mask value
  321. * determines which menu items are to be skipped.
  322. *
  323. * If @id refers to a non-menu control, then this function will return NULL.
  324. */
  325. struct v4l2_ctrl *v4l2_ctrl_new_std_menu(struct v4l2_ctrl_handler *hdl,
  326. const struct v4l2_ctrl_ops *ops,
  327. u32 id, s32 max, s32 mask, s32 def);
  328. /** v4l2_ctrl_add_ctrl() - Add a control from another handler to this handler.
  329. * @hdl: The control handler.
  330. * @ctrl: The control to add.
  331. *
  332. * It will return NULL if it was unable to add the control reference.
  333. * If the control already belonged to the handler, then it will do
  334. * nothing and just return @ctrl.
  335. */
  336. struct v4l2_ctrl *v4l2_ctrl_add_ctrl(struct v4l2_ctrl_handler *hdl,
  337. struct v4l2_ctrl *ctrl);
  338. /** v4l2_ctrl_add_handler() - Add all controls from handler @add to
  339. * handler @hdl.
  340. * @hdl: The control handler.
  341. * @add: The control handler whose controls you want to add to
  342. * the @hdl control handler.
  343. *
  344. * Does nothing if either of the two is a NULL pointer.
  345. * In case of an error @hdl->error will be set to the error code (if it
  346. * wasn't set already).
  347. */
  348. int v4l2_ctrl_add_handler(struct v4l2_ctrl_handler *hdl,
  349. struct v4l2_ctrl_handler *add);
  350. /** v4l2_ctrl_cluster() - Mark all controls in the cluster as belonging to that cluster.
  351. * @ncontrols: The number of controls in this cluster.
  352. * @controls: The cluster control array of size @ncontrols.
  353. */
  354. void v4l2_ctrl_cluster(unsigned ncontrols, struct v4l2_ctrl **controls);
  355. /** v4l2_ctrl_auto_cluster() - Mark all controls in the cluster as belonging to
  356. * that cluster and set it up for autofoo/foo-type handling.
  357. * @ncontrols: The number of controls in this cluster.
  358. * @controls: The cluster control array of size @ncontrols. The first control
  359. * must be the 'auto' control (e.g. autogain, autoexposure, etc.)
  360. * @manual_val: The value for the first control in the cluster that equals the
  361. * manual setting.
  362. * @set_volatile: If true, then all controls except the first auto control will
  363. * have is_volatile set to true. If false, then is_volatile will not
  364. * be touched.
  365. *
  366. * Use for control groups where one control selects some automatic feature and
  367. * the other controls are only active whenever the automatic feature is turned
  368. * off (manual mode). Typical examples: autogain vs gain, auto-whitebalance vs
  369. * red and blue balance, etc.
  370. *
  371. * The behavior of such controls is as follows:
  372. *
  373. * When the autofoo control is set to automatic, then any manual controls
  374. * are set to inactive and any reads will call g_volatile_ctrl (if the control
  375. * was marked volatile).
  376. *
  377. * When the autofoo control is set to manual, then any manual controls will
  378. * be marked active, and any reads will just return the current value without
  379. * going through g_volatile_ctrl.
  380. *
  381. * In addition, this function will set the V4L2_CTRL_FLAG_UPDATE flag
  382. * on the autofoo control and V4L2_CTRL_FLAG_INACTIVE on the foo control(s)
  383. * if autofoo is in auto mode.
  384. */
  385. void v4l2_ctrl_auto_cluster(unsigned ncontrols, struct v4l2_ctrl **controls,
  386. u8 manual_val, bool set_volatile);
  387. /** v4l2_ctrl_find() - Find a control with the given ID.
  388. * @hdl: The control handler.
  389. * @id: The control ID to find.
  390. *
  391. * If @hdl == NULL this will return NULL as well. Will lock the handler so
  392. * do not use from inside &v4l2_ctrl_ops.
  393. */
  394. struct v4l2_ctrl *v4l2_ctrl_find(struct v4l2_ctrl_handler *hdl, u32 id);
  395. /** v4l2_ctrl_activate() - Make the control active or inactive.
  396. * @ctrl: The control to (de)activate.
  397. * @active: True if the control should become active.
  398. *
  399. * This sets or clears the V4L2_CTRL_FLAG_INACTIVE flag atomically.
  400. * Does nothing if @ctrl == NULL.
  401. * This will usually be called from within the s_ctrl op.
  402. * The V4L2_EVENT_CTRL event will be generated afterwards.
  403. *
  404. * This function assumes that the control handler is locked.
  405. */
  406. void v4l2_ctrl_activate(struct v4l2_ctrl *ctrl, bool active);
  407. /** v4l2_ctrl_grab() - Mark the control as grabbed or not grabbed.
  408. * @ctrl: The control to (de)activate.
  409. * @grabbed: True if the control should become grabbed.
  410. *
  411. * This sets or clears the V4L2_CTRL_FLAG_GRABBED flag atomically.
  412. * Does nothing if @ctrl == NULL.
  413. * The V4L2_EVENT_CTRL event will be generated afterwards.
  414. * This will usually be called when starting or stopping streaming in the
  415. * driver.
  416. *
  417. * This function assumes that the control handler is not locked and will
  418. * take the lock itself.
  419. */
  420. void v4l2_ctrl_grab(struct v4l2_ctrl *ctrl, bool grabbed);
  421. /** v4l2_ctrl_lock() - Helper function to lock the handler
  422. * associated with the control.
  423. * @ctrl: The control to lock.
  424. */
  425. static inline void v4l2_ctrl_lock(struct v4l2_ctrl *ctrl)
  426. {
  427. mutex_lock(&ctrl->handler->lock);
  428. }
  429. /** v4l2_ctrl_lock() - Helper function to unlock the handler
  430. * associated with the control.
  431. * @ctrl: The control to unlock.
  432. */
  433. static inline void v4l2_ctrl_unlock(struct v4l2_ctrl *ctrl)
  434. {
  435. mutex_unlock(&ctrl->handler->lock);
  436. }
  437. /** v4l2_ctrl_g_ctrl() - Helper function to get the control's value from within a driver.
  438. * @ctrl: The control.
  439. *
  440. * This returns the control's value safely by going through the control
  441. * framework. This function will lock the control's handler, so it cannot be
  442. * used from within the &v4l2_ctrl_ops functions.
  443. *
  444. * This function is for integer type controls only.
  445. */
  446. s32 v4l2_ctrl_g_ctrl(struct v4l2_ctrl *ctrl);
  447. /** v4l2_ctrl_s_ctrl() - Helper function to set the control's value from within a driver.
  448. * @ctrl: The control.
  449. * @val: The new value.
  450. *
  451. * This set the control's new value safely by going through the control
  452. * framework. This function will lock the control's handler, so it cannot be
  453. * used from within the &v4l2_ctrl_ops functions.
  454. *
  455. * This function is for integer type controls only.
  456. */
  457. int v4l2_ctrl_s_ctrl(struct v4l2_ctrl *ctrl, s32 val);
  458. /* Internal helper functions that deal with control events. */
  459. void v4l2_ctrl_add_event(struct v4l2_ctrl *ctrl,
  460. struct v4l2_subscribed_event *sev);
  461. void v4l2_ctrl_del_event(struct v4l2_ctrl *ctrl,
  462. struct v4l2_subscribed_event *sev);
  463. /* Helpers for ioctl_ops. If hdl == NULL then they will all return -EINVAL. */
  464. int v4l2_queryctrl(struct v4l2_ctrl_handler *hdl, struct v4l2_queryctrl *qc);
  465. int v4l2_querymenu(struct v4l2_ctrl_handler *hdl, struct v4l2_querymenu *qm);
  466. int v4l2_g_ctrl(struct v4l2_ctrl_handler *hdl, struct v4l2_control *ctrl);
  467. int v4l2_s_ctrl(struct v4l2_fh *fh, struct v4l2_ctrl_handler *hdl,
  468. struct v4l2_control *ctrl);
  469. int v4l2_g_ext_ctrls(struct v4l2_ctrl_handler *hdl, struct v4l2_ext_controls *c);
  470. int v4l2_try_ext_ctrls(struct v4l2_ctrl_handler *hdl, struct v4l2_ext_controls *c);
  471. int v4l2_s_ext_ctrls(struct v4l2_fh *fh, struct v4l2_ctrl_handler *hdl,
  472. struct v4l2_ext_controls *c);
  473. /* Helpers for subdevices. If the associated ctrl_handler == NULL then they
  474. will all return -EINVAL. */
  475. int v4l2_subdev_queryctrl(struct v4l2_subdev *sd, struct v4l2_queryctrl *qc);
  476. int v4l2_subdev_querymenu(struct v4l2_subdev *sd, struct v4l2_querymenu *qm);
  477. int v4l2_subdev_g_ext_ctrls(struct v4l2_subdev *sd, struct v4l2_ext_controls *cs);
  478. int v4l2_subdev_try_ext_ctrls(struct v4l2_subdev *sd, struct v4l2_ext_controls *cs);
  479. int v4l2_subdev_s_ext_ctrls(struct v4l2_subdev *sd, struct v4l2_ext_controls *cs);
  480. int v4l2_subdev_g_ctrl(struct v4l2_subdev *sd, struct v4l2_control *ctrl);
  481. int v4l2_subdev_s_ctrl(struct v4l2_subdev *sd, struct v4l2_control *ctrl);
  482. #endif