• Home
  • Raw
  • Download

Lines Matching +full:camera +full:- +full:command +full:- +full:set

1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
13 VIDIOC_G_EXT_CTRLS - VIDIOC_S_EXT_CTRLS - VIDIOC_TRY_EXT_CTRLS - Get or set the value of several co…
42 These ioctls allow the caller to get or set multiple controls
44 :ref:`ctrl-class`) and all controls in the control array must belong
53 To get the current value of a set of controls applications initialize
56 :ref:`VIDIOC_G_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` ioctl. String controls must also set the
58 (``V4L2_CTRL_FLAG_HAS_PAYLOAD`` is set) must set the ``ptr`` field.
61 relevant for pointer-type controls like strings), then the driver will
62 set ``size`` to a valid value and return an ``ENOSPC`` error code. You
63 should re-allocate the memory to this new size and try again. For the
70 N-dimensional arrays are set and retrieved row-by-row. You cannot set a
71 partial array, all elements have to be set or retrieved. The total size
75 To change the value of a set of controls applications initialize the
78 the :ref:`VIDIOC_S_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` ioctl. The controls will only be set if *all*
81 To check if a set of controls have correct values applications
92 appropriate. In the first case the new value is set in struct
97 If ``request_fd`` is set to a not-yet-queued :ref:`request <media-request-api>`
98 file descriptor and ``which`` is set to ``V4L2_CTRL_WHICH_REQUEST_VAL``,
109 If ``request_fd`` is specified and ``which`` is set to
116 The driver will only set/get these controls if all control values are
118 were set/get. Only low-level errors (e. g. a failed i2c command) can
131 .. flat-table:: struct v4l2_ext_control
132 :header-rows: 0
133 :stub-columns: 0
136 * - __u32
137 - ``id``
138 - Identifies the control, set by the application.
139 * - __u32
140 - ``size``
141 - The total size in bytes of the payload of this control.
142 * - :cspan:`2` The ``size`` field is normally 0, but for pointer
143 controls this should be set to the size of the memory that contains
146 is less than is required to store the payload result, then it is set
156 * - __u32
157 - ``reserved2``\ [1]
158 - Reserved for future extensions. Drivers and applications must set
160 * - union {
161 - (anonymous)
162 * - __s32
163 - ``value``
164 - New value or current value. Valid if this control is not of type
166 not set.
167 * - __s64
168 - ``value64``
169 - New value or current value. Valid if this control is of type
171 not set.
172 * - char *
173 - ``string``
174 - A pointer to a string. Valid if this control is of type
176 * - __u8 *
177 - ``p_u8``
178 - A pointer to a matrix control of unsigned 8-bit values. Valid if
180 * - __u16 *
181 - ``p_u16``
182 - A pointer to a matrix control of unsigned 16-bit values. Valid if
184 * - __u32 *
185 - ``p_u32``
186 - A pointer to a matrix control of unsigned 32-bit values. Valid if
188 * - __s32 *
189 - ``p_s32``
190 - A pointer to a matrix control of signed 32-bit values. Valid if
192 ``V4L2_CTRL_FLAG_HAS_PAYLOAD`` is set.
193 * - __s64 *
194 - ``p_s64``
195 - A pointer to a matrix control of signed 64-bit values. Valid if
197 ``V4L2_CTRL_FLAG_HAS_PAYLOAD`` is set.
198 * - struct :c:type:`v4l2_area` *
199 - ``p_area``
200 - A pointer to a struct :c:type:`v4l2_area`. Valid if this control is
202 * - struct :c:type:`v4l2_rect` *
203 - ``p_rect``
204 - A pointer to a struct :c:type:`v4l2_rect`. Valid if this control is
206 * - struct :c:type:`v4l2_ctrl_h264_sps` *
207 - ``p_h264_sps``
208 - A pointer to a struct :c:type:`v4l2_ctrl_h264_sps`. Valid if this control is
210 * - struct :c:type:`v4l2_ctrl_h264_pps` *
211 - ``p_h264_pps``
212 - A pointer to a struct :c:type:`v4l2_ctrl_h264_pps`. Valid if this control is
214 * - struct :c:type:`v4l2_ctrl_h264_scaling_matrix` *
215 - ``p_h264_scaling_matrix``
216 - A pointer to a struct :c:type:`v4l2_ctrl_h264_scaling_matrix`. Valid if this control is
218 * - struct :c:type:`v4l2_ctrl_h264_pred_weights` *
219 - ``p_h264_pred_weights``
220 - A pointer to a struct :c:type:`v4l2_ctrl_h264_pred_weights`. Valid if this control is
222 * - struct :c:type:`v4l2_ctrl_h264_slice_params` *
223 - ``p_h264_slice_params``
224 - A pointer to a struct :c:type:`v4l2_ctrl_h264_slice_params`. Valid if this control is
226 * - struct :c:type:`v4l2_ctrl_h264_decode_params` *
227 - ``p_h264_decode_params``
228 - A pointer to a struct :c:type:`v4l2_ctrl_h264_decode_params`. Valid if this control is
230 * - struct :c:type:`v4l2_ctrl_fwht_params` *
231 - ``p_fwht_params``
232 - A pointer to a struct :c:type:`v4l2_ctrl_fwht_params`. Valid if this control is
234 * - struct :c:type:`v4l2_ctrl_vp8_frame` *
235 - ``p_vp8_frame``
236 - A pointer to a struct :c:type:`v4l2_ctrl_vp8_frame`. Valid if this control is
238 * - struct :c:type:`v4l2_ctrl_mpeg2_sequence` *
239 - ``p_mpeg2_sequence``
240 - A pointer to a struct :c:type:`v4l2_ctrl_mpeg2_sequence`. Valid if this control is
242 * - struct :c:type:`v4l2_ctrl_mpeg2_picture` *
243 - ``p_mpeg2_picture``
244 - A pointer to a struct :c:type:`v4l2_ctrl_mpeg2_picture`. Valid if this control is
246 * - struct :c:type:`v4l2_ctrl_mpeg2_quantisation` *
247 - ``p_mpeg2_quantisation``
248 - A pointer to a struct :c:type:`v4l2_ctrl_mpeg2_quantisation`. Valid if this control is
250 * - struct :c:type:`v4l2_ctrl_vp9_compressed_hdr` *
251 - ``p_vp9_compressed_hdr_probs``
252 - A pointer to a struct :c:type:`v4l2_ctrl_vp9_compressed_hdr`. Valid if this
254 * - struct :c:type:`v4l2_ctrl_vp9_frame` *
255 - ``p_vp9_frame``
256 - A pointer to a struct :c:type:`v4l2_ctrl_vp9_frame`. Valid if this
258 * - struct :c:type:`v4l2_ctrl_hdr10_cll_info` *
259 - ``p_hdr10_cll``
260 - A pointer to a struct :c:type:`v4l2_ctrl_hdr10_cll_info`. Valid if this control is
262 * - struct :c:type:`v4l2_ctrl_hdr10_mastering_display` *
263 - ``p_hdr10_mastering``
264 - A pointer to a struct :c:type:`v4l2_ctrl_hdr10_mastering_display`. Valid if this control is
266 * - struct :c:type:`v4l2_ctrl_hevc_sps` *
267 - ``p_hevc_sps``
268 - A pointer to a struct :c:type:`v4l2_ctrl_hevc_sps`. Valid if this
270 * - struct :c:type:`v4l2_ctrl_hevc_pps` *
271 - ``p_hevc_pps``
272 - A pointer to a struct :c:type:`v4l2_ctrl_hevc_pps`. Valid if this
274 * - struct :c:type:`v4l2_ctrl_hevc_slice_params` *
275 - ``p_hevc_slice_params``
276 - A pointer to a struct :c:type:`v4l2_ctrl_hevc_slice_params`. Valid if this
278 * - struct :c:type:`v4l2_ctrl_hevc_scaling_matrix` *
279 - ``p_hevc_scaling_matrix``
280 - A pointer to a struct :c:type:`v4l2_ctrl_hevc_scaling_matrix`. Valid if this
282 * - struct :c:type:`v4l2_ctrl_hevc_decode_params` *
283 - ``p_hevc_decode_params``
284 - A pointer to a struct :c:type:`v4l2_ctrl_hevc_decode_params`. Valid if this
286 * - struct :c:type:`v4l2_ctrl_av1_sequence` *
287 - ``p_av1_sequence``
288 - A pointer to a struct :c:type:`v4l2_ctrl_av1_sequence`. Valid if this control is
290 * - struct :c:type:`v4l2_ctrl_av1_tile_group_entry` *
291 - ``p_av1_tile_group_entry``
292 - A pointer to a struct :c:type:`v4l2_ctrl_av1_tile_group_entry`. Valid if this control is
294 * - struct :c:type:`v4l2_ctrl_av1_frame` *
295 - ``p_av1_frame``
296 - A pointer to a struct :c:type:`v4l2_ctrl_av1_frame`. Valid if this control is
298 * - struct :c:type:`v4l2_ctrl_av1_film_grain` *
299 - ``p_av1_film_grain``
300 - A pointer to a struct :c:type:`v4l2_ctrl_av1_film_grain`. Valid if this control is
302 * - struct :c:type:`v4l2_ctrl_hdr10_cll_info` *
303 - ``p_hdr10_cll_info``
304 - A pointer to a struct :c:type:`v4l2_ctrl_hdr10_cll_info`. Valid if this control is
306 * - struct :c:type:`v4l2_ctrl_hdr10_mastering_display` *
307 - ``p_hdr10_mastering_display``
308 - A pointer to a struct :c:type:`v4l2_ctrl_hdr10_mastering_display`. Valid if this control is
310 * - void *
311 - ``ptr``
312 - A pointer to a compound type which can be an N-dimensional array
315 ``V4L2_CTRL_FLAG_HAS_PAYLOAD`` is set for this control.
316 * - }
317 -
329 .. flat-table:: struct v4l2_ext_controls
330 :header-rows: 0
331 :stub-columns: 0
334 * - union {
335 - (anonymous)
336 * - __u32
337 - ``which``
338 - Which value of the control to get/set/try.
339 * - :cspan:`2` ``V4L2_CTRL_WHICH_CUR_VAL`` will return the current value of
344 the control value has to be retrieved from a request or tried/set for
351 default/minimum/maximum value of the control, you cannot set or try it.
355 by the ``V4L2_CTRL_FLAG_HAS_WHICH_MIN_MAX`` flag. Most non-compound
360 value will result in the error code -EINVAL.
363 (see :ref:`ctrl-class`). In that case all controls have to
371 * - __u32
372 - ``ctrl_class``
373 - Deprecated name kept for backwards compatibility. Use ``which`` instead.
374 * - }
375 -
376 * - __u32
377 - ``count``
378 - The number of controls in the controls array. May also be zero.
379 * - __u32
380 - ``error_idx``
381 - Index of the failing control. Set by the driver in case of an error.
382 * - :cspan:`2` If the error is associated
383 with a particular control, then ``error_idx`` is set to the index
386 ``error_idx`` is set to ``count``. The value is undefined if the
391 valid controls, if no attempt is made to write to a read-only
392 control or read from a write-only control, and any other up-front
396 it impossible to do those checks up-front. However, drivers should
397 make a best-effort to do as many up-front checks as possible.
400 inconsistent state due to easy-to-avoid problems. But it leads to
406 The, in hindsight quite poor, solution for that is to set
408 unfortunate side-effect that it is not possible to see which
412 ``error_idx-1`` were read or written correctly, and the state of
417 ``error_idx`` will just be set to the control that failed the
419 :ref:`VIDIOC_S_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` fails with ``error_idx`` set to ``count``,
423 * - __s32
424 - ``request_fd``
425 - File descriptor of the request to be used by this operation. Only
426 valid if ``which`` is set to ``V4L2_CTRL_WHICH_REQUEST_VAL``.
430 * - __u32
431 - ``reserved``\ [1]
432 - Reserved for future extensions.
434 Drivers and applications must set the array to zero.
435 * - struct :c:type:`v4l2_ext_control` *
436 - ``controls``
437 - Pointer to an array of ``count`` v4l2_ext_control structures.
445 .. _ctrl-class:
447 .. flat-table:: Control classes
448 :header-rows: 0
449 :stub-columns: 0
452 * - ``V4L2_CTRL_CLASS_USER``
453 - 0x980000
454 - The class containing user controls. These controls are described
455 in :ref:`control`. All controls that can be set using the
459 * - ``V4L2_CTRL_CLASS_CODEC``
460 - 0x990000
461 - The class containing stateful codec controls. These controls are
462 described in :ref:`codec-controls`.
463 * - ``V4L2_CTRL_CLASS_CAMERA``
464 - 0x9a0000
465 - The class containing camera controls. These controls are described
466 in :ref:`camera-controls`.
467 * - ``V4L2_CTRL_CLASS_FM_TX``
468 - 0x9b0000
469 - The class containing FM Transmitter (FM TX) controls. These
470 controls are described in :ref:`fm-tx-controls`.
471 * - ``V4L2_CTRL_CLASS_FLASH``
472 - 0x9c0000
473 - The class containing flash device controls. These controls are
474 described in :ref:`flash-controls`.
475 * - ``V4L2_CTRL_CLASS_JPEG``
476 - 0x9d0000
477 - The class containing JPEG compression controls. These controls are
478 described in :ref:`jpeg-controls`.
479 * - ``V4L2_CTRL_CLASS_IMAGE_SOURCE``
480 - 0x9e0000
481 - The class containing image source controls. These controls are
482 described in :ref:`image-source-controls`.
483 * - ``V4L2_CTRL_CLASS_IMAGE_PROC``
484 - 0x9f0000
485 - The class containing image processing controls. These controls are
486 described in :ref:`image-process-controls`.
487 * - ``V4L2_CTRL_CLASS_FM_RX``
488 - 0xa10000
489 - The class containing FM Receiver (FM RX) controls. These controls
490 are described in :ref:`fm-rx-controls`.
491 * - ``V4L2_CTRL_CLASS_RF_TUNER``
492 - 0xa20000
493 - The class containing RF tuner controls. These controls are
494 described in :ref:`rf-tuner-controls`.
495 * - ``V4L2_CTRL_CLASS_DETECT``
496 - 0xa30000
497 - The class containing motion or object detection controls. These controls
498 are described in :ref:`detect-controls`.
499 * - ``V4L2_CTRL_CLASS_CODEC_STATELESS``
500 - 0xa40000
501 - The class containing stateless codec controls. These controls are
502 described in :ref:`codec-stateless-controls`.
503 * - ``V4L2_CTRL_CLASS_COLORIMETRY``
504 - 0xa50000
505 - The class containing colorimetry controls. These controls are
506 described in :ref:`colorimetry-controls`.
511 On success 0 is returned, on error -1 and the ``errno`` variable is set
513 :ref:`Generic Error Codes <gen-errors>` chapter.
521 driver), or the ``which`` field was set to ``V4L2_CTRL_WHICH_REQUEST_VAL``
535 belongs to, or (if the ``which`` field was set to
541 field ``size`` is set to a value that is enough to store the payload
545 Attempt to try or set a read-only control, or to get a write-only
549 Or the ``which`` field was set to ``V4L2_CTRL_WHICH_REQUEST_VAL`` but the
552 Or if there is an attempt to set an inactive control and the driver is