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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  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>spacing</structfield> and
  50. <structfield>wrap_around</structfield> fields, and zero out the
  51. <structfield>reserved</structfield> array of a &v4l2-hw-freq-seek; and
  52. call the <constant>VIDIOC_S_HW_FREQ_SEEK</constant> ioctl with a pointer
  53. to this structure.</para>
  54. <para>If an error is returned, then the original frequency will
  55. be restored.</para>
  56. <para>This ioctl is supported if the <constant>V4L2_CAP_HW_FREQ_SEEK</constant> capability is set.</para>
  57. <table pgwide="1" frame="none" id="v4l2-hw-freq-seek">
  58. <title>struct <structname>v4l2_hw_freq_seek</structname></title>
  59. <tgroup cols="3">
  60. &cs-str;
  61. <tbody valign="top">
  62. <row>
  63. <entry>__u32</entry>
  64. <entry><structfield>tuner</structfield></entry>
  65. <entry>The tuner index number. This is the
  66. same value as in the &v4l2-input; <structfield>tuner</structfield>
  67. field and the &v4l2-tuner; <structfield>index</structfield> field.</entry>
  68. </row>
  69. <row>
  70. <entry>__u32</entry>
  71. <entry><structfield>type</structfield></entry>
  72. <entry>The tuner type. This is the same value as in the
  73. &v4l2-tuner; <structfield>type</structfield> field. See <xref
  74. linkend="v4l2-tuner-type" /></entry>
  75. </row>
  76. <row>
  77. <entry>__u32</entry>
  78. <entry><structfield>seek_upward</structfield></entry>
  79. <entry>If non-zero, seek upward from the current frequency, else seek downward.</entry>
  80. </row>
  81. <row>
  82. <entry>__u32</entry>
  83. <entry><structfield>wrap_around</structfield></entry>
  84. <entry>If non-zero, wrap around when at the end of the frequency range, else stop seeking.
  85. The &v4l2-tuner; <structfield>capability</structfield> field will tell you what the
  86. hardware supports.
  87. </entry>
  88. </row>
  89. <row>
  90. <entry>__u32</entry>
  91. <entry><structfield>spacing</structfield></entry>
  92. <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>
  93. </row>
  94. <row>
  95. <entry>__u32</entry>
  96. <entry><structfield>reserved</structfield>[7]</entry>
  97. <entry>Reserved for future extensions. Applications
  98. must set the array to zero.</entry>
  99. </row>
  100. </tbody>
  101. </tgroup>
  102. </table>
  103. </refsect1>
  104. <refsect1>
  105. &return-value;
  106. <variablelist>
  107. <varlistentry>
  108. <term><errorcode>EINVAL</errorcode></term>
  109. <listitem>
  110. <para>The <structfield>tuner</structfield> index is out of
  111. bounds, the wrap_around value is not supported or the value in the <structfield>type</structfield> field is
  112. wrong.</para>
  113. </listitem>
  114. </varlistentry>
  115. <varlistentry>
  116. <term><errorcode>ENODATA</errorcode></term>
  117. <listitem>
  118. <para>The hardware seek found no channels.</para>
  119. </listitem>
  120. </varlistentry>
  121. <varlistentry>
  122. <term><errorcode>EBUSY</errorcode></term>
  123. <listitem>
  124. <para>Another hardware seek is already in progress.</para>
  125. </listitem>
  126. </varlistentry>
  127. </variablelist>
  128. </refsect1>
  129. </refentry>