About Kernel Documentation Linux Kernel Contact Linux Resources Linux Blog

Documentation / DocBook / media / v4l / vidioc-s-hw-freq-seek.xml




Custom Search

Based on kernel version 3.13. Page generated on 2014-01-20 22:02 EST.

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>wrap_around</structfield>, <structfield>spacing</structfield>,
56	<structfield>rangelow</structfield> and <structfield>rangehigh</structfield>
57	fields, and zero out the <structfield>reserved</structfield> array of a
58	&v4l2-hw-freq-seek; and call the <constant>VIDIOC_S_HW_FREQ_SEEK</constant>
59	ioctl with a pointer to this structure.</para>
60	
61	    <para>The <structfield>rangelow</structfield> and
62	<structfield>rangehigh</structfield> fields can be set to a non-zero value to
63	tell the driver to search a specific band. If the &v4l2-tuner;
64	<structfield>capability</structfield> field has the
65	<constant>V4L2_TUNER_CAP_HWSEEK_PROG_LIM</constant> flag set, these values
66	must fall within one of the bands returned by &VIDIOC-ENUM-FREQ-BANDS;. If
67	the <constant>V4L2_TUNER_CAP_HWSEEK_PROG_LIM</constant> flag is not set,
68	then these values must exactly match those of one of the bands returned by
69	&VIDIOC-ENUM-FREQ-BANDS;. If the current frequency of the tuner does not fall
70	within the selected band it will be clamped to fit in the band before the
71	seek is started.</para>
72	
73	    <para>If an error is returned, then the original frequency will
74	    be restored.</para>
75	
76	    <para>This ioctl is supported if the <constant>V4L2_CAP_HW_FREQ_SEEK</constant> capability is set.</para>
77	
78	    <para>If this ioctl is called from a non-blocking filehandle, then &EAGAIN; is
79	    returned and no seek takes place.</para>
80	
81	    <table pgwide="1" frame="none" id="v4l2-hw-freq-seek">
82	      <title>struct <structname>v4l2_hw_freq_seek</structname></title>
83	      <tgroup cols="3">
84		&cs-str;
85		<tbody valign="top">
86		  <row>
87		    <entry>__u32</entry>
88		    <entry><structfield>tuner</structfield></entry>
89		    <entry>The tuner index number. This is the
90	same value as in the &v4l2-input; <structfield>tuner</structfield>
91	field and the &v4l2-tuner; <structfield>index</structfield> field.</entry>
92		  </row>
93		  <row>
94		    <entry>__u32</entry>
95		    <entry><structfield>type</structfield></entry>
96		    <entry>The tuner type. This is the same value as in the
97	&v4l2-tuner; <structfield>type</structfield> field. See <xref
98		    linkend="v4l2-tuner-type" /></entry>
99		  </row>
100		  <row>
101		    <entry>__u32</entry>
102		    <entry><structfield>seek_upward</structfield></entry>
103		    <entry>If non-zero, seek upward from the current frequency, else seek downward.</entry>
104		  </row>
105		  <row>
106		    <entry>__u32</entry>
107		    <entry><structfield>wrap_around</structfield></entry>
108		    <entry>If non-zero, wrap around when at the end of the frequency range, else stop seeking.
109		    The &v4l2-tuner; <structfield>capability</structfield> field will tell you what the
110		    hardware supports.
111		    </entry>
112		  </row>
113		  <row>
114		    <entry>__u32</entry>
115		    <entry><structfield>spacing</structfield></entry>
116		    <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>
117		  </row>
118		  <row>
119		    <entry>__u32</entry>
120		    <entry><structfield>rangelow</structfield></entry>
121		    <entry>If non-zero, the lowest tunable frequency of the band to
122	search in units of 62.5 kHz, or if the &v4l2-tuner;
123	<structfield>capability</structfield> field has the
124	<constant>V4L2_TUNER_CAP_LOW</constant> flag set, in units of 62.5 Hz.
125	If <structfield>rangelow</structfield> is zero a reasonable default value
126	is used.</entry>
127		  </row>
128		  <row>
129		    <entry>__u32</entry>
130		    <entry><structfield>rangehigh</structfield></entry>
131		    <entry>If non-zero, the highest tunable frequency of the band to
132	search in units of 62.5 kHz, or if the &v4l2-tuner;
133	<structfield>capability</structfield> field has the
134	<constant>V4L2_TUNER_CAP_LOW</constant> flag set, in units of 62.5 Hz.
135	If <structfield>rangehigh</structfield> is zero a reasonable default value
136	is used.</entry>
137		  </row>
138		  <row>
139		    <entry>__u32</entry>
140		    <entry><structfield>reserved</structfield>[5]</entry>
141		    <entry>Reserved for future extensions. Applications
142		    must set the array to zero.</entry>
143		  </row>
144		</tbody>
145	      </tgroup>
146	    </table>
147	  </refsect1>
148	
149	  <refsect1>
150	    &return-value;
151	
152	    <variablelist>
153	      <varlistentry>
154		<term><errorcode>EINVAL</errorcode></term>
155		<listitem>
156		  <para>The <structfield>tuner</structfield> index is out of
157	bounds, the <structfield>wrap_around</structfield> value is not supported or
158	one of the values in the <structfield>type</structfield>,
159	<structfield>rangelow</structfield> or <structfield>rangehigh</structfield>
160	fields is wrong.</para>
161		</listitem>
162	      </varlistentry>
163	      <varlistentry>
164		<term><errorcode>EAGAIN</errorcode></term>
165		<listitem>
166		  <para>Attempted to call <constant>VIDIOC_S_HW_FREQ_SEEK</constant>
167		  with the filehandle in non-blocking mode.</para>
168		</listitem>
169	      </varlistentry>
170	      <varlistentry>
171		<term><errorcode>ENODATA</errorcode></term>
172		<listitem>
173		  <para>The hardware seek found no channels.</para>
174		</listitem>
175	      </varlistentry>
176	      <varlistentry>
177		<term><errorcode>EBUSY</errorcode></term>
178		<listitem>
179		  <para>Another hardware seek is already in progress.</para>
180		</listitem>
181	      </varlistentry>
182	    </variablelist>
183	  </refsect1>
184	</refentry>
Hide Line Numbers
About Kernel Documentation Linux Kernel Contact Linux Resources Linux Blog

Information is copyright its respective author. All material is available from the Linux Kernel Source distributed under a GPL License. This page is provided as a free service by mjmwired.net.