Lines Matching +full:control +full:-
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…
43 atomically. Control IDs are grouped into control classes (see
44 :ref:`ctrl-class`) and all controls in the control array must belong
45 to the same control class.
60 If the ``size`` is too small to receive the control result (only
61 relevant for pointer-type controls like strings), then the driver will
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
79 control values are valid.
93 :c:type:`v4l2_ext_control`. If the new control value
95 control), then this will also result in an ``EINVAL`` error code error.
97 If ``request_fd`` is set to a not-yet-queued :ref:`request <media-request-api>`
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
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
167 * - __s64
168 - ``value64``
169 - New value or current value. Valid if this control is of type
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
179 this control is of type ``V4L2_CTRL_TYPE_U8``.
180 * - __u16 *
181 - ``p_u16``
182 - A pointer to a matrix control of unsigned 16-bit values. Valid if
183 this control is of type ``V4L2_CTRL_TYPE_U16``.
184 * - __u32 *
185 - ``p_u32``
186 - A pointer to a matrix control of unsigned 32-bit values. Valid if
187 this control is of type ``V4L2_CTRL_TYPE_U32``.
188 * - __s32 *
189 - ``p_s32``
190 - A pointer to a matrix control of signed 32-bit values. Valid if
191 this control is of type ``V4L2_CTRL_TYPE_INTEGER`` and
193 * - __s64 *
194 - ``p_s64``
195 - A pointer to a matrix control of signed 64-bit values. Valid if
196 this control is of type ``V4L2_CTRL_TYPE_INTEGER64`` and
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_ctrl_h264_sps` *
203 - ``p_h264_sps``
204 - A pointer to a struct :c:type:`v4l2_ctrl_h264_sps`. Valid if this control is
206 * - struct :c:type:`v4l2_ctrl_h264_pps` *
207 - ``p_h264_pps``
208 - A pointer to a struct :c:type:`v4l2_ctrl_h264_pps`. Valid if this control is
210 * - struct :c:type:`v4l2_ctrl_h264_scaling_matrix` *
211 - ``p_h264_scaling_matrix``
212 - A pointer to a struct :c:type:`v4l2_ctrl_h264_scaling_matrix`. Valid if this control is
214 * - struct :c:type:`v4l2_ctrl_h264_pred_weights` *
215 - ``p_h264_pred_weights``
216 - A pointer to a struct :c:type:`v4l2_ctrl_h264_pred_weights`. Valid if this control is
218 * - struct :c:type:`v4l2_ctrl_h264_slice_params` *
219 - ``p_h264_slice_params``
220 - A pointer to a struct :c:type:`v4l2_ctrl_h264_slice_params`. Valid if this control is
222 * - struct :c:type:`v4l2_ctrl_h264_decode_params` *
223 - ``p_h264_decode_params``
224 - A pointer to a struct :c:type:`v4l2_ctrl_h264_decode_params`. Valid if this control is
226 * - struct :c:type:`v4l2_ctrl_fwht_params` *
227 - ``p_fwht_params``
228 - A pointer to a struct :c:type:`v4l2_ctrl_fwht_params`. Valid if this control is
230 * - struct :c:type:`v4l2_ctrl_vp8_frame` *
231 - ``p_vp8_frame``
232 - A pointer to a struct :c:type:`v4l2_ctrl_vp8_frame`. Valid if this control is
234 * - struct :c:type:`v4l2_ctrl_mpeg2_sequence` *
235 - ``p_mpeg2_sequence``
236 - A pointer to a struct :c:type:`v4l2_ctrl_mpeg2_sequence`. Valid if this control is
238 * - struct :c:type:`v4l2_ctrl_mpeg2_picture` *
239 - ``p_mpeg2_picture``
240 - A pointer to a struct :c:type:`v4l2_ctrl_mpeg2_picture`. Valid if this control is
242 * - struct :c:type:`v4l2_ctrl_mpeg2_quantisation` *
243 - ``p_mpeg2_quantisation``
244 - A pointer to a struct :c:type:`v4l2_ctrl_mpeg2_quantisation`. Valid if this control is
246 * - struct :c:type:`v4l2_ctrl_vp9_compressed_hdr` *
247 - ``p_vp9_compressed_hdr_probs``
248 - A pointer to a struct :c:type:`v4l2_ctrl_vp9_compressed_hdr`. Valid if this
249 control is of type ``V4L2_CTRL_TYPE_VP9_COMPRESSED_HDR``.
250 * - struct :c:type:`v4l2_ctrl_vp9_frame` *
251 - ``p_vp9_frame``
252 - A pointer to a struct :c:type:`v4l2_ctrl_vp9_frame`. Valid if this
253 control is of type ``V4L2_CTRL_TYPE_VP9_FRAME``.
254 * - struct :c:type:`v4l2_ctrl_hdr10_cll_info` *
255 - ``p_hdr10_cll``
256 - A pointer to a struct :c:type:`v4l2_ctrl_hdr10_cll_info`. Valid if this control is
258 * - struct :c:type:`v4l2_ctrl_hdr10_mastering_display` *
259 - ``p_hdr10_mastering``
260 - A pointer to a struct :c:type:`v4l2_ctrl_hdr10_mastering_display`. Valid if this control is
262 * - struct :c:type:`v4l2_ctrl_hevc_sps` *
263 - ``p_hevc_sps``
264 - A pointer to a struct :c:type:`v4l2_ctrl_hevc_sps`. Valid if this
265 control is of type ``V4L2_CTRL_TYPE_HEVC_SPS``.
266 * - struct :c:type:`v4l2_ctrl_hevc_pps` *
267 - ``p_hevc_pps``
268 - A pointer to a struct :c:type:`v4l2_ctrl_hevc_pps`. Valid if this
269 control is of type ``V4L2_CTRL_TYPE_HEVC_PPS``.
270 * - struct :c:type:`v4l2_ctrl_hevc_slice_params` *
271 - ``p_hevc_slice_params``
272 - A pointer to a struct :c:type:`v4l2_ctrl_hevc_slice_params`. Valid if this
273 control is of type ``V4L2_CTRL_TYPE_HEVC_SLICE_PARAMS``.
274 * - struct :c:type:`v4l2_ctrl_hevc_scaling_matrix` *
275 - ``p_hevc_scaling_matrix``
276 - A pointer to a struct :c:type:`v4l2_ctrl_hevc_scaling_matrix`. Valid if this
277 control is of type ``V4L2_CTRL_TYPE_HEVC_SCALING_MATRIX``.
278 * - struct :c:type:`v4l2_ctrl_hevc_decode_params` *
279 - ``p_hevc_decode_params``
280 - A pointer to a struct :c:type:`v4l2_ctrl_hevc_decode_params`. Valid if this
281 control is of type ``V4L2_CTRL_TYPE_HEVC_DECODE_PARAMS``.
282 * - struct :c:type:`v4l2_ctrl_av1_sequence` *
283 - ``p_av1_sequence``
284 - A pointer to a struct :c:type:`v4l2_ctrl_av1_sequence`. Valid if this control is
286 * - struct :c:type:`v4l2_ctrl_av1_tile_group_entry` *
287 - ``p_av1_tile_group_entry``
288 - A pointer to a struct :c:type:`v4l2_ctrl_av1_tile_group_entry`. Valid if this control is
290 * - struct :c:type:`v4l2_ctrl_av1_frame` *
291 - ``p_av1_frame``
292 - A pointer to a struct :c:type:`v4l2_ctrl_av1_frame`. Valid if this control is
294 * - struct :c:type:`v4l2_ctrl_av1_film_grain` *
295 - ``p_av1_film_grain``
296 - A pointer to a struct :c:type:`v4l2_ctrl_av1_film_grain`. Valid if this control is
298 * - void *
299 - ``ptr``
300 - A pointer to a compound type which can be an N-dimensional array
301 and/or a compound type (the control's type is >=
303 ``V4L2_CTRL_FLAG_HAS_PAYLOAD`` is set for this control.
304 * - }
305 -
317 .. flat-table:: struct v4l2_ext_controls
318 :header-rows: 0
319 :stub-columns: 0
322 * - union {
323 - (anonymous)
324 * - __u32
325 - ``which``
326 - Which value of the control to get/set/try.
327 * - :cspan:`2` ``V4L2_CTRL_WHICH_CUR_VAL`` will return the current value of
328 the control, ``V4L2_CTRL_WHICH_DEF_VAL`` will return the default
329 value of the control and ``V4L2_CTRL_WHICH_REQUEST_VAL`` indicates that
336 get the default value of the control, you cannot set or try it.
338 For backwards compatibility you can also use a control class here
339 (see :ref:`ctrl-class`). In that case all controls have to
340 belong to that control class. This usage is deprecated, instead
343 that require a control class here. You can test for such drivers
347 * - __u32
348 - ``ctrl_class``
349 - Deprecated name kept for backwards compatibility. Use ``which`` instead.
350 * - }
351 -
352 * - __u32
353 - ``count``
354 - The number of controls in the controls array. May also be zero.
355 * - __u32
356 - ``error_idx``
357 - Index of the failing control. Set by the driver in case of an error.
358 * - :cspan:`2` If the error is associated
359 with a particular control, then ``error_idx`` is set to the index
360 of that control. If the error is not related to a specific
361 control, or the validation step failed (see below), then
367 valid controls, if no attempt is made to write to a read-only
368 control or read from a write-only control, and any other up-front
372 it impossible to do those checks up-front. However, drivers should
373 make a best-effort to do as many up-front checks as possible.
376 inconsistent state due to easy-to-avoid problems. But it leads to
384 unfortunate side-effect that it is not possible to see which
385 control failed the validation. If the validation was successful
388 ``error_idx-1`` were read or written correctly, and the state of
393 ``error_idx`` will just be set to the control that failed the
397 actual control that failed the validation step. Unfortunately,
399 * - __s32
400 - ``request_fd``
401 - File descriptor of the request to be used by this operation. Only
406 * - __u32
407 - ``reserved``\ [1]
408 - Reserved for future extensions.
411 * - struct :c:type:`v4l2_ext_control` *
412 - ``controls``
413 - Pointer to an array of ``count`` v4l2_ext_control structures.
421 .. _ctrl-class:
423 .. flat-table:: Control classes
424 :header-rows: 0
425 :stub-columns: 0
428 * - ``V4L2_CTRL_CLASS_USER``
429 - 0x980000
430 - The class containing user controls. These controls are described
431 in :ref:`control`. All controls that can be set using the
435 * - ``V4L2_CTRL_CLASS_CODEC``
436 - 0x990000
437 - The class containing stateful codec controls. These controls are
438 described in :ref:`codec-controls`.
439 * - ``V4L2_CTRL_CLASS_CAMERA``
440 - 0x9a0000
441 - The class containing camera controls. These controls are described
442 in :ref:`camera-controls`.
443 * - ``V4L2_CTRL_CLASS_FM_TX``
444 - 0x9b0000
445 - The class containing FM Transmitter (FM TX) controls. These
446 controls are described in :ref:`fm-tx-controls`.
447 * - ``V4L2_CTRL_CLASS_FLASH``
448 - 0x9c0000
449 - The class containing flash device controls. These controls are
450 described in :ref:`flash-controls`.
451 * - ``V4L2_CTRL_CLASS_JPEG``
452 - 0x9d0000
453 - The class containing JPEG compression controls. These controls are
454 described in :ref:`jpeg-controls`.
455 * - ``V4L2_CTRL_CLASS_IMAGE_SOURCE``
456 - 0x9e0000
457 - The class containing image source controls. These controls are
458 described in :ref:`image-source-controls`.
459 * - ``V4L2_CTRL_CLASS_IMAGE_PROC``
460 - 0x9f0000
461 - The class containing image processing controls. These controls are
462 described in :ref:`image-process-controls`.
463 * - ``V4L2_CTRL_CLASS_FM_RX``
464 - 0xa10000
465 - The class containing FM Receiver (FM RX) controls. These controls
466 are described in :ref:`fm-rx-controls`.
467 * - ``V4L2_CTRL_CLASS_RF_TUNER``
468 - 0xa20000
469 - The class containing RF tuner controls. These controls are
470 described in :ref:`rf-tuner-controls`.
471 * - ``V4L2_CTRL_CLASS_DETECT``
472 - 0xa30000
473 - The class containing motion or object detection controls. These controls
474 are described in :ref:`detect-controls`.
475 * - ``V4L2_CTRL_CLASS_CODEC_STATELESS``
476 - 0xa40000
477 - The class containing stateless codec controls. These controls are
478 described in :ref:`codec-stateless-controls`.
479 * - ``V4L2_CTRL_CLASS_COLORIMETRY``
480 - 0xa50000
481 - The class containing colorimetry controls. These controls are
482 described in :ref:`colorimetry-controls`.
487 On success 0 is returned, on error -1 and the ``errno`` variable is set
489 :ref:`Generic Error Codes <gen-errors>` chapter.
502 more control values are in conflict.
509 The control is temporarily not changeable, possibly because another
510 applications took over control of the device function this control
516 The space reserved for the control's payload is insufficient. The
521 Attempt to try or set a read-only control, or to get a write-only
522 control, or to get a control from a request that has not yet been
528 Or if there is an attempt to set an inactive control and the driver is
529 not capable of caching the new value until the control is active again.