vidioc-subdev-enum-mbus-code.xml 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. <refentry id="vidioc-subdev-enum-mbus-code">
  2. <refmeta>
  3. <refentrytitle>ioctl VIDIOC_SUBDEV_ENUM_MBUS_CODE</refentrytitle>
  4. &manvol;
  5. </refmeta>
  6. <refnamediv>
  7. <refname>VIDIOC_SUBDEV_ENUM_MBUS_CODE</refname>
  8. <refpurpose>Enumerate media bus formats</refpurpose>
  9. </refnamediv>
  10. <refsynopsisdiv>
  11. <funcsynopsis>
  12. <funcprototype>
  13. <funcdef>int <function>ioctl</function></funcdef>
  14. <paramdef>int <parameter>fd</parameter></paramdef>
  15. <paramdef>int <parameter>request</parameter></paramdef>
  16. <paramdef>struct v4l2_subdev_mbus_code_enum *
  17. <parameter>argp</parameter></paramdef>
  18. </funcprototype>
  19. </funcsynopsis>
  20. </refsynopsisdiv>
  21. <refsect1>
  22. <title>Arguments</title>
  23. <variablelist>
  24. <varlistentry>
  25. <term><parameter>fd</parameter></term>
  26. <listitem>
  27. <para>&fd;</para>
  28. </listitem>
  29. </varlistentry>
  30. <varlistentry>
  31. <term><parameter>request</parameter></term>
  32. <listitem>
  33. <para>VIDIOC_SUBDEV_ENUM_MBUS_CODE</para>
  34. </listitem>
  35. </varlistentry>
  36. <varlistentry>
  37. <term><parameter>argp</parameter></term>
  38. <listitem>
  39. <para></para>
  40. </listitem>
  41. </varlistentry>
  42. </variablelist>
  43. </refsect1>
  44. <refsect1>
  45. <title>Description</title>
  46. <note>
  47. <title>Experimental</title>
  48. <para>This is an <link linkend="experimental">experimental</link>
  49. interface and may change in the future.</para>
  50. </note>
  51. <para>To enumerate media bus formats available at a given sub-device pad
  52. applications initialize the <structfield>pad</structfield>, <structfield>which</structfield>
  53. and <structfield>index</structfield> fields of &v4l2-subdev-mbus-code-enum; and
  54. call the <constant>VIDIOC_SUBDEV_ENUM_MBUS_CODE</constant> ioctl with a
  55. pointer to this structure. Drivers fill the rest of the structure or return
  56. an &EINVAL; if either the <structfield>pad</structfield> or
  57. <structfield>index</structfield> are invalid. All media bus formats are
  58. enumerable by beginning at index zero and incrementing by one until
  59. <errorcode>EINVAL</errorcode> is returned.</para>
  60. <para>Available media bus formats may depend on the current 'try' formats
  61. at other pads of the sub-device, as well as on the current active links. See
  62. &VIDIOC-SUBDEV-G-FMT; for more information about the try formats.</para>
  63. <table pgwide="1" frame="none" id="v4l2-subdev-mbus-code-enum">
  64. <title>struct <structname>v4l2_subdev_mbus_code_enum</structname></title>
  65. <tgroup cols="3">
  66. &cs-str;
  67. <tbody valign="top">
  68. <row>
  69. <entry>__u32</entry>
  70. <entry><structfield>pad</structfield></entry>
  71. <entry>Pad number as reported by the media controller API.</entry>
  72. </row>
  73. <row>
  74. <entry>__u32</entry>
  75. <entry><structfield>index</structfield></entry>
  76. <entry>Number of the format in the enumeration, set by the
  77. application.</entry>
  78. </row>
  79. <row>
  80. <entry>__u32</entry>
  81. <entry><structfield>code</structfield></entry>
  82. <entry>The media bus format code, as defined in
  83. <xref linkend="v4l2-mbus-format" />.</entry>
  84. </row>
  85. <row>
  86. <entry>__u32</entry>
  87. <entry><structfield>which</structfield></entry>
  88. <entry>Media bus format codes to be enumerated, from &v4l2-subdev-format-whence;.</entry>
  89. </row>
  90. <row>
  91. <entry>__u32</entry>
  92. <entry><structfield>reserved</structfield>[8]</entry>
  93. <entry>Reserved for future extensions. Applications and drivers must
  94. set the array to zero.</entry>
  95. </row>
  96. </tbody>
  97. </tgroup>
  98. </table>
  99. </refsect1>
  100. <refsect1>
  101. &return-value;
  102. <variablelist>
  103. <varlistentry>
  104. <term><errorcode>EINVAL</errorcode></term>
  105. <listitem>
  106. <para>The &v4l2-subdev-mbus-code-enum; <structfield>pad</structfield>
  107. references a non-existing pad, or the <structfield>index</structfield>
  108. field is out of bounds.</para>
  109. </listitem>
  110. </varlistentry>
  111. </variablelist>
  112. </refsect1>
  113. </refentry>