[media] v4l2 spec: document the new v4l2_tuner capabilities
[linux-2.6-microblaze.git] / Documentation / DocBook / media / v4l / vidioc-s-hw-freq-seek.xml
1 <refentry id="vidioc-s-hw-freq-seek">
2   <refmeta>
3     <refentrytitle>ioctl VIDIOC_S_HW_FREQ_SEEK</refentrytitle>
4     &manvol;
5   </refmeta>
6
7   <refnamediv>
8     <refname>VIDIOC_S_HW_FREQ_SEEK</refname>
9     <refpurpose>Perform a hardware frequency seek</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_hw_freq_seek
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_S_HW_FREQ_SEEK</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>Start a hardware frequency seek from the current frequency.
53 To do this applications initialize the <structfield>tuner</structfield>,
54 <structfield>type</structfield>, <structfield>seek_upward</structfield>,
55 <structfield>spacing</structfield> and
56 <structfield>wrap_around</structfield> fields, and zero out the
57 <structfield>reserved</structfield> array of a &v4l2-hw-freq-seek; and
58 call the <constant>VIDIOC_S_HW_FREQ_SEEK</constant> ioctl with a pointer
59 to this structure.</para>
60
61     <para>If an error is returned, then the original frequency will
62     be restored.</para>
63
64     <para>This ioctl is supported if the <constant>V4L2_CAP_HW_FREQ_SEEK</constant> capability is set.</para>
65
66     <table pgwide="1" frame="none" id="v4l2-hw-freq-seek">
67       <title>struct <structname>v4l2_hw_freq_seek</structname></title>
68       <tgroup cols="3">
69         &cs-str;
70         <tbody valign="top">
71           <row>
72             <entry>__u32</entry>
73             <entry><structfield>tuner</structfield></entry>
74             <entry>The tuner index number. This is the
75 same value as in the &v4l2-input; <structfield>tuner</structfield>
76 field and the &v4l2-tuner; <structfield>index</structfield> field.</entry>
77           </row>
78           <row>
79             <entry>__u32</entry>
80             <entry><structfield>type</structfield></entry>
81             <entry>The tuner type. This is the same value as in the
82 &v4l2-tuner; <structfield>type</structfield> field. See <xref
83             linkend="v4l2-tuner-type" /></entry>
84           </row>
85           <row>
86             <entry>__u32</entry>
87             <entry><structfield>seek_upward</structfield></entry>
88             <entry>If non-zero, seek upward from the current frequency, else seek downward.</entry>
89           </row>
90           <row>
91             <entry>__u32</entry>
92             <entry><structfield>wrap_around</structfield></entry>
93             <entry>If non-zero, wrap around when at the end of the frequency range, else stop seeking.
94             The &v4l2-tuner; <structfield>capability</structfield> field will tell you what the
95             hardware supports.
96             </entry>
97           </row>
98           <row>
99             <entry>__u32</entry>
100             <entry><structfield>spacing</structfield></entry>
101             <entry>If non-zero, defines the hardware seek resolution in Hz. The driver selects the nearest value that is supported by the device. If spacing is zero a reasonable default value is used.</entry>
102           </row>
103           <row>
104             <entry>__u32</entry>
105             <entry><structfield>reserved</structfield>[7]</entry>
106             <entry>Reserved for future extensions. Applications
107             must set the array to zero.</entry>
108           </row>
109         </tbody>
110       </tgroup>
111     </table>
112   </refsect1>
113
114   <refsect1>
115     &return-value;
116
117     <variablelist>
118       <varlistentry>
119         <term><errorcode>EINVAL</errorcode></term>
120         <listitem>
121           <para>The <structfield>tuner</structfield> index is out of
122 bounds, the wrap_around value is not supported or the value in the <structfield>type</structfield> field is
123 wrong.</para>
124         </listitem>
125       </varlistentry>
126       <varlistentry>
127         <term><errorcode>ENODATA</errorcode></term>
128         <listitem>
129           <para>The hardware seek found no channels.</para>
130         </listitem>
131       </varlistentry>
132       <varlistentry>
133         <term><errorcode>EBUSY</errorcode></term>
134         <listitem>
135           <para>Another hardware seek is already in progress.</para>
136         </listitem>
137       </varlistentry>
138     </variablelist>
139   </refsect1>
140 </refentry>