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