| Mauro Carvalho Chehab | 8e080c2 | 2009-09-13 22:16:04 -0300 | [diff] [blame] | 1 | <title>DVB Audio Device</title> |
| 2 | <para>The DVB audio device controls the MPEG2 audio decoder of the DVB hardware. It |
| 3 | can be accessed through <emphasis role="tt">/dev/dvb/adapter0/audio0</emphasis>. Data types and and |
| 4 | ioctl definitions can be accessed by including <emphasis role="tt">linux/dvb/video.h</emphasis> in your |
| 5 | application. |
| 6 | </para> |
| 7 | <para>Please note that some DVB cards don’t have their own MPEG decoder, which results in |
| 8 | the omission of the audio and video device. |
| 9 | </para> |
| 10 | |
| 11 | <section id="audio_data_types"> |
| 12 | <title>Audio Data Types</title> |
| 13 | <para>This section describes the structures, data types and defines used when talking to the |
| 14 | audio device. |
| 15 | </para> |
| 16 | |
| Mauro Carvalho Chehab | 4cde378 | 2011-06-08 10:42:22 -0300 | [diff] [blame] | 17 | <section id="audio-stream-source-t"> |
| Mauro Carvalho Chehab | 8e080c2 | 2009-09-13 22:16:04 -0300 | [diff] [blame] | 18 | <title>audio_stream_source_t</title> |
| 19 | <para>The audio stream source is set through the AUDIO_SELECT_SOURCE call and can take |
| 20 | the following values, depending on whether we are replaying from an internal (demux) or |
| 21 | external (user write) source. |
| 22 | </para> |
| 23 | <programlisting> |
| Mauro Carvalho Chehab | 3445243 | 2011-06-08 10:55:57 -0300 | [diff] [blame] | 24 | typedef enum { |
| 25 | AUDIO_SOURCE_DEMUX, |
| 26 | AUDIO_SOURCE_MEMORY |
| 27 | } audio_stream_source_t; |
| Mauro Carvalho Chehab | 8e080c2 | 2009-09-13 22:16:04 -0300 | [diff] [blame] | 28 | </programlisting> |
| 29 | <para>AUDIO_SOURCE_DEMUX selects the demultiplexer (fed either by the frontend or the |
| 30 | DVR device) as the source of the video stream. If AUDIO_SOURCE_MEMORY |
| 31 | is selected the stream comes from the application through the <emphasis role="tt">write()</emphasis> system |
| 32 | call. |
| 33 | </para> |
| 34 | |
| 35 | </section> |
| Mauro Carvalho Chehab | 4cde378 | 2011-06-08 10:42:22 -0300 | [diff] [blame] | 36 | <section id="audio-play-state-t"> |
| Mauro Carvalho Chehab | 8e080c2 | 2009-09-13 22:16:04 -0300 | [diff] [blame] | 37 | <title>audio_play_state_t</title> |
| 38 | <para>The following values can be returned by the AUDIO_GET_STATUS call representing the |
| 39 | state of audio playback. |
| 40 | </para> |
| 41 | <programlisting> |
| Mauro Carvalho Chehab | 3445243 | 2011-06-08 10:55:57 -0300 | [diff] [blame] | 42 | typedef enum { |
| 43 | AUDIO_STOPPED, |
| 44 | AUDIO_PLAYING, |
| 45 | AUDIO_PAUSED |
| 46 | } audio_play_state_t; |
| Mauro Carvalho Chehab | 8e080c2 | 2009-09-13 22:16:04 -0300 | [diff] [blame] | 47 | </programlisting> |
| 48 | |
| 49 | </section> |
| Mauro Carvalho Chehab | 4cde378 | 2011-06-08 10:42:22 -0300 | [diff] [blame] | 50 | <section id="audio-channel-select-t"> |
| Mauro Carvalho Chehab | 8e080c2 | 2009-09-13 22:16:04 -0300 | [diff] [blame] | 51 | <title>audio_channel_select_t</title> |
| 52 | <para>The audio channel selected via AUDIO_CHANNEL_SELECT is determined by the |
| 53 | following values. |
| 54 | </para> |
| 55 | <programlisting> |
| Mauro Carvalho Chehab | 3445243 | 2011-06-08 10:55:57 -0300 | [diff] [blame] | 56 | typedef enum { |
| 57 | AUDIO_STEREO, |
| 58 | AUDIO_MONO_LEFT, |
| 59 | AUDIO_MONO_RIGHT, |
| 60 | AUDIO_MONO, |
| 61 | AUDIO_STEREO_SWAPPED |
| 62 | } audio_channel_select_t; |
| Mauro Carvalho Chehab | 8e080c2 | 2009-09-13 22:16:04 -0300 | [diff] [blame] | 63 | </programlisting> |
| 64 | |
| 65 | </section> |
| Mauro Carvalho Chehab | 4cde378 | 2011-06-08 10:42:22 -0300 | [diff] [blame] | 66 | <section id="audio-status"> |
| Mauro Carvalho Chehab | 8e080c2 | 2009-09-13 22:16:04 -0300 | [diff] [blame] | 67 | <title>struct audio_status</title> |
| 68 | <para>The AUDIO_GET_STATUS call returns the following structure informing about various |
| 69 | states of the playback operation. |
| 70 | </para> |
| 71 | <programlisting> |
| Mauro Carvalho Chehab | 3445243 | 2011-06-08 10:55:57 -0300 | [diff] [blame] | 72 | typedef struct audio_status { |
| 73 | boolean AV_sync_state; |
| 74 | boolean mute_state; |
| 75 | audio_play_state_t play_state; |
| 76 | audio_stream_source_t stream_source; |
| 77 | audio_channel_select_t channel_select; |
| 78 | boolean bypass_mode; |
| 79 | audio_mixer_t mixer_state; |
| 80 | } audio_status_t; |
| Mauro Carvalho Chehab | 8e080c2 | 2009-09-13 22:16:04 -0300 | [diff] [blame] | 81 | </programlisting> |
| 82 | |
| 83 | </section> |
| Mauro Carvalho Chehab | 4cde378 | 2011-06-08 10:42:22 -0300 | [diff] [blame] | 84 | <section id="audio-mixer"> |
| Mauro Carvalho Chehab | 8e080c2 | 2009-09-13 22:16:04 -0300 | [diff] [blame] | 85 | <title>struct audio_mixer</title> |
| 86 | <para>The following structure is used by the AUDIO_SET_MIXER call to set the audio |
| 87 | volume. |
| 88 | </para> |
| 89 | <programlisting> |
| Mauro Carvalho Chehab | 3445243 | 2011-06-08 10:55:57 -0300 | [diff] [blame] | 90 | typedef struct audio_mixer { |
| 91 | unsigned int volume_left; |
| 92 | unsigned int volume_right; |
| 93 | } audio_mixer_t; |
| Mauro Carvalho Chehab | 8e080c2 | 2009-09-13 22:16:04 -0300 | [diff] [blame] | 94 | </programlisting> |
| 95 | |
| 96 | </section> |
| 97 | <section id="audio_encodings"> |
| 98 | <title>audio encodings</title> |
| 99 | <para>A call to AUDIO_GET_CAPABILITIES returns an unsigned integer with the following |
| 100 | bits set according to the hardwares capabilities. |
| 101 | </para> |
| 102 | <programlisting> |
| 103 | #define AUDIO_CAP_DTS 1 |
| 104 | #define AUDIO_CAP_LPCM 2 |
| 105 | #define AUDIO_CAP_MP1 4 |
| 106 | #define AUDIO_CAP_MP2 8 |
| 107 | #define AUDIO_CAP_MP3 16 |
| 108 | #define AUDIO_CAP_AAC 32 |
| 109 | #define AUDIO_CAP_OGG 64 |
| 110 | #define AUDIO_CAP_SDDS 128 |
| 111 | #define AUDIO_CAP_AC3 256 |
| 112 | </programlisting> |
| 113 | |
| 114 | </section> |
| Mauro Carvalho Chehab | 4cde378 | 2011-06-08 10:42:22 -0300 | [diff] [blame] | 115 | <section id="audio-karaoke"> |
| Mauro Carvalho Chehab | 8e080c2 | 2009-09-13 22:16:04 -0300 | [diff] [blame] | 116 | <title>struct audio_karaoke</title> |
| 117 | <para>The ioctl AUDIO_SET_KARAOKE uses the following format: |
| 118 | </para> |
| 119 | <programlisting> |
| Mauro Carvalho Chehab | 3445243 | 2011-06-08 10:55:57 -0300 | [diff] [blame] | 120 | typedef |
| 121 | struct audio_karaoke { |
| 122 | int vocal1; |
| 123 | int vocal2; |
| 124 | int melody; |
| 125 | } audio_karaoke_t; |
| Mauro Carvalho Chehab | 8e080c2 | 2009-09-13 22:16:04 -0300 | [diff] [blame] | 126 | </programlisting> |
| 127 | <para>If Vocal1 or Vocal2 are non-zero, they get mixed into left and right t at 70% each. If both, |
| 128 | Vocal1 and Vocal2 are non-zero, Vocal1 gets mixed into the left channel and Vocal2 into the |
| 129 | right channel at 100% each. Ff Melody is non-zero, the melody channel gets mixed into left |
| 130 | and right. |
| 131 | </para> |
| 132 | |
| 133 | </section> |
| Mauro Carvalho Chehab | 4cde378 | 2011-06-08 10:42:22 -0300 | [diff] [blame] | 134 | <section id="audio-attributes-t"> |
| Mauro Carvalho Chehab | 8e080c2 | 2009-09-13 22:16:04 -0300 | [diff] [blame] | 135 | <title>audio attributes</title> |
| 136 | <para>The following attributes can be set by a call to AUDIO_SET_ATTRIBUTES: |
| 137 | </para> |
| 138 | <programlisting> |
| 139 | typedef uint16_t audio_attributes_t; |
| 140 | /⋆ bits: descr. ⋆/ |
| 141 | /⋆ 15-13 audio coding mode (0=ac3, 2=mpeg1, 3=mpeg2ext, 4=LPCM, 6=DTS, ⋆/ |
| 142 | /⋆ 12 multichannel extension ⋆/ |
| 143 | /⋆ 11-10 audio type (0=not spec, 1=language included) ⋆/ |
| 144 | /⋆ 9- 8 audio application mode (0=not spec, 1=karaoke, 2=surround) ⋆/ |
| 145 | /⋆ 7- 6 Quantization / DRC (mpeg audio: 1=DRC exists)(lpcm: 0=16bit, ⋆/ |
| 146 | /⋆ 5- 4 Sample frequency fs (0=48kHz, 1=96kHz) ⋆/ |
| 147 | /⋆ 2- 0 number of audio channels (n+1 channels) ⋆/ |
| 148 | </programlisting> |
| 149 | </section></section> |
| 150 | <section id="audio_function_calls"> |
| 151 | <title>Audio Function Calls</title> |
| 152 | |
| 153 | |
| 154 | <section id="audio_fopen"> |
| 155 | <title>open()</title> |
| 156 | <para>DESCRIPTION |
| 157 | </para> |
| 158 | <informaltable><tgroup cols="1"><tbody><row><entry |
| 159 | align="char"> |
| 160 | <para>This system call opens a named audio device (e.g. /dev/dvb/adapter0/audio0) |
| 161 | for subsequent use. When an open() call has succeeded, the device will be ready |
| 162 | for use. The significance of blocking or non-blocking mode is described in the |
| 163 | documentation for functions where there is a difference. It does not affect the |
| 164 | semantics of the open() call itself. A device opened in blocking mode can later |
| 165 | be put into non-blocking mode (and vice versa) using the F_SETFL command |
| 166 | of the fcntl system call. This is a standard system call, documented in the Linux |
| 167 | manual page for fcntl. Only one user can open the Audio Device in O_RDWR |
| 168 | mode. All other attempts to open the device in this mode will fail, and an error |
| 169 | code will be returned. If the Audio Device is opened in O_RDONLY mode, the |
| 170 | only ioctl call that can be used is AUDIO_GET_STATUS. All other call will |
| 171 | return with an error code.</para> |
| 172 | </entry> |
| 173 | </row></tbody></tgroup></informaltable> |
| 174 | <para>SYNOPSIS |
| 175 | </para> |
| 176 | <informaltable><tgroup cols="1"><tbody><row><entry |
| 177 | align="char"> |
| 178 | <para>int open(const char ⋆deviceName, int flags);</para> |
| 179 | </entry> |
| 180 | </row></tbody></tgroup></informaltable> |
| 181 | <para>PARAMETERS |
| 182 | </para> |
| 183 | <informaltable><tgroup cols="2"><tbody><row><entry |
| 184 | align="char"> |
| 185 | <para>const char |
| 186 | *deviceName</para> |
| 187 | </entry><entry |
| 188 | align="char"> |
| 189 | <para>Name of specific audio device.</para> |
| 190 | </entry> |
| 191 | </row><row><entry |
| 192 | align="char"> |
| 193 | <para>int flags</para> |
| 194 | </entry><entry |
| 195 | align="char"> |
| 196 | <para>A bit-wise OR of the following flags:</para> |
| 197 | </entry> |
| 198 | </row><row><entry |
| 199 | align="char"> |
| 200 | </entry><entry |
| 201 | align="char"> |
| 202 | <para>O_RDONLY read-only access</para> |
| 203 | </entry> |
| 204 | </row><row><entry |
| 205 | align="char"> |
| 206 | </entry><entry |
| 207 | align="char"> |
| 208 | <para>O_RDWR read/write access</para> |
| 209 | </entry> |
| 210 | </row><row><entry |
| 211 | align="char"> |
| 212 | </entry><entry |
| 213 | align="char"> |
| 214 | <para>O_NONBLOCK open in non-blocking mode</para> |
| 215 | </entry> |
| 216 | </row><row><entry |
| 217 | align="char"> |
| 218 | </entry><entry |
| 219 | align="char"> |
| 220 | <para>(blocking mode is the default)</para> |
| 221 | </entry> |
| 222 | </row></tbody></tgroup></informaltable> |
| Mauro Carvalho Chehab | 3de530f | 2011-07-05 12:36:01 -0300 | [diff] [blame] | 223 | <para>RETURN VALUE</para> |
| Mauro Carvalho Chehab | 8e080c2 | 2009-09-13 22:16:04 -0300 | [diff] [blame] | 224 | <informaltable><tgroup cols="2"><tbody><row><entry |
| 225 | align="char"> |
| 226 | <para>ENODEV</para> |
| 227 | </entry><entry |
| 228 | align="char"> |
| 229 | <para>Device driver not loaded/available.</para> |
| 230 | </entry> |
| 231 | </row><row><entry |
| 232 | align="char"> |
| Mauro Carvalho Chehab | 8e080c2 | 2009-09-13 22:16:04 -0300 | [diff] [blame] | 233 | <para>EBUSY</para> |
| 234 | </entry><entry |
| 235 | align="char"> |
| 236 | <para>Device or resource busy.</para> |
| 237 | </entry> |
| 238 | </row><row><entry |
| 239 | align="char"> |
| 240 | <para>EINVAL</para> |
| 241 | </entry><entry |
| 242 | align="char"> |
| 243 | <para>Invalid argument.</para> |
| 244 | </entry> |
| 245 | </row></tbody></tgroup></informaltable> |
| 246 | |
| 247 | </section> |
| 248 | <section id="audio_fclose"> |
| 249 | <title>close()</title> |
| 250 | <para>DESCRIPTION |
| 251 | </para> |
| 252 | <informaltable><tgroup cols="1"><tbody><row><entry |
| 253 | align="char"> |
| 254 | <para>This system call closes a previously opened audio device.</para> |
| 255 | </entry> |
| 256 | </row></tbody></tgroup></informaltable> |
| 257 | <para>SYNOPSIS |
| 258 | </para> |
| 259 | <informaltable><tgroup cols="1"><tbody><row><entry |
| 260 | align="char"> |
| 261 | <para>int close(int fd);</para> |
| 262 | </entry> |
| 263 | </row></tbody></tgroup></informaltable> |
| 264 | <para>PARAMETERS |
| 265 | </para> |
| 266 | <informaltable><tgroup cols="2"><tbody><row><entry |
| 267 | align="char"> |
| 268 | <para>int fd</para> |
| 269 | </entry><entry |
| 270 | align="char"> |
| 271 | <para>File descriptor returned by a previous call to open().</para> |
| 272 | </entry> |
| 273 | </row></tbody></tgroup></informaltable> |
| Mauro Carvalho Chehab | 3de530f | 2011-07-05 12:36:01 -0300 | [diff] [blame] | 274 | <para>RETURN VALUE</para> |
| Mauro Carvalho Chehab | 8e080c2 | 2009-09-13 22:16:04 -0300 | [diff] [blame] | 275 | <informaltable><tgroup cols="2"><tbody><row><entry |
| 276 | align="char"> |
| 277 | <para>EBADF</para> |
| 278 | </entry><entry |
| 279 | align="char"> |
| 280 | <para>fd is not a valid open file descriptor.</para> |
| 281 | </entry> |
| 282 | </row></tbody></tgroup></informaltable> |
| 283 | |
| 284 | </section> |
| 285 | <section id="audio_fwrite"> |
| 286 | <title>write()</title> |
| 287 | <para>DESCRIPTION |
| 288 | </para> |
| 289 | <informaltable><tgroup cols="1"><tbody><row><entry |
| 290 | align="char"> |
| 291 | <para>This system call can only be used if AUDIO_SOURCE_MEMORY is selected |
| 292 | in the ioctl call AUDIO_SELECT_SOURCE. The data provided shall be in |
| 293 | PES format. If O_NONBLOCK is not specified the function will block until |
| 294 | buffer space is available. The amount of data to be transferred is implied by |
| 295 | count.</para> |
| 296 | </entry> |
| 297 | </row></tbody></tgroup></informaltable> |
| 298 | <para>SYNOPSIS |
| 299 | </para> |
| 300 | <informaltable><tgroup cols="1"><tbody><row><entry |
| 301 | align="char"> |
| 302 | <para>size_t write(int fd, const void ⋆buf, size_t count);</para> |
| 303 | </entry> |
| 304 | </row></tbody></tgroup></informaltable> |
| 305 | <para>PARAMETERS |
| 306 | </para> |
| 307 | <informaltable><tgroup cols="2"><tbody><row><entry |
| 308 | align="char"> |
| 309 | <para>int fd</para> |
| 310 | </entry><entry |
| 311 | align="char"> |
| 312 | <para>File descriptor returned by a previous call to open().</para> |
| 313 | </entry> |
| 314 | </row><row><entry |
| 315 | align="char"> |
| 316 | <para>void *buf</para> |
| 317 | </entry><entry |
| 318 | align="char"> |
| 319 | <para>Pointer to the buffer containing the PES data.</para> |
| 320 | </entry> |
| 321 | </row><row><entry |
| 322 | align="char"> |
| 323 | <para>size_t count</para> |
| 324 | </entry><entry |
| 325 | align="char"> |
| 326 | <para>Size of buf.</para> |
| 327 | </entry> |
| 328 | </row></tbody></tgroup></informaltable> |
| Mauro Carvalho Chehab | 3de530f | 2011-07-05 12:36:01 -0300 | [diff] [blame] | 329 | <para>RETURN VALUE</para> |
| Mauro Carvalho Chehab | 8e080c2 | 2009-09-13 22:16:04 -0300 | [diff] [blame] | 330 | <informaltable><tgroup cols="2"><tbody><row><entry |
| 331 | align="char"> |
| 332 | <para>EPERM</para> |
| 333 | </entry><entry |
| 334 | align="char"> |
| 335 | <para>Mode AUDIO_SOURCE_MEMORY not selected.</para> |
| 336 | </entry> |
| 337 | </row><row><entry |
| 338 | align="char"> |
| 339 | <para>ENOMEM</para> |
| 340 | </entry><entry |
| 341 | align="char"> |
| 342 | <para>Attempted to write more data than the internal buffer can |
| 343 | hold.</para> |
| 344 | </entry> |
| 345 | </row><row><entry |
| 346 | align="char"> |
| 347 | <para>EBADF</para> |
| 348 | </entry><entry |
| 349 | align="char"> |
| 350 | <para>fd is not a valid open file descriptor.</para> |
| 351 | </entry> |
| 352 | </row></tbody></tgroup></informaltable> |
| 353 | |
| Mauro Carvalho Chehab | 4cde378 | 2011-06-08 10:42:22 -0300 | [diff] [blame] | 354 | </section><section id="AUDIO_STOP" |
| Mauro Carvalho Chehab | 8e080c2 | 2009-09-13 22:16:04 -0300 | [diff] [blame] | 355 | role="subsection"><title>AUDIO_STOP</title> |
| 356 | <para>DESCRIPTION |
| 357 | </para> |
| 358 | <informaltable><tgroup cols="1"><tbody><row><entry |
| 359 | align="char"> |
| 360 | <para>This ioctl call asks the Audio Device to stop playing the current stream.</para> |
| 361 | </entry> |
| 362 | </row></tbody></tgroup></informaltable> |
| 363 | <para>SYNOPSIS |
| 364 | </para> |
| 365 | <informaltable><tgroup cols="1"><tbody><row><entry |
| 366 | align="char"> |
| 367 | <para>int ioctl(int fd, int request = AUDIO_STOP);</para> |
| 368 | </entry> |
| 369 | </row></tbody></tgroup></informaltable> |
| 370 | <para>PARAMETERS |
| 371 | </para> |
| 372 | <informaltable><tgroup cols="2"><tbody><row><entry |
| 373 | align="char"> |
| 374 | <para>int fd</para> |
| 375 | </entry><entry |
| 376 | align="char"> |
| 377 | <para>File descriptor returned by a previous call to open().</para> |
| 378 | </entry> |
| 379 | </row><row><entry |
| 380 | align="char"> |
| 381 | <para>int request</para> |
| 382 | </entry><entry |
| 383 | align="char"> |
| 384 | <para>Equals AUDIO_STOP for this command.</para> |
| 385 | </entry> |
| 386 | </row></tbody></tgroup></informaltable> |
| Mauro Carvalho Chehab | 3de530f | 2011-07-05 12:36:01 -0300 | [diff] [blame] | 387 | &return-value-dvb; |
| Mauro Carvalho Chehab | 8e080c2 | 2009-09-13 22:16:04 -0300 | [diff] [blame] | 388 | |
| Mauro Carvalho Chehab | 4cde378 | 2011-06-08 10:42:22 -0300 | [diff] [blame] | 389 | </section><section id="AUDIO_PLAY" |
| Mauro Carvalho Chehab | 8e080c2 | 2009-09-13 22:16:04 -0300 | [diff] [blame] | 390 | role="subsection"><title>AUDIO_PLAY</title> |
| 391 | <para>DESCRIPTION |
| 392 | </para> |
| 393 | <informaltable><tgroup cols="1"><tbody><row><entry |
| 394 | align="char"> |
| 395 | <para>This ioctl call asks the Audio Device to start playing an audio stream from the |
| 396 | selected source.</para> |
| 397 | </entry> |
| 398 | </row></tbody></tgroup></informaltable> |
| 399 | <para>SYNOPSIS |
| 400 | </para> |
| 401 | <informaltable><tgroup cols="1"><tbody><row><entry |
| 402 | align="char"> |
| 403 | <para>int ioctl(int fd, int request = AUDIO_PLAY);</para> |
| 404 | </entry> |
| 405 | </row></tbody></tgroup></informaltable> |
| 406 | <para>PARAMETERS |
| 407 | </para> |
| 408 | <informaltable><tgroup cols="2"><tbody><row><entry |
| 409 | align="char"> |
| 410 | <para>int fd</para> |
| 411 | </entry><entry |
| 412 | align="char"> |
| 413 | <para>File descriptor returned by a previous call to open().</para> |
| 414 | </entry> |
| 415 | </row><row><entry |
| 416 | align="char"> |
| 417 | <para>int request</para> |
| 418 | </entry><entry |
| 419 | align="char"> |
| 420 | <para>Equals AUDIO_PLAY for this command.</para> |
| 421 | </entry> |
| 422 | </row></tbody></tgroup></informaltable> |
| Mauro Carvalho Chehab | 3de530f | 2011-07-05 12:36:01 -0300 | [diff] [blame] | 423 | &return-value-dvb; |
| Mauro Carvalho Chehab | 8e080c2 | 2009-09-13 22:16:04 -0300 | [diff] [blame] | 424 | |
| Mauro Carvalho Chehab | 4cde378 | 2011-06-08 10:42:22 -0300 | [diff] [blame] | 425 | </section><section id="AUDIO_PAUSE" |
| Mauro Carvalho Chehab | 8e080c2 | 2009-09-13 22:16:04 -0300 | [diff] [blame] | 426 | role="subsection"><title>AUDIO_PAUSE</title> |
| 427 | <para>DESCRIPTION |
| 428 | </para> |
| 429 | <informaltable><tgroup cols="1"><tbody><row><entry |
| 430 | align="char"> |
| 431 | <para>This ioctl call suspends the audio stream being played. Decoding and playing |
| 432 | are paused. It is then possible to restart again decoding and playing process of |
| 433 | the audio stream using AUDIO_CONTINUE command.</para> |
| 434 | </entry> |
| 435 | </row><row><entry |
| 436 | align="char"> |
| 437 | <para>If AUDIO_SOURCE_MEMORY is selected in the ioctl call |
| 438 | AUDIO_SELECT_SOURCE, the DVB-subsystem will not decode (consume) |
| 439 | any more data until the ioctl call AUDIO_CONTINUE or AUDIO_PLAY is |
| 440 | performed.</para> |
| 441 | </entry> |
| 442 | </row></tbody></tgroup></informaltable> |
| 443 | <para>SYNOPSIS |
| 444 | </para> |
| 445 | <informaltable><tgroup cols="1"><tbody><row><entry |
| 446 | align="char"> |
| 447 | <para>int ioctl(int fd, int request = AUDIO_PAUSE);</para> |
| 448 | </entry> |
| 449 | </row></tbody></tgroup></informaltable> |
| 450 | <para>PARAMETERS |
| 451 | </para> |
| 452 | <informaltable><tgroup cols="2"><tbody><row><entry |
| 453 | align="char"> |
| 454 | <para>int fd</para> |
| 455 | </entry><entry |
| 456 | align="char"> |
| 457 | <para>File descriptor returned by a previous call to open().</para> |
| 458 | </entry> |
| 459 | </row><row><entry |
| 460 | align="char"> |
| 461 | <para>int request</para> |
| 462 | </entry><entry |
| 463 | align="char"> |
| 464 | <para>Equals AUDIO_PAUSE for this command.</para> |
| 465 | </entry> |
| 466 | </row></tbody></tgroup></informaltable> |
| Mauro Carvalho Chehab | 3de530f | 2011-07-05 12:36:01 -0300 | [diff] [blame] | 467 | &return-value-dvb; |
| Mauro Carvalho Chehab | a2eb7c0 | 2011-06-08 11:03:10 -0300 | [diff] [blame] | 468 | |
| 469 | </section><section id="AUDIO_CONTINUE" |
| 470 | role="subsection"><title>AUDIO_CONTINUE</title> |
| 471 | <para>DESCRIPTION |
| 472 | </para> |
| 473 | <informaltable><tgroup cols="1"><tbody><row><entry |
| 474 | align="char"> |
| 475 | <para>This ioctl restarts the decoding and playing process previously paused |
| 476 | with AUDIO_PAUSE command.</para> |
| 477 | </entry> |
| 478 | </row><row><entry |
| 479 | align="char"> |
| 480 | <para>It only works if the stream were previously stopped with AUDIO_PAUSE</para> |
| 481 | </entry> |
| 482 | </row></tbody></tgroup></informaltable> |
| 483 | <para>SYNOPSIS |
| 484 | </para> |
| 485 | <informaltable><tgroup cols="1"><tbody><row><entry |
| 486 | align="char"> |
| 487 | <para>int ioctl(int fd, int request = AUDIO_CONTINUE);</para> |
| 488 | </entry> |
| 489 | </row></tbody></tgroup></informaltable> |
| 490 | <para>PARAMETERS |
| 491 | </para> |
| 492 | <informaltable><tgroup cols="2"><tbody><row><entry |
| 493 | align="char"> |
| 494 | <para>int fd</para> |
| 495 | </entry><entry |
| 496 | align="char"> |
| 497 | <para>File descriptor returned by a previous call to open().</para> |
| 498 | </entry> |
| 499 | </row><row><entry |
| 500 | align="char"> |
| 501 | <para>int request</para> |
| 502 | </entry><entry |
| 503 | align="char"> |
| 504 | <para>Equals AUDIO_CONTINUE for this command.</para> |
| 505 | </entry> |
| 506 | </row></tbody></tgroup></informaltable> |
| Mauro Carvalho Chehab | 3de530f | 2011-07-05 12:36:01 -0300 | [diff] [blame] | 507 | &return-value-dvb; |
| Mauro Carvalho Chehab | a2eb7c0 | 2011-06-08 11:03:10 -0300 | [diff] [blame] | 508 | |
| Mauro Carvalho Chehab | 4cde378 | 2011-06-08 10:42:22 -0300 | [diff] [blame] | 509 | </section><section id="AUDIO_SELECT_SOURCE" |
| Mauro Carvalho Chehab | 8e080c2 | 2009-09-13 22:16:04 -0300 | [diff] [blame] | 510 | role="subsection"><title>AUDIO_SELECT_SOURCE</title> |
| 511 | <para>DESCRIPTION |
| 512 | </para> |
| 513 | <informaltable><tgroup cols="1"><tbody><row><entry |
| 514 | align="char"> |
| 515 | <para>This ioctl call informs the audio device which source shall be used |
| 516 | for the input data. The possible sources are demux or memory. If |
| 517 | AUDIO_SOURCE_MEMORY is selected, the data is fed to the Audio Device |
| 518 | through the write command.</para> |
| 519 | </entry> |
| 520 | </row></tbody></tgroup></informaltable> |
| 521 | <para>SYNOPSIS |
| 522 | </para> |
| 523 | <informaltable><tgroup cols="1"><tbody><row><entry |
| 524 | align="char"> |
| 525 | <para>int ioctl(int fd, int request = AUDIO_SELECT_SOURCE, |
| 526 | audio_stream_source_t source);</para> |
| 527 | </entry> |
| 528 | </row></tbody></tgroup></informaltable> |
| 529 | <para>PARAMETERS |
| 530 | </para> |
| 531 | <informaltable><tgroup cols="2"><tbody><row><entry |
| 532 | align="char"> |
| 533 | <para>int fd</para> |
| 534 | </entry><entry |
| 535 | align="char"> |
| 536 | <para>File descriptor returned by a previous call to open().</para> |
| 537 | </entry> |
| 538 | </row><row><entry |
| 539 | align="char"> |
| 540 | <para>int request</para> |
| 541 | </entry><entry |
| 542 | align="char"> |
| 543 | <para>Equals AUDIO_SELECT_SOURCE for this command.</para> |
| 544 | </entry> |
| 545 | </row><row><entry |
| 546 | align="char"> |
| 547 | <para>audio_stream_source_t |
| 548 | source</para> |
| 549 | </entry><entry |
| 550 | align="char"> |
| 551 | <para>Indicates the source that shall be used for the Audio |
| 552 | stream.</para> |
| 553 | </entry> |
| 554 | </row></tbody></tgroup></informaltable> |
| Mauro Carvalho Chehab | 3de530f | 2011-07-05 12:36:01 -0300 | [diff] [blame] | 555 | &return-value-dvb; |
| Mauro Carvalho Chehab | 8e080c2 | 2009-09-13 22:16:04 -0300 | [diff] [blame] | 556 | |
| Mauro Carvalho Chehab | 4cde378 | 2011-06-08 10:42:22 -0300 | [diff] [blame] | 557 | </section><section id="AUDIO_SET_MUTE" |
| Mauro Carvalho Chehab | 8e080c2 | 2009-09-13 22:16:04 -0300 | [diff] [blame] | 558 | role="subsection"><title>AUDIO_SET_MUTE</title> |
| 559 | <para>DESCRIPTION |
| 560 | </para> |
| 561 | <informaltable><tgroup cols="1"><tbody><row><entry |
| 562 | align="char"> |
| 563 | <para>This ioctl call asks the audio device to mute the stream that is currently being |
| 564 | played.</para> |
| 565 | </entry> |
| 566 | </row></tbody></tgroup></informaltable> |
| 567 | <para>SYNOPSIS |
| 568 | </para> |
| 569 | <informaltable><tgroup cols="1"><tbody><row><entry |
| 570 | align="char"> |
| 571 | <para>int ioctl(int fd, int request = AUDIO_SET_MUTE, |
| 572 | boolean state);</para> |
| 573 | </entry> |
| 574 | </row></tbody></tgroup></informaltable> |
| 575 | <para>PARAMETERS |
| 576 | </para> |
| 577 | <informaltable><tgroup cols="2"><tbody><row><entry |
| 578 | align="char"> |
| 579 | <para>int fd</para> |
| 580 | </entry><entry |
| 581 | align="char"> |
| 582 | <para>File descriptor returned by a previous call to open().</para> |
| 583 | </entry> |
| 584 | </row><row><entry |
| 585 | align="char"> |
| 586 | <para>int request</para> |
| 587 | </entry><entry |
| 588 | align="char"> |
| 589 | <para>Equals AUDIO_SET_MUTE for this command.</para> |
| 590 | </entry> |
| 591 | </row><row><entry |
| 592 | align="char"> |
| 593 | <para>boolean state</para> |
| 594 | </entry><entry |
| 595 | align="char"> |
| 596 | <para>Indicates if audio device shall mute or not.</para> |
| 597 | </entry> |
| 598 | </row><row><entry |
| 599 | align="char"> |
| 600 | </entry><entry |
| 601 | align="char"> |
| 602 | <para>TRUE Audio Mute</para> |
| 603 | </entry> |
| 604 | </row><row><entry |
| 605 | align="char"> |
| 606 | </entry><entry |
| 607 | align="char"> |
| 608 | <para>FALSE Audio Un-mute</para> |
| 609 | </entry> |
| 610 | </row></tbody></tgroup></informaltable> |
| Mauro Carvalho Chehab | 3de530f | 2011-07-05 12:36:01 -0300 | [diff] [blame] | 611 | &return-value-dvb; |
| Mauro Carvalho Chehab | 8e080c2 | 2009-09-13 22:16:04 -0300 | [diff] [blame] | 612 | |
| Mauro Carvalho Chehab | 4cde378 | 2011-06-08 10:42:22 -0300 | [diff] [blame] | 613 | </section><section id="AUDIO_SET_AV_SYNC" |
| Mauro Carvalho Chehab | 8e080c2 | 2009-09-13 22:16:04 -0300 | [diff] [blame] | 614 | role="subsection"><title>AUDIO_SET_AV_SYNC</title> |
| 615 | <para>DESCRIPTION |
| 616 | </para> |
| 617 | <informaltable><tgroup cols="1"><tbody><row><entry |
| 618 | align="char"> |
| 619 | <para>This ioctl call asks the Audio Device to turn ON or OFF A/V synchronization.</para> |
| 620 | </entry> |
| 621 | </row></tbody></tgroup></informaltable> |
| 622 | <para>SYNOPSIS |
| 623 | </para> |
| 624 | <informaltable><tgroup cols="1"><tbody><row><entry |
| 625 | align="char"> |
| 626 | <para>int ioctl(int fd, int request = AUDIO_SET_AV_SYNC, |
| 627 | boolean state);</para> |
| 628 | </entry> |
| 629 | </row></tbody></tgroup></informaltable> |
| 630 | <para>PARAMETERS |
| 631 | </para> |
| 632 | <informaltable><tgroup cols="2"><tbody><row><entry |
| 633 | align="char"> |
| 634 | <para>int fd</para> |
| 635 | </entry><entry |
| 636 | align="char"> |
| 637 | <para>File descriptor returned by a previous call to open().</para> |
| 638 | </entry> |
| 639 | </row><row><entry |
| 640 | align="char"> |
| 641 | <para>int request</para> |
| 642 | </entry><entry |
| 643 | align="char"> |
| 644 | <para>Equals AUDIO_AV_SYNC for this command.</para> |
| 645 | </entry> |
| 646 | </row><row><entry |
| 647 | align="char"> |
| 648 | <para>boolean state</para> |
| 649 | </entry><entry |
| 650 | align="char"> |
| 651 | <para>Tells the DVB subsystem if A/V synchronization shall be |
| 652 | ON or OFF.</para> |
| 653 | </entry> |
| 654 | </row><row><entry |
| 655 | align="char"> |
| 656 | </entry><entry |
| 657 | align="char"> |
| 658 | <para>TRUE AV-sync ON</para> |
| 659 | </entry> |
| 660 | </row><row><entry |
| 661 | align="char"> |
| 662 | </entry><entry |
| 663 | align="char"> |
| 664 | <para>FALSE AV-sync OFF</para> |
| 665 | </entry> |
| 666 | </row></tbody></tgroup></informaltable> |
| Mauro Carvalho Chehab | 3de530f | 2011-07-05 12:36:01 -0300 | [diff] [blame] | 667 | &return-value-dvb; |
| Mauro Carvalho Chehab | 8e080c2 | 2009-09-13 22:16:04 -0300 | [diff] [blame] | 668 | |
| Mauro Carvalho Chehab | 4cde378 | 2011-06-08 10:42:22 -0300 | [diff] [blame] | 669 | </section><section id="AUDIO_SET_BYPASS_MODE" |
| Mauro Carvalho Chehab | 8e080c2 | 2009-09-13 22:16:04 -0300 | [diff] [blame] | 670 | role="subsection"><title>AUDIO_SET_BYPASS_MODE</title> |
| 671 | <para>DESCRIPTION |
| 672 | </para> |
| 673 | <informaltable><tgroup cols="1"><tbody><row><entry |
| 674 | align="char"> |
| 675 | <para>This ioctl call asks the Audio Device to bypass the Audio decoder and forward |
| 676 | the stream without decoding. This mode shall be used if streams that can’t be |
| 677 | handled by the DVB system shall be decoded. Dolby DigitalTM streams are |
| 678 | automatically forwarded by the DVB subsystem if the hardware can handle it.</para> |
| 679 | </entry> |
| 680 | </row></tbody></tgroup></informaltable> |
| 681 | <para>SYNOPSIS |
| 682 | </para> |
| 683 | <informaltable><tgroup cols="1"><tbody><row><entry |
| 684 | align="char"> |
| 685 | <para>int ioctl(int fd, int request = |
| 686 | AUDIO_SET_BYPASS_MODE, boolean mode);</para> |
| 687 | </entry> |
| 688 | </row></tbody></tgroup></informaltable> |
| 689 | <para>PARAMETERS |
| 690 | </para> |
| 691 | <informaltable><tgroup cols="2"><tbody><row><entry |
| 692 | align="char"> |
| 693 | <para>int fd</para> |
| 694 | </entry><entry |
| 695 | align="char"> |
| 696 | <para>File descriptor returned by a previous call to open().</para> |
| 697 | </entry> |
| 698 | </row><row><entry |
| 699 | align="char"> |
| 700 | <para>int request</para> |
| 701 | </entry><entry |
| 702 | align="char"> |
| 703 | <para>Equals AUDIO_SET_BYPASS_MODE for this |
| 704 | command.</para> |
| 705 | </entry> |
| 706 | </row><row><entry |
| 707 | align="char"> |
| 708 | <para>boolean mode</para> |
| 709 | </entry><entry |
| 710 | align="char"> |
| 711 | <para>Enables or disables the decoding of the current Audio |
| 712 | stream in the DVB subsystem.</para> |
| 713 | </entry> |
| 714 | </row><row><entry |
| 715 | align="char"> |
| 716 | </entry><entry |
| 717 | align="char"> |
| 718 | <para>TRUE Bypass is disabled</para> |
| 719 | </entry> |
| 720 | </row><row><entry |
| 721 | align="char"> |
| 722 | </entry><entry |
| 723 | align="char"> |
| 724 | <para>FALSE Bypass is enabled</para> |
| 725 | </entry> |
| 726 | </row></tbody></tgroup></informaltable> |
| Mauro Carvalho Chehab | 3de530f | 2011-07-05 12:36:01 -0300 | [diff] [blame] | 727 | &return-value-dvb; |
| Mauro Carvalho Chehab | 8e080c2 | 2009-09-13 22:16:04 -0300 | [diff] [blame] | 728 | |
| Mauro Carvalho Chehab | 4cde378 | 2011-06-08 10:42:22 -0300 | [diff] [blame] | 729 | </section><section id="AUDIO_CHANNEL_SELECT" |
| Mauro Carvalho Chehab | 8e080c2 | 2009-09-13 22:16:04 -0300 | [diff] [blame] | 730 | role="subsection"><title>AUDIO_CHANNEL_SELECT</title> |
| 731 | <para>DESCRIPTION |
| 732 | </para> |
| 733 | <informaltable><tgroup cols="1"><tbody><row><entry |
| 734 | align="char"> |
| 735 | <para>This ioctl call asks the Audio Device to select the requested channel if possible.</para> |
| 736 | </entry> |
| 737 | </row></tbody></tgroup></informaltable> |
| 738 | <para>SYNOPSIS |
| 739 | </para> |
| 740 | <informaltable><tgroup cols="1"><tbody><row><entry |
| 741 | align="char"> |
| 742 | <para>int ioctl(int fd, int request = |
| 743 | AUDIO_CHANNEL_SELECT, audio_channel_select_t);</para> |
| 744 | </entry> |
| 745 | </row></tbody></tgroup></informaltable> |
| 746 | <para>PARAMETERS |
| 747 | </para> |
| 748 | <informaltable><tgroup cols="2"><tbody><row><entry |
| 749 | align="char"> |
| 750 | <para>int fd</para> |
| 751 | </entry><entry |
| 752 | align="char"> |
| 753 | <para>File descriptor returned by a previous call to open().</para> |
| 754 | </entry> |
| 755 | </row><row><entry |
| 756 | align="char"> |
| 757 | <para>int request</para> |
| 758 | </entry><entry |
| 759 | align="char"> |
| 760 | <para>Equals AUDIO_CHANNEL_SELECT for this |
| 761 | command.</para> |
| 762 | </entry> |
| 763 | </row><row><entry |
| 764 | align="char"> |
| 765 | <para>audio_channel_select_t |
| 766 | ch</para> |
| 767 | </entry><entry |
| 768 | align="char"> |
| 769 | <para>Select the output format of the audio (mono left/right, |
| 770 | stereo).</para> |
| 771 | </entry> |
| 772 | </row></tbody></tgroup></informaltable> |
| Mauro Carvalho Chehab | 3de530f | 2011-07-05 12:36:01 -0300 | [diff] [blame] | 773 | &return-value-dvb; |
| Mauro Carvalho Chehab | 8e080c2 | 2009-09-13 22:16:04 -0300 | [diff] [blame] | 774 | |
| Mauro Carvalho Chehab | 4cde378 | 2011-06-08 10:42:22 -0300 | [diff] [blame] | 775 | </section><section id="AUDIO_GET_STATUS" |
| Mauro Carvalho Chehab | 8e080c2 | 2009-09-13 22:16:04 -0300 | [diff] [blame] | 776 | role="subsection"><title>AUDIO_GET_STATUS</title> |
| 777 | <para>DESCRIPTION |
| 778 | </para> |
| 779 | <informaltable><tgroup cols="1"><tbody><row><entry |
| 780 | align="char"> |
| 781 | <para>This ioctl call asks the Audio Device to return the current state of the Audio |
| 782 | Device.</para> |
| 783 | </entry> |
| 784 | </row></tbody></tgroup></informaltable> |
| 785 | <para>SYNOPSIS |
| 786 | </para> |
| 787 | <informaltable><tgroup cols="1"><tbody><row><entry |
| 788 | align="char"> |
| 789 | <para>int ioctl(int fd, int request = AUDIO_GET_STATUS, |
| 790 | struct audio_status ⋆status);</para> |
| 791 | </entry> |
| 792 | </row></tbody></tgroup></informaltable> |
| 793 | <para>PARAMETERS |
| 794 | </para> |
| 795 | <informaltable><tgroup cols="2"><tbody><row><entry |
| 796 | align="char"> |
| 797 | <para>int fd</para> |
| 798 | </entry><entry |
| 799 | align="char"> |
| 800 | <para>File descriptor returned by a previous call to open().</para> |
| 801 | </entry> |
| 802 | </row><row><entry |
| 803 | align="char"> |
| 804 | <para>int request</para> |
| 805 | </entry><entry |
| 806 | align="char"> |
| 807 | <para>Equals AUDIO_GET_STATUS for this command.</para> |
| 808 | </entry> |
| 809 | </row><row><entry |
| 810 | align="char"> |
| 811 | <para>struct audio_status |
| 812 | *status</para> |
| 813 | </entry><entry |
| 814 | align="char"> |
| 815 | <para>Returns the current state of Audio Device.</para> |
| 816 | </entry> |
| 817 | </row></tbody></tgroup></informaltable> |
| Mauro Carvalho Chehab | 3de530f | 2011-07-05 12:36:01 -0300 | [diff] [blame] | 818 | &return-value-dvb; |
| Mauro Carvalho Chehab | 8e080c2 | 2009-09-13 22:16:04 -0300 | [diff] [blame] | 819 | |
| Mauro Carvalho Chehab | 4cde378 | 2011-06-08 10:42:22 -0300 | [diff] [blame] | 820 | </section><section id="AUDIO_GET_CAPABILITIES" |
| Mauro Carvalho Chehab | 8e080c2 | 2009-09-13 22:16:04 -0300 | [diff] [blame] | 821 | role="subsection"><title>AUDIO_GET_CAPABILITIES</title> |
| 822 | <para>DESCRIPTION |
| 823 | </para> |
| 824 | <informaltable><tgroup cols="1"><tbody><row><entry |
| 825 | align="char"> |
| 826 | <para>This ioctl call asks the Audio Device to tell us about the decoding capabilities |
| 827 | of the audio hardware.</para> |
| 828 | </entry> |
| 829 | </row></tbody></tgroup></informaltable> |
| 830 | <para>SYNOPSIS |
| 831 | </para> |
| 832 | <informaltable><tgroup cols="1"><tbody><row><entry |
| 833 | align="char"> |
| 834 | <para>int ioctl(int fd, int request = |
| 835 | AUDIO_GET_CAPABILITIES, unsigned int ⋆cap);</para> |
| 836 | </entry> |
| 837 | </row></tbody></tgroup></informaltable> |
| 838 | <para>PARAMETERS |
| 839 | </para> |
| 840 | <informaltable><tgroup cols="2"><tbody><row><entry |
| 841 | align="char"> |
| 842 | <para>int fd</para> |
| 843 | </entry><entry |
| 844 | align="char"> |
| 845 | <para>File descriptor returned by a previous call to open().</para> |
| 846 | </entry> |
| 847 | </row><row><entry |
| 848 | align="char"> |
| 849 | <para>int request</para> |
| 850 | </entry><entry |
| 851 | align="char"> |
| 852 | <para>Equals AUDIO_GET_CAPABILITIES for this |
| 853 | command.</para> |
| 854 | </entry> |
| 855 | </row><row><entry |
| 856 | align="char"> |
| 857 | <para>unsigned int *cap</para> |
| 858 | </entry><entry |
| 859 | align="char"> |
| 860 | <para>Returns a bit array of supported sound formats.</para> |
| 861 | </entry> |
| 862 | </row></tbody></tgroup></informaltable> |
| Mauro Carvalho Chehab | 3de530f | 2011-07-05 12:36:01 -0300 | [diff] [blame] | 863 | &return-value-dvb; |
| Mauro Carvalho Chehab | 8e080c2 | 2009-09-13 22:16:04 -0300 | [diff] [blame] | 864 | |
| Mauro Carvalho Chehab | 4cde378 | 2011-06-08 10:42:22 -0300 | [diff] [blame] | 865 | </section><section id="AUDIO_CLEAR_BUFFER" |
| Mauro Carvalho Chehab | 8e080c2 | 2009-09-13 22:16:04 -0300 | [diff] [blame] | 866 | role="subsection"><title>AUDIO_CLEAR_BUFFER</title> |
| 867 | <para>DESCRIPTION |
| 868 | </para> |
| 869 | <informaltable><tgroup cols="1"><tbody><row><entry |
| 870 | align="char"> |
| 871 | <para>This ioctl call asks the Audio Device to clear all software and hardware buffers |
| 872 | of the audio decoder device.</para> |
| 873 | </entry> |
| 874 | </row></tbody></tgroup></informaltable> |
| 875 | <para>SYNOPSIS |
| 876 | </para> |
| 877 | <informaltable><tgroup cols="1"><tbody><row><entry |
| 878 | align="char"> |
| 879 | <para>int ioctl(int fd, int request = AUDIO_CLEAR_BUFFER);</para> |
| 880 | </entry> |
| 881 | </row></tbody></tgroup></informaltable> |
| 882 | <para>PARAMETERS |
| 883 | </para> |
| 884 | <informaltable><tgroup cols="2"><tbody><row><entry |
| 885 | align="char"> |
| 886 | <para>int fd</para> |
| 887 | </entry><entry |
| 888 | align="char"> |
| 889 | <para>File descriptor returned by a previous call to open().</para> |
| 890 | </entry> |
| 891 | </row><row><entry |
| 892 | align="char"> |
| 893 | <para>int request</para> |
| 894 | </entry><entry |
| 895 | align="char"> |
| 896 | <para>Equals AUDIO_CLEAR_BUFFER for this command.</para> |
| 897 | </entry> |
| 898 | </row></tbody></tgroup></informaltable> |
| Mauro Carvalho Chehab | 3de530f | 2011-07-05 12:36:01 -0300 | [diff] [blame] | 899 | &return-value-dvb; |
| Mauro Carvalho Chehab | 8e080c2 | 2009-09-13 22:16:04 -0300 | [diff] [blame] | 900 | |
| Mauro Carvalho Chehab | 4cde378 | 2011-06-08 10:42:22 -0300 | [diff] [blame] | 901 | </section><section id="AUDIO_SET_ID" |
| Mauro Carvalho Chehab | 8e080c2 | 2009-09-13 22:16:04 -0300 | [diff] [blame] | 902 | role="subsection"><title>AUDIO_SET_ID</title> |
| 903 | <para>DESCRIPTION |
| 904 | </para> |
| 905 | <informaltable><tgroup cols="1"><tbody><row><entry |
| 906 | align="char"> |
| 907 | <para>This ioctl selects which sub-stream is to be decoded if a program or system |
| 908 | stream is sent to the video device. If no audio stream type is set the id has to be |
| 909 | in [0xC0,0xDF] for MPEG sound, in [0x80,0x87] for AC3 and in [0xA0,0xA7] |
| 910 | for LPCM. More specifications may follow for other stream types. If the stream |
| 911 | type is set the id just specifies the substream id of the audio stream and only |
| 912 | the first 5 bits are recognized.</para> |
| 913 | </entry> |
| 914 | </row></tbody></tgroup></informaltable> |
| 915 | <para>SYNOPSIS |
| 916 | </para> |
| 917 | <informaltable><tgroup cols="1"><tbody><row><entry |
| 918 | align="char"> |
| 919 | <para>int ioctl(int fd, int request = AUDIO_SET_ID, int |
| 920 | id);</para> |
| 921 | </entry> |
| 922 | </row></tbody></tgroup></informaltable> |
| 923 | <para>PARAMETERS |
| 924 | </para> |
| 925 | <informaltable><tgroup cols="2"><tbody><row><entry |
| 926 | align="char"> |
| 927 | <para>int fd</para> |
| 928 | </entry><entry |
| 929 | align="char"> |
| 930 | <para>File descriptor returned by a previous call to open().</para> |
| 931 | </entry> |
| 932 | </row><row><entry |
| 933 | align="char"> |
| 934 | <para>int request</para> |
| 935 | </entry><entry |
| 936 | align="char"> |
| 937 | <para>Equals AUDIO_SET_ID for this command.</para> |
| 938 | </entry> |
| 939 | </row><row><entry |
| 940 | align="char"> |
| 941 | <para>int id</para> |
| 942 | </entry><entry |
| 943 | align="char"> |
| 944 | <para>audio sub-stream id</para> |
| 945 | </entry> |
| 946 | </row></tbody></tgroup></informaltable> |
| Mauro Carvalho Chehab | 3de530f | 2011-07-05 12:36:01 -0300 | [diff] [blame] | 947 | &return-value-dvb; |
| Mauro Carvalho Chehab | 8e080c2 | 2009-09-13 22:16:04 -0300 | [diff] [blame] | 948 | |
| Mauro Carvalho Chehab | 4cde378 | 2011-06-08 10:42:22 -0300 | [diff] [blame] | 949 | </section><section id="AUDIO_SET_MIXER" |
| Mauro Carvalho Chehab | 8e080c2 | 2009-09-13 22:16:04 -0300 | [diff] [blame] | 950 | role="subsection"><title>AUDIO_SET_MIXER</title> |
| 951 | <para>DESCRIPTION |
| 952 | </para> |
| 953 | <informaltable><tgroup cols="1"><tbody><row><entry |
| 954 | align="char"> |
| 955 | <para>This ioctl lets you adjust the mixer settings of the audio decoder.</para> |
| 956 | </entry> |
| 957 | </row></tbody></tgroup></informaltable> |
| 958 | <para>SYNOPSIS |
| 959 | </para> |
| 960 | <informaltable><tgroup cols="1"><tbody><row><entry |
| 961 | align="char"> |
| 962 | <para>int ioctl(int fd, int request = AUDIO_SET_MIXER, |
| 963 | audio_mixer_t ⋆mix);</para> |
| 964 | </entry> |
| 965 | </row></tbody></tgroup></informaltable> |
| 966 | <para>PARAMETERS |
| 967 | </para> |
| 968 | <informaltable><tgroup cols="2"><tbody><row><entry |
| 969 | align="char"> |
| 970 | <para>int fd</para> |
| 971 | </entry><entry |
| 972 | align="char"> |
| 973 | <para>File descriptor returned by a previous call to open().</para> |
| 974 | </entry> |
| 975 | </row><row><entry |
| 976 | align="char"> |
| 977 | <para>int request</para> |
| 978 | </entry><entry |
| 979 | align="char"> |
| 980 | <para>Equals AUDIO_SET_ID for this command.</para> |
| 981 | </entry> |
| 982 | </row><row><entry |
| 983 | align="char"> |
| 984 | <para>audio_mixer_t *mix</para> |
| 985 | </entry><entry |
| 986 | align="char"> |
| 987 | <para>mixer settings.</para> |
| 988 | </entry> |
| 989 | </row></tbody></tgroup></informaltable> |
| Mauro Carvalho Chehab | 3de530f | 2011-07-05 12:36:01 -0300 | [diff] [blame] | 990 | &return-value-dvb; |
| Mauro Carvalho Chehab | 8e080c2 | 2009-09-13 22:16:04 -0300 | [diff] [blame] | 991 | |
| Mauro Carvalho Chehab | 4cde378 | 2011-06-08 10:42:22 -0300 | [diff] [blame] | 992 | </section><section id="AUDIO_SET_STREAMTYPE" |
| Mauro Carvalho Chehab | 8e080c2 | 2009-09-13 22:16:04 -0300 | [diff] [blame] | 993 | role="subsection"><title>AUDIO_SET_STREAMTYPE</title> |
| 994 | <para>DESCRIPTION |
| 995 | </para> |
| 996 | <informaltable><tgroup cols="1"><tbody><row><entry |
| 997 | align="char"> |
| 998 | <para>This ioctl tells the driver which kind of audio stream to expect. This is useful |
| 999 | if the stream offers several audio sub-streams like LPCM and AC3.</para> |
| 1000 | </entry> |
| 1001 | </row></tbody></tgroup></informaltable> |
| 1002 | <para>SYNOPSIS |
| 1003 | </para> |
| 1004 | <informaltable><tgroup cols="1"><tbody><row><entry |
| 1005 | align="char"> |
| 1006 | <para>int ioctl(fd, int request = AUDIO_SET_STREAMTYPE, |
| 1007 | int type);</para> |
| 1008 | </entry> |
| 1009 | </row></tbody></tgroup></informaltable> |
| 1010 | <para>PARAMETERS |
| 1011 | </para> |
| 1012 | <informaltable><tgroup cols="2"><tbody><row><entry |
| 1013 | align="char"> |
| 1014 | <para>int fd</para> |
| 1015 | </entry><entry |
| 1016 | align="char"> |
| 1017 | <para>File descriptor returned by a previous call to open().</para> |
| 1018 | </entry> |
| 1019 | </row><row><entry |
| 1020 | align="char"> |
| 1021 | <para>int request</para> |
| 1022 | </entry><entry |
| 1023 | align="char"> |
| 1024 | <para>Equals AUDIO_SET_STREAMTYPE for this |
| 1025 | command.</para> |
| 1026 | </entry> |
| 1027 | </row><row><entry |
| 1028 | align="char"> |
| 1029 | <para>int type</para> |
| 1030 | </entry><entry |
| 1031 | align="char"> |
| 1032 | <para>stream type</para> |
| 1033 | </entry> |
| 1034 | </row></tbody></tgroup></informaltable> |
| Mauro Carvalho Chehab | 3de530f | 2011-07-05 12:36:01 -0300 | [diff] [blame] | 1035 | &return-value-dvb; |
| Mauro Carvalho Chehab | 8e080c2 | 2009-09-13 22:16:04 -0300 | [diff] [blame] | 1036 | <informaltable><tgroup cols="2"><tbody><row><entry |
| 1037 | align="char"> |
| Mauro Carvalho Chehab | 8e080c2 | 2009-09-13 22:16:04 -0300 | [diff] [blame] | 1038 | <para>EINVAL</para> |
| 1039 | </entry><entry |
| 1040 | align="char"> |
| 1041 | <para>type is not a valid or supported stream type.</para> |
| 1042 | </entry> |
| 1043 | </row></tbody></tgroup></informaltable> |
| 1044 | |
| Mauro Carvalho Chehab | 4cde378 | 2011-06-08 10:42:22 -0300 | [diff] [blame] | 1045 | </section><section id="AUDIO_SET_EXT_ID" |
| Mauro Carvalho Chehab | 8e080c2 | 2009-09-13 22:16:04 -0300 | [diff] [blame] | 1046 | role="subsection"><title>AUDIO_SET_EXT_ID</title> |
| 1047 | <para>DESCRIPTION |
| 1048 | </para> |
| 1049 | <informaltable><tgroup cols="1"><tbody><row><entry |
| 1050 | align="char"> |
| 1051 | <para>This ioctl can be used to set the extension id for MPEG streams in DVD |
| 1052 | playback. Only the first 3 bits are recognized.</para> |
| 1053 | </entry> |
| 1054 | </row></tbody></tgroup></informaltable> |
| 1055 | <para>SYNOPSIS |
| 1056 | </para> |
| 1057 | <informaltable><tgroup cols="1"><tbody><row><entry |
| 1058 | align="char"> |
| 1059 | <para>int ioctl(fd, int request = AUDIO_SET_EXT_ID, int |
| 1060 | id);</para> |
| 1061 | </entry> |
| 1062 | </row></tbody></tgroup></informaltable> |
| 1063 | <para>PARAMETERS |
| 1064 | </para> |
| 1065 | <informaltable><tgroup cols="2"><tbody><row><entry |
| 1066 | align="char"> |
| 1067 | <para>int fd</para> |
| 1068 | </entry><entry |
| 1069 | align="char"> |
| 1070 | <para>File descriptor returned by a previous call to open().</para> |
| 1071 | </entry> |
| 1072 | </row><row><entry |
| 1073 | align="char"> |
| 1074 | <para>int request</para> |
| 1075 | </entry><entry |
| 1076 | align="char"> |
| 1077 | <para>Equals AUDIO_SET_EXT_ID for this command.</para> |
| 1078 | </entry> |
| 1079 | </row><row><entry |
| 1080 | align="char"> |
| 1081 | <para>int id</para> |
| 1082 | </entry><entry |
| 1083 | align="char"> |
| 1084 | <para>audio sub_stream_id</para> |
| 1085 | </entry> |
| 1086 | </row></tbody></tgroup></informaltable> |
| Mauro Carvalho Chehab | 3de530f | 2011-07-05 12:36:01 -0300 | [diff] [blame] | 1087 | &return-value-dvb; |
| Mauro Carvalho Chehab | 8e080c2 | 2009-09-13 22:16:04 -0300 | [diff] [blame] | 1088 | <informaltable><tgroup cols="2"><tbody><row><entry |
| 1089 | align="char"> |
| Mauro Carvalho Chehab | 8e080c2 | 2009-09-13 22:16:04 -0300 | [diff] [blame] | 1090 | <para>EINVAL</para> |
| 1091 | </entry><entry |
| 1092 | align="char"> |
| 1093 | <para>id is not a valid id.</para> |
| 1094 | </entry> |
| 1095 | </row></tbody></tgroup></informaltable> |
| 1096 | |
| Mauro Carvalho Chehab | 4cde378 | 2011-06-08 10:42:22 -0300 | [diff] [blame] | 1097 | </section><section id="AUDIO_SET_ATTRIBUTES" |
| Mauro Carvalho Chehab | 8e080c2 | 2009-09-13 22:16:04 -0300 | [diff] [blame] | 1098 | role="subsection"><title>AUDIO_SET_ATTRIBUTES</title> |
| 1099 | <para>DESCRIPTION |
| 1100 | </para> |
| 1101 | <informaltable><tgroup cols="1"><tbody><row><entry |
| 1102 | align="char"> |
| 1103 | <para>This ioctl is intended for DVD playback and allows you to set certain |
| 1104 | information about the audio stream.</para> |
| 1105 | </entry> |
| 1106 | </row></tbody></tgroup></informaltable> |
| 1107 | <para>SYNOPSIS |
| 1108 | </para> |
| 1109 | <informaltable><tgroup cols="1"><tbody><row><entry |
| 1110 | align="char"> |
| 1111 | <para>int ioctl(fd, int request = AUDIO_SET_ATTRIBUTES, |
| 1112 | audio_attributes_t attr );</para> |
| 1113 | </entry> |
| 1114 | </row></tbody></tgroup></informaltable> |
| 1115 | <para>PARAMETERS |
| 1116 | </para> |
| 1117 | <informaltable><tgroup cols="2"><tbody><row><entry |
| 1118 | align="char"> |
| 1119 | <para>int fd</para> |
| 1120 | </entry><entry |
| 1121 | align="char"> |
| 1122 | <para>File descriptor returned by a previous call to open().</para> |
| 1123 | </entry> |
| 1124 | </row><row><entry |
| 1125 | align="char"> |
| 1126 | <para>int request</para> |
| 1127 | </entry><entry |
| 1128 | align="char"> |
| 1129 | <para>Equals AUDIO_SET_ATTRIBUTES for this command.</para> |
| 1130 | </entry> |
| 1131 | </row><row><entry |
| 1132 | align="char"> |
| 1133 | <para>audio_attributes_t |
| 1134 | attr</para> |
| 1135 | </entry><entry |
| 1136 | align="char"> |
| 1137 | <para>audio attributes according to section ??</para> |
| 1138 | </entry> |
| 1139 | </row></tbody></tgroup></informaltable> |
| Mauro Carvalho Chehab | 3de530f | 2011-07-05 12:36:01 -0300 | [diff] [blame] | 1140 | &return-value-dvb; |
| Mauro Carvalho Chehab | 8e080c2 | 2009-09-13 22:16:04 -0300 | [diff] [blame] | 1141 | <informaltable><tgroup cols="2"><tbody><row><entry |
| 1142 | align="char"> |
| Mauro Carvalho Chehab | 8e080c2 | 2009-09-13 22:16:04 -0300 | [diff] [blame] | 1143 | <para>EINVAL</para> |
| 1144 | </entry><entry |
| 1145 | align="char"> |
| 1146 | <para>attr is not a valid or supported attribute setting.</para> |
| 1147 | </entry> |
| 1148 | </row></tbody></tgroup></informaltable> |
| 1149 | |
| Mauro Carvalho Chehab | 4cde378 | 2011-06-08 10:42:22 -0300 | [diff] [blame] | 1150 | </section><section id="AUDIO_SET_KARAOKE" |
| Mauro Carvalho Chehab | 8e080c2 | 2009-09-13 22:16:04 -0300 | [diff] [blame] | 1151 | role="subsection"><title>AUDIO_SET_KARAOKE</title> |
| 1152 | <para>DESCRIPTION |
| 1153 | </para> |
| 1154 | <informaltable><tgroup cols="1"><tbody><row><entry |
| 1155 | align="char"> |
| 1156 | <para>This ioctl allows one to set the mixer settings for a karaoke DVD.</para> |
| 1157 | </entry> |
| 1158 | </row></tbody></tgroup></informaltable> |
| 1159 | <para>SYNOPSIS |
| 1160 | </para> |
| 1161 | <informaltable><tgroup cols="1"><tbody><row><entry |
| 1162 | align="char"> |
| Mauro Carvalho Chehab | 4cde378 | 2011-06-08 10:42:22 -0300 | [diff] [blame] | 1163 | <para>int ioctl(fd, int request = AUDIO_SET_KARAOKE, |
| Mauro Carvalho Chehab | 8e080c2 | 2009-09-13 22:16:04 -0300 | [diff] [blame] | 1164 | audio_karaoke_t ⋆karaoke);</para> |
| 1165 | </entry> |
| 1166 | </row></tbody></tgroup></informaltable> |
| 1167 | <para>PARAMETERS |
| 1168 | </para> |
| 1169 | <informaltable><tgroup cols="2"><tbody><row><entry |
| 1170 | align="char"> |
| 1171 | <para>int fd</para> |
| 1172 | </entry><entry |
| 1173 | align="char"> |
| 1174 | <para>File descriptor returned by a previous call to open().</para> |
| 1175 | </entry> |
| 1176 | </row><row><entry |
| 1177 | align="char"> |
| 1178 | <para>int request</para> |
| 1179 | </entry><entry |
| 1180 | align="char"> |
| Mauro Carvalho Chehab | 4cde378 | 2011-06-08 10:42:22 -0300 | [diff] [blame] | 1181 | <para>Equals AUDIO_SET_KARAOKE for this |
| Mauro Carvalho Chehab | 8e080c2 | 2009-09-13 22:16:04 -0300 | [diff] [blame] | 1182 | command.</para> |
| 1183 | </entry> |
| 1184 | </row><row><entry |
| 1185 | align="char"> |
| 1186 | <para>audio_karaoke_t |
| 1187 | *karaoke</para> |
| 1188 | </entry><entry |
| 1189 | align="char"> |
| 1190 | <para>karaoke settings according to section ??.</para> |
| 1191 | </entry> |
| 1192 | </row></tbody></tgroup></informaltable> |
| Mauro Carvalho Chehab | 3de530f | 2011-07-05 12:36:01 -0300 | [diff] [blame] | 1193 | &return-value-dvb; |
| Mauro Carvalho Chehab | 8e080c2 | 2009-09-13 22:16:04 -0300 | [diff] [blame] | 1194 | <informaltable><tgroup cols="2"><tbody><row><entry |
| 1195 | align="char"> |
| Mauro Carvalho Chehab | 8e080c2 | 2009-09-13 22:16:04 -0300 | [diff] [blame] | 1196 | <para>EINVAL</para> |
| 1197 | </entry><entry |
| 1198 | align="char"> |
| 1199 | <para>karaoke is not a valid or supported karaoke setting.</para> |
| 1200 | </entry> |
| 1201 | </row></tbody></tgroup></informaltable> |
| 1202 | </section> |
| 1203 | </section> |