~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/Documentation/userspace-api/media/v4l/vidioc-subdev-enum-mbus-code.rst

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /Documentation/userspace-api/media/v4l/vidioc-subdev-enum-mbus-code.rst (Architecture mips) and /Documentation/userspace-api/media/v4l/vidioc-subdev-enum-mbus-code.rst (Architecture sparc64)


  1 .. SPDX-License-Identifier: GFDL-1.1-no-invari      1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
  2 .. c:namespace:: V4L                                2 .. c:namespace:: V4L
  3                                                     3 
  4 .. _VIDIOC_SUBDEV_ENUM_MBUS_CODE:                   4 .. _VIDIOC_SUBDEV_ENUM_MBUS_CODE:
  5                                                     5 
  6 **********************************                  6 **********************************
  7 ioctl VIDIOC_SUBDEV_ENUM_MBUS_CODE                  7 ioctl VIDIOC_SUBDEV_ENUM_MBUS_CODE
  8 **********************************                  8 **********************************
  9                                                     9 
 10 Name                                               10 Name
 11 ====                                               11 ====
 12                                                    12 
 13 VIDIOC_SUBDEV_ENUM_MBUS_CODE - Enumerate media     13 VIDIOC_SUBDEV_ENUM_MBUS_CODE - Enumerate media bus formats
 14                                                    14 
 15 Synopsis                                           15 Synopsis
 16 ========                                           16 ========
 17                                                    17 
 18 .. c:macro:: VIDIOC_SUBDEV_ENUM_MBUS_CODE          18 .. c:macro:: VIDIOC_SUBDEV_ENUM_MBUS_CODE
 19                                                    19 
 20 ``int ioctl(int fd, VIDIOC_SUBDEV_ENUM_MBUS_CO     20 ``int ioctl(int fd, VIDIOC_SUBDEV_ENUM_MBUS_CODE, struct v4l2_subdev_mbus_code_enum * argp)``
 21                                                    21 
 22 Arguments                                          22 Arguments
 23 =========                                          23 =========
 24                                                    24 
 25 ``fd``                                             25 ``fd``
 26     File descriptor returned by :c:func:`open(     26     File descriptor returned by :c:func:`open()`.
 27                                                    27 
 28 ``argp``                                           28 ``argp``
 29     Pointer to struct :c:type:`v4l2_subdev_mbu     29     Pointer to struct :c:type:`v4l2_subdev_mbus_code_enum`.
 30                                                    30 
 31 Description                                        31 Description
 32 ===========                                        32 ===========
 33                                                    33 
 34 This call is used by the application to access     34 This call is used by the application to access the enumeration
 35 of media bus formats for the selected pad.         35 of media bus formats for the selected pad.
 36                                                    36 
 37 The enumerations are defined by the driver, an     37 The enumerations are defined by the driver, and indexed using the ``index`` field
 38 of struct :c:type:`v4l2_subdev_mbus_code_enum`     38 of struct :c:type:`v4l2_subdev_mbus_code_enum`.
 39 Each enumeration starts with the ``index`` of      39 Each enumeration starts with the ``index`` of 0, and
 40 the lowest invalid index marks the end of enum     40 the lowest invalid index marks the end of enumeration.
 41                                                    41 
 42 Therefore, to enumerate media bus formats avai     42 Therefore, to enumerate media bus formats available at a given sub-device pad,
 43 initialize the ``pad``, and ``which`` fields t     43 initialize the ``pad``, and ``which`` fields to desired values,
 44 and set ``index`` to 0.                            44 and set ``index`` to 0.
 45 Then call the :ref:`VIDIOC_SUBDEV_ENUM_MBUS_CO     45 Then call the :ref:`VIDIOC_SUBDEV_ENUM_MBUS_CODE` ioctl
 46 with a pointer to this structure.                  46 with a pointer to this structure.
 47                                                    47 
 48 A successful call will return with the ``code`     48 A successful call will return with the ``code`` field filled in
 49 with a mbus code value.                            49 with a mbus code value.
 50 Repeat with increasing ``index`` until ``EINVA     50 Repeat with increasing ``index`` until ``EINVAL`` is received.
 51 ``EINVAL`` means that either ``pad`` is invali     51 ``EINVAL`` means that either ``pad`` is invalid,
 52 or that there are no more codes available at t     52 or that there are no more codes available at this pad.
 53                                                    53 
 54 The driver must not return the same value of `     54 The driver must not return the same value of ``code`` for different indices
 55 at the same pad.                                   55 at the same pad.
 56                                                    56 
 57 Available media bus formats may depend on the      57 Available media bus formats may depend on the current 'try' formats at
 58 other pads of the sub-device, as well as on th     58 other pads of the sub-device, as well as on the current active links.
 59 See :ref:`VIDIOC_SUBDEV_G_FMT` for more            59 See :ref:`VIDIOC_SUBDEV_G_FMT` for more
 60 information about the try formats.                 60 information about the try formats.
 61                                                    61 
 62 .. c:type:: v4l2_subdev_mbus_code_enum             62 .. c:type:: v4l2_subdev_mbus_code_enum
 63                                                    63 
 64 .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.5cm     64 .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.5cm}|
 65                                                    65 
 66 .. flat-table:: struct v4l2_subdev_mbus_code_e     66 .. flat-table:: struct v4l2_subdev_mbus_code_enum
 67     :header-rows:  0                               67     :header-rows:  0
 68     :stub-columns: 0                               68     :stub-columns: 0
 69     :widths:       1 1 2                           69     :widths:       1 1 2
 70                                                    70 
 71     * - __u32                                      71     * - __u32
 72       - ``pad``                                    72       - ``pad``
 73       - Pad number as reported by the media co     73       - Pad number as reported by the media controller API. Filled in by the
 74         application.                               74         application.
 75     * - __u32                                      75     * - __u32
 76       - ``index``                                  76       - ``index``
 77       - Index of the mbus code in the enumerat     77       - Index of the mbus code in the enumeration belonging to the given pad.
 78         Filled in by the application.              78         Filled in by the application.
 79     * - __u32                                      79     * - __u32
 80       - ``code``                                   80       - ``code``
 81       - The media bus format code, as defined      81       - The media bus format code, as defined in
 82         :ref:`v4l2-mbus-format`. Filled in by      82         :ref:`v4l2-mbus-format`. Filled in by the driver.
 83     * - __u32                                      83     * - __u32
 84       - ``which``                                  84       - ``which``
 85       - Media bus format codes to be enumerate     85       - Media bus format codes to be enumerated, from enum
 86         :ref:`v4l2_subdev_format_whence <v4l2-     86         :ref:`v4l2_subdev_format_whence <v4l2-subdev-format-whence>`.
 87     * - __u32                                      87     * - __u32
 88       - ``flags``                                  88       - ``flags``
 89       - See :ref:`v4l2-subdev-mbus-code-flags`     89       - See :ref:`v4l2-subdev-mbus-code-flags`
 90     * - __u32                                      90     * - __u32
 91       - ``stream``                                 91       - ``stream``
 92       - Stream identifier.                         92       - Stream identifier.
 93     * - __u32                                      93     * - __u32
 94       - ``reserved``\ [6]                          94       - ``reserved``\ [6]
 95       - Reserved for future extensions. Applic     95       - Reserved for future extensions. Applications and drivers must set
 96         the array to zero.                         96         the array to zero.
 97                                                    97 
 98                                                    98 
 99                                                    99 
100 .. raw:: latex                                    100 .. raw:: latex
101                                                   101 
102    \footnotesize                                  102    \footnotesize
103                                                   103 
104 .. tabularcolumns:: |p{8.8cm}|p{2.2cm}|p{6.3cm    104 .. tabularcolumns:: |p{8.8cm}|p{2.2cm}|p{6.3cm}|
105                                                   105 
106 .. _v4l2-subdev-mbus-code-flags:                  106 .. _v4l2-subdev-mbus-code-flags:
107                                                   107 
108 .. flat-table:: Subdev Media Bus Code Enumerat    108 .. flat-table:: Subdev Media Bus Code Enumerate Flags
109     :header-rows:  0                              109     :header-rows:  0
110     :stub-columns: 0                              110     :stub-columns: 0
111     :widths:       1 1 2                          111     :widths:       1 1 2
112                                                   112 
113     * - V4L2_SUBDEV_MBUS_CODE_CSC_COLORSPACE      113     * - V4L2_SUBDEV_MBUS_CODE_CSC_COLORSPACE
114       - 0x00000001                                114       - 0x00000001
115       - The driver allows the application to t    115       - The driver allows the application to try to change the default colorspace
116         encoding. The application can ask to c    116         encoding. The application can ask to configure the colorspace of the
117         subdevice when calling the :ref:`VIDIO    117         subdevice when calling the :ref:`VIDIOC_SUBDEV_S_FMT <VIDIOC_SUBDEV_G_FMT>`
118         ioctl with :ref:`V4L2_MBUS_FRAMEFMT_SE    118         ioctl with :ref:`V4L2_MBUS_FRAMEFMT_SET_CSC <mbus-framefmt-set-csc>` set.
119         See :ref:`v4l2-mbus-format` on how to     119         See :ref:`v4l2-mbus-format` on how to do this.
120     * - V4L2_SUBDEV_MBUS_CODE_CSC_XFER_FUNC       120     * - V4L2_SUBDEV_MBUS_CODE_CSC_XFER_FUNC
121       - 0x00000002                                121       - 0x00000002
122       - The driver allows the application to t    122       - The driver allows the application to try to change the default transform function.
123         The application can ask to configure t    123         The application can ask to configure the transform function of
124         the subdevice when calling the :ref:`V    124         the subdevice when calling the :ref:`VIDIOC_SUBDEV_S_FMT <VIDIOC_SUBDEV_G_FMT>`
125         ioctl with :ref:`V4L2_MBUS_FRAMEFMT_SE    125         ioctl with :ref:`V4L2_MBUS_FRAMEFMT_SET_CSC <mbus-framefmt-set-csc>` set.
126         See :ref:`v4l2-mbus-format` on how to     126         See :ref:`v4l2-mbus-format` on how to do this.
127     * - V4L2_SUBDEV_MBUS_CODE_CSC_YCBCR_ENC       127     * - V4L2_SUBDEV_MBUS_CODE_CSC_YCBCR_ENC
128       - 0x00000004                                128       - 0x00000004
129       - The driver allows the application to t    129       - The driver allows the application to try to change the default Y'CbCr
130         encoding. The application can ask to c    130         encoding. The application can ask to configure the Y'CbCr encoding of the
131         subdevice when calling the :ref:`VIDIO    131         subdevice when calling the :ref:`VIDIOC_SUBDEV_S_FMT <VIDIOC_SUBDEV_G_FMT>`
132         ioctl with :ref:`V4L2_MBUS_FRAMEFMT_SE    132         ioctl with :ref:`V4L2_MBUS_FRAMEFMT_SET_CSC <mbus-framefmt-set-csc>` set.
133         See :ref:`v4l2-mbus-format` on how to     133         See :ref:`v4l2-mbus-format` on how to do this.
134     * - V4L2_SUBDEV_MBUS_CODE_CSC_HSV_ENC         134     * - V4L2_SUBDEV_MBUS_CODE_CSC_HSV_ENC
135       - 0x00000004                                135       - 0x00000004
136       - The driver allows the application to t    136       - The driver allows the application to try to change the default HSV
137         encoding. The application can ask to c    137         encoding. The application can ask to configure the HSV encoding of the
138         subdevice when calling the :ref:`VIDIO    138         subdevice when calling the :ref:`VIDIOC_SUBDEV_S_FMT <VIDIOC_SUBDEV_G_FMT>`
139         ioctl with :ref:`V4L2_MBUS_FRAMEFMT_SE    139         ioctl with :ref:`V4L2_MBUS_FRAMEFMT_SET_CSC <mbus-framefmt-set-csc>` set.
140         See :ref:`v4l2-mbus-format` on how to     140         See :ref:`v4l2-mbus-format` on how to do this.
141     * - V4L2_SUBDEV_MBUS_CODE_CSC_QUANTIZATION    141     * - V4L2_SUBDEV_MBUS_CODE_CSC_QUANTIZATION
142       - 0x00000008                                142       - 0x00000008
143       - The driver allows the application to t    143       - The driver allows the application to try to change the default
144         quantization. The application can ask     144         quantization. The application can ask to configure the quantization of
145         the subdevice when calling the :ref:`V    145         the subdevice when calling the :ref:`VIDIOC_SUBDEV_S_FMT <VIDIOC_SUBDEV_G_FMT>`
146         ioctl with :ref:`V4L2_MBUS_FRAMEFMT_SE    146         ioctl with :ref:`V4L2_MBUS_FRAMEFMT_SET_CSC <mbus-framefmt-set-csc>` set.
147         See :ref:`v4l2-mbus-format` on how to     147         See :ref:`v4l2-mbus-format` on how to do this.
148                                                   148 
149 .. raw:: latex                                    149 .. raw:: latex
150                                                   150 
151    \normalsize                                    151    \normalsize
152                                                   152 
153 Return Value                                      153 Return Value
154 ============                                      154 ============
155                                                   155 
156 On success 0 is returned, on error -1 and the     156 On success 0 is returned, on error -1 and the ``errno`` variable is set
157 appropriately. The generic error codes are des    157 appropriately. The generic error codes are described at the
158 :ref:`Generic Error Codes <gen-errors>` chapte    158 :ref:`Generic Error Codes <gen-errors>` chapter.
159                                                   159 
160 EINVAL                                            160 EINVAL
161     The struct :c:type:`v4l2_subdev_mbus_code_    161     The struct :c:type:`v4l2_subdev_mbus_code_enum` ``pad`` references a
162     non-existing pad, the ``which`` field has     162     non-existing pad, the ``which`` field has an unsupported value, or the
163     ``index`` field is out of bounds.             163     ``index`` field is out of bounds.
                                                      

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php