vidioc-g-audioout.xml 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  1. <refentry id="vidioc-g-audioout">
  2. <refmeta>
  3. <refentrytitle>ioctl VIDIOC_G_AUDOUT, VIDIOC_S_AUDOUT</refentrytitle>
  4. &manvol;
  5. </refmeta>
  6. <refnamediv>
  7. <refname>VIDIOC_G_AUDOUT</refname>
  8. <refname>VIDIOC_S_AUDOUT</refname>
  9. <refpurpose>Query or select the current audio output</refpurpose>
  10. </refnamediv>
  11. <refsynopsisdiv>
  12. <funcsynopsis>
  13. <funcprototype>
  14. <funcdef>int <function>ioctl</function></funcdef>
  15. <paramdef>int <parameter>fd</parameter></paramdef>
  16. <paramdef>int <parameter>request</parameter></paramdef>
  17. <paramdef>struct v4l2_audioout *<parameter>argp</parameter></paramdef>
  18. </funcprototype>
  19. </funcsynopsis>
  20. <funcsynopsis>
  21. <funcprototype>
  22. <funcdef>int <function>ioctl</function></funcdef>
  23. <paramdef>int <parameter>fd</parameter></paramdef>
  24. <paramdef>int <parameter>request</parameter></paramdef>
  25. <paramdef>const struct v4l2_audioout *<parameter>argp</parameter></paramdef>
  26. </funcprototype>
  27. </funcsynopsis>
  28. </refsynopsisdiv>
  29. <refsect1>
  30. <title>Arguments</title>
  31. <variablelist>
  32. <varlistentry>
  33. <term><parameter>fd</parameter></term>
  34. <listitem>
  35. <para>&fd;</para>
  36. </listitem>
  37. </varlistentry>
  38. <varlistentry>
  39. <term><parameter>request</parameter></term>
  40. <listitem>
  41. <para>VIDIOC_G_AUDOUT, VIDIOC_S_AUDOUT</para>
  42. </listitem>
  43. </varlistentry>
  44. <varlistentry>
  45. <term><parameter>argp</parameter></term>
  46. <listitem>
  47. <para></para>
  48. </listitem>
  49. </varlistentry>
  50. </variablelist>
  51. </refsect1>
  52. <refsect1>
  53. <title>Description</title>
  54. <para>To query the current audio output applications zero out the
  55. <structfield>reserved</structfield> array of a &v4l2-audioout; and
  56. call the <constant>VIDIOC_G_AUDOUT</constant> ioctl with a pointer
  57. to this structure. Drivers fill the rest of the structure or return an
  58. &EINVAL; when the device has no audio inputs, or none which combine
  59. with the current video output.</para>
  60. <para>Audio outputs have no writable properties. Nevertheless, to
  61. select the current audio output applications can initialize the
  62. <structfield>index</structfield> field and
  63. <structfield>reserved</structfield> array (which in the future may
  64. contain writable properties) of a
  65. <structname>v4l2_audioout</structname> structure and call the
  66. <constant>VIDIOC_S_AUDOUT</constant> ioctl. Drivers switch to the
  67. requested output or return the &EINVAL; when the index is out of
  68. bounds. This is a write-only ioctl, it does not return the current
  69. audio output attributes as <constant>VIDIOC_G_AUDOUT</constant>
  70. does.</para>
  71. <para>Note connectors on a TV card to loop back the received audio
  72. signal to a sound card are not audio outputs in this sense.</para>
  73. <table pgwide="1" frame="none" id="v4l2-audioout">
  74. <title>struct <structname>v4l2_audioout</structname></title>
  75. <tgroup cols="3">
  76. &cs-str;
  77. <tbody valign="top">
  78. <row>
  79. <entry>__u32</entry>
  80. <entry><structfield>index</structfield></entry>
  81. <entry>Identifies the audio output, set by the
  82. driver or application.</entry>
  83. </row>
  84. <row>
  85. <entry>__u8</entry>
  86. <entry><structfield>name</structfield>[32]</entry>
  87. <entry>Name of the audio output, a NUL-terminated ASCII
  88. string, for example: "Line Out". This information is intended for the
  89. user, preferably the connector label on the device itself.</entry>
  90. </row>
  91. <row>
  92. <entry>__u32</entry>
  93. <entry><structfield>capability</structfield></entry>
  94. <entry>Audio capability flags, none defined yet. Drivers
  95. must set this field to zero.</entry>
  96. </row>
  97. <row>
  98. <entry>__u32</entry>
  99. <entry><structfield>mode</structfield></entry>
  100. <entry>Audio mode, none defined yet. Drivers and
  101. applications (on <constant>VIDIOC_S_AUDOUT</constant>) must set this
  102. field to zero.</entry>
  103. </row>
  104. <row>
  105. <entry>__u32</entry>
  106. <entry><structfield>reserved</structfield>[2]</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>No audio outputs combine with the current video
  121. output, or the number of the selected audio output is out of bounds or
  122. it does not combine, or there are no audio outputs at all and the
  123. ioctl is not supported.</para>
  124. </listitem>
  125. </varlistentry>
  126. <varlistentry>
  127. <term><errorcode>EBUSY</errorcode></term>
  128. <listitem>
  129. <para>I/O is in progress, the output cannot be
  130. switched.</para>
  131. </listitem>
  132. </varlistentry>
  133. </variablelist>
  134. </refsect1>
  135. </refentry>
  136. <!--
  137. Local Variables:
  138. mode: sgml
  139. sgml-parent-document: "v4l2.sgml"
  140. indent-tabs-mode: nil
  141. End:
  142. -->