vidioc-enum-freq-bands.xml 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  1. <refentry id="vidioc-enum-freq-bands">
  2. <refmeta>
  3. <refentrytitle>ioctl VIDIOC_ENUM_FREQ_BANDS</refentrytitle>
  4. &manvol;
  5. </refmeta>
  6. <refnamediv>
  7. <refname>VIDIOC_ENUM_FREQ_BANDS</refname>
  8. <refpurpose>Enumerate supported frequency bands</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_frequency_band
  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_ENUM_FREQ_BANDS</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. <note>
  47. <title>Experimental</title>
  48. <para>This is an <link linkend="experimental"> experimental </link>
  49. interface and may change in the future.</para>
  50. </note>
  51. <para>Enumerates the frequency bands that a tuner or modulator supports.
  52. To do this applications initialize the <structfield>tuner</structfield>,
  53. <structfield>type</structfield> and <structfield>index</structfield> fields,
  54. and zero out the <structfield>reserved</structfield> array of a &v4l2-frequency-band; and
  55. call the <constant>VIDIOC_ENUM_FREQ_BANDS</constant> ioctl with a pointer
  56. to this structure.</para>
  57. <para>This ioctl is supported if the <constant>V4L2_TUNER_CAP_FREQ_BANDS</constant> capability
  58. of the corresponding tuner/modulator is set.</para>
  59. <table pgwide="1" frame="none" id="v4l2-frequency-band">
  60. <title>struct <structname>v4l2_frequency_band</structname></title>
  61. <tgroup cols="3">
  62. &cs-str;
  63. <tbody valign="top">
  64. <row>
  65. <entry>__u32</entry>
  66. <entry><structfield>tuner</structfield></entry>
  67. <entry>The tuner or modulator index number. This is the
  68. same value as in the &v4l2-input; <structfield>tuner</structfield>
  69. field and the &v4l2-tuner; <structfield>index</structfield> field, or
  70. the &v4l2-output; <structfield>modulator</structfield> field and the
  71. &v4l2-modulator; <structfield>index</structfield> field.</entry>
  72. </row>
  73. <row>
  74. <entry>__u32</entry>
  75. <entry><structfield>type</structfield></entry>
  76. <entry>The tuner type. This is the same value as in the
  77. &v4l2-tuner; <structfield>type</structfield> field. The type must be set
  78. to <constant>V4L2_TUNER_RADIO</constant> for <filename>/dev/radioX</filename>
  79. device nodes, and to <constant>V4L2_TUNER_ANALOG_TV</constant>
  80. for all others. Set this field to <constant>V4L2_TUNER_RADIO</constant> for
  81. modulators (currently only radio modulators are supported).
  82. See <xref linkend="v4l2-tuner-type" /></entry>
  83. </row>
  84. <row>
  85. <entry>__u32</entry>
  86. <entry><structfield>index</structfield></entry>
  87. <entry>Identifies the frequency band, set by the application.</entry>
  88. </row>
  89. <row>
  90. <entry>__u32</entry>
  91. <entry><structfield>capability</structfield></entry>
  92. <entry spanname="hspan">The tuner/modulator capability flags for
  93. this frequency band, see <xref linkend="tuner-capability" />. The <constant>V4L2_TUNER_CAP_LOW</constant>
  94. or <constant>V4L2_TUNER_CAP_1HZ</constant> capability must be the same for all frequency bands of the selected tuner/modulator.
  95. So either all bands have that capability set, or none of them have that capability.</entry>
  96. </row>
  97. <row>
  98. <entry>__u32</entry>
  99. <entry><structfield>rangelow</structfield></entry>
  100. <entry spanname="hspan">The lowest tunable frequency in
  101. units of 62.5 kHz, or if the <structfield>capability</structfield>
  102. flag <constant>V4L2_TUNER_CAP_LOW</constant> is set, in units of 62.5
  103. Hz, for this frequency band. A 1 Hz unit is used when the <structfield>capability</structfield> flag
  104. <constant>V4L2_TUNER_CAP_1HZ</constant> is set.</entry>
  105. </row>
  106. <row>
  107. <entry>__u32</entry>
  108. <entry><structfield>rangehigh</structfield></entry>
  109. <entry spanname="hspan">The highest tunable frequency in
  110. units of 62.5 kHz, or if the <structfield>capability</structfield>
  111. flag <constant>V4L2_TUNER_CAP_LOW</constant> is set, in units of 62.5
  112. Hz, for this frequency band. A 1 Hz unit is used when the <structfield>capability</structfield> flag
  113. <constant>V4L2_TUNER_CAP_1HZ</constant> is set.</entry>
  114. </row>
  115. <row>
  116. <entry>__u32</entry>
  117. <entry><structfield>modulation</structfield></entry>
  118. <entry spanname="hspan">The supported modulation systems of this frequency band.
  119. See <xref linkend="band-modulation" />. Note that currently only one
  120. modulation system per frequency band is supported. More work will need to
  121. be done if multiple modulation systems are possible. Contact the
  122. linux-media mailing list (&v4l-ml;) if you need that functionality.</entry>
  123. </row>
  124. <row>
  125. <entry>__u32</entry>
  126. <entry><structfield>reserved</structfield>[9]</entry>
  127. <entry>Reserved for future extensions. Applications and drivers
  128. must set the array to zero.</entry>
  129. </row>
  130. </tbody>
  131. </tgroup>
  132. </table>
  133. <table pgwide="1" frame="none" id="band-modulation">
  134. <title>Band Modulation Systems</title>
  135. <tgroup cols="3">
  136. &cs-def;
  137. <tbody valign="top">
  138. <row>
  139. <entry><constant>V4L2_BAND_MODULATION_VSB</constant></entry>
  140. <entry>0x02</entry>
  141. <entry>Vestigial Sideband modulation, used for analog TV.</entry>
  142. </row>
  143. <row>
  144. <entry><constant>V4L2_BAND_MODULATION_FM</constant></entry>
  145. <entry>0x04</entry>
  146. <entry>Frequency Modulation, commonly used for analog radio.</entry>
  147. </row>
  148. <row>
  149. <entry><constant>V4L2_BAND_MODULATION_AM</constant></entry>
  150. <entry>0x08</entry>
  151. <entry>Amplitude Modulation, commonly used for analog radio.</entry>
  152. </row>
  153. </tbody>
  154. </tgroup>
  155. </table>
  156. </refsect1>
  157. <refsect1>
  158. &return-value;
  159. <variablelist>
  160. <varlistentry>
  161. <term><errorcode>EINVAL</errorcode></term>
  162. <listitem>
  163. <para>The <structfield>tuner</structfield> or <structfield>index</structfield>
  164. is out of bounds or the <structfield>type</structfield> field is wrong.</para>
  165. </listitem>
  166. </varlistentry>
  167. </variablelist>
  168. </refsect1>
  169. </refentry>