vidioc-g-frequency.xml 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. <refentry id="vidioc-g-frequency">
  2. <refmeta>
  3. <refentrytitle>ioctl VIDIOC_G_FREQUENCY, VIDIOC_S_FREQUENCY</refentrytitle>
  4. &manvol;
  5. </refmeta>
  6. <refnamediv>
  7. <refname>VIDIOC_G_FREQUENCY</refname>
  8. <refname>VIDIOC_S_FREQUENCY</refname>
  9. <refpurpose>Get or set tuner or modulator radio
  10. frequency</refpurpose>
  11. </refnamediv>
  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_frequency
  19. *<parameter>argp</parameter></paramdef>
  20. </funcprototype>
  21. </funcsynopsis>
  22. <funcsynopsis>
  23. <funcprototype>
  24. <funcdef>int <function>ioctl</function></funcdef>
  25. <paramdef>int <parameter>fd</parameter></paramdef>
  26. <paramdef>int <parameter>request</parameter></paramdef>
  27. <paramdef>const struct v4l2_frequency
  28. *<parameter>argp</parameter></paramdef>
  29. </funcprototype>
  30. </funcsynopsis>
  31. </refsynopsisdiv>
  32. <refsect1>
  33. <title>Arguments</title>
  34. <variablelist>
  35. <varlistentry>
  36. <term><parameter>fd</parameter></term>
  37. <listitem>
  38. <para>&fd;</para>
  39. </listitem>
  40. </varlistentry>
  41. <varlistentry>
  42. <term><parameter>request</parameter></term>
  43. <listitem>
  44. <para>VIDIOC_G_FREQUENCY, VIDIOC_S_FREQUENCY</para>
  45. </listitem>
  46. </varlistentry>
  47. <varlistentry>
  48. <term><parameter>argp</parameter></term>
  49. <listitem>
  50. <para></para>
  51. </listitem>
  52. </varlistentry>
  53. </variablelist>
  54. </refsect1>
  55. <refsect1>
  56. <title>Description</title>
  57. <para>To get the current tuner or modulator radio frequency
  58. applications set the <structfield>tuner</structfield> field of a
  59. &v4l2-frequency; to the respective tuner or modulator number (only
  60. input devices have tuners, only output devices have modulators), zero
  61. out the <structfield>reserved</structfield> array and
  62. call the <constant>VIDIOC_G_FREQUENCY</constant> ioctl with a pointer
  63. to this structure. The driver stores the current frequency in the
  64. <structfield>frequency</structfield> field.</para>
  65. <para>To change the current tuner or modulator radio frequency
  66. applications initialize the <structfield>tuner</structfield>,
  67. <structfield>type</structfield> and
  68. <structfield>frequency</structfield> fields, and the
  69. <structfield>reserved</structfield> array of a &v4l2-frequency; and
  70. call the <constant>VIDIOC_S_FREQUENCY</constant> ioctl with a pointer
  71. to this structure. When the requested frequency is not possible the
  72. driver assumes the closest possible value. However
  73. <constant>VIDIOC_S_FREQUENCY</constant> is a write-only ioctl, it does
  74. not return the actual new frequency.</para>
  75. <table pgwide="1" frame="none" id="v4l2-frequency">
  76. <title>struct <structname>v4l2_frequency</structname></title>
  77. <tgroup cols="3">
  78. &cs-str;
  79. <tbody valign="top">
  80. <row>
  81. <entry>__u32</entry>
  82. <entry><structfield>tuner</structfield></entry>
  83. <entry>The tuner or modulator index number. This is the
  84. same value as in the &v4l2-input; <structfield>tuner</structfield>
  85. field and the &v4l2-tuner; <structfield>index</structfield> field, or
  86. the &v4l2-output; <structfield>modulator</structfield> field and the
  87. &v4l2-modulator; <structfield>index</structfield> field.</entry>
  88. </row>
  89. <row>
  90. <entry>&v4l2-tuner-type;</entry>
  91. <entry><structfield>type</structfield></entry>
  92. <entry>The tuner type. This is the same value as in the
  93. &v4l2-tuner; <structfield>type</structfield> field. The field is not
  94. applicable to modulators, &ie; ignored by drivers.</entry>
  95. </row>
  96. <row>
  97. <entry>__u32</entry>
  98. <entry><structfield>frequency</structfield></entry>
  99. <entry>Tuning frequency in units of 62.5 kHz, or if the
  100. &v4l2-tuner; or &v4l2-modulator; <structfield>capabilities</structfield> flag
  101. <constant>V4L2_TUNER_CAP_LOW</constant> is set, in units of 62.5
  102. Hz.</entry>
  103. </row>
  104. <row>
  105. <entry>__u32</entry>
  106. <entry><structfield>reserved</structfield>[8]</entry>
  107. <entry>Reserved for future extensions. Drivers and
  108. applications must set the array to zero.</entry>
  109. </row>
  110. </tbody>
  111. </tgroup>
  112. </table>
  113. </refsect1>
  114. <refsect1>
  115. &return-value;
  116. <variablelist>
  117. <varlistentry>
  118. <term><errorcode>EINVAL</errorcode></term>
  119. <listitem>
  120. <para>The <structfield>tuner</structfield> index is out of
  121. bounds or the value in the <structfield>type</structfield> field is
  122. wrong.</para>
  123. </listitem>
  124. </varlistentry>
  125. </variablelist>
  126. </refsect1>
  127. </refentry>
  128. <!--
  129. Local Variables:
  130. mode: sgml
  131. sgml-parent-document: "v4l2.sgml"
  132. indent-tabs-mode: nil
  133. End:
  134. -->