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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  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. <table pgwide="1" frame="none" id="v4l2-hw-freq-seek">
  69. <title>struct <structname>v4l2_hw_freq_seek</structname></title>
  70. <tgroup cols="3">
  71. &cs-str;
  72. <tbody valign="top">
  73. <row>
  74. <entry>__u32</entry>
  75. <entry><structfield>tuner</structfield></entry>
  76. <entry>The tuner index number. This is the
  77. same value as in the &v4l2-input; <structfield>tuner</structfield>
  78. field and the &v4l2-tuner; <structfield>index</structfield> field.</entry>
  79. </row>
  80. <row>
  81. <entry>__u32</entry>
  82. <entry><structfield>type</structfield></entry>
  83. <entry>The tuner type. This is the same value as in the
  84. &v4l2-tuner; <structfield>type</structfield> field. See <xref
  85. linkend="v4l2-tuner-type" /></entry>
  86. </row>
  87. <row>
  88. <entry>__u32</entry>
  89. <entry><structfield>seek_upward</structfield></entry>
  90. <entry>If non-zero, seek upward from the current frequency, else seek downward.</entry>
  91. </row>
  92. <row>
  93. <entry>__u32</entry>
  94. <entry><structfield>wrap_around</structfield></entry>
  95. <entry>If non-zero, wrap around when at the end of the frequency range, else stop seeking.
  96. The &v4l2-tuner; <structfield>capability</structfield> field will tell you what the
  97. hardware supports.
  98. </entry>
  99. </row>
  100. <row>
  101. <entry>__u32</entry>
  102. <entry><structfield>spacing</structfield></entry>
  103. <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>
  104. </row>
  105. <row>
  106. <entry>__u32</entry>
  107. <entry><structfield>rangelow</structfield></entry>
  108. <entry>If non-zero, the lowest tunable frequency of the band to
  109. search in units of 62.5 kHz, or if the &v4l2-tuner;
  110. <structfield>capability</structfield> field has the
  111. <constant>V4L2_TUNER_CAP_LOW</constant> flag set, in units of 62.5 Hz.
  112. If <structfield>rangelow</structfield> is zero a reasonable default value
  113. is used.</entry>
  114. </row>
  115. <row>
  116. <entry>__u32</entry>
  117. <entry><structfield>rangehigh</structfield></entry>
  118. <entry>If non-zero, the highest tunable frequency of the band to
  119. search in units of 62.5 kHz, or if the &v4l2-tuner;
  120. <structfield>capability</structfield> field has the
  121. <constant>V4L2_TUNER_CAP_LOW</constant> flag set, in units of 62.5 Hz.
  122. If <structfield>rangehigh</structfield> is zero a reasonable default value
  123. is used.</entry>
  124. </row>
  125. <row>
  126. <entry>__u32</entry>
  127. <entry><structfield>reserved</structfield>[5]</entry>
  128. <entry>Reserved for future extensions. Applications
  129. must set the array to zero.</entry>
  130. </row>
  131. </tbody>
  132. </tgroup>
  133. </table>
  134. </refsect1>
  135. <refsect1>
  136. &return-value;
  137. <variablelist>
  138. <varlistentry>
  139. <term><errorcode>EINVAL</errorcode></term>
  140. <listitem>
  141. <para>The <structfield>tuner</structfield> index is out of
  142. bounds, the <structfield>wrap_around</structfield> value is not supported or
  143. one of the values in the <structfield>type</structfield>,
  144. <structfield>rangelow</structfield> or <structfield>rangehigh</structfield>
  145. fields is wrong.</para>
  146. </listitem>
  147. </varlistentry>
  148. <varlistentry>
  149. <term><errorcode>ENODATA</errorcode></term>
  150. <listitem>
  151. <para>The hardware seek found no channels.</para>
  152. </listitem>
  153. </varlistentry>
  154. <varlistentry>
  155. <term><errorcode>EBUSY</errorcode></term>
  156. <listitem>
  157. <para>Another hardware seek is already in progress.</para>
  158. </listitem>
  159. </varlistentry>
  160. </variablelist>
  161. </refsect1>
  162. </refentry>