Lines Matching +full:hardware +full:- +full:bound
1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
13 VIDIOC_QUERYCTRL - VIDIOC_QUERY_EXT_CTRL - VIDIOC_QUERYMENU - Enumerate controls and menu control items
42 of a struct :ref:`v4l2_queryctrl <v4l2-queryctrl>` and call the
60 driver returns the next supported non-compound control, or ``EINVAL`` if
72 :ref:`v4l2_queryctrl <v4l2-queryctrl>` since that structure is full.
80 fields of struct :ref:`v4l2_querymenu <v4l2-querymenu>` and call the
85 :ref:`v4l2_queryctrl <v4l2-queryctrl>` ``minimum`` to ``maximum``,
99 .. _v4l2-queryctrl:
103 .. flat-table:: struct v4l2_queryctrl
104 :header-rows: 0
105 :stub-columns: 0
108 * - __u32
109 - ``id``
110 - Identifies the control, set by the application. See
111 :ref:`control-id` for predefined IDs. When the ID is ORed with
115 * - __u32
116 - ``type``
117 - Type of control, see :c:type:`v4l2_ctrl_type`.
118 * - __u8
119 - ``name``\ [32]
120 - Name of the control, a NUL-terminated ASCII string. This
122 * - __s32
123 - ``minimum``
124 - Minimum value, inclusive. This field gives a lower bound for the
127 Note that this a signed 32-bit value.
128 * - __s32
129 - ``maximum``
130 - Maximum value, inclusive. This field gives an upper bound for the
133 Note that this a signed 32-bit value.
134 * - __s32
135 - ``step``
136 - This field gives a step size for the control. See enum
139 unsigned 32-bit value.
141 Generally drivers should not scale hardware control values. It may
143 particular unit and the hardware actually accepts only multiples
146 repeated read-write cycles.
149 actually affecting hardware. Often the information is needed when
151 than a slider. When for example a hardware register accepts values
152 0-511 and the driver reports 0-65535, step should be 128.
156 * - __s32
157 - ``default_value``
158 - The default value of a ``V4L2_CTRL_TYPE_INTEGER``, ``_BOOLEAN``,
166 * - __u32
167 - ``flags``
168 - Control flags, see :ref:`control-flags`.
169 * - __u32
170 - ``reserved``\ [2]
171 - Reserved for future extensions. Drivers must set the array to
177 .. _v4l2-query-ext-ctrl:
181 .. flat-table:: struct v4l2_query_ext_ctrl
182 :header-rows: 0
183 :stub-columns: 0
186 * - __u32
187 - ``id``
188 - Identifies the control, set by the application. See
189 :ref:`control-id` for predefined IDs. When the ID is ORed with
191 returns the first non-compound control with a higher ID. When the
196 * - __u32
197 - ``type``
198 - Type of control, see :c:type:`v4l2_ctrl_type`.
199 * - char
200 - ``name``\ [32]
201 - Name of the control, a NUL-terminated ASCII string. This
203 * - __s64
204 - ``minimum``
205 - Minimum value, inclusive. This field gives a lower bound for the
208 Note that this a signed 64-bit value.
209 * - __s64
210 - ``maximum``
211 - Maximum value, inclusive. This field gives an upper bound for the
214 Note that this a signed 64-bit value.
215 * - __u64
216 - ``step``
217 - This field gives a step size for the control. See enum
220 unsigned 64-bit value.
222 Generally drivers should not scale hardware control values. It may
224 particular unit and the hardware actually accepts only multiples
227 repeated read-write cycles.
230 actually affecting hardware. Often the information is needed when
232 than a slider. When for example a hardware register accepts values
233 0-511 and the driver reports 0-65535, step should be 128.
234 * - __s64
235 - ``default_value``
236 - The default value of a ``V4L2_CTRL_TYPE_INTEGER``, ``_INTEGER64``,
244 * - __u32
245 - ``flags``
246 - Control flags, see :ref:`control-flags`.
247 * - __u32
248 - ``elem_size``
249 - The size in bytes of a single element of the array. Given a char
250 pointer ``p`` to a 3-dimensional array you can find the position
256 * - __u32
257 - ``elems``
258 - The number of elements in the N-dimensional array. If this control
261 * - __u32
262 - ``nr_of_dims``
263 - The number of dimension in the N-dimensional array. If this
265 * - __u32
266 - ``dims[V4L2_CTRL_MAX_DIMS]``
267 - The size of each dimension. The first ``nr_of_dims`` elements of
268 this array must be non-zero, all remaining elements must be zero.
269 * - __u32
270 - ``reserved``\ [32]
271 - Reserved for future extensions. Applications and drivers must set
277 .. _v4l2-querymenu:
279 .. flat-table:: struct v4l2_querymenu
280 :header-rows: 0
281 :stub-columns: 0
284 * - __u32
285 - ``id``
286 - Identifies the control, set by the application from the respective
287 struct :ref:`v4l2_queryctrl <v4l2-queryctrl>` ``id``.
288 * - __u32
289 - ``index``
290 - Index of the menu item, starting at zero, set by the application.
291 * - union {
292 - (anonymous)
293 * - __u8
294 - ``name``\ [32]
295 - Name of the menu item, a NUL-terminated ASCII string. This
298 * - __s64
299 - ``value``
300 - Value of the integer menu item. This field is valid for
302 * - }
303 -
304 * - __u32
305 - ``reserved``
306 - Reserved for future extensions. Drivers must set the array to
319 .. flat-table:: enum v4l2_ctrl_type
320 :header-rows: 1
321 :stub-columns: 0
324 * - Type
325 - ``minimum``
326 - ``step``
327 - ``maximum``
328 - Description
329 * - ``V4L2_CTRL_TYPE_INTEGER``
330 - any
331 - any
332 - any
333 - An integer-valued control ranging from minimum to maximum
335 * - ``V4L2_CTRL_TYPE_BOOLEAN``
336 - 0
337 - 1
338 - 1
339 - A boolean-valued control. Zero corresponds to "disabled", and one
341 * - ``V4L2_CTRL_TYPE_MENU``
342 - ≥ 0
343 - 1
344 - N-1
345 - The control has a menu of N choices. The names of the menu items
347 * - ``V4L2_CTRL_TYPE_INTEGER_MENU``
348 - ≥ 0
349 - 1
350 - N-1
351 - The control has a menu of N choices. The values of the menu items
354 the menu items are signed 64-bit integers.
355 * - ``V4L2_CTRL_TYPE_BITMASK``
356 - 0
357 - n/a
358 - any
359 - A bitmask field. The maximum value is the set of bits that can be
362 * - ``V4L2_CTRL_TYPE_BUTTON``
363 - 0
364 - 0
365 - 0
366 - A control which performs an action when set. Drivers must ignore
369 * - ``V4L2_CTRL_TYPE_INTEGER64``
370 - any
371 - any
372 - any
373 - A 64-bit integer valued control. Minimum, maximum and step size
375 ``VIDIOC_QUERY_EXT_CTRL`` can retrieve the 64-bit min/max/step
378 * - ``V4L2_CTRL_TYPE_STRING``
379 - ≥ 0
380 - ≥ 1
381 - ≥ 0
382 - The minimum and maximum string lengths. The step size means that
393 * - ``V4L2_CTRL_TYPE_CTRL_CLASS``
394 - n/a
395 - n/a
396 - n/a
397 - This is not a control. When ``VIDIOC_QUERYCTRL`` is called with a
398 control ID equal to a control class code (see :ref:`ctrl-class`)
402 * - ``V4L2_CTRL_TYPE_U8``
403 - any
404 - any
405 - any
406 - An unsigned 8-bit valued control ranging from minimum to maximum
408 * - ``V4L2_CTRL_TYPE_U16``
409 - any
410 - any
411 - any
412 - An unsigned 16-bit valued control ranging from minimum to maximum
414 * - ``V4L2_CTRL_TYPE_U32``
415 - any
416 - any
417 - any
418 - An unsigned 32-bit valued control ranging from minimum to maximum
420 * - ``V4L2_CTRL_TYPE_MPEG2_QUANTISATION``
421 - n/a
422 - n/a
423 - n/a
424 - A struct :c:type:`v4l2_ctrl_mpeg2_quantisation`, containing MPEG-2
426 * - ``V4L2_CTRL_TYPE_MPEG2_SEQUENCE``
427 - n/a
428 - n/a
429 - n/a
430 - A struct :c:type:`v4l2_ctrl_mpeg2_sequence`, containing MPEG-2
432 * - ``V4L2_CTRL_TYPE_MPEG2_PICTURE``
433 - n/a
434 - n/a
435 - n/a
436 - A struct :c:type:`v4l2_ctrl_mpeg2_picture`, containing MPEG-2
438 * - ``V4L2_CTRL_TYPE_AREA``
439 - n/a
440 - n/a
441 - n/a
442 - A struct :c:type:`v4l2_area`, containing the width and the height
444 * - ``V4L2_CTRL_TYPE_RECT``
445 - n/a
446 - n/a
447 - n/a
448 - A struct :c:type:`v4l2_rect`, containing a rectangle described by
449 the position of its top-left corner, the width and the height. Units
454 * - ``V4L2_CTRL_TYPE_H264_SPS``
455 - n/a
456 - n/a
457 - n/a
458 - A struct :c:type:`v4l2_ctrl_h264_sps`, containing H264
460 * - ``V4L2_CTRL_TYPE_H264_PPS``
461 - n/a
462 - n/a
463 - n/a
464 - A struct :c:type:`v4l2_ctrl_h264_pps`, containing H264
466 * - ``V4L2_CTRL_TYPE_H264_SCALING_MATRIX``
467 - n/a
468 - n/a
469 - n/a
470 - A struct :c:type:`v4l2_ctrl_h264_scaling_matrix`, containing H264
472 * - ``V4L2_CTRL_TYPE_H264_SLICE_PARAMS``
473 - n/a
474 - n/a
475 - n/a
476 - A struct :c:type:`v4l2_ctrl_h264_slice_params`, containing H264
478 * - ``V4L2_CTRL_TYPE_H264_DECODE_PARAMS``
479 - n/a
480 - n/a
481 - n/a
482 - A struct :c:type:`v4l2_ctrl_h264_decode_params`, containing H264
484 * - ``V4L2_CTRL_TYPE_FWHT_PARAMS``
485 - n/a
486 - n/a
487 - n/a
488 - A struct :c:type:`v4l2_ctrl_fwht_params`, containing FWHT
490 * - ``V4L2_CTRL_TYPE_HEVC_SPS``
491 - n/a
492 - n/a
493 - n/a
494 - A struct :c:type:`v4l2_ctrl_hevc_sps`, containing HEVC Sequence
496 * - ``V4L2_CTRL_TYPE_HEVC_PPS``
497 - n/a
498 - n/a
499 - n/a
500 - A struct :c:type:`v4l2_ctrl_hevc_pps`, containing HEVC Picture
502 * - ``V4L2_CTRL_TYPE_HEVC_SLICE_PARAMS``
503 - n/a
504 - n/a
505 - n/a
506 - A struct :c:type:`v4l2_ctrl_hevc_slice_params`, containing HEVC
508 * - ``V4L2_CTRL_TYPE_HEVC_SCALING_MATRIX``
509 - n/a
510 - n/a
511 - n/a
512 - A struct :c:type:`v4l2_ctrl_hevc_scaling_matrix`, containing HEVC
514 * - ``V4L2_CTRL_TYPE_VP8_FRAME``
515 - n/a
516 - n/a
517 - n/a
518 - A struct :c:type:`v4l2_ctrl_vp8_frame`, containing VP8
520 * - ``V4L2_CTRL_TYPE_HEVC_DECODE_PARAMS``
521 - n/a
522 - n/a
523 - n/a
524 - A struct :c:type:`v4l2_ctrl_hevc_decode_params`, containing HEVC
526 * - ``V4L2_CTRL_TYPE_VP9_COMPRESSED_HDR``
527 - n/a
528 - n/a
529 - n/a
530 - A struct :c:type:`v4l2_ctrl_vp9_compressed_hdr`, containing VP9
532 * - ``V4L2_CTRL_TYPE_VP9_FRAME``
533 - n/a
534 - n/a
535 - n/a
536 - A struct :c:type:`v4l2_ctrl_vp9_frame`, containing VP9
538 * - ``V4L2_CTRL_TYPE_AV1_SEQUENCE``
539 - n/a
540 - n/a
541 - n/a
542 - A struct :c:type:`v4l2_ctrl_av1_sequence`, containing AV1 Sequence OBU
544 * - ``V4L2_CTRL_TYPE_AV1_TILE_GROUP_ENTRY``
545 - n/a
546 - n/a
547 - n/a
548 - A struct :c:type:`v4l2_ctrl_av1_tile_group_entry`, containing AV1 Tile Group
550 * - ``V4L2_CTRL_TYPE_AV1_FRAME``
551 - n/a
552 - n/a
553 - n/a
554 - A struct :c:type:`v4l2_ctrl_av1_frame`, containing AV1 Frame/Frame
556 * - ``V4L2_CTRL_TYPE_AV1_FILM_GRAIN``
557 - n/a
558 - n/a
559 - n/a
560 - A struct :c:type:`v4l2_ctrl_av1_film_grain`, containing AV1 Film Grain
571 .. _control-flags:
573 .. flat-table:: Control Flags
574 :header-rows: 0
575 :stub-columns: 0
578 * - ``V4L2_CTRL_FLAG_DISABLED``
579 - 0x0001
580 - This control is permanently disabled and should be ignored by the
583 * - ``V4L2_CTRL_FLAG_GRABBED``
584 - 0x0002
585 - This control is temporarily unchangeable, for example because
589 * - ``V4L2_CTRL_FLAG_READ_ONLY``
590 - 0x0004
591 - This control is permanently readable only. Any attempt to change
593 * - ``V4L2_CTRL_FLAG_UPDATE``
594 - 0x0008
595 - A hint that changing this control may affect the value of other
598 * - ``V4L2_CTRL_FLAG_INACTIVE``
599 - 0x0010
600 - This control is not applicable to the current configuration and
604 * - ``V4L2_CTRL_FLAG_SLIDER``
605 - 0x0020
606 - A hint that this control is best represented as a slider-like
608 * - ``V4L2_CTRL_FLAG_WRITE_ONLY``
609 - 0x0040
610 - This control is permanently writable only. Any attempt to read the
616 * - ``V4L2_CTRL_FLAG_VOLATILE``
617 - 0x0080
618 - This control is volatile, which means that the value of the
620 current gain value if the device is in auto-gain mode. In such a
621 case the hardware calculates the gain value based on the lighting
631 :ref:`V4L2_EVENT_CTRL_CH_VALUE <ctrl-changes-flags>` event.
632 * - ``V4L2_CTRL_FLAG_HAS_PAYLOAD``
633 - 0x0100
634 - This control has a pointer type, so its value has to be accessed
642 - ``V4L2_CTRL_FLAG_EXECUTE_ON_WRITE``
643 - 0x0200
644 - The value provided to the control will be propagated to the driver
646 represents an action on the hardware. For example: clearing an
651 - ``V4L2_CTRL_FLAG_MODIFY_LAYOUT``
652 - 0x0400
653 - Changing this control value may modify the layout of the
654 buffer (for video devices) or the media bus format (for sub-devices).
662 * - ``V4L2_CTRL_FLAG_DYNAMIC_ARRAY``
663 - 0x0800
664 - This control is a dynamically sized 1-dimensional array. It
670 * - ``V4L2_CTRL_FLAG_HAS_WHICH_MIN_MAX``
671 - 0x1000
672 - This control supports getting minimum and maximum values using
678 On success 0 is returned, on error -1 and the ``errno`` variable is set
680 :ref:`Generic Error Codes <gen-errors>` chapter.
683 The struct :ref:`v4l2_queryctrl <v4l2-queryctrl>` ``id`` is
684 invalid. The struct :ref:`v4l2_querymenu <v4l2-querymenu>` ``id``
690 An attempt was made to read a write-only control.
694 can skip predefined controls not supported by the hardware (although
696 controls after hardware detection without the trouble of reordering