[media] DocBook: document when to return ENODATA
[cascardo/linux.git] / Documentation / DocBook / media / v4l / vidioc-g-dv-preset.xml
1 <refentry id="vidioc-g-dv-preset">
2   <refmeta>
3     <refentrytitle>ioctl VIDIOC_G_DV_PRESET, VIDIOC_S_DV_PRESET</refentrytitle>
4     &manvol;
5   </refmeta>
6
7   <refnamediv>
8     <refname>VIDIOC_G_DV_PRESET</refname>
9     <refname>VIDIOC_S_DV_PRESET</refname>
10     <refpurpose>Query or select the DV preset of the current input or output</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_dv_preset *<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_G_DV_PRESET, VIDIOC_S_DV_PRESET</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>These ioctls are <emphasis role="bold">deprecated</emphasis>.
53     New drivers and applications should use &VIDIOC-G-DV-TIMINGS; and &VIDIOC-S-DV-TIMINGS;
54     instead.
55     </para>
56
57     <para>To query and select the current DV preset, applications
58 use the <constant>VIDIOC_G_DV_PRESET</constant> and <constant>VIDIOC_S_DV_PRESET</constant>
59 ioctls which take a pointer to a &v4l2-dv-preset; type as argument.
60 Applications must zero the reserved array in &v4l2-dv-preset;.
61 <constant>VIDIOC_G_DV_PRESET</constant> returns a dv preset in the field
62 <structfield>preset</structfield> of &v4l2-dv-preset;.</para>
63
64     <para><constant>VIDIOC_S_DV_PRESET</constant> accepts a pointer to a &v4l2-dv-preset;
65 that has the preset value to be set. Applications must zero the reserved array in &v4l2-dv-preset;.
66 If the preset is not supported, it returns an &EINVAL; </para>
67   </refsect1>
68
69   <refsect1>
70     &return-value;
71
72     <variablelist>
73       <varlistentry>
74         <term><errorcode>EINVAL</errorcode></term>
75         <listitem>
76           <para>This ioctl is not supported, or the
77 <constant>VIDIOC_S_DV_PRESET</constant>,<constant>VIDIOC_S_DV_PRESET</constant> parameter was unsuitable.</para>
78         </listitem>
79       </varlistentry>
80       <varlistentry>
81         <term><errorcode>ENODATA</errorcode></term>
82         <listitem>
83           <para>Digital video presets are not supported for this input or output.</para>
84         </listitem>
85       </varlistentry>
86       <varlistentry>
87         <term><errorcode>EBUSY</errorcode></term>
88         <listitem>
89           <para>The device is busy and therefore can not change the preset.</para>
90         </listitem>
91       </varlistentry>
92     </variablelist>
93
94     <table pgwide="1" frame="none" id="v4l2-dv-preset">
95       <title>struct <structname>v4l2_dv_preset</structname></title>
96       <tgroup cols="3">
97         &cs-str;
98         <tbody valign="top">
99           <row>
100             <entry>__u32</entry>
101             <entry><structfield>preset</structfield></entry>
102             <entry>Preset value to represent the digital video timings</entry>
103           </row>
104           <row>
105             <entry>__u32</entry>
106             <entry><structfield>reserved[4]</structfield></entry>
107             <entry>Reserved fields for future use</entry>
108           </row>
109         </tbody>
110       </tgroup>
111     </table>
112   </refsect1>
113 </refentry>