vidioc-subdev-g-edid.xml 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. <refentry id="vidioc-subdev-g-edid">
  2. <refmeta>
  3. <refentrytitle>ioctl VIDIOC_SUBDEV_G_EDID, VIDIOC_SUBDEV_S_EDID</refentrytitle>
  4. &manvol;
  5. </refmeta>
  6. <refnamediv>
  7. <refname>VIDIOC_SUBDEV_G_EDID</refname>
  8. <refname>VIDIOC_SUBDEV_S_EDID</refname>
  9. <refpurpose>Get or set the EDID of a video receiver/transmitter</refpurpose>
  10. </refnamediv>
  11. <refsynopsisdiv>
  12. <funcsynopsis>
  13. <funcprototype>
  14. <funcdef>int <function>ioctl</function></funcdef>
  15. <paramdef>int <parameter>fd</parameter></paramdef>
  16. <paramdef>int <parameter>request</parameter></paramdef>
  17. <paramdef>struct v4l2_subdev_edid *<parameter>argp</parameter></paramdef>
  18. </funcprototype>
  19. </funcsynopsis>
  20. <funcsynopsis>
  21. <funcprototype>
  22. <funcdef>int <function>ioctl</function></funcdef>
  23. <paramdef>int <parameter>fd</parameter></paramdef>
  24. <paramdef>int <parameter>request</parameter></paramdef>
  25. <paramdef>const struct v4l2_subdev_edid *<parameter>argp</parameter></paramdef>
  26. </funcprototype>
  27. </funcsynopsis>
  28. </refsynopsisdiv>
  29. <refsect1>
  30. <title>Arguments</title>
  31. <variablelist>
  32. <varlistentry>
  33. <term><parameter>fd</parameter></term>
  34. <listitem>
  35. <para>&fd;</para>
  36. </listitem>
  37. </varlistentry>
  38. <varlistentry>
  39. <term><parameter>request</parameter></term>
  40. <listitem>
  41. <para>VIDIOC_SUBDEV_G_EDID, VIDIOC_SUBDEV_S_EDID</para>
  42. </listitem>
  43. </varlistentry>
  44. <varlistentry>
  45. <term><parameter>argp</parameter></term>
  46. <listitem>
  47. <para></para>
  48. </listitem>
  49. </varlistentry>
  50. </variablelist>
  51. </refsect1>
  52. <refsect1>
  53. <title>Description</title>
  54. <para>These ioctls can be used to get or set an EDID associated with an input pad
  55. from a receiver or an output pad of a transmitter subdevice.</para>
  56. <para>To get the EDID data the application has to fill in the <structfield>pad</structfield>,
  57. <structfield>start_block</structfield>, <structfield>blocks</structfield> and <structfield>edid</structfield>
  58. fields and call <constant>VIDIOC_SUBDEV_G_EDID</constant>. The current EDID from block
  59. <structfield>start_block</structfield> and of size <structfield>blocks</structfield>
  60. will be placed in the memory <structfield>edid</structfield> points to. The <structfield>edid</structfield>
  61. pointer must point to memory at least <structfield>blocks</structfield>&nbsp;*&nbsp;128 bytes
  62. large (the size of one block is 128 bytes).</para>
  63. <para>If there are fewer blocks than specified, then the driver will set <structfield>blocks</structfield>
  64. to the actual number of blocks. If there are no EDID blocks available at all, then the error code
  65. ENODATA is set.</para>
  66. <para>If blocks have to be retrieved from the sink, then this call will block until they
  67. have been read.</para>
  68. <para>To set the EDID blocks of a receiver the application has to fill in the <structfield>pad</structfield>,
  69. <structfield>blocks</structfield> and <structfield>edid</structfield> fields and set
  70. <structfield>start_block</structfield> to 0. It is not possible to set part of an EDID,
  71. it is always all or nothing. Setting the EDID data is only valid for receivers as it makes
  72. no sense for a transmitter.</para>
  73. <para>The driver assumes that the full EDID is passed in. If there are more EDID blocks than
  74. the hardware can handle then the EDID is not written, but instead the error code E2BIG is set
  75. and <structfield>blocks</structfield> is set to the maximum that the hardware supports.
  76. If <structfield>start_block</structfield> is any
  77. value other than 0 then the error code EINVAL is set.</para>
  78. <para>To disable an EDID you set <structfield>blocks</structfield> to 0. Depending on the
  79. hardware this will drive the hotplug pin low and/or block the source from reading the EDID
  80. data in some way. In any case, the end result is the same: the EDID is no longer available.
  81. </para>
  82. <table pgwide="1" frame="none" id="v4l2-subdev-edid">
  83. <title>struct <structname>v4l2_subdev_edid</structname></title>
  84. <tgroup cols="3">
  85. &cs-str;
  86. <tbody valign="top">
  87. <row>
  88. <entry>__u32</entry>
  89. <entry><structfield>pad</structfield></entry>
  90. <entry>Pad for which to get/set the EDID blocks.</entry>
  91. </row>
  92. <row>
  93. <entry>__u32</entry>
  94. <entry><structfield>start_block</structfield></entry>
  95. <entry>Read the EDID from starting with this block. Must be 0 when setting
  96. the EDID.</entry>
  97. </row>
  98. <row>
  99. <entry>__u32</entry>
  100. <entry><structfield>blocks</structfield></entry>
  101. <entry>The number of blocks to get or set. Must be less or equal to 256 (the
  102. maximum number of blocks as defined by the standard). When you set the EDID and
  103. <structfield>blocks</structfield> is 0, then the EDID is disabled or erased.</entry>
  104. </row>
  105. <row>
  106. <entry>__u8&nbsp;*</entry>
  107. <entry><structfield>edid</structfield></entry>
  108. <entry>Pointer to memory that contains the EDID. The minimum size is
  109. <structfield>blocks</structfield>&nbsp;*&nbsp;128.</entry>
  110. </row>
  111. <row>
  112. <entry>__u32</entry>
  113. <entry><structfield>reserved</structfield>[5]</entry>
  114. <entry>Reserved for future extensions. Applications and drivers must
  115. set the array to zero.</entry>
  116. </row>
  117. </tbody>
  118. </tgroup>
  119. </table>
  120. </refsect1>
  121. <refsect1>
  122. &return-value;
  123. <variablelist>
  124. <varlistentry>
  125. <term><errorcode>ENODATA</errorcode></term>
  126. <listitem>
  127. <para>The EDID data is not available.</para>
  128. </listitem>
  129. </varlistentry>
  130. <varlistentry>
  131. <term><errorcode>E2BIG</errorcode></term>
  132. <listitem>
  133. <para>The EDID data you provided is more than the hardware can handle.</para>
  134. </listitem>
  135. </varlistentry>
  136. </variablelist>
  137. </refsect1>
  138. </refentry>