Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs...
[sfrench/cifs-2.6.git] / Documentation / DocBook / v4l / vidioc-enumoutput.xml
1 <refentry id="vidioc-enumoutput">
2   <refmeta>
3     <refentrytitle>ioctl VIDIOC_ENUMOUTPUT</refentrytitle>
4     &manvol;
5   </refmeta>
6
7   <refnamediv>
8     <refname>VIDIOC_ENUMOUTPUT</refname>
9     <refpurpose>Enumerate video outputs</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_output *<parameter>argp</parameter></paramdef>
19       </funcprototype>
20     </funcsynopsis>
21   </refsynopsisdiv>
22
23   <refsect1>
24     <title>Arguments</title>
25
26     <variablelist>
27       <varlistentry>
28         <term><parameter>fd</parameter></term>
29         <listitem>
30           <para>&fd;</para>
31         </listitem>
32       </varlistentry>
33       <varlistentry>
34         <term><parameter>request</parameter></term>
35         <listitem>
36           <para>VIDIOC_ENUMOUTPUT</para>
37         </listitem>
38       </varlistentry>
39       <varlistentry>
40         <term><parameter>argp</parameter></term>
41         <listitem>
42           <para></para>
43         </listitem>
44       </varlistentry>
45     </variablelist>
46   </refsect1>
47
48   <refsect1>
49     <title>Description</title>
50
51     <para>To query the attributes of a video outputs applications
52 initialize the <structfield>index</structfield> field of &v4l2-output;
53 and call the <constant>VIDIOC_ENUMOUTPUT</constant> ioctl with a
54 pointer to this structure. Drivers fill the rest of the structure or
55 return an &EINVAL; when the index is out of bounds. To enumerate all
56 outputs applications shall begin at index zero, incrementing by one
57 until the driver returns <errorcode>EINVAL</errorcode>.</para>
58
59     <table frame="none" pgwide="1" id="v4l2-output">
60       <title>struct <structname>v4l2_output</structname></title>
61       <tgroup cols="3">
62         &cs-str;
63         <tbody valign="top">
64           <row>
65             <entry>__u32</entry>
66             <entry><structfield>index</structfield></entry>
67             <entry>Identifies the output, set by the
68 application.</entry>
69           </row>
70           <row>
71             <entry>__u8</entry>
72             <entry><structfield>name</structfield>[32]</entry>
73             <entry>Name of the video output, a NUL-terminated ASCII
74 string, for example: "Vout". This information is intended for the
75 user, preferably the connector label on the device itself.</entry>
76           </row>
77           <row>
78             <entry>__u32</entry>
79             <entry><structfield>type</structfield></entry>
80             <entry>Type of the output, see <xref
81                 linkend="output-type" />.</entry>
82           </row>
83           <row>
84             <entry>__u32</entry>
85             <entry><structfield>audioset</structfield></entry>
86             <entry><para>Drivers can enumerate up to 32 video and
87 audio outputs. This field shows which audio outputs were
88 selectable as the current output if this was the currently selected
89 video output. It is a bit mask. The LSB corresponds to audio output 0,
90 the MSB to output 31. Any number of bits can be set, or
91 none.</para><para>When the driver does not enumerate audio outputs no
92 bits must be set. Applications shall not interpret this as lack of
93 audio support. Drivers may automatically select audio outputs without
94 enumerating them.</para><para>For details on audio outputs and how to
95 select the current output see <xref linkend="audio" />.</para></entry>
96           </row>
97           <row>
98             <entry>__u32</entry>
99             <entry><structfield>modulator</structfield></entry>
100             <entry>Output devices can have zero or more RF modulators.
101 When the <structfield>type</structfield> is
102 <constant>V4L2_OUTPUT_TYPE_MODULATOR</constant> this is an RF
103 connector and this field identifies the modulator. It corresponds to
104 &v4l2-modulator; field <structfield>index</structfield>. For details
105 on modulators see <xref linkend="tuner" />.</entry>
106           </row>
107           <row>
108             <entry>&v4l2-std-id;</entry>
109             <entry><structfield>std</structfield></entry>
110             <entry>Every video output supports one or more different
111 video standards. This field is a set of all supported standards. For
112 details on video standards and how to switch see <xref
113                 linkend="standard" />.</entry>
114           </row>
115           <row>
116             <entry>__u32</entry>
117             <entry><structfield>reserved</structfield>[4]</entry>
118             <entry>Reserved for future extensions. Drivers must set
119 the array to zero.</entry>
120           </row>
121         </tbody>
122       </tgroup>
123     </table>
124
125     <table frame="none" pgwide="1" id="output-type">
126       <title>Output Type</title>
127       <tgroup cols="3">
128         &cs-def;
129         <tbody valign="top">
130           <row>
131             <entry><constant>V4L2_OUTPUT_TYPE_MODULATOR</constant></entry>
132             <entry>1</entry>
133             <entry>This output is an analog TV modulator.</entry>
134           </row>
135           <row>
136             <entry><constant>V4L2_OUTPUT_TYPE_ANALOG</constant></entry>
137             <entry>2</entry>
138             <entry>Analog baseband output, for example Composite /
139 CVBS, S-Video, RGB.</entry>
140           </row>
141           <row>
142             <entry><constant>V4L2_OUTPUT_TYPE_ANALOGVGAOVERLAY</constant></entry>
143             <entry>3</entry>
144             <entry>[?]</entry>
145           </row>
146         </tbody>
147       </tgroup>
148     </table>
149
150   </refsect1>
151   <refsect1>
152     &return-value;
153
154     <variablelist>
155       <varlistentry>
156         <term><errorcode>EINVAL</errorcode></term>
157         <listitem>
158           <para>The &v4l2-output; <structfield>index</structfield>
159 is out of bounds.</para>
160         </listitem>
161       </varlistentry>
162     </variablelist>
163   </refsect1>
164 </refentry>
165
166 <!--
167 Local Variables:
168 mode: sgml
169 sgml-parent-document: "v4l2.sgml"
170 indent-tabs-mode: nil
171 End:
172 -->