Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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