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
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.
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
17 <section id="audio-stream-source-t">
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.
27 } audio_stream_source_t;
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
36 <section id="audio-play-state-t">
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.
50 <section id="audio-channel-select-t">
51 <title>audio_channel_select_t</title>
52 <para>The audio channel selected via AUDIO_CHANNEL_SELECT is determined by the
62 } audio_channel_select_t;
66 <section id="audio-status">
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.
72 typedef struct audio_status {
73 boolean AV_sync_state;
75 audio_play_state_t play_state;
76 audio_stream_source_t stream_source;
77 audio_channel_select_t channel_select;
79 audio_mixer_t mixer_state;
84 <section id="audio-mixer">
85 <title>struct audio_mixer</title>
86 <para>The following structure is used by the AUDIO_SET_MIXER call to set the audio
90 typedef struct audio_mixer {
91 unsigned int volume_left;
92 unsigned int volume_right;
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.
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
115 <section id="audio-karaoke">
116 <title>struct audio_karaoke</title>
117 <para>The ioctl AUDIO_SET_KARAOKE uses the following format:
121 struct audio_karaoke {
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
134 <section id="audio-attributes-t">
135 <title>audio attributes</title>
136 <para>The following attributes can be set by a call to AUDIO_SET_ATTRIBUTES:
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) ⋆/
150 <section id="audio_function_calls">
151 <title>Audio Function Calls</title>
154 <section id="audio_fopen">
155 <title>open()</title>
158 <informaltable><tgroup cols="1"><tbody><row><entry
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>
173 </row></tbody></tgroup></informaltable>
176 <informaltable><tgroup cols="1"><tbody><row><entry
178 <para>int open(const char ⋆deviceName, int flags);</para>
180 </row></tbody></tgroup></informaltable>
183 <informaltable><tgroup cols="2"><tbody><row><entry
189 <para>Name of specific audio device.</para>
193 <para>int flags</para>
196 <para>A bit-wise OR of the following flags:</para>
202 <para>O_RDONLY read-only access</para>
208 <para>O_RDWR read/write access</para>
214 <para>O_NONBLOCK open in non-blocking mode</para>
220 <para>(blocking mode is the default)</para>
222 </row></tbody></tgroup></informaltable>
225 <informaltable><tgroup cols="2"><tbody><row><entry
230 <para>Device driver not loaded/available.</para>
234 <para>EINTERNAL</para>
237 <para>Internal error.</para>
244 <para>Device or resource busy.</para>
251 <para>Invalid argument.</para>
253 </row></tbody></tgroup></informaltable>
256 <section id="audio_fclose">
257 <title>close()</title>
260 <informaltable><tgroup cols="1"><tbody><row><entry
262 <para>This system call closes a previously opened audio device.</para>
264 </row></tbody></tgroup></informaltable>
267 <informaltable><tgroup cols="1"><tbody><row><entry
269 <para>int close(int fd);</para>
271 </row></tbody></tgroup></informaltable>
274 <informaltable><tgroup cols="2"><tbody><row><entry
279 <para>File descriptor returned by a previous call to open().</para>
281 </row></tbody></tgroup></informaltable>
284 <informaltable><tgroup cols="2"><tbody><row><entry
289 <para>fd is not a valid open file descriptor.</para>
291 </row></tbody></tgroup></informaltable>
294 <section id="audio_fwrite">
295 <title>write()</title>
298 <informaltable><tgroup cols="1"><tbody><row><entry
300 <para>This system call can only be used if AUDIO_SOURCE_MEMORY is selected
301 in the ioctl call AUDIO_SELECT_SOURCE. The data provided shall be in
302 PES format. If O_NONBLOCK is not specified the function will block until
303 buffer space is available. The amount of data to be transferred is implied by
306 </row></tbody></tgroup></informaltable>
309 <informaltable><tgroup cols="1"><tbody><row><entry
311 <para>size_t write(int fd, const void ⋆buf, size_t count);</para>
313 </row></tbody></tgroup></informaltable>
316 <informaltable><tgroup cols="2"><tbody><row><entry
321 <para>File descriptor returned by a previous call to open().</para>
325 <para>void *buf</para>
328 <para>Pointer to the buffer containing the PES data.</para>
332 <para>size_t count</para>
335 <para>Size of buf.</para>
337 </row></tbody></tgroup></informaltable>
340 <informaltable><tgroup cols="2"><tbody><row><entry
345 <para>Mode AUDIO_SOURCE_MEMORY not selected.</para>
352 <para>Attempted to write more data than the internal buffer can
360 <para>fd is not a valid open file descriptor.</para>
362 </row></tbody></tgroup></informaltable>
364 </section><section id="AUDIO_STOP"
365 role="subsection"><title>AUDIO_STOP</title>
368 <informaltable><tgroup cols="1"><tbody><row><entry
370 <para>This ioctl call asks the Audio Device to stop playing the current stream.</para>
372 </row></tbody></tgroup></informaltable>
375 <informaltable><tgroup cols="1"><tbody><row><entry
377 <para>int ioctl(int fd, int request = AUDIO_STOP);</para>
379 </row></tbody></tgroup></informaltable>
382 <informaltable><tgroup cols="2"><tbody><row><entry
387 <para>File descriptor returned by a previous call to open().</para>
391 <para>int request</para>
394 <para>Equals AUDIO_STOP for this command.</para>
396 </row></tbody></tgroup></informaltable>
399 <informaltable><tgroup cols="2"><tbody><row><entry
404 <para>fd is not a valid open file descriptor</para>
408 <para>EINTERNAL</para>
411 <para>Internal error.</para>
413 </row></tbody></tgroup></informaltable>
415 </section><section id="AUDIO_PLAY"
416 role="subsection"><title>AUDIO_PLAY</title>
419 <informaltable><tgroup cols="1"><tbody><row><entry
421 <para>This ioctl call asks the Audio Device to start playing an audio stream from the
422 selected source.</para>
424 </row></tbody></tgroup></informaltable>
427 <informaltable><tgroup cols="1"><tbody><row><entry
429 <para>int ioctl(int fd, int request = AUDIO_PLAY);</para>
431 </row></tbody></tgroup></informaltable>
434 <informaltable><tgroup cols="2"><tbody><row><entry
439 <para>File descriptor returned by a previous call to open().</para>
443 <para>int request</para>
446 <para>Equals AUDIO_PLAY for this command.</para>
448 </row></tbody></tgroup></informaltable>
451 <informaltable><tgroup cols="2"><tbody><row><entry
456 <para>fd is not a valid open file descriptor</para>
460 <para>EINTERNAL</para>
463 <para>Internal error.</para>
465 </row></tbody></tgroup></informaltable>
467 </section><section id="AUDIO_PAUSE"
468 role="subsection"><title>AUDIO_PAUSE</title>
471 <informaltable><tgroup cols="1"><tbody><row><entry
473 <para>This ioctl call suspends the audio stream being played. Decoding and playing
474 are paused. It is then possible to restart again decoding and playing process of
475 the audio stream using AUDIO_CONTINUE command.</para>
479 <para>If AUDIO_SOURCE_MEMORY is selected in the ioctl call
480 AUDIO_SELECT_SOURCE, the DVB-subsystem will not decode (consume)
481 any more data until the ioctl call AUDIO_CONTINUE or AUDIO_PLAY is
484 </row></tbody></tgroup></informaltable>
487 <informaltable><tgroup cols="1"><tbody><row><entry
489 <para>int ioctl(int fd, int request = AUDIO_PAUSE);</para>
491 </row></tbody></tgroup></informaltable>
494 <informaltable><tgroup cols="2"><tbody><row><entry
499 <para>File descriptor returned by a previous call to open().</para>
503 <para>int request</para>
506 <para>Equals AUDIO_PAUSE for this command.</para>
508 </row></tbody></tgroup></informaltable>
511 <informaltable><tgroup cols="2"><tbody><row><entry
516 <para>fd is not a valid open file descriptor.</para>
520 <para>EINTERNAL</para>
523 <para>Internal error.</para>
525 </row></tbody></tgroup></informaltable>
528 </section><section id="AUDIO_CONTINUE"
529 role="subsection"><title>AUDIO_CONTINUE</title>
532 <informaltable><tgroup cols="1"><tbody><row><entry
534 <para>This ioctl restarts the decoding and playing process previously paused
535 with AUDIO_PAUSE command.</para>
539 <para>It only works if the stream were previously stopped with AUDIO_PAUSE</para>
541 </row></tbody></tgroup></informaltable>
544 <informaltable><tgroup cols="1"><tbody><row><entry
546 <para>int ioctl(int fd, int request = AUDIO_CONTINUE);</para>
548 </row></tbody></tgroup></informaltable>
551 <informaltable><tgroup cols="2"><tbody><row><entry
556 <para>File descriptor returned by a previous call to open().</para>
560 <para>int request</para>
563 <para>Equals AUDIO_CONTINUE for this command.</para>
565 </row></tbody></tgroup></informaltable>
568 <informaltable><tgroup cols="2"><tbody><row><entry
573 <para>fd is not a valid open file descriptor.</para>
577 <para>EINTERNAL</para>
580 <para>Internal error.</para>
582 </row></tbody></tgroup></informaltable>
584 </section><section id="AUDIO_SELECT_SOURCE"
585 role="subsection"><title>AUDIO_SELECT_SOURCE</title>
588 <informaltable><tgroup cols="1"><tbody><row><entry
590 <para>This ioctl call informs the audio device which source shall be used
591 for the input data. The possible sources are demux or memory. If
592 AUDIO_SOURCE_MEMORY is selected, the data is fed to the Audio Device
593 through the write command.</para>
595 </row></tbody></tgroup></informaltable>
598 <informaltable><tgroup cols="1"><tbody><row><entry
600 <para>int ioctl(int fd, int request = AUDIO_SELECT_SOURCE,
601 audio_stream_source_t source);</para>
603 </row></tbody></tgroup></informaltable>
606 <informaltable><tgroup cols="2"><tbody><row><entry
611 <para>File descriptor returned by a previous call to open().</para>
615 <para>int request</para>
618 <para>Equals AUDIO_SELECT_SOURCE for this command.</para>
622 <para>audio_stream_source_t
626 <para>Indicates the source that shall be used for the Audio
629 </row></tbody></tgroup></informaltable>
632 <informaltable><tgroup cols="2"><tbody><row><entry
637 <para>fd is not a valid open file descriptor.</para>
641 <para>EINTERNAL</para>
644 <para>Internal error.</para>
651 <para>Illegal input parameter.</para>
653 </row></tbody></tgroup></informaltable>
655 </section><section id="AUDIO_SET_MUTE"
656 role="subsection"><title>AUDIO_SET_MUTE</title>
659 <informaltable><tgroup cols="1"><tbody><row><entry
661 <para>This ioctl call asks the audio device to mute the stream that is currently being
664 </row></tbody></tgroup></informaltable>
667 <informaltable><tgroup cols="1"><tbody><row><entry
669 <para>int ioctl(int fd, int request = AUDIO_SET_MUTE,
670 boolean state);</para>
672 </row></tbody></tgroup></informaltable>
675 <informaltable><tgroup cols="2"><tbody><row><entry
680 <para>File descriptor returned by a previous call to open().</para>
684 <para>int request</para>
687 <para>Equals AUDIO_SET_MUTE for this command.</para>
691 <para>boolean state</para>
694 <para>Indicates if audio device shall mute or not.</para>
700 <para>TRUE Audio Mute</para>
706 <para>FALSE Audio Un-mute</para>
708 </row></tbody></tgroup></informaltable>
711 <informaltable><tgroup cols="2"><tbody><row><entry
716 <para>fd is not a valid open file descriptor.</para>
720 <para>EINTERNAL</para>
723 <para>Internal error.</para>
730 <para>Illegal input parameter.</para>
732 </row></tbody></tgroup></informaltable>
734 </section><section id="AUDIO_SET_AV_SYNC"
735 role="subsection"><title>AUDIO_SET_AV_SYNC</title>
738 <informaltable><tgroup cols="1"><tbody><row><entry
740 <para>This ioctl call asks the Audio Device to turn ON or OFF A/V synchronization.</para>
742 </row></tbody></tgroup></informaltable>
745 <informaltable><tgroup cols="1"><tbody><row><entry
747 <para>int ioctl(int fd, int request = AUDIO_SET_AV_SYNC,
748 boolean state);</para>
750 </row></tbody></tgroup></informaltable>
753 <informaltable><tgroup cols="2"><tbody><row><entry
758 <para>File descriptor returned by a previous call to open().</para>
762 <para>int request</para>
765 <para>Equals AUDIO_AV_SYNC for this command.</para>
769 <para>boolean state</para>
772 <para>Tells the DVB subsystem if A/V synchronization shall be
779 <para>TRUE AV-sync ON</para>
785 <para>FALSE AV-sync OFF</para>
787 </row></tbody></tgroup></informaltable>
790 <informaltable><tgroup cols="2"><tbody><row><entry
795 <para>fd is not a valid open file descriptor.</para>
799 <para>EINTERNAL</para>
802 <para>Internal error.</para>
809 <para>Illegal input parameter.</para>
811 </row></tbody></tgroup></informaltable>
813 </section><section id="AUDIO_SET_BYPASS_MODE"
814 role="subsection"><title>AUDIO_SET_BYPASS_MODE</title>
817 <informaltable><tgroup cols="1"><tbody><row><entry
819 <para>This ioctl call asks the Audio Device to bypass the Audio decoder and forward
820 the stream without decoding. This mode shall be used if streams that can’t be
821 handled by the DVB system shall be decoded. Dolby DigitalTM streams are
822 automatically forwarded by the DVB subsystem if the hardware can handle it.</para>
824 </row></tbody></tgroup></informaltable>
827 <informaltable><tgroup cols="1"><tbody><row><entry
829 <para>int ioctl(int fd, int request =
830 AUDIO_SET_BYPASS_MODE, boolean mode);</para>
832 </row></tbody></tgroup></informaltable>
835 <informaltable><tgroup cols="2"><tbody><row><entry
840 <para>File descriptor returned by a previous call to open().</para>
844 <para>int request</para>
847 <para>Equals AUDIO_SET_BYPASS_MODE for this
852 <para>boolean mode</para>
855 <para>Enables or disables the decoding of the current Audio
856 stream in the DVB subsystem.</para>
862 <para>TRUE Bypass is disabled</para>
868 <para>FALSE Bypass is enabled</para>
870 </row></tbody></tgroup></informaltable>
873 <informaltable><tgroup cols="2"><tbody><row><entry
878 <para>fd is not a valid open file descriptor.</para>
882 <para>EINTERNAL</para>
885 <para>Internal error.</para>
892 <para>Illegal input parameter.</para>
894 </row></tbody></tgroup></informaltable>
896 </section><section id="AUDIO_CHANNEL_SELECT"
897 role="subsection"><title>AUDIO_CHANNEL_SELECT</title>
900 <informaltable><tgroup cols="1"><tbody><row><entry
902 <para>This ioctl call asks the Audio Device to select the requested channel if possible.</para>
904 </row></tbody></tgroup></informaltable>
907 <informaltable><tgroup cols="1"><tbody><row><entry
909 <para>int ioctl(int fd, int request =
910 AUDIO_CHANNEL_SELECT, audio_channel_select_t);</para>
912 </row></tbody></tgroup></informaltable>
915 <informaltable><tgroup cols="2"><tbody><row><entry
920 <para>File descriptor returned by a previous call to open().</para>
924 <para>int request</para>
927 <para>Equals AUDIO_CHANNEL_SELECT for this
932 <para>audio_channel_select_t
936 <para>Select the output format of the audio (mono left/right,
939 </row></tbody></tgroup></informaltable>
942 <informaltable><tgroup cols="2"><tbody><row><entry
947 <para>fd is not a valid open file descriptor.</para>
951 <para>EINTERNAL</para>
954 <para>Internal error.</para>
961 <para>Illegal input parameter ch.</para>
963 </row></tbody></tgroup></informaltable>
965 </section><section id="AUDIO_GET_STATUS"
966 role="subsection"><title>AUDIO_GET_STATUS</title>
969 <informaltable><tgroup cols="1"><tbody><row><entry
971 <para>This ioctl call asks the Audio Device to return the current state of the Audio
974 </row></tbody></tgroup></informaltable>
977 <informaltable><tgroup cols="1"><tbody><row><entry
979 <para>int ioctl(int fd, int request = AUDIO_GET_STATUS,
980 struct audio_status ⋆status);</para>
982 </row></tbody></tgroup></informaltable>
985 <informaltable><tgroup cols="2"><tbody><row><entry
990 <para>File descriptor returned by a previous call to open().</para>
994 <para>int request</para>
997 <para>Equals AUDIO_GET_STATUS for this command.</para>
1001 <para>struct audio_status
1005 <para>Returns the current state of Audio Device.</para>
1007 </row></tbody></tgroup></informaltable>
1010 <informaltable><tgroup cols="2"><tbody><row><entry
1015 <para>fd is not a valid open file descriptor.</para>
1019 <para>EINTERNAL</para>
1022 <para>Internal error.</para>
1029 <para>status points to invalid address.</para>
1031 </row></tbody></tgroup></informaltable>
1033 </section><section id="AUDIO_GET_CAPABILITIES"
1034 role="subsection"><title>AUDIO_GET_CAPABILITIES</title>
1037 <informaltable><tgroup cols="1"><tbody><row><entry
1039 <para>This ioctl call asks the Audio Device to tell us about the decoding capabilities
1040 of the audio hardware.</para>
1042 </row></tbody></tgroup></informaltable>
1045 <informaltable><tgroup cols="1"><tbody><row><entry
1047 <para>int ioctl(int fd, int request =
1048 AUDIO_GET_CAPABILITIES, unsigned int ⋆cap);</para>
1050 </row></tbody></tgroup></informaltable>
1053 <informaltable><tgroup cols="2"><tbody><row><entry
1058 <para>File descriptor returned by a previous call to open().</para>
1062 <para>int request</para>
1065 <para>Equals AUDIO_GET_CAPABILITIES for this
1070 <para>unsigned int *cap</para>
1073 <para>Returns a bit array of supported sound formats.</para>
1075 </row></tbody></tgroup></informaltable>
1078 <informaltable><tgroup cols="2"><tbody><row><entry
1083 <para>fd is not a valid open file descriptor.</para>
1087 <para>EINTERNAL</para>
1090 <para>Internal error.</para>
1097 <para>cap points to an invalid address.</para>
1099 </row></tbody></tgroup></informaltable>
1101 </section><section id="AUDIO_CLEAR_BUFFER"
1102 role="subsection"><title>AUDIO_CLEAR_BUFFER</title>
1105 <informaltable><tgroup cols="1"><tbody><row><entry
1107 <para>This ioctl call asks the Audio Device to clear all software and hardware buffers
1108 of the audio decoder device.</para>
1110 </row></tbody></tgroup></informaltable>
1113 <informaltable><tgroup cols="1"><tbody><row><entry
1115 <para>int ioctl(int fd, int request = AUDIO_CLEAR_BUFFER);</para>
1117 </row></tbody></tgroup></informaltable>
1120 <informaltable><tgroup cols="2"><tbody><row><entry
1125 <para>File descriptor returned by a previous call to open().</para>
1129 <para>int request</para>
1132 <para>Equals AUDIO_CLEAR_BUFFER for this command.</para>
1134 </row></tbody></tgroup></informaltable>
1137 <informaltable><tgroup cols="2"><tbody><row><entry
1142 <para>fd is not a valid open file descriptor.</para>
1146 <para>EINTERNAL</para>
1149 <para>Internal error.</para>
1151 </row></tbody></tgroup></informaltable>
1153 </section><section id="AUDIO_SET_ID"
1154 role="subsection"><title>AUDIO_SET_ID</title>
1157 <informaltable><tgroup cols="1"><tbody><row><entry
1159 <para>This ioctl selects which sub-stream is to be decoded if a program or system
1160 stream is sent to the video device. If no audio stream type is set the id has to be
1161 in [0xC0,0xDF] for MPEG sound, in [0x80,0x87] for AC3 and in [0xA0,0xA7]
1162 for LPCM. More specifications may follow for other stream types. If the stream
1163 type is set the id just specifies the substream id of the audio stream and only
1164 the first 5 bits are recognized.</para>
1166 </row></tbody></tgroup></informaltable>
1169 <informaltable><tgroup cols="1"><tbody><row><entry
1171 <para>int ioctl(int fd, int request = AUDIO_SET_ID, int
1174 </row></tbody></tgroup></informaltable>
1177 <informaltable><tgroup cols="2"><tbody><row><entry
1182 <para>File descriptor returned by a previous call to open().</para>
1186 <para>int request</para>
1189 <para>Equals AUDIO_SET_ID for this command.</para>
1196 <para>audio sub-stream id</para>
1198 </row></tbody></tgroup></informaltable>
1201 <informaltable><tgroup cols="2"><tbody><row><entry
1206 <para>fd is not a valid open file descriptor.</para>
1210 <para>EINTERNAL</para>
1213 <para>Internal error.</para>
1220 <para>Invalid sub-stream id.</para>
1222 </row></tbody></tgroup></informaltable>
1224 </section><section id="AUDIO_SET_MIXER"
1225 role="subsection"><title>AUDIO_SET_MIXER</title>
1228 <informaltable><tgroup cols="1"><tbody><row><entry
1230 <para>This ioctl lets you adjust the mixer settings of the audio decoder.</para>
1232 </row></tbody></tgroup></informaltable>
1235 <informaltable><tgroup cols="1"><tbody><row><entry
1237 <para>int ioctl(int fd, int request = AUDIO_SET_MIXER,
1238 audio_mixer_t ⋆mix);</para>
1240 </row></tbody></tgroup></informaltable>
1243 <informaltable><tgroup cols="2"><tbody><row><entry
1248 <para>File descriptor returned by a previous call to open().</para>
1252 <para>int request</para>
1255 <para>Equals AUDIO_SET_ID for this command.</para>
1259 <para>audio_mixer_t *mix</para>
1262 <para>mixer settings.</para>
1264 </row></tbody></tgroup></informaltable>
1267 <informaltable><tgroup cols="2"><tbody><row><entry
1272 <para>fd is not a valid open file descriptor.</para>
1276 <para>EINTERNAL</para>
1279 <para>Internal error.</para>
1286 <para>mix points to an invalid address.</para>
1288 </row></tbody></tgroup></informaltable>
1290 </section><section id="AUDIO_SET_STREAMTYPE"
1291 role="subsection"><title>AUDIO_SET_STREAMTYPE</title>
1294 <informaltable><tgroup cols="1"><tbody><row><entry
1296 <para>This ioctl tells the driver which kind of audio stream to expect. This is useful
1297 if the stream offers several audio sub-streams like LPCM and AC3.</para>
1299 </row></tbody></tgroup></informaltable>
1302 <informaltable><tgroup cols="1"><tbody><row><entry
1304 <para>int ioctl(fd, int request = AUDIO_SET_STREAMTYPE,
1307 </row></tbody></tgroup></informaltable>
1310 <informaltable><tgroup cols="2"><tbody><row><entry
1315 <para>File descriptor returned by a previous call to open().</para>
1319 <para>int request</para>
1322 <para>Equals AUDIO_SET_STREAMTYPE for this
1327 <para>int type</para>
1330 <para>stream type</para>
1332 </row></tbody></tgroup></informaltable>
1335 <informaltable><tgroup cols="2"><tbody><row><entry
1340 <para>fd is not a valid open file descriptor</para>
1347 <para>type is not a valid or supported stream type.</para>
1349 </row></tbody></tgroup></informaltable>
1351 </section><section id="AUDIO_SET_EXT_ID"
1352 role="subsection"><title>AUDIO_SET_EXT_ID</title>
1355 <informaltable><tgroup cols="1"><tbody><row><entry
1357 <para>This ioctl can be used to set the extension id for MPEG streams in DVD
1358 playback. Only the first 3 bits are recognized.</para>
1360 </row></tbody></tgroup></informaltable>
1363 <informaltable><tgroup cols="1"><tbody><row><entry
1365 <para>int ioctl(fd, int request = AUDIO_SET_EXT_ID, int
1368 </row></tbody></tgroup></informaltable>
1371 <informaltable><tgroup cols="2"><tbody><row><entry
1376 <para>File descriptor returned by a previous call to open().</para>
1380 <para>int request</para>
1383 <para>Equals AUDIO_SET_EXT_ID for this command.</para>
1390 <para>audio sub_stream_id</para>
1392 </row></tbody></tgroup></informaltable>
1395 <informaltable><tgroup cols="2"><tbody><row><entry
1400 <para>fd is not a valid open file descriptor</para>
1407 <para>id is not a valid id.</para>
1409 </row></tbody></tgroup></informaltable>
1411 </section><section id="AUDIO_SET_ATTRIBUTES"
1412 role="subsection"><title>AUDIO_SET_ATTRIBUTES</title>
1415 <informaltable><tgroup cols="1"><tbody><row><entry
1417 <para>This ioctl is intended for DVD playback and allows you to set certain
1418 information about the audio stream.</para>
1420 </row></tbody></tgroup></informaltable>
1423 <informaltable><tgroup cols="1"><tbody><row><entry
1425 <para>int ioctl(fd, int request = AUDIO_SET_ATTRIBUTES,
1426 audio_attributes_t attr );</para>
1428 </row></tbody></tgroup></informaltable>
1431 <informaltable><tgroup cols="2"><tbody><row><entry
1436 <para>File descriptor returned by a previous call to open().</para>
1440 <para>int request</para>
1443 <para>Equals AUDIO_SET_ATTRIBUTES for this command.</para>
1447 <para>audio_attributes_t
1451 <para>audio attributes according to section ??</para>
1453 </row></tbody></tgroup></informaltable>
1456 <informaltable><tgroup cols="2"><tbody><row><entry
1461 <para>fd is not a valid open file descriptor</para>
1468 <para>attr is not a valid or supported attribute setting.</para>
1470 </row></tbody></tgroup></informaltable>
1472 </section><section id="AUDIO_SET_KARAOKE"
1473 role="subsection"><title>AUDIO_SET_KARAOKE</title>
1476 <informaltable><tgroup cols="1"><tbody><row><entry
1478 <para>This ioctl allows one to set the mixer settings for a karaoke DVD.</para>
1480 </row></tbody></tgroup></informaltable>
1483 <informaltable><tgroup cols="1"><tbody><row><entry
1485 <para>int ioctl(fd, int request = AUDIO_SET_KARAOKE,
1486 audio_karaoke_t ⋆karaoke);</para>
1488 </row></tbody></tgroup></informaltable>
1491 <informaltable><tgroup cols="2"><tbody><row><entry
1496 <para>File descriptor returned by a previous call to open().</para>
1500 <para>int request</para>
1503 <para>Equals AUDIO_SET_KARAOKE for this
1508 <para>audio_karaoke_t
1512 <para>karaoke settings according to section ??.</para>
1514 </row></tbody></tgroup></informaltable>
1517 <informaltable><tgroup cols="2"><tbody><row><entry
1522 <para>fd is not a valid open file descriptor</para>
1529 <para>karaoke is not a valid or supported karaoke setting.</para>
1531 </row></tbody></tgroup></informaltable>