Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   1) .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   2) .. c:namespace:: V4L
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   3) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   4) .. _VIDIOC_SUBDEV_ENUM_FRAME_INTERVAL:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   5) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   6) ***************************************
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   7) ioctl VIDIOC_SUBDEV_ENUM_FRAME_INTERVAL
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   8) ***************************************
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   9) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  10) Name
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  11) ====
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  12) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  13) VIDIOC_SUBDEV_ENUM_FRAME_INTERVAL - Enumerate frame intervals
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  14) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  15) Synopsis
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  16) ========
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  17) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  18) .. c:macro:: VIDIOC_SUBDEV_ENUM_FRAME_INTERVAL
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  19) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  20) ``int ioctl(int fd, VIDIOC_SUBDEV_ENUM_FRAME_INTERVAL, struct v4l2_subdev_frame_interval_enum * argp)``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  21) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  22) Arguments
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  23) =========
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  24) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  25) ``fd``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  26)     File descriptor returned by :c:func:`open()`.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  27) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  28) ``argp``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  29)     Pointer to struct :c:type:`v4l2_subdev_frame_interval_enum`.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  30) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  31) Description
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  32) ===========
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  33) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  34) This ioctl lets applications enumerate available frame intervals on a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  35) given sub-device pad. Frame intervals only makes sense for sub-devices
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  36) that can control the frame period on their own. This includes, for
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  37) instance, image sensors and TV tuners.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  38) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  39) For the common use case of image sensors, the frame intervals available
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  40) on the sub-device output pad depend on the frame format and size on the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  41) same pad. Applications must thus specify the desired format and size
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  42) when enumerating frame intervals.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  43) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  44) To enumerate frame intervals applications initialize the ``index``,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  45) ``pad``, ``which``, ``code``, ``width`` and ``height`` fields of struct
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  46) :c:type:`v4l2_subdev_frame_interval_enum`
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  47) and call the :ref:`VIDIOC_SUBDEV_ENUM_FRAME_INTERVAL` ioctl with a pointer
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  48) to this structure. Drivers fill the rest of the structure or return an
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  49) EINVAL error code if one of the input fields is invalid. All frame
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  50) intervals are enumerable by beginning at index zero and incrementing by
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  51) one until ``EINVAL`` is returned.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  52) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  53) Available frame intervals may depend on the current 'try' formats at
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  54) other pads of the sub-device, as well as on the current active links.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  55) See :ref:`VIDIOC_SUBDEV_G_FMT` for more
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  56) information about the try formats.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  57) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  58) Sub-devices that support the frame interval enumeration ioctl should
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  59) implemented it on a single pad only. Its behaviour when supported on
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  60) multiple pads of the same sub-device is not defined.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  61) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  62) .. c:type:: v4l2_subdev_frame_interval_enum
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  63) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  64) .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}|
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  65) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  66) .. flat-table:: struct v4l2_subdev_frame_interval_enum
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  67)     :header-rows:  0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  68)     :stub-columns: 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  69)     :widths:       1 1 2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  70) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  71)     * - __u32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  72)       - ``index``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  73)       - Number of the format in the enumeration, set by the application.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  74)     * - __u32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  75)       - ``pad``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  76)       - Pad number as reported by the media controller API.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  77)     * - __u32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  78)       - ``code``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  79)       - The media bus format code, as defined in
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  80) 	:ref:`v4l2-mbus-format`.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  81)     * - __u32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  82)       - ``width``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  83)       - Frame width, in pixels.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  84)     * - __u32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  85)       - ``height``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  86)       - Frame height, in pixels.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  87)     * - struct :c:type:`v4l2_fract`
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  88)       - ``interval``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  89)       - Period, in seconds, between consecutive video frames.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  90)     * - __u32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  91)       - ``which``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  92)       - Frame intervals to be enumerated, from enum
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  93) 	:ref:`v4l2_subdev_format_whence <v4l2-subdev-format-whence>`.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  94)     * - __u32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  95)       - ``reserved``\ [8]
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  96)       - Reserved for future extensions. Applications and drivers must set
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  97) 	the array to zero.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  98) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  99) Return Value
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) ============
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) On success 0 is returned, on error -1 and the ``errno`` variable is set
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) appropriately. The generic error codes are described at the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) :ref:`Generic Error Codes <gen-errors>` chapter.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) EINVAL
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107)     The struct
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108)     :c:type:`v4l2_subdev_frame_interval_enum`
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109)     ``pad`` references a non-existing pad, one of the ``code``,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110)     ``width`` or ``height`` fields are invalid for the given pad or the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111)     ``index`` field is out of bounds.