1<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>ioctl VIDIOC_G_TUNER, VIDIOC_S_TUNER</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="LINUX MEDIA INFRASTRUCTURE API"><link rel="up" href="user-func.html" title="Appendix A. Function Reference"><link rel="prev" href="vidioc-g-std.html" title="ioctl VIDIOC_G_STD, VIDIOC_S_STD"><link rel="next" href="vidioc-log-status.html" title="ioctl VIDIOC_LOG_STATUS"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">ioctl VIDIOC_G_TUNER, VIDIOC_S_TUNER</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="vidioc-g-std.html">Prev</a> </td><th width="60%" align="center">Appendix A. Function Reference</th><td width="20%" align="right"> <a accesskey="n" href="vidioc-log-status.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="vidioc-g-tuner"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>VIDIOC_G_TUNER, VIDIOC_S_TUNER — Get or set tuner attributes</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">ioctl</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">request</var>, </td></tr><tr><td> </td><td>struct v4l2_tuner 2*<var class="pdparam">argp</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div><div class="funcsynopsis"><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">ioctl</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">request</var>, </td></tr><tr><td> </td><td>const struct v4l2_tuner 3*<var class="pdparam">argp</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="id-1.4.11.43.4"></a><h2>Arguments</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><em class="parameter"><code>fd</code></em></span></dt><dd><p>File descriptor returned by <a class="link" href="func-open.html" title="V4L2 open()"><code class="function">open()</code></a>.</p></dd><dt><span class="term"><em class="parameter"><code>request</code></em></span></dt><dd><p>VIDIOC_G_TUNER, VIDIOC_S_TUNER</p></dd><dt><span class="term"><em class="parameter"><code>argp</code></em></span></dt><dd><p></p></dd></dl></div></div><div class="refsect1"><a name="id-1.4.11.43.5"></a><h2>Description</h2><p>To query the attributes of a tuner applications initialize the 4<em class="structfield"><code>index</code></em> field and zero out the 5<em class="structfield"><code>reserved</code></em> array of a struct <a class="link" href="vidioc-g-tuner.html#v4l2-tuner" title="Table A.87. struct v4l2_tuner">v4l2_tuner</a> and call the 6<code class="constant">VIDIOC_G_TUNER</code> ioctl with a pointer to this 7structure. Drivers fill the rest of the structure or return an 8<span class="errorcode">EINVAL</span> error code when the index is out of bounds. To enumerate all tuners 9applications shall begin at index zero, incrementing by one until the 10driver returns <span class="errorcode">EINVAL</span>.</p><p>Tuners have two writable properties, the audio mode and 11the radio frequency. To change the audio mode, applications initialize 12the <em class="structfield"><code>index</code></em>, 13<em class="structfield"><code>audmode</code></em> and 14<em class="structfield"><code>reserved</code></em> fields and call the 15<code class="constant">VIDIOC_S_TUNER</code> ioctl. This will 16<span class="emphasis"><em>not</em></span> change the current tuner, which is determined 17by the current video input. Drivers may choose a different audio mode 18if the requested mode is invalid or unsupported. Since this is a 19write-only ioctl, it does not return the actually 20selected audio mode.</p><p><a class="link" href="sdr.html" title="Software Defined Radio Interface (SDR)">SDR</a> specific tuner types are 21<code class="constant">V4L2_TUNER_SDR</code> and <code class="constant">V4L2_TUNER_RF</code>. 22For SDR devices <em class="structfield"><code>audmode</code></em> field must be 23initialized to zero. 24The term 'tuner' means SDR receiver in this context.</p><p>To change the radio frequency the <a class="link" href="vidioc-g-frequency.html" title="ioctl VIDIOC_G_FREQUENCY, VIDIOC_S_FREQUENCY"><code class="constant">VIDIOC_S_FREQUENCY</code></a> ioctl 25is available.</p><div class="table"><a name="v4l2-tuner"></a><p class="title"><b>Table A.87. struct <span class="structname">v4l2_tuner</span></b></p><div class="table-contents"><table summary="struct v4l2_tuner" width="100%" border="0"><colgroup><col class="c1"><col class="c2"><col class="c3"></colgroup><tbody valign="top"><tr><td valign="top">__u32</td><td valign="top"><em class="structfield"><code>index</code></em></td><td colspan="2" valign="top">Identifies the tuner, set by the 26application.</td></tr><tr><td valign="top">__u8</td><td valign="top"><em class="structfield"><code>name</code></em>[32]</td><td colspan="2" valign="top"><p>Name of the tuner, a 27NUL-terminated ASCII string. This information is intended for the 28user.</p></td></tr><tr><td valign="top">__u32</td><td valign="top"><em class="structfield"><code>type</code></em></td><td colspan="2" valign="top">Type of the tuner, see <a class="xref" href="vidioc-g-tuner.html#v4l2-tuner-type" title="Table A.88. enum v4l2_tuner_type">Table A.88, “enum v4l2_tuner_type”</a>.</td></tr><tr><td valign="top">__u32</td><td valign="top"><em class="structfield"><code>capability</code></em></td><td colspan="2" valign="top"><p>Tuner capability flags, see 29<a class="xref" href="vidioc-g-tuner.html#tuner-capability" title="Table A.89. Tuner and Modulator Capability Flags">Table A.89, “Tuner and Modulator Capability Flags”</a>. Audio flags indicate the ability 30to decode audio subprograms. They will <span class="emphasis"><em>not</em></span> 31change, for example with the current video standard.</p><p>When 32the structure refers to a radio tuner the 33<code class="constant">V4L2_TUNER_CAP_LANG1</code>, 34<code class="constant">V4L2_TUNER_CAP_LANG2</code> and 35<code class="constant">V4L2_TUNER_CAP_NORM</code> flags can't be used.</p> 36<p>If multiple frequency bands are supported, then 37<em class="structfield"><code>capability</code></em> is the union of all 38<em class="structfield"><code>capability</code></em> fields of each struct <a class="link" href="vidioc-enum-freq-bands.html#v4l2-frequency-band" title="Table A.37. struct v4l2_frequency_band">v4l2_frequency_band</a>. 39</p></td></tr><tr><td valign="top">__u32</td><td valign="top"><em class="structfield"><code>rangelow</code></em></td><td colspan="2" valign="top">The lowest tunable frequency in 40units of 62.5 kHz, or if the <em class="structfield"><code>capability</code></em> 41flag <code class="constant">V4L2_TUNER_CAP_LOW</code> is set, in units of 62.5 42Hz, or if the <em class="structfield"><code>capability</code></em> flag 43<code class="constant">V4L2_TUNER_CAP_1HZ</code> is set, in units of 1 Hz. 44If multiple frequency bands are supported, then 45<em class="structfield"><code>rangelow</code></em> is the lowest frequency 46of all the frequency bands.</td></tr><tr><td valign="top">__u32</td><td valign="top"><em class="structfield"><code>rangehigh</code></em></td><td colspan="2" valign="top">The highest tunable frequency in 47units of 62.5 kHz, or if the <em class="structfield"><code>capability</code></em> 48flag <code class="constant">V4L2_TUNER_CAP_LOW</code> is set, in units of 62.5 49Hz, or if the <em class="structfield"><code>capability</code></em> flag 50<code class="constant">V4L2_TUNER_CAP_1HZ</code> is set, in units of 1 Hz. 51If multiple frequency bands are supported, then 52<em class="structfield"><code>rangehigh</code></em> is the highest frequency 53of all the frequency bands.</td></tr><tr><td valign="top">__u32</td><td valign="top"><em class="structfield"><code>rxsubchans</code></em></td><td colspan="2" valign="top"><p>Some tuners or audio 54decoders can determine the received audio subprograms by analyzing 55audio carriers, pilot tones or other indicators. To pass this 56information drivers set flags defined in <a class="xref" href="vidioc-g-tuner.html#tuner-rxsubchans" title="Table A.90. Tuner Audio Reception Flags">Table A.90, “Tuner Audio Reception Flags”</a> in this field. For 57example:</p></td></tr><tr><td valign="top"> </td><td valign="top"> </td><td valign="top"><code class="constant">V4L2_TUNER_SUB_MONO</code></td><td valign="top">receiving mono audio</td></tr><tr><td valign="top"> </td><td valign="top"> </td><td valign="top"><code class="constant">STEREO | SAP</code></td><td valign="top">receiving stereo audio and a secondary audio 58program</td></tr><tr><td valign="top"> </td><td valign="top"> </td><td valign="top"><code class="constant">MONO | STEREO</code></td><td valign="top">receiving mono or stereo audio, the hardware cannot 59distinguish</td></tr><tr><td valign="top"> </td><td valign="top"> </td><td valign="top"><code class="constant">LANG1 | LANG2</code></td><td valign="top">receiving bilingual audio</td></tr><tr><td valign="top"> </td><td valign="top"> </td><td valign="top"><code class="constant">MONO | STEREO | LANG1 | LANG2</code></td><td valign="top">receiving mono, stereo or bilingual 60audio</td></tr><tr><td valign="top"> </td><td valign="top"> </td><td colspan="2" valign="top"><p>When the 61<code class="constant">V4L2_TUNER_CAP_STEREO</code>, 62<code class="constant">_LANG1</code>, <code class="constant">_LANG2</code> or 63<code class="constant">_SAP</code> flag is cleared in the 64<em class="structfield"><code>capability</code></em> field, the corresponding 65<code class="constant">V4L2_TUNER_SUB_</code> flag must not be set 66here.</p><p>This field is valid only if this is the tuner of the 67current video input, or when the structure refers to a radio 68tuner.</p></td></tr><tr><td valign="top">__u32</td><td valign="top"><em class="structfield"><code>audmode</code></em></td><td colspan="2" valign="top"><p>The selected audio mode, see 69<a class="xref" href="vidioc-g-tuner.html#tuner-audmode" title="Table A.91. Tuner Audio Modes">Table A.91, “Tuner Audio Modes”</a> for valid values. The audio mode does 70not affect audio subprogram detection, and like a <a class="link" href="control.html" title="User Controls">control</a> it does not automatically change 71unless the requested mode is invalid or unsupported. See <a class="xref" href="vidioc-g-tuner.html#tuner-matrix" title="Table A.92. Tuner Audio Matrix">Table A.92, “Tuner Audio Matrix”</a> for possible results when 72the selected and received audio programs do not 73match.</p><p>Currently this is the only field of struct 74<span class="structname">v4l2_tuner</span> applications can 75change.</p></td></tr><tr><td valign="top">__u32</td><td valign="top"><em class="structfield"><code>signal</code></em></td><td colspan="2" valign="top">The signal strength if known, ranging 76from 0 to 65535. Higher values indicate a better signal.</td></tr><tr><td valign="top">__s32</td><td valign="top"><em class="structfield"><code>afc</code></em></td><td colspan="2" valign="top">Automatic frequency control: When the 77<em class="structfield"><code>afc</code></em> value is negative, the frequency is too 78low, when positive too high.</td></tr><tr><td valign="top">__u32</td><td valign="top"><em class="structfield"><code>reserved</code></em>[4]</td><td colspan="2" valign="top">Reserved for future extensions. Drivers and 79applications must set the array to zero.</td></tr></tbody></table></div></div><br class="table-break"><div class="table"><a name="v4l2-tuner-type"></a><p class="title"><b>Table A.88. enum v4l2_tuner_type</b></p><div class="table-contents"><table summary="enum v4l2_tuner_type" width="100%" border="0"><colgroup><col class="c1"><col class="c2"><col class="c3"></colgroup><tbody valign="top"><tr><td valign="top"><code class="constant">V4L2_TUNER_RADIO</code></td><td valign="top">1</td><td valign="top"> </td></tr><tr><td valign="top"><code class="constant">V4L2_TUNER_ANALOG_TV</code></td><td valign="top">2</td><td valign="top"> </td></tr><tr><td valign="top"><code class="constant">V4L2_TUNER_SDR</code></td><td valign="top">4</td><td valign="top"> </td></tr><tr><td valign="top"><code class="constant">V4L2_TUNER_RF</code></td><td valign="top">5</td><td valign="top"> </td></tr></tbody></table></div></div><br class="table-break"><div class="table"><a name="tuner-capability"></a><p class="title"><b>Table A.89. Tuner and Modulator Capability Flags</b></p><div class="table-contents"><table summary="Tuner and Modulator Capability Flags" width="100%" border="0"><colgroup><col class="c1"><col class="c2"><col class="c3"></colgroup><tbody valign="top"><tr><td valign="top"><code class="constant">V4L2_TUNER_CAP_LOW</code></td><td valign="top">0x0001</td><td valign="top">When set, tuning frequencies are expressed in units of 8062.5 Hz instead of 62.5 kHz.</td></tr><tr><td valign="top"><code class="constant">V4L2_TUNER_CAP_NORM</code></td><td valign="top">0x0002</td><td valign="top">This is a multi-standard tuner; the video standard 81can or must be switched. (B/G PAL tuners for example are typically not 82 considered multi-standard because the video standard is automatically 83 determined from the frequency band.) The set of supported video 84 standards is available from the struct <a class="link" href="vidioc-enuminput.html#v4l2-input" title="Table A.39. struct v4l2_input">v4l2_input</a> pointing to this tuner, 85 see the description of ioctl <a class="link" href="vidioc-enuminput.html" title="ioctl VIDIOC_ENUMINPUT"><code class="constant">VIDIOC_ENUMINPUT</code></a> for details. Only 86 <code class="constant">V4L2_TUNER_ANALOG_TV</code> tuners can have this capability.</td></tr><tr><td valign="top"><code class="constant">V4L2_TUNER_CAP_HWSEEK_BOUNDED</code></td><td valign="top">0x0004</td><td valign="top">If set, then this tuner supports the hardware seek functionality 87 where the seek stops when it reaches the end of the frequency range.</td></tr><tr><td valign="top"><code class="constant">V4L2_TUNER_CAP_HWSEEK_WRAP</code></td><td valign="top">0x0008</td><td valign="top">If set, then this tuner supports the hardware seek functionality 88 where the seek wraps around when it reaches the end of the frequency range.</td></tr><tr><td valign="top"><code class="constant">V4L2_TUNER_CAP_STEREO</code></td><td valign="top">0x0010</td><td valign="top">Stereo audio reception is supported.</td></tr><tr><td valign="top"><code class="constant">V4L2_TUNER_CAP_LANG1</code></td><td valign="top">0x0040</td><td valign="top">Reception of the primary language of a bilingual 89audio program is supported. Bilingual audio is a feature of 90two-channel systems, transmitting the primary language monaural on the 91main audio carrier and a secondary language monaural on a second 92carrier. Only 93 <code class="constant">V4L2_TUNER_ANALOG_TV</code> tuners can have this capability.</td></tr><tr><td valign="top"><code class="constant">V4L2_TUNER_CAP_LANG2</code></td><td valign="top">0x0020</td><td valign="top">Reception of the secondary language of a bilingual 94audio program is supported. Only 95 <code class="constant">V4L2_TUNER_ANALOG_TV</code> tuners can have this capability.</td></tr><tr><td valign="top"><code class="constant">V4L2_TUNER_CAP_SAP</code></td><td valign="top">0x0020</td><td valign="top"><p>Reception of a secondary audio program is 96supported. This is a feature of the BTSC system which accompanies the 97NTSC video standard. Two audio carriers are available for mono or 98stereo transmissions of a primary language, and an independent third 99carrier for a monaural secondary language. Only 100 <code class="constant">V4L2_TUNER_ANALOG_TV</code> tuners can have this capability.</p><p>Note the 101<code class="constant">V4L2_TUNER_CAP_LANG2</code> and 102<code class="constant">V4L2_TUNER_CAP_SAP</code> flags are synonyms. 103<code class="constant">V4L2_TUNER_CAP_SAP</code> applies when the tuner 104supports the <code class="constant">V4L2_STD_NTSC_M</code> video 105standard.</p></td></tr><tr><td valign="top"><code class="constant">V4L2_TUNER_CAP_RDS</code></td><td valign="top">0x0080</td><td valign="top">RDS capture is supported. This capability is only valid for 106radio tuners.</td></tr><tr><td valign="top"><code class="constant">V4L2_TUNER_CAP_RDS_BLOCK_IO</code></td><td valign="top">0x0100</td><td valign="top">The RDS data is passed as unparsed RDS blocks.</td></tr><tr><td valign="top"><code class="constant">V4L2_TUNER_CAP_RDS_CONTROLS</code></td><td valign="top">0x0200</td><td valign="top">The RDS data is parsed by the hardware and set via controls.</td></tr><tr><td valign="top"><code class="constant">V4L2_TUNER_CAP_FREQ_BANDS</code></td><td valign="top">0x0400</td><td valign="top">The <a class="link" href="vidioc-enum-freq-bands.html" title="ioctl VIDIOC_ENUM_FREQ_BANDS"><code class="constant">VIDIOC_ENUM_FREQ_BANDS</code></a> ioctl can be used to enumerate 107 the available frequency bands.</td></tr><tr><td valign="top"><code class="constant">V4L2_TUNER_CAP_HWSEEK_PROG_LIM</code></td><td valign="top">0x0800</td><td valign="top">The range to search when using the hardware seek functionality 108 is programmable, see <a class="link" href="vidioc-s-hw-freq-seek.html" title="ioctl VIDIOC_S_HW_FREQ_SEEK"><code class="constant">VIDIOC_S_HW_FREQ_SEEK</code></a> for details.</td></tr><tr><td valign="top"><code class="constant">V4L2_TUNER_CAP_1HZ</code></td><td valign="top">0x1000</td><td valign="top">When set, tuning frequencies are expressed in units of 1 Hz instead of 62.5 kHz.</td></tr></tbody></table></div></div><br class="table-break"><div class="table"><a name="tuner-rxsubchans"></a><p class="title"><b>Table A.90. Tuner Audio Reception Flags</b></p><div class="table-contents"><table summary="Tuner Audio Reception Flags" width="100%" border="0"><colgroup><col class="c1"><col class="c2"><col class="c3"></colgroup><tbody valign="top"><tr><td valign="top"><code class="constant">V4L2_TUNER_SUB_MONO</code></td><td valign="top">0x0001</td><td valign="top">The tuner receives a mono audio signal.</td></tr><tr><td valign="top"><code class="constant">V4L2_TUNER_SUB_STEREO</code></td><td valign="top">0x0002</td><td valign="top">The tuner receives a stereo audio signal.</td></tr><tr><td valign="top"><code class="constant">V4L2_TUNER_SUB_LANG1</code></td><td valign="top">0x0008</td><td valign="top">The tuner receives the primary language of a 109bilingual audio signal. Drivers must clear this flag when the current 110video standard is <code class="constant">V4L2_STD_NTSC_M</code>.</td></tr><tr><td valign="top"><code class="constant">V4L2_TUNER_SUB_LANG2</code></td><td valign="top">0x0004</td><td valign="top">The tuner receives the secondary language of a 111bilingual audio signal (or a second audio program).</td></tr><tr><td valign="top"><code class="constant">V4L2_TUNER_SUB_SAP</code></td><td valign="top">0x0004</td><td valign="top">The tuner receives a Second Audio Program. Note the 112<code class="constant">V4L2_TUNER_SUB_LANG2</code> and 113<code class="constant">V4L2_TUNER_SUB_SAP</code> flags are synonyms. The 114<code class="constant">V4L2_TUNER_SUB_SAP</code> flag applies when the 115current video standard is <code class="constant">V4L2_STD_NTSC_M</code>.</td></tr><tr><td valign="top"><code class="constant">V4L2_TUNER_SUB_RDS</code></td><td valign="top">0x0010</td><td valign="top">The tuner receives an RDS channel.</td></tr></tbody></table></div></div><br class="table-break"><div class="table"><a name="tuner-audmode"></a><p class="title"><b>Table A.91. Tuner Audio Modes</b></p><div class="table-contents"><table summary="Tuner Audio Modes" width="100%" border="0"><colgroup><col class="c1"><col class="c2"><col class="c3"></colgroup><tbody valign="top"><tr><td valign="top"><code class="constant">V4L2_TUNER_MODE_MONO</code></td><td valign="top">0</td><td valign="top">Play mono audio. When the tuner receives a stereo 116signal this a down-mix of the left and right channel. When the tuner 117receives a bilingual or SAP signal this mode selects the primary 118language.</td></tr><tr><td valign="top"><code class="constant">V4L2_TUNER_MODE_STEREO</code></td><td valign="top">1</td><td valign="top"><p>Play stereo audio. When the tuner receives 119bilingual audio it may play different languages on the left and right 120channel or the primary language is played on both channels.</p><p>Playing 121different languages in this mode is 122deprecated. New drivers should do this only in 123<code class="constant">MODE_LANG1_LANG2</code>.</p><p>When the tuner 124receives no stereo signal or does not support stereo reception the 125driver shall fall back to <code class="constant">MODE_MONO</code>.</p></td></tr><tr><td valign="top"><code class="constant">V4L2_TUNER_MODE_LANG1</code></td><td valign="top">3</td><td valign="top">Play the primary language, mono or stereo. Only 126<code class="constant">V4L2_TUNER_ANALOG_TV</code> tuners support this 127mode.</td></tr><tr><td valign="top"><code class="constant">V4L2_TUNER_MODE_LANG2</code></td><td valign="top">2</td><td valign="top">Play the secondary language, mono. When the tuner 128receives no bilingual audio or SAP, or their reception is not 129supported the driver shall fall back to mono or stereo mode. Only 130<code class="constant">V4L2_TUNER_ANALOG_TV</code> tuners support this 131mode.</td></tr><tr><td valign="top"><code class="constant">V4L2_TUNER_MODE_SAP</code></td><td valign="top">2</td><td valign="top">Play the Second Audio Program. When the tuner 132receives no bilingual audio or SAP, or their reception is not 133supported the driver shall fall back to mono or stereo mode. Only 134<code class="constant">V4L2_TUNER_ANALOG_TV</code> tuners support this mode. 135Note the <code class="constant">V4L2_TUNER_MODE_LANG2</code> and 136<code class="constant">V4L2_TUNER_MODE_SAP</code> are synonyms.</td></tr><tr><td valign="top"><code class="constant">V4L2_TUNER_MODE_LANG1_LANG2</code></td><td valign="top">4</td><td valign="top">Play the primary language on the left channel, the 137secondary language on the right channel. When the tuner receives no 138bilingual audio or SAP, it shall fall back to 139<code class="constant">MODE_LANG1</code> or <code class="constant">MODE_MONO</code>. 140Only <code class="constant">V4L2_TUNER_ANALOG_TV</code> tuners support this 141mode.</td></tr></tbody></table></div></div><br class="table-break"><div class="table"><a name="tuner-matrix"></a><p class="title"><b>Table A.92. Tuner Audio Matrix</b></p><div class="table-contents"><table summary="Tuner Audio Matrix" width="100%" border="1"><colgroup><col align="left"><col align="center" class="c2"><col align="center"><col align="center"><col><col align="center" class="c6"></colgroup><thead><tr><th align="left"> </th><th colspan="5" align="center">Selected 142<code class="constant">V4L2_TUNER_MODE_</code></th></tr><tr><th align="left">Received <code class="constant">V4L2_TUNER_SUB_</code></th><th align="center"><code class="constant">MONO</code></th><th align="center"><code class="constant">STEREO</code></th><th align="center"><code class="constant">LANG1</code></th><th align="center"><code class="constant">LANG2 = SAP</code></th><th align="center"><code class="constant">LANG1_LANG2</code><a href="#ftn.id-1.4.11.43.5.11.2.7.2.6.2" class="footnote" name="id-1.4.11.43.5.11.2.7.2.6.2"><sup class="footnote">[a]</sup></a></th></tr></thead><tbody valign="top"><tr><td align="left" valign="top"><code class="constant">MONO</code></td><td align="center" valign="top">Mono</td><td align="center" valign="top">Mono/Mono</td><td align="center" valign="top">Mono</td><td align="center" valign="top">Mono</td><td align="center" valign="top">Mono/Mono</td></tr><tr><td align="left" valign="top"><code class="constant">MONO | SAP</code></td><td align="center" valign="top">Mono</td><td align="center" valign="top">Mono/Mono</td><td align="center" valign="top">Mono</td><td align="center" valign="top">SAP</td><td align="center" valign="top">Mono/SAP (preferred) or Mono/Mono</td></tr><tr><td align="left" valign="top"><code class="constant">STEREO</code></td><td align="center" valign="top">L+R</td><td align="center" valign="top">L/R</td><td align="center" valign="top">Stereo L/R (preferred) or Mono L+R</td><td align="center" valign="top">Stereo L/R (preferred) or Mono L+R</td><td align="center" valign="top">L/R (preferred) or L+R/L+R</td></tr><tr><td align="left" valign="top"><code class="constant">STEREO | SAP</code></td><td align="center" valign="top">L+R</td><td align="center" valign="top">L/R</td><td align="center" valign="top">Stereo L/R (preferred) or Mono L+R</td><td align="center" valign="top">SAP</td><td align="center" valign="top">L+R/SAP (preferred) or L/R or L+R/L+R</td></tr><tr><td align="left" valign="top"><code class="constant">LANG1 | LANG2</code></td><td align="center" valign="top">Language 1</td><td align="center" valign="top">Lang1/Lang2 (deprecated<a href="#ftn.id-1.4.11.43.5.11.2.8.5.3.1" class="footnote" name="id-1.4.11.43.5.11.2.8.5.3.1"><sup class="footnote">[b]</sup></a>) or 143Lang1/Lang1</td><td align="center" valign="top">Language 1</td><td align="center" valign="top">Language 2</td><td align="center" valign="top">Lang1/Lang2 (preferred) or Lang1/Lang1</td></tr></tbody><tbody class="footnotes"><tr><td colspan="6"><div id="ftn.id-1.4.11.43.5.11.2.7.2.6.2" class="footnote"><p><a href="#id-1.4.11.43.5.11.2.7.2.6.2" class="para"><sup class="para">[a] </sup></a>This 144mode has been added in Linux 2.6.17 and may not be supported by older 145drivers.</p></div><div id="ftn.id-1.4.11.43.5.11.2.8.5.3.1" class="footnote"><p><a href="#id-1.4.11.43.5.11.2.8.5.3.1" class="para"><sup class="para">[b] </sup></a>Playback of 146both languages in <code class="constant">MODE_STEREO</code> is deprecated. In 147the future drivers should produce only the primary language in this 148mode. Applications should request 149<code class="constant">MODE_LANG1_LANG2</code> to record both languages or a 150stereo signal.</p></div></td></tr></tbody></table></div></div><br class="table-break"></div><div class="refsect1"><a name="id-1.4.11.43.6"></a><h2>Return Value</h2><p>On success <span class="returnvalue">0</span> is returned, on error <span class="returnvalue">-1</span> and the <code class="varname">errno</code> variable is set appropriately. The generic error codes are described at the <a class="link" href="gen_errors.html#gen-errors" title="Table 17.1. Generic error codes">Generic Error Codes</a> chapter.</p><div class="variablelist"><dl class="variablelist"><dt><span class="term"><span class="errorcode">EINVAL</span></span></dt><dd><p>The struct <a class="link" href="vidioc-g-tuner.html#v4l2-tuner" title="Table A.87. struct v4l2_tuner">v4l2_tuner</a> <em class="structfield"><code>index</code></em> is 151out of bounds.</p></dd></dl></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="vidioc-g-std.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="user-func.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="vidioc-log-status.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">ioctl VIDIOC_G_STD, VIDIOC_S_STD </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> ioctl VIDIOC_LOG_STATUS</td></tr></table></div></body></html> 152