1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> 2 <HTML 3 ><HEAD 4 ><TITLE 5 >ioctl VIDIOC_ENUMAUDIO</TITLE 6 ><META 7 NAME="GENERATOR" 8 CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK 9 REL="HOME" 10 TITLE="Video for Linux Two API Specification" 11 HREF="book1.htm"><LINK 12 REL="UP" 13 TITLE="Function Reference" 14 HREF="r7624.htm"><LINK 15 REL="PREVIOUS" 16 TITLE="ioctl VIDIOC_ENCODER_CMD, VIDIOC_TRY_ENCODER_CMD" 17 HREF="r8087.htm"><LINK 18 REL="NEXT" 19 TITLE="ioctl VIDIOC_ENUMAUDOUT" 20 HREF="r8304.htm"></HEAD 21 ><BODY 22 CLASS="REFENTRY" 23 BGCOLOR="#FFFFFF" 24 TEXT="#000000" 25 LINK="#0000FF" 26 VLINK="#840084" 27 ALINK="#0000FF" 28 ><DIV 29 CLASS="NAVHEADER" 30 ><TABLE 31 SUMMARY="Header navigation table" 32 WIDTH="100%" 33 BORDER="0" 34 CELLPADDING="0" 35 CELLSPACING="0" 36 ><TR 37 ><TH 38 COLSPAN="3" 39 ALIGN="center" 40 >Video for Linux Two API Specification: Revision 0.24</TH 41 ></TR 42 ><TR 43 ><TD 44 WIDTH="10%" 45 ALIGN="left" 46 VALIGN="bottom" 47 ><A 48 HREF="r8087.htm" 49 ACCESSKEY="P" 50 >Prev</A 51 ></TD 52 ><TD 53 WIDTH="80%" 54 ALIGN="center" 55 VALIGN="bottom" 56 ></TD 57 ><TD 58 WIDTH="10%" 59 ALIGN="right" 60 VALIGN="bottom" 61 ><A 62 HREF="r8304.htm" 63 ACCESSKEY="N" 64 >Next</A 65 ></TD 66 ></TR 67 ></TABLE 68 ><HR 69 ALIGN="LEFT" 70 WIDTH="100%"></DIV 71 ><H1 72 ><A 73 NAME="VIDIOC-ENUMAUDIO" 74 ></A 75 >ioctl VIDIOC_ENUMAUDIO</H1 76 ><DIV 77 CLASS="REFNAMEDIV" 78 ><A 79 NAME="AEN8246" 80 ></A 81 ><H2 82 >Name</H2 83 >VIDIOC_ENUMAUDIO -- Enumerate audio inputs</DIV 84 ><DIV 85 CLASS="REFSYNOPSISDIV" 86 ><A 87 NAME="AEN8249" 88 ></A 89 ><H2 90 >Synopsis</H2 91 ><DIV 92 CLASS="FUNCSYNOPSIS" 93 ><P 94 ></P 95 ><A 96 NAME="AEN8250" 97 ></A 98 ><P 99 ><CODE 100 ><CODE 101 CLASS="FUNCDEF" 102 >int ioctl</CODE 103 >(int fd, int request, struct v4l2_audio *argp);</CODE 104 ></P 105 ><P 106 ></P 107 ></DIV 108 ></DIV 109 ><DIV 110 CLASS="REFSECT1" 111 ><A 112 NAME="AEN8260" 113 ></A 114 ><H2 115 >Arguments</H2 116 ><P 117 ></P 118 ><DIV 119 CLASS="VARIABLELIST" 120 ><DL 121 ><DT 122 ><CODE 123 CLASS="PARAMETER" 124 >fd</CODE 125 ></DT 126 ><DD 127 ><P 128 >File descriptor returned by <A 129 HREF="r14090.htm" 130 ><CODE 131 CLASS="FUNCTION" 132 >open()</CODE 133 ></A 134 >.</P 135 ></DD 136 ><DT 137 ><CODE 138 CLASS="PARAMETER" 139 >request</CODE 140 ></DT 141 ><DD 142 ><P 143 >VIDIOC_ENUMAUDIO</P 144 ></DD 145 ><DT 146 ><CODE 147 CLASS="PARAMETER" 148 >argp</CODE 149 ></DT 150 ><DD 151 ><P 152 ></P 153 ></DD 154 ></DL 155 ></DIV 156 ></DIV 157 ><DIV 158 CLASS="REFSECT1" 159 ><A 160 NAME="AEN8280" 161 ></A 162 ><H2 163 >Description</H2 164 ><P 165 >To query the attributes of an audio input applications 166 initialize the <CODE 167 CLASS="STRUCTFIELD" 168 >index</CODE 169 > field and zero out the 170 <CODE 171 CLASS="STRUCTFIELD" 172 >reserved</CODE 173 > array of a struct <A 174 HREF="r9539.htm#V4L2-AUDIO" 175 >v4l2_audio</A 176 > 177 and call the <CODE 178 CLASS="CONSTANT" 179 >VIDIOC_ENUMAUDIO</CODE 180 > ioctl with a pointer 181 to this structure. Drivers fill the rest of the structure or return an 182 <SPAN 183 CLASS="ERRORCODE" 184 >EINVAL</SPAN 185 > error code when the index is out of bounds. To enumerate all audio 186 inputs applications shall begin at index zero, incrementing by one 187 until the driver returns <SPAN 188 CLASS="ERRORCODE" 189 >EINVAL</SPAN 190 >.</P 191 ><P 192 >See <A 193 HREF="r9539.htm" 194 >ioctl VIDIOC_G_AUDIO, VIDIOC_S_AUDIO(2)</A 195 > for a description of 196 struct <A 197 HREF="r9539.htm#V4L2-AUDIO" 198 >v4l2_audio</A 199 >.</P 200 ></DIV 201 ><DIV 202 CLASS="REFSECT1" 203 ><A 204 NAME="AEN8292" 205 ></A 206 ><H2 207 >Return Value</H2 208 ><P 209 >On success <SPAN 210 CLASS="RETURNVALUE" 211 >0</SPAN 212 > is returned, on error <SPAN 213 CLASS="RETURNVALUE" 214 >-1</SPAN 215 > and the <CODE 216 CLASS="VARNAME" 217 >errno</CODE 218 > variable is set appropriately:</P 219 ><P 220 ></P 221 ><DIV 222 CLASS="VARIABLELIST" 223 ><DL 224 ><DT 225 ><SPAN 226 CLASS="ERRORCODE" 227 >EINVAL</SPAN 228 ></DT 229 ><DD 230 ><P 231 >The number of the audio input is out of bounds, or 232 there are no audio inputs at all and this ioctl is not 233 supported.</P 234 ></DD 235 ></DL 236 ></DIV 237 ></DIV 238 ><DIV 239 CLASS="NAVFOOTER" 240 ><HR 241 ALIGN="LEFT" 242 WIDTH="100%"><TABLE 243 SUMMARY="Footer navigation table" 244 WIDTH="100%" 245 BORDER="0" 246 CELLPADDING="0" 247 CELLSPACING="0" 248 ><TR 249 ><TD 250 WIDTH="33%" 251 ALIGN="left" 252 VALIGN="top" 253 ><A 254 HREF="r8087.htm" 255 ACCESSKEY="P" 256 >Prev</A 257 ></TD 258 ><TD 259 WIDTH="34%" 260 ALIGN="center" 261 VALIGN="top" 262 ><A 263 HREF="book1.htm" 264 ACCESSKEY="H" 265 >Home</A 266 ></TD 267 ><TD 268 WIDTH="33%" 269 ALIGN="right" 270 VALIGN="top" 271 ><A 272 HREF="r8304.htm" 273 ACCESSKEY="N" 274 >Next</A 275 ></TD 276 ></TR 277 ><TR 278 ><TD 279 WIDTH="33%" 280 ALIGN="left" 281 VALIGN="top" 282 >ioctl VIDIOC_ENCODER_CMD, VIDIOC_TRY_ENCODER_CMD</TD 283 ><TD 284 WIDTH="34%" 285 ALIGN="center" 286 VALIGN="top" 287 ><A 288 HREF="r7624.htm" 289 ACCESSKEY="U" 290 >Up</A 291 ></TD 292 ><TD 293 WIDTH="33%" 294 ALIGN="right" 295 VALIGN="top" 296 >ioctl VIDIOC_ENUMAUDOUT</TD 297 ></TR 298 ></TABLE 299 ></DIV 300 ></BODY 301 ></HTML 302 > 303