1 <refentry id="vidioc-g-audioout">
3 <refentrytitle>ioctl VIDIOC_G_AUDOUT, VIDIOC_S_AUDOUT</refentrytitle>
8 <refname>VIDIOC_G_AUDOUT</refname>
9 <refname>VIDIOC_S_AUDOUT</refname>
10 <refpurpose>Query or select the current audio output</refpurpose>
16 <funcdef>int <function>ioctl</function></funcdef>
17 <paramdef>int <parameter>fd</parameter></paramdef>
18 <paramdef>int <parameter>request</parameter></paramdef>
19 <paramdef>struct v4l2_audioout *<parameter>argp</parameter></paramdef>
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_audioout *<parameter>argp</parameter></paramdef>
33 <title>Arguments</title>
37 <term><parameter>fd</parameter></term>
43 <term><parameter>request</parameter></term>
45 <para>VIDIOC_G_AUDOUT, VIDIOC_S_AUDOUT</para>
49 <term><parameter>argp</parameter></term>
58 <title>Description</title>
60 <para>To query the current audio output applications zero out the
61 <structfield>reserved</structfield> array of a &v4l2-audioout; and
62 call the <constant>VIDIOC_G_AUDOUT</constant> ioctl with a pointer
63 to this structure. Drivers fill the rest of the structure or return an
64 &EINVAL; when the device has no audio inputs, or none which combine
65 with the current video output.</para>
67 <para>Audio outputs have no writable properties. Nevertheless, to
68 select the current audio output applications can initialize the
69 <structfield>index</structfield> field and
70 <structfield>reserved</structfield> array (which in the future may
71 contain writable properties) of a
72 <structname>v4l2_audioout</structname> structure and call the
73 <constant>VIDIOC_S_AUDOUT</constant> ioctl. Drivers switch to the
74 requested output or return the &EINVAL; when the index is out of
75 bounds. This is a write-only ioctl, it does not return the current
76 audio output attributes as <constant>VIDIOC_G_AUDOUT</constant>
79 <para>Note connectors on a TV card to loop back the received audio
80 signal to a sound card are not audio outputs in this sense.</para>
82 <table pgwide="1" frame="none" id="v4l2-audioout">
83 <title>struct <structname>v4l2_audioout</structname></title>
89 <entry><structfield>index</structfield></entry>
90 <entry>Identifies the audio output, set by the
91 driver or application.</entry>
95 <entry><structfield>name</structfield>[32]</entry>
96 <entry>Name of the audio output, a NUL-terminated ASCII
97 string, for example: "Line Out". This information is intended for the
98 user, preferably the connector label on the device itself.</entry>
102 <entry><structfield>capability</structfield></entry>
103 <entry>Audio capability flags, none defined yet. Drivers
104 must set this field to zero.</entry>
108 <entry><structfield>mode</structfield></entry>
109 <entry>Audio mode, none defined yet. Drivers and
110 applications (on <constant>VIDIOC_S_AUDOUT</constant>) must set this
111 field to zero.</entry>
115 <entry><structfield>reserved</structfield>[2]</entry>
116 <entry>Reserved for future extensions. Drivers and
117 applications must set the array to zero.</entry>
129 <term><errorcode>EINVAL</errorcode></term>
131 <para>No audio outputs combine with the current video
132 output, or the number of the selected audio output is out of bounds or
133 it does not combine.</para>