diff options
Diffstat (limited to 'Documentation/DocBook/v4l/vidioc-enuminput.xml')
-rw-r--r-- | Documentation/DocBook/v4l/vidioc-enuminput.xml | 287 |
1 files changed, 287 insertions, 0 deletions
diff --git a/Documentation/DocBook/v4l/vidioc-enuminput.xml b/Documentation/DocBook/v4l/vidioc-enuminput.xml new file mode 100644 index 000000000000..414856b82473 --- /dev/null +++ b/Documentation/DocBook/v4l/vidioc-enuminput.xml | |||
@@ -0,0 +1,287 @@ | |||
1 | <refentry id="vidioc-enuminput"> | ||
2 | <refmeta> | ||
3 | <refentrytitle>ioctl VIDIOC_ENUMINPUT</refentrytitle> | ||
4 | &manvol; | ||
5 | </refmeta> | ||
6 | |||
7 | <refnamediv> | ||
8 | <refname>VIDIOC_ENUMINPUT</refname> | ||
9 | <refpurpose>Enumerate video inputs</refpurpose> | ||
10 | </refnamediv> | ||
11 | |||
12 | <refsynopsisdiv> | ||
13 | <funcsynopsis> | ||
14 | <funcprototype> | ||
15 | <funcdef>int <function>ioctl</function></funcdef> | ||
16 | <paramdef>int <parameter>fd</parameter></paramdef> | ||
17 | <paramdef>int <parameter>request</parameter></paramdef> | ||
18 | <paramdef>struct v4l2_input | ||
19 | *<parameter>argp</parameter></paramdef> | ||
20 | </funcprototype> | ||
21 | </funcsynopsis> | ||
22 | </refsynopsisdiv> | ||
23 | |||
24 | <refsect1> | ||
25 | <title>Arguments</title> | ||
26 | |||
27 | <variablelist> | ||
28 | <varlistentry> | ||
29 | <term><parameter>fd</parameter></term> | ||
30 | <listitem> | ||
31 | <para>&fd;</para> | ||
32 | </listitem> | ||
33 | </varlistentry> | ||
34 | <varlistentry> | ||
35 | <term><parameter>request</parameter></term> | ||
36 | <listitem> | ||
37 | <para>VIDIOC_ENUMINPUT</para> | ||
38 | </listitem> | ||
39 | </varlistentry> | ||
40 | <varlistentry> | ||
41 | <term><parameter>argp</parameter></term> | ||
42 | <listitem> | ||
43 | <para></para> | ||
44 | </listitem> | ||
45 | </varlistentry> | ||
46 | </variablelist> | ||
47 | </refsect1> | ||
48 | |||
49 | <refsect1> | ||
50 | <title>Description</title> | ||
51 | |||
52 | <para>To query the attributes of a video input applications | ||
53 | initialize the <structfield>index</structfield> field of &v4l2-input; | ||
54 | and call the <constant>VIDIOC_ENUMINPUT</constant> ioctl with a | ||
55 | pointer to this structure. Drivers fill the rest of the structure or | ||
56 | return an &EINVAL; when the index is out of bounds. To enumerate all | ||
57 | inputs applications shall begin at index zero, incrementing by one | ||
58 | until the driver returns <errorcode>EINVAL</errorcode>.</para> | ||
59 | |||
60 | <table frame="none" pgwide="1" id="v4l2-input"> | ||
61 | <title>struct <structname>v4l2_input</structname></title> | ||
62 | <tgroup cols="3"> | ||
63 | &cs-str; | ||
64 | <tbody valign="top"> | ||
65 | <row> | ||
66 | <entry>__u32</entry> | ||
67 | <entry><structfield>index</structfield></entry> | ||
68 | <entry>Identifies the input, set by the | ||
69 | application.</entry> | ||
70 | </row> | ||
71 | <row> | ||
72 | <entry>__u8</entry> | ||
73 | <entry><structfield>name</structfield>[32]</entry> | ||
74 | <entry>Name of the video input, a NUL-terminated ASCII | ||
75 | string, for example: "Vin (Composite 2)". This information is intended | ||
76 | for the user, preferably the connector label on the device itself.</entry> | ||
77 | </row> | ||
78 | <row> | ||
79 | <entry>__u32</entry> | ||
80 | <entry><structfield>type</structfield></entry> | ||
81 | <entry>Type of the input, see <xref | ||
82 | linkend="input-type" />.</entry> | ||
83 | </row> | ||
84 | <row> | ||
85 | <entry>__u32</entry> | ||
86 | <entry><structfield>audioset</structfield></entry> | ||
87 | <entry><para>Drivers can enumerate up to 32 video and | ||
88 | audio inputs. This field shows which audio inputs were selectable as | ||
89 | audio source if this was the currently selected video input. It is a | ||
90 | bit mask. The LSB corresponds to audio input 0, the MSB to input 31. | ||
91 | Any number of bits can be set, or none.</para><para>When the driver | ||
92 | does not enumerate audio inputs no bits must be set. Applications | ||
93 | shall not interpret this as lack of audio support. Some drivers | ||
94 | automatically select audio sources and do not enumerate them since | ||
95 | there is no choice anyway.</para><para>For details on audio inputs and | ||
96 | how to select the current input see <xref | ||
97 | linkend="audio" />.</para></entry> | ||
98 | </row> | ||
99 | <row> | ||
100 | <entry>__u32</entry> | ||
101 | <entry><structfield>tuner</structfield></entry> | ||
102 | <entry>Capture devices can have zero or more tuners (RF | ||
103 | demodulators). When the <structfield>type</structfield> is set to | ||
104 | <constant>V4L2_INPUT_TYPE_TUNER</constant> this is an RF connector and | ||
105 | this field identifies the tuner. It corresponds to | ||
106 | &v4l2-tuner; field <structfield>index</structfield>. For details on | ||
107 | tuners see <xref linkend="tuner" />.</entry> | ||
108 | </row> | ||
109 | <row> | ||
110 | <entry>&v4l2-std-id;</entry> | ||
111 | <entry><structfield>std</structfield></entry> | ||
112 | <entry>Every video input supports one or more different | ||
113 | video standards. This field is a set of all supported standards. For | ||
114 | details on video standards and how to switch see <xref | ||
115 | linkend="standard" />.</entry> | ||
116 | </row> | ||
117 | <row> | ||
118 | <entry>__u32</entry> | ||
119 | <entry><structfield>status</structfield></entry> | ||
120 | <entry>This field provides status information about the | ||
121 | input. See <xref linkend="input-status" /> for flags. | ||
122 | With the exception of the sensor orientation bits <structfield>status</structfield> is only valid when this is the | ||
123 | current input.</entry> | ||
124 | </row> | ||
125 | <row> | ||
126 | <entry>__u32</entry> | ||
127 | <entry><structfield>reserved</structfield>[4]</entry> | ||
128 | <entry>Reserved for future extensions. Drivers must set | ||
129 | the array to zero.</entry> | ||
130 | </row> | ||
131 | </tbody> | ||
132 | </tgroup> | ||
133 | </table> | ||
134 | |||
135 | <table frame="none" pgwide="1" id="input-type"> | ||
136 | <title>Input Types</title> | ||
137 | <tgroup cols="3"> | ||
138 | &cs-def; | ||
139 | <tbody valign="top"> | ||
140 | <row> | ||
141 | <entry><constant>V4L2_INPUT_TYPE_TUNER</constant></entry> | ||
142 | <entry>1</entry> | ||
143 | <entry>This input uses a tuner (RF demodulator).</entry> | ||
144 | </row> | ||
145 | <row> | ||
146 | <entry><constant>V4L2_INPUT_TYPE_CAMERA</constant></entry> | ||
147 | <entry>2</entry> | ||
148 | <entry>Analog baseband input, for example CVBS / | ||
149 | Composite Video, S-Video, RGB.</entry> | ||
150 | </row> | ||
151 | </tbody> | ||
152 | </tgroup> | ||
153 | </table> | ||
154 | |||
155 | <!-- Status flags based on proposal by Mark McClelland, | ||
156 | video4linux-list@redhat.com on 18 Oct 2002, subject "Re: [V4L] Re: | ||
157 | v4l2 api". "Why are some of them inverted? So that the driver doesn't | ||
158 | have to lie about the status in cases where it can't tell one way or | ||
159 | the other. Plus, a status of zero would generally mean that everything | ||
160 | is OK." --> | ||
161 | |||
162 | <table frame="none" pgwide="1" id="input-status"> | ||
163 | <title>Input Status Flags</title> | ||
164 | <tgroup cols="3"> | ||
165 | <colspec colname="c1" /> | ||
166 | <colspec colname="c2" align="center" /> | ||
167 | <colspec colname="c3" /> | ||
168 | <spanspec namest="c1" nameend="c3" spanname="hspan" | ||
169 | align="left" /> | ||
170 | <tbody valign="top"> | ||
171 | <row> | ||
172 | <entry spanname="hspan">General</entry> | ||
173 | </row> | ||
174 | <row> | ||
175 | <entry><constant>V4L2_IN_ST_NO_POWER</constant></entry> | ||
176 | <entry>0x00000001</entry> | ||
177 | <entry>Attached device is off.</entry> | ||
178 | </row> | ||
179 | <row> | ||
180 | <entry><constant>V4L2_IN_ST_NO_SIGNAL</constant></entry> | ||
181 | <entry>0x00000002</entry> | ||
182 | <entry></entry> | ||
183 | </row> | ||
184 | <row> | ||
185 | <entry><constant>V4L2_IN_ST_NO_COLOR</constant></entry> | ||
186 | <entry>0x00000004</entry> | ||
187 | <entry>The hardware supports color decoding, but does not | ||
188 | detect color modulation in the signal.</entry> | ||
189 | </row> | ||
190 | <row> | ||
191 | <entry spanname="hspan">Sensor Orientation</entry> | ||
192 | </row> | ||
193 | <row> | ||
194 | <entry><constant>V4L2_IN_ST_HFLIP</constant></entry> | ||
195 | <entry>0x00000010</entry> | ||
196 | <entry>The input is connected to a device that produces a signal | ||
197 | that is flipped horizontally and does not correct this before passing the | ||
198 | signal to userspace.</entry> | ||
199 | </row> | ||
200 | <row> | ||
201 | <entry><constant>V4L2_IN_ST_VFLIP</constant></entry> | ||
202 | <entry>0x00000020</entry> | ||
203 | <entry>The input is connected to a device that produces a signal | ||
204 | that is flipped vertically and does not correct this before passing the | ||
205 | signal to userspace. Note that a 180 degree rotation is the same as HFLIP | VFLIP</entry> | ||
206 | </row> | ||
207 | <row> | ||
208 | <entry spanname="hspan">Analog Video</entry> | ||
209 | </row> | ||
210 | <row> | ||
211 | <entry><constant>V4L2_IN_ST_NO_H_LOCK</constant></entry> | ||
212 | <entry>0x00000100</entry> | ||
213 | <entry>No horizontal sync lock.</entry> | ||
214 | </row> | ||
215 | <row> | ||
216 | <entry><constant>V4L2_IN_ST_COLOR_KILL</constant></entry> | ||
217 | <entry>0x00000200</entry> | ||
218 | <entry>A color killer circuit automatically disables color | ||
219 | decoding when it detects no color modulation. When this flag is set | ||
220 | the color killer is enabled <emphasis>and</emphasis> has shut off | ||
221 | color decoding.</entry> | ||
222 | </row> | ||
223 | <row> | ||
224 | <entry spanname="hspan">Digital Video</entry> | ||
225 | </row> | ||
226 | <row> | ||
227 | <entry><constant>V4L2_IN_ST_NO_SYNC</constant></entry> | ||
228 | <entry>0x00010000</entry> | ||
229 | <entry>No synchronization lock.</entry> | ||
230 | </row> | ||
231 | <row> | ||
232 | <entry><constant>V4L2_IN_ST_NO_EQU</constant></entry> | ||
233 | <entry>0x00020000</entry> | ||
234 | <entry>No equalizer lock.</entry> | ||
235 | </row> | ||
236 | <row> | ||
237 | <entry><constant>V4L2_IN_ST_NO_CARRIER</constant></entry> | ||
238 | <entry>0x00040000</entry> | ||
239 | <entry>Carrier recovery failed.</entry> | ||
240 | </row> | ||
241 | <row> | ||
242 | <entry spanname="hspan">VCR and Set-Top Box</entry> | ||
243 | </row> | ||
244 | <row> | ||
245 | <entry><constant>V4L2_IN_ST_MACROVISION</constant></entry> | ||
246 | <entry>0x01000000</entry> | ||
247 | <entry>Macrovision is an analog copy prevention system | ||
248 | mangling the video signal to confuse video recorders. When this | ||
249 | flag is set Macrovision has been detected.</entry> | ||
250 | </row> | ||
251 | <row> | ||
252 | <entry><constant>V4L2_IN_ST_NO_ACCESS</constant></entry> | ||
253 | <entry>0x02000000</entry> | ||
254 | <entry>Conditional access denied.</entry> | ||
255 | </row> | ||
256 | <row> | ||
257 | <entry><constant>V4L2_IN_ST_VTR</constant></entry> | ||
258 | <entry>0x04000000</entry> | ||
259 | <entry>VTR time constant. [?]</entry> | ||
260 | </row> | ||
261 | </tbody> | ||
262 | </tgroup> | ||
263 | </table> | ||
264 | </refsect1> | ||
265 | |||
266 | <refsect1> | ||
267 | &return-value; | ||
268 | |||
269 | <variablelist> | ||
270 | <varlistentry> | ||
271 | <term><errorcode>EINVAL</errorcode></term> | ||
272 | <listitem> | ||
273 | <para>The &v4l2-input; <structfield>index</structfield> is | ||
274 | out of bounds.</para> | ||
275 | </listitem> | ||
276 | </varlistentry> | ||
277 | </variablelist> | ||
278 | </refsect1> | ||
279 | </refentry> | ||
280 | |||
281 | <!-- | ||
282 | Local Variables: | ||
283 | mode: sgml | ||
284 | sgml-parent-document: "v4l2.sgml" | ||
285 | indent-tabs-mode: nil | ||
286 | End: | ||
287 | --> | ||