xen/dom0: set wallclock time in Xen
[pandora-kernel.git] / Documentation / DocBook / v4l / vidioc-subdev-enum-frame-size.xml
1 <refentry id="vidioc-subdev-enum-frame-size">
2   <refmeta>
3     <refentrytitle>ioctl VIDIOC_SUBDEV_ENUM_FRAME_SIZE</refentrytitle>
4     &manvol;
5   </refmeta>
6
7   <refnamediv>
8     <refname>VIDIOC_SUBDEV_ENUM_FRAME_SIZE</refname>
9     <refpurpose>Enumerate media bus frame sizes</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_subdev_frame_size_enum *
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_SUBDEV_ENUM_FRAME_SIZE</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     <note>
53       <title>Experimental</title>
54       <para>This is an <link linkend="experimental">experimental</link>
55       interface and may change in the future.</para>
56     </note>
57
58     <para>This ioctl allows applications to enumerate all frame sizes
59     supported by a sub-device on the given pad for the given media bus format.
60     Supported formats can be retrieved with the &VIDIOC-SUBDEV-ENUM-MBUS-CODE;
61     ioctl.</para>
62
63     <para>To enumerate frame sizes applications initialize the
64     <structfield>pad</structfield>, <structfield>code</structfield> and
65     <structfield>index</structfield> fields of the
66     &v4l2-subdev-mbus-code-enum; and call the
67     <constant>VIDIOC_SUBDEV_ENUM_FRAME_SIZE</constant> ioctl with a pointer to
68     the structure. Drivers fill the minimum and maximum frame sizes or return
69     an &EINVAL; if one of the input parameters is invalid.</para>
70
71     <para>Sub-devices that only support discrete frame sizes (such as most
72     sensors) will return one or more frame sizes with identical minimum and
73     maximum values.</para>
74
75     <para>Not all possible sizes in given [minimum, maximum] ranges need to be
76     supported. For instance, a scaler that uses a fixed-point scaling ratio
77     might not be able to produce every frame size between the minimum and
78     maximum values. Applications must use the &VIDIOC-SUBDEV-S-FMT; ioctl to
79     try the sub-device for an exact supported frame size.</para>
80
81     <para>Available frame sizes may depend on the current 'try' formats at other
82     pads of the sub-device, as well as on the current active links and the
83     current values of V4L2 controls. See &VIDIOC-SUBDEV-G-FMT; for more
84     information about try formats.</para>
85
86     <table pgwide="1" frame="none" id="v4l2-subdev-frame-size-enum">
87       <title>struct <structname>v4l2_subdev_frame_size_enum</structname></title>
88       <tgroup cols="3">
89         &cs-str;
90         <tbody valign="top">
91           <row>
92             <entry>__u32</entry>
93             <entry><structfield>index</structfield></entry>
94             <entry>Number of the format in the enumeration, set by the
95             application.</entry>
96           </row>
97           <row>
98             <entry>__u32</entry>
99             <entry><structfield>pad</structfield></entry>
100             <entry>Pad number as reported by the media controller API.</entry>
101           </row>
102           <row>
103             <entry>__u32</entry>
104             <entry><structfield>code</structfield></entry>
105             <entry>The media bus format code, as defined in
106             <xref linkend="v4l2-mbus-format" />.</entry>
107           </row>
108           <row>
109             <entry>__u32</entry>
110             <entry><structfield>min_width</structfield></entry>
111             <entry>Minimum frame width, in pixels.</entry>
112           </row>
113           <row>
114             <entry>__u32</entry>
115             <entry><structfield>max_width</structfield></entry>
116             <entry>Maximum frame width, in pixels.</entry>
117           </row>
118           <row>
119             <entry>__u32</entry>
120             <entry><structfield>min_height</structfield></entry>
121             <entry>Minimum frame height, in pixels.</entry>
122           </row>
123           <row>
124             <entry>__u32</entry>
125             <entry><structfield>max_height</structfield></entry>
126             <entry>Maximum frame height, in pixels.</entry>
127           </row>
128           <row>
129             <entry>__u32</entry>
130             <entry><structfield>reserved</structfield>[9]</entry>
131             <entry>Reserved for future extensions. Applications and drivers must
132             set the array to zero.</entry>
133           </row>
134         </tbody>
135       </tgroup>
136     </table>
137   </refsect1>
138
139   <refsect1>
140     &return-value;
141
142     <variablelist>
143       <varlistentry>
144         <term><errorcode>EINVAL</errorcode></term>
145         <listitem>
146           <para>The &v4l2-subdev-frame-size-enum; <structfield>pad</structfield>
147           references a non-existing pad, the <structfield>code</structfield> is
148           invalid for the given pad or the <structfield>index</structfield>
149           field is out of bounds.</para>
150         </listitem>
151       </varlistentry>
152     </variablelist>
153   </refsect1>
154 </refentry>