About Kernel Documentation Linux Kernel Contact Linux Resources Linux Blog

Documentation / DocBook / media / v4l / vidioc-subdev-g-edid.xml




Custom Search

Based on kernel version 3.14.11. Page generated on 2014-07-07 08:54 EST.

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

Information is copyright its respective author. All material is available from the Linux Kernel Source distributed under a GPL License. This page is provided as a free service by mjmwired.net.