Lines Matching +full:ref +full:- +full:pad
1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
13 VIDIOC_SUBDEV_G_FMT - VIDIOC_SUBDEV_S_FMT - Get or set the data format on a subdev pad
41 To retrieve the current format applications set the ``pad`` field of a
43 pad number as reported by the media API and the ``which`` field to
48 To change the current format applications set both the ``pad`` and
59 and stored in the sub-device file handle. Two applications querying the
60 same sub-device would thus not interact with each other.
62 For instance, to try a format at the output pad of a sub-device,
63 applications would first set the try format at the sub-device input with
65 default format at the output pad with the ``VIDIOC_SUBDEV_G_FMT`` ioctl,
66 or set the desired output pad format with the ``VIDIOC_SUBDEV_S_FMT``
70 current links configuration or sub-device controls value. For instance,
71 a low-pass noise filter might crop pixels at the frame boundaries,
74 If the subdev device node has been registered in read-only mode, calls to
77 variable is set to ``-EPERM``.
88 .. flat-table:: struct v4l2_subdev_format
89 :header-rows: 0
90 :stub-columns: 0
93 * - __u32
94 - ``pad``
95 - Pad number as reported by the media controller API.
96 * - __u32
97 - ``which``
98 - Format to modified, from enum
99 :ref:`v4l2_subdev_format_whence <v4l2-subdev-format-whence>`.
100 * - struct :c:type:`v4l2_mbus_framefmt`
101 - ``format``
102 - Definition of an image format, see :c:type:`v4l2_mbus_framefmt` for
104 * - __u32
105 - ``stream``
106 - Stream identifier.
107 * - __u32
108 - ``reserved``\ [7]
109 - Reserved for future extensions. Applications and drivers must set
115 .. _v4l2-subdev-format-whence:
117 .. flat-table:: enum v4l2_subdev_format_whence
118 :header-rows: 0
119 :stub-columns: 0
122 * - V4L2_SUBDEV_FORMAT_TRY
123 - 0
124 - Try formats, used for querying device capabilities.
125 * - V4L2_SUBDEV_FORMAT_ACTIVE
126 - 1
127 - Active formats, applied to the hardware.
132 On success 0 is returned, on error -1 and the ``errno`` variable is set
134 :ref:`Generic Error Codes <gen-errors>` chapter.
137 The format can't be changed because the pad is currently busy. This
138 can be caused, for instance, by an active video stream on the pad.
143 The struct :c:type:`v4l2_subdev_format` ``pad`` references a non-existing
144 pad, or the ``which`` field has an unsupported value.
147 The ``VIDIOC_SUBDEV_S_FMT`` ioctl has been called on a read-only subdevice
152 On success 0 is returned, on error -1 and the ``errno`` variable is set
154 :ref:`Generic Error Codes <gen-errors>` chapter.