vidioc-s-hw-freq-seek.xml 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188
  1. <refentry id="vidioc-s-hw-freq-seek">
  2. <refmeta>
  3. <refentrytitle>ioctl VIDIOC_S_HW_FREQ_SEEK</refentrytitle>
  4. &manvol;
  5. </refmeta>
  6. <refnamediv>
  7. <refname>VIDIOC_S_HW_FREQ_SEEK</refname>
  8. <refpurpose>Perform a hardware frequency seek</refpurpose>
  9. </refnamediv>
  10. <refsynopsisdiv>
  11. <funcsynopsis>
  12. <funcprototype>
  13. <funcdef>int <function>ioctl</function></funcdef>
  14. <paramdef>int <parameter>fd</parameter></paramdef>
  15. <paramdef>int <parameter>request</parameter></paramdef>
  16. <paramdef>struct v4l2_hw_freq_seek
  17. *<parameter>argp</parameter></paramdef>
  18. </funcprototype>
  19. </funcsynopsis>
  20. </refsynopsisdiv>
  21. <refsect1>
  22. <title>Arguments</title>
  23. <variablelist>
  24. <varlistentry>
  25. <term><parameter>fd</parameter></term>
  26. <listitem>
  27. <para>&fd;</para>
  28. </listitem>
  29. </varlistentry>
  30. <varlistentry>
  31. <term><parameter>request</parameter></term>
  32. <listitem>
  33. <para>VIDIOC_S_HW_FREQ_SEEK</para>
  34. </listitem>
  35. </varlistentry>
  36. <varlistentry>
  37. <term><parameter>argp</parameter></term>
  38. <listitem>
  39. <para></para>
  40. </listitem>
  41. </varlistentry>
  42. </variablelist>
  43. </refsect1>
  44. <refsect1>
  45. <title>Description</title>
  46. <para>Start a hardware frequency seek from the current frequency.
  47. To do this applications initialize the <structfield>tuner</structfield>,
  48. <structfield>type</structfield>, <structfield>seek_upward</structfield>,
  49. <structfield>wrap_around</structfield>, <structfield>spacing</structfield>,
  50. <structfield>rangelow</structfield> and <structfield>rangehigh</structfield>
  51. fields, and zero out the <structfield>reserved</structfield> array of a
  52. &v4l2-hw-freq-seek; and call the <constant>VIDIOC_S_HW_FREQ_SEEK</constant>
  53. ioctl with a pointer to this structure.</para>
  54. <para>The <structfield>rangelow</structfield> and
  55. <structfield>rangehigh</structfield> fields can be set to a non-zero value to
  56. tell the driver to search a specific band. If the &v4l2-tuner;
  57. <structfield>capability</structfield> field has the
  58. <constant>V4L2_TUNER_CAP_HWSEEK_PROG_LIM</constant> flag set, these values
  59. must fall within one of the bands returned by &VIDIOC-ENUM-FREQ-BANDS;. If
  60. the <constant>V4L2_TUNER_CAP_HWSEEK_PROG_LIM</constant> flag is not set,
  61. then these values must exactly match those of one of the bands returned by
  62. &VIDIOC-ENUM-FREQ-BANDS;. If the current frequency of the tuner does not fall
  63. within the selected band it will be clamped to fit in the band before the
  64. seek is started.</para>
  65. <para>If an error is returned, then the original frequency will
  66. be restored.</para>
  67. <para>This ioctl is supported if the <constant>V4L2_CAP_HW_FREQ_SEEK</constant> capability is set.</para>
  68. <para>If this ioctl is called from a non-blocking filehandle, then &EAGAIN; is
  69. returned and no seek takes place.</para>
  70. <table pgwide="1" frame="none" id="v4l2-hw-freq-seek">
  71. <title>struct <structname>v4l2_hw_freq_seek</structname></title>
  72. <tgroup cols="3">
  73. &cs-str;
  74. <tbody valign="top">
  75. <row>
  76. <entry>__u32</entry>
  77. <entry><structfield>tuner</structfield></entry>
  78. <entry>The tuner index number. This is the
  79. same value as in the &v4l2-input; <structfield>tuner</structfield>
  80. field and the &v4l2-tuner; <structfield>index</structfield> field.</entry>
  81. </row>
  82. <row>
  83. <entry>__u32</entry>
  84. <entry><structfield>type</structfield></entry>
  85. <entry>The tuner type. This is the same value as in the
  86. &v4l2-tuner; <structfield>type</structfield> field. See <xref
  87. linkend="v4l2-tuner-type" /></entry>
  88. </row>
  89. <row>
  90. <entry>__u32</entry>
  91. <entry><structfield>seek_upward</structfield></entry>
  92. <entry>If non-zero, seek upward from the current frequency, else seek downward.</entry>
  93. </row>
  94. <row>
  95. <entry>__u32</entry>
  96. <entry><structfield>wrap_around</structfield></entry>
  97. <entry>If non-zero, wrap around when at the end of the frequency range, else stop seeking.
  98. The &v4l2-tuner; <structfield>capability</structfield> field will tell you what the
  99. hardware supports.
  100. </entry>
  101. </row>
  102. <row>
  103. <entry>__u32</entry>
  104. <entry><structfield>spacing</structfield></entry>
  105. <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>
  106. </row>
  107. <row>
  108. <entry>__u32</entry>
  109. <entry><structfield>rangelow</structfield></entry>
  110. <entry>If non-zero, the lowest tunable frequency of the band to
  111. search in units of 62.5 kHz, or if the &v4l2-tuner;
  112. <structfield>capability</structfield> field has the
  113. <constant>V4L2_TUNER_CAP_LOW</constant> flag set, in units of 62.5 Hz or if the &v4l2-tuner;
  114. <structfield>capability</structfield> field has the
  115. <constant>V4L2_TUNER_CAP_1HZ</constant> flag set, in units of 1 Hz.
  116. If <structfield>rangelow</structfield> is zero a reasonable default value
  117. is used.</entry>
  118. </row>
  119. <row>
  120. <entry>__u32</entry>
  121. <entry><structfield>rangehigh</structfield></entry>
  122. <entry>If non-zero, the highest tunable frequency of the band to
  123. search in units of 62.5 kHz, or if the &v4l2-tuner;
  124. <structfield>capability</structfield> field has the
  125. <constant>V4L2_TUNER_CAP_LOW</constant> flag set, in units of 62.5 Hz or if the &v4l2-tuner;
  126. <structfield>capability</structfield> field has the
  127. <constant>V4L2_TUNER_CAP_1HZ</constant> flag set, in units of 1 Hz.
  128. If <structfield>rangehigh</structfield> is zero a reasonable default value
  129. is used.</entry>
  130. </row>
  131. <row>
  132. <entry>__u32</entry>
  133. <entry><structfield>reserved</structfield>[5]</entry>
  134. <entry>Reserved for future extensions. Applications
  135. must set the array to zero.</entry>
  136. </row>
  137. </tbody>
  138. </tgroup>
  139. </table>
  140. </refsect1>
  141. <refsect1>
  142. &return-value;
  143. <variablelist>
  144. <varlistentry>
  145. <term><errorcode>EINVAL</errorcode></term>
  146. <listitem>
  147. <para>The <structfield>tuner</structfield> index is out of
  148. bounds, the <structfield>wrap_around</structfield> value is not supported or
  149. one of the values in the <structfield>type</structfield>,
  150. <structfield>rangelow</structfield> or <structfield>rangehigh</structfield>
  151. fields is wrong.</para>
  152. </listitem>
  153. </varlistentry>
  154. <varlistentry>
  155. <term><errorcode>EAGAIN</errorcode></term>
  156. <listitem>
  157. <para>Attempted to call <constant>VIDIOC_S_HW_FREQ_SEEK</constant>
  158. with the filehandle in non-blocking mode.</para>
  159. </listitem>
  160. </varlistentry>
  161. <varlistentry>
  162. <term><errorcode>ENODATA</errorcode></term>
  163. <listitem>
  164. <para>The hardware seek found no channels.</para>
  165. </listitem>
  166. </varlistentry>
  167. <varlistentry>
  168. <term><errorcode>EBUSY</errorcode></term>
  169. <listitem>
  170. <para>Another hardware seek is already in progress.</para>
  171. </listitem>
  172. </varlistentry>
  173. </variablelist>
  174. </refsect1>
  175. </refentry>