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_QUERYCAP:
^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_QUERYCAP
^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_QUERYCAP - Query device capabilities
^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_QUERYCAP
^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_QUERYCAP, struct v4l2_capability *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_capability`.
^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) All V4L2 devices support the ``VIDIOC_QUERYCAP`` ioctl. It is used to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  35) identify kernel devices compatible with this specification and to obtain
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  36) information about driver and hardware capabilities. The ioctl takes a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  37) pointer to a struct :c:type:`v4l2_capability` which is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  38) filled by the driver. When the driver is not compatible with this
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  39) specification the ioctl returns an ``EINVAL`` error code.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  40) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  41) .. tabularcolumns:: |p{1.5cm}|p{2.5cm}|p{13cm}|
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  42) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  43) .. c:type:: v4l2_capability
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  44) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  45) .. flat-table:: struct v4l2_capability
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  46)     :header-rows:  0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  47)     :stub-columns: 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  48)     :widths:       3 4 20
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  49) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  50)     * - __u8
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  51)       - ``driver``\ [16]
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  52)       - Name of the driver, a unique NUL-terminated ASCII string. For
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  53) 	example: "bttv". Driver specific applications can use this
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  54) 	information to verify the driver identity. It is also useful to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  55) 	work around known bugs, or to identify drivers in error reports.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  56) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  57) 	Storing strings in fixed sized arrays is bad practice but
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  58) 	unavoidable here. Drivers and applications should take precautions
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  59) 	to never read or write beyond the end of the array and to make
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  60) 	sure the strings are properly NUL-terminated.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  61)     * - __u8
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  62)       - ``card``\ [32]
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  63)       - Name of the device, a NUL-terminated UTF-8 string. For example:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  64) 	"Yoyodyne TV/FM". One driver may support different brands or
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  65) 	models of video hardware. This information is intended for users,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  66) 	for example in a menu of available devices. Since multiple TV
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  67) 	cards of the same brand may be installed which are supported by
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  68) 	the same driver, this name should be combined with the character
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  69) 	device file name (e. g. ``/dev/video2``) or the ``bus_info``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  70) 	string to avoid ambiguities.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  71)     * - __u8
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  72)       - ``bus_info``\ [32]
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  73)       - Location of the device in the system, a NUL-terminated ASCII
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  74) 	string. For example: "PCI:0000:05:06.0". This information is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  75) 	intended for users, to distinguish multiple identical devices. If
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  76) 	no such information is available the field must simply count the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  77) 	devices controlled by the driver ("platform:vivid-000"). The
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  78) 	bus_info must start with "PCI:" for PCI boards, "PCIe:" for PCI
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  79) 	Express boards, "usb-" for USB devices, "I2C:" for i2c devices,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  80) 	"ISA:" for ISA devices, "parport" for parallel port devices and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  81) 	"platform:" for platform devices.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  82)     * - __u32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  83)       - ``version``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  84)       - Version number of the driver.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  85) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  86) 	Starting with kernel 3.1, the version reported is provided by the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  87) 	V4L2 subsystem following the kernel numbering scheme. However, it
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  88) 	may not always return the same version as the kernel if, for
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  89) 	example, a stable or distribution-modified kernel uses the V4L2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  90) 	stack from a newer kernel.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  91) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  92) 	The version number is formatted using the ``KERNEL_VERSION()``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  93) 	macro. For example if the media stack corresponds to the V4L2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  94) 	version shipped with Kernel 4.14, it would be equivalent to:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  95)     * - :cspan:`2`
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  96) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  97) 	``#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  98) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  99) 	``__u32 version = KERNEL_VERSION(4, 14, 0);``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) 	``printf ("Version: %u.%u.%u\\n",``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) 	``(version >> 16) & 0xFF, (version >> 8) & 0xFF, version & 0xFF);``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104)     * - __u32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105)       - ``capabilities``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106)       - Available capabilities of the physical device as a whole, see
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) 	:ref:`device-capabilities`. The same physical device can export
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) 	multiple devices in /dev (e.g. /dev/videoX, /dev/vbiY and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) 	/dev/radioZ). The ``capabilities`` field should contain a union of
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) 	all capabilities available around the several V4L2 devices
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) 	exported to userspace. For all those devices the ``capabilities``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112) 	field returns the same set of capabilities. This allows
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) 	applications to open just one of the devices (typically the video
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) 	device) and discover whether video, vbi and/or radio are also
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) 	supported.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116)     * - __u32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117)       - ``device_caps``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118)       - Device capabilities of the opened device, see
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) 	:ref:`device-capabilities`. Should contain the available
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) 	capabilities of that specific device node. So, for example,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) 	``device_caps`` of a radio device will only contain radio related
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122) 	capabilities and no video or vbi capabilities. This field is only
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123) 	set if the ``capabilities`` field contains the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124) 	``V4L2_CAP_DEVICE_CAPS`` capability. Only the ``capabilities``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125) 	field can have the ``V4L2_CAP_DEVICE_CAPS`` capability,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126) 	``device_caps`` will never set ``V4L2_CAP_DEVICE_CAPS``.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127)     * - __u32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128)       - ``reserved``\ [3]
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129)       - Reserved for future extensions. Drivers must set this array to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130) 	zero.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133) .. tabularcolumns:: |p{6.1cm}|p{2.2cm}|p{8.7cm}|
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) .. _device-capabilities:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137) .. cssclass:: longtable
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139) .. flat-table:: Device Capabilities Flags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140)     :header-rows:  0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141)     :stub-columns: 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142)     :widths:       3 1 4
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144)     * - ``V4L2_CAP_VIDEO_CAPTURE``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145)       - 0x00000001
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146)       - The device supports the single-planar API through the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) 	:ref:`Video Capture <capture>` interface.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148)     * - ``V4L2_CAP_VIDEO_CAPTURE_MPLANE``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149)       - 0x00001000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150)       - The device supports the :ref:`multi-planar API <planar-apis>`
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151) 	through the :ref:`Video Capture <capture>` interface.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152)     * - ``V4L2_CAP_VIDEO_OUTPUT``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153)       - 0x00000002
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154)       - The device supports the single-planar API through the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155) 	:ref:`Video Output <output>` interface.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156)     * - ``V4L2_CAP_VIDEO_OUTPUT_MPLANE``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157)       - 0x00002000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158)       - The device supports the :ref:`multi-planar API <planar-apis>`
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159) 	through the :ref:`Video Output <output>` interface.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160)     * - ``V4L2_CAP_VIDEO_M2M``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161)       - 0x00008000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162)       - The device supports the single-planar API through the Video
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163) 	Memory-To-Memory interface.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164)     * - ``V4L2_CAP_VIDEO_M2M_MPLANE``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165)       - 0x00004000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166)       - The device supports the :ref:`multi-planar API <planar-apis>`
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167) 	through the Video Memory-To-Memory interface.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168)     * - ``V4L2_CAP_VIDEO_OVERLAY``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169)       - 0x00000004
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170)       - The device supports the :ref:`Video Overlay <overlay>`
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171) 	interface. A video overlay device typically stores captured images
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172) 	directly in the video memory of a graphics card, with hardware
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 173) 	clipping and scaling.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 174)     * - ``V4L2_CAP_VBI_CAPTURE``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 175)       - 0x00000010
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176)       - The device supports the :ref:`Raw VBI Capture <raw-vbi>`
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177) 	interface, providing Teletext and Closed Caption data.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178)     * - ``V4L2_CAP_VBI_OUTPUT``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179)       - 0x00000020
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180)       - The device supports the :ref:`Raw VBI Output <raw-vbi>`
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181) 	interface.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182)     * - ``V4L2_CAP_SLICED_VBI_CAPTURE``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183)       - 0x00000040
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184)       - The device supports the :ref:`Sliced VBI Capture <sliced>`
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 185) 	interface.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 186)     * - ``V4L2_CAP_SLICED_VBI_OUTPUT``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 187)       - 0x00000080
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 188)       - The device supports the :ref:`Sliced VBI Output <sliced>`
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 189) 	interface.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 190)     * - ``V4L2_CAP_RDS_CAPTURE``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 191)       - 0x00000100
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 192)       - The device supports the :ref:`RDS <rds>` capture interface.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 193)     * - ``V4L2_CAP_VIDEO_OUTPUT_OVERLAY``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 194)       - 0x00000200
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 195)       - The device supports the :ref:`Video Output Overlay <osd>` (OSD)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 196) 	interface. Unlike the *Video Overlay* interface, this is a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 197) 	secondary function of video output devices and overlays an image
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 198) 	onto an outgoing video signal. When the driver sets this flag, it
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 199) 	must clear the ``V4L2_CAP_VIDEO_OVERLAY`` flag and vice
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 200) 	versa. [#f1]_
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 201)     * - ``V4L2_CAP_HW_FREQ_SEEK``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 202)       - 0x00000400
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 203)       - The device supports the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 204) 	:ref:`VIDIOC_S_HW_FREQ_SEEK` ioctl
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 205) 	for hardware frequency seeking.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 206)     * - ``V4L2_CAP_RDS_OUTPUT``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 207)       - 0x00000800
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 208)       - The device supports the :ref:`RDS <rds>` output interface.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 209)     * - ``V4L2_CAP_TUNER``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 210)       - 0x00010000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 211)       - The device has some sort of tuner to receive RF-modulated video
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 212) 	signals. For more information about tuner programming see
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 213) 	:ref:`tuner`.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 214)     * - ``V4L2_CAP_AUDIO``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 215)       - 0x00020000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 216)       - The device has audio inputs or outputs. It may or may not support
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 217) 	audio recording or playback, in PCM or compressed formats. PCM
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 218) 	audio support must be implemented as ALSA or OSS interface. For
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 219) 	more information on audio inputs and outputs see :ref:`audio`.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 220)     * - ``V4L2_CAP_RADIO``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 221)       - 0x00040000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 222)       - This is a radio receiver.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 223)     * - ``V4L2_CAP_MODULATOR``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 224)       - 0x00080000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 225)       - The device has some sort of modulator to emit RF-modulated
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 226) 	video/audio signals. For more information about modulator
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 227) 	programming see :ref:`tuner`.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 228)     * - ``V4L2_CAP_SDR_CAPTURE``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 229)       - 0x00100000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 230)       - The device supports the :ref:`SDR Capture <sdr>` interface.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 231)     * - ``V4L2_CAP_EXT_PIX_FORMAT``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 232)       - 0x00200000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 233)       - The device supports the struct
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 234) 	:c:type:`v4l2_pix_format` extended fields.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 235)     * - ``V4L2_CAP_SDR_OUTPUT``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 236)       - 0x00400000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 237)       - The device supports the :ref:`SDR Output <sdr>` interface.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 238)     * - ``V4L2_CAP_META_CAPTURE``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 239)       - 0x00800000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 240)       - The device supports the :ref:`metadata` capture interface.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 241)     * - ``V4L2_CAP_READWRITE``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 242)       - 0x01000000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 243)       - The device supports the :c:func:`read()` and/or
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 244) 	:c:func:`write()` I/O methods.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 245)     * - ``V4L2_CAP_ASYNCIO``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 246)       - 0x02000000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 247)       - The device supports the :ref:`asynchronous <async>` I/O methods.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 248)     * - ``V4L2_CAP_STREAMING``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 249)       - 0x04000000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 250)       - The device supports the :ref:`streaming <mmap>` I/O method.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 251)     * - ``V4L2_CAP_META_OUTPUT``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 252)       - 0x08000000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 253)       - The device supports the :ref:`metadata` output interface.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 254)     * - ``V4L2_CAP_TOUCH``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 255)       - 0x10000000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 256)       - This is a touch device.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 257)     * - ``V4L2_CAP_IO_MC``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 258)       - 0x20000000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 259)       - There is only one input and/or output seen from userspace. The whole
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 260)         video topology configuration, including which I/O entity is routed to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 261)         the input/output, is configured by userspace via the Media Controller.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 262)         See :ref:`media_controller`.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 263)     * - ``V4L2_CAP_DEVICE_CAPS``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 264)       - 0x80000000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 265)       - The driver fills the ``device_caps`` field. This capability can
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 266) 	only appear in the ``capabilities`` field and never in the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 267) 	``device_caps`` field.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 268) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 269) Return Value
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 270) ============
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 271) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 272) On success 0 is returned, on error -1 and the ``errno`` variable is set
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 273) appropriately. The generic error codes are described at the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 274) :ref:`Generic Error Codes <gen-errors>` chapter.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 275) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 276) .. [#f1]
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 277)    The struct :c:type:`v4l2_framebuffer` lacks an
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 278)    enum :c:type:`v4l2_buf_type` field, therefore the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 279)    type of overlay is implied by the driver capabilities.