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
60 } audio_channel_select_t;
64 <section id="struct_audio_status">
65 <title>struct audio_status</title>
66 <para>The AUDIO_GET_STATUS call returns the following structure informing about various
67 states of the playback operation.
70 typedef struct audio_status {
71 boolean AV_sync_state;
73 audio_play_state_t play_state;
74 audio_stream_source_t stream_source;
75 audio_channel_select_t channel_select;
81 <section id="struct_audio_mixer">
82 <title>struct audio_mixer</title>
83 <para>The following structure is used by the AUDIO_SET_MIXER call to set the audio
87 typedef struct audio_mixer {
88 unsigned int volume_left;
89 unsigned int volume_right;
94 <section id="audio_encodings">
95 <title>audio encodings</title>
96 <para>A call to AUDIO_GET_CAPABILITIES returns an unsigned integer with the following
97 bits set according to the hardwares capabilities.
100 #define AUDIO_CAP_DTS 1
101 #define AUDIO_CAP_LPCM 2
102 #define AUDIO_CAP_MP1 4
103 #define AUDIO_CAP_MP2 8
104 #define AUDIO_CAP_MP3 16
105 #define AUDIO_CAP_AAC 32
106 #define AUDIO_CAP_OGG 64
107 #define AUDIO_CAP_SDDS 128
108 #define AUDIO_CAP_AC3 256
112 <section id="struct_audio_karaoke">
113 <title>struct audio_karaoke</title>
114 <para>The ioctl AUDIO_SET_KARAOKE uses the following format:
118 struct audio_karaoke{
124 <para>If Vocal1 or Vocal2 are non-zero, they get mixed into left and right t at 70% each. If both,
125 Vocal1 and Vocal2 are non-zero, Vocal1 gets mixed into the left channel and Vocal2 into the
126 right channel at 100% each. Ff Melody is non-zero, the melody channel gets mixed into left
131 <section id="audio_attributes">
132 <title>audio attributes</title>
133 <para>The following attributes can be set by a call to AUDIO_SET_ATTRIBUTES:
136 typedef uint16_t audio_attributes_t;
137 /⋆ bits: descr. ⋆/
138 /⋆ 15-13 audio coding mode (0=ac3, 2=mpeg1, 3=mpeg2ext, 4=LPCM, 6=DTS, ⋆/
139 /⋆ 12 multichannel extension ⋆/
140 /⋆ 11-10 audio type (0=not spec, 1=language included) ⋆/
141 /⋆ 9- 8 audio application mode (0=not spec, 1=karaoke, 2=surround) ⋆/
142 /⋆ 7- 6 Quantization / DRC (mpeg audio: 1=DRC exists)(lpcm: 0=16bit, ⋆/
143 /⋆ 5- 4 Sample frequency fs (0=48kHz, 1=96kHz) ⋆/
144 /⋆ 2- 0 number of audio channels (n+1 channels) ⋆/
147 <section id="audio_function_calls">
148 <title>Audio Function Calls</title>
151 <section id="audio_fopen">
152 <title>open()</title>
155 <informaltable><tgroup cols="1"><tbody><row><entry
157 <para>This system call opens a named audio device (e.g. /dev/dvb/adapter0/audio0)
158 for subsequent use. When an open() call has succeeded, the device will be ready
159 for use. The significance of blocking or non-blocking mode is described in the
160 documentation for functions where there is a difference. It does not affect the
161 semantics of the open() call itself. A device opened in blocking mode can later
162 be put into non-blocking mode (and vice versa) using the F_SETFL command
163 of the fcntl system call. This is a standard system call, documented in the Linux
164 manual page for fcntl. Only one user can open the Audio Device in O_RDWR
165 mode. All other attempts to open the device in this mode will fail, and an error
166 code will be returned. If the Audio Device is opened in O_RDONLY mode, the
167 only ioctl call that can be used is AUDIO_GET_STATUS. All other call will
168 return with an error code.</para>
170 </row></tbody></tgroup></informaltable>
173 <informaltable><tgroup cols="1"><tbody><row><entry
175 <para>int open(const char ⋆deviceName, int flags);</para>
177 </row></tbody></tgroup></informaltable>
180 <informaltable><tgroup cols="2"><tbody><row><entry
186 <para>Name of specific audio device.</para>
190 <para>int flags</para>
193 <para>A bit-wise OR of the following flags:</para>
199 <para>O_RDONLY read-only access</para>
205 <para>O_RDWR read/write access</para>
211 <para>O_NONBLOCK open in non-blocking mode</para>
217 <para>(blocking mode is the default)</para>
219 </row></tbody></tgroup></informaltable>
222 <informaltable><tgroup cols="2"><tbody><row><entry
227 <para>Device driver not loaded/available.</para>
231 <para>EINTERNAL</para>
234 <para>Internal error.</para>
241 <para>Device or resource busy.</para>
248 <para>Invalid argument.</para>
250 </row></tbody></tgroup></informaltable>
253 <section id="audio_fclose">
254 <title>close()</title>
257 <informaltable><tgroup cols="1"><tbody><row><entry
259 <para>This system call closes a previously opened audio device.</para>
261 </row></tbody></tgroup></informaltable>
264 <informaltable><tgroup cols="1"><tbody><row><entry
266 <para>int close(int fd);</para>
268 </row></tbody></tgroup></informaltable>
271 <informaltable><tgroup cols="2"><tbody><row><entry
276 <para>File descriptor returned by a previous call to open().</para>
278 </row></tbody></tgroup></informaltable>
281 <informaltable><tgroup cols="2"><tbody><row><entry
286 <para>fd is not a valid open file descriptor.</para>
288 </row></tbody></tgroup></informaltable>
291 <section id="audio_fwrite">
292 <title>write()</title>
295 <informaltable><tgroup cols="1"><tbody><row><entry
297 <para>This system call can only be used if AUDIO_SOURCE_MEMORY is selected
298 in the ioctl call AUDIO_SELECT_SOURCE. The data provided shall be in
299 PES format. If O_NONBLOCK is not specified the function will block until
300 buffer space is available. The amount of data to be transferred is implied by
303 </row></tbody></tgroup></informaltable>
306 <informaltable><tgroup cols="1"><tbody><row><entry
308 <para>size_t write(int fd, const void ⋆buf, size_t count);</para>
310 </row></tbody></tgroup></informaltable>
313 <informaltable><tgroup cols="2"><tbody><row><entry
318 <para>File descriptor returned by a previous call to open().</para>
322 <para>void *buf</para>
325 <para>Pointer to the buffer containing the PES data.</para>
329 <para>size_t count</para>
332 <para>Size of buf.</para>
334 </row></tbody></tgroup></informaltable>
337 <informaltable><tgroup cols="2"><tbody><row><entry
342 <para>Mode AUDIO_SOURCE_MEMORY not selected.</para>
349 <para>Attempted to write more data than the internal buffer can
357 <para>fd is not a valid open file descriptor.</para>
359 </row></tbody></tgroup></informaltable>
362 role="subsection"><title>AUDIO_STOP</title>
365 <informaltable><tgroup cols="1"><tbody><row><entry
367 <para>This ioctl call asks the Audio Device to stop playing the current stream.</para>
369 </row></tbody></tgroup></informaltable>
372 <informaltable><tgroup cols="1"><tbody><row><entry
374 <para>int ioctl(int fd, int request = AUDIO_STOP);</para>
376 </row></tbody></tgroup></informaltable>
379 <informaltable><tgroup cols="2"><tbody><row><entry
384 <para>File descriptor returned by a previous call to open().</para>
388 <para>int request</para>
391 <para>Equals AUDIO_STOP for this command.</para>
393 </row></tbody></tgroup></informaltable>
396 <informaltable><tgroup cols="2"><tbody><row><entry
401 <para>fd is not a valid open file descriptor</para>
405 <para>EINTERNAL</para>
408 <para>Internal error.</para>
410 </row></tbody></tgroup></informaltable>
413 role="subsection"><title>AUDIO_PLAY</title>
416 <informaltable><tgroup cols="1"><tbody><row><entry
418 <para>This ioctl call asks the Audio Device to start playing an audio stream from the
419 selected source.</para>
421 </row></tbody></tgroup></informaltable>
424 <informaltable><tgroup cols="1"><tbody><row><entry
426 <para>int ioctl(int fd, int request = AUDIO_PLAY);</para>
428 </row></tbody></tgroup></informaltable>
431 <informaltable><tgroup cols="2"><tbody><row><entry
436 <para>File descriptor returned by a previous call to open().</para>
440 <para>int request</para>
443 <para>Equals AUDIO_PLAY for this command.</para>
445 </row></tbody></tgroup></informaltable>
448 <informaltable><tgroup cols="2"><tbody><row><entry
453 <para>fd is not a valid open file descriptor</para>
457 <para>EINTERNAL</para>
460 <para>Internal error.</para>
462 </row></tbody></tgroup></informaltable>
465 role="subsection"><title>AUDIO_PAUSE</title>
468 <informaltable><tgroup cols="1"><tbody><row><entry
470 <para>This ioctl call suspends the audio stream being played. Decoding and playing
471 are paused. It is then possible to restart again decoding and playing process of
472 the audio stream using AUDIO_CONTINUE command.</para>
476 <para>If AUDIO_SOURCE_MEMORY is selected in the ioctl call
477 AUDIO_SELECT_SOURCE, the DVB-subsystem will not decode (consume)
478 any more data until the ioctl call AUDIO_CONTINUE or AUDIO_PLAY is
481 </row></tbody></tgroup></informaltable>
484 <informaltable><tgroup cols="1"><tbody><row><entry
486 <para>int ioctl(int fd, int request = AUDIO_PAUSE);</para>
488 </row></tbody></tgroup></informaltable>
491 <informaltable><tgroup cols="2"><tbody><row><entry
496 <para>File descriptor returned by a previous call to open().</para>
500 <para>int request</para>
503 <para>Equals AUDIO_PAUSE for this command.</para>
505 </row></tbody></tgroup></informaltable>
508 <informaltable><tgroup cols="2"><tbody><row><entry
513 <para>fd is not a valid open file descriptor.</para>
517 <para>EINTERNAL</para>
520 <para>Internal error.</para>
522 </row></tbody></tgroup></informaltable>
525 role="subsection"><title>AUDIO_SELECT_SOURCE</title>
528 <informaltable><tgroup cols="1"><tbody><row><entry
530 <para>This ioctl call informs the audio device which source shall be used
531 for the input data. The possible sources are demux or memory. If
532 AUDIO_SOURCE_MEMORY is selected, the data is fed to the Audio Device
533 through the write command.</para>
535 </row></tbody></tgroup></informaltable>
538 <informaltable><tgroup cols="1"><tbody><row><entry
540 <para>int ioctl(int fd, int request = AUDIO_SELECT_SOURCE,
541 audio_stream_source_t source);</para>
543 </row></tbody></tgroup></informaltable>
546 <informaltable><tgroup cols="2"><tbody><row><entry
551 <para>File descriptor returned by a previous call to open().</para>
555 <para>int request</para>
558 <para>Equals AUDIO_SELECT_SOURCE for this command.</para>
562 <para>audio_stream_source_t
566 <para>Indicates the source that shall be used for the Audio
569 </row></tbody></tgroup></informaltable>
572 <informaltable><tgroup cols="2"><tbody><row><entry
577 <para>fd is not a valid open file descriptor.</para>
581 <para>EINTERNAL</para>
584 <para>Internal error.</para>
591 <para>Illegal input parameter.</para>
593 </row></tbody></tgroup></informaltable>
596 role="subsection"><title>AUDIO_SET_MUTE</title>
599 <informaltable><tgroup cols="1"><tbody><row><entry
601 <para>This ioctl call asks the audio device to mute the stream that is currently being
604 </row></tbody></tgroup></informaltable>
607 <informaltable><tgroup cols="1"><tbody><row><entry
609 <para>int ioctl(int fd, int request = AUDIO_SET_MUTE,
610 boolean state);</para>
612 </row></tbody></tgroup></informaltable>
615 <informaltable><tgroup cols="2"><tbody><row><entry
620 <para>File descriptor returned by a previous call to open().</para>
624 <para>int request</para>
627 <para>Equals AUDIO_SET_MUTE for this command.</para>
631 <para>boolean state</para>
634 <para>Indicates if audio device shall mute or not.</para>
640 <para>TRUE Audio Mute</para>
646 <para>FALSE Audio Un-mute</para>
648 </row></tbody></tgroup></informaltable>
651 <informaltable><tgroup cols="2"><tbody><row><entry
656 <para>fd is not a valid open file descriptor.</para>
660 <para>EINTERNAL</para>
663 <para>Internal error.</para>
670 <para>Illegal input parameter.</para>
672 </row></tbody></tgroup></informaltable>
675 role="subsection"><title>AUDIO_SET_AV_SYNC</title>
678 <informaltable><tgroup cols="1"><tbody><row><entry
680 <para>This ioctl call asks the Audio Device to turn ON or OFF A/V synchronization.</para>
682 </row></tbody></tgroup></informaltable>
685 <informaltable><tgroup cols="1"><tbody><row><entry
687 <para>int ioctl(int fd, int request = AUDIO_SET_AV_SYNC,
688 boolean state);</para>
690 </row></tbody></tgroup></informaltable>
693 <informaltable><tgroup cols="2"><tbody><row><entry
698 <para>File descriptor returned by a previous call to open().</para>
702 <para>int request</para>
705 <para>Equals AUDIO_AV_SYNC for this command.</para>
709 <para>boolean state</para>
712 <para>Tells the DVB subsystem if A/V synchronization shall be
719 <para>TRUE AV-sync ON</para>
725 <para>FALSE AV-sync OFF</para>
727 </row></tbody></tgroup></informaltable>
730 <informaltable><tgroup cols="2"><tbody><row><entry
735 <para>fd is not a valid open file descriptor.</para>
739 <para>EINTERNAL</para>
742 <para>Internal error.</para>
749 <para>Illegal input parameter.</para>
751 </row></tbody></tgroup></informaltable>
754 role="subsection"><title>AUDIO_SET_BYPASS_MODE</title>
757 <informaltable><tgroup cols="1"><tbody><row><entry
759 <para>This ioctl call asks the Audio Device to bypass the Audio decoder and forward
760 the stream without decoding. This mode shall be used if streams that can’t be
761 handled by the DVB system shall be decoded. Dolby DigitalTM streams are
762 automatically forwarded by the DVB subsystem if the hardware can handle it.</para>
764 </row></tbody></tgroup></informaltable>
767 <informaltable><tgroup cols="1"><tbody><row><entry
769 <para>int ioctl(int fd, int request =
770 AUDIO_SET_BYPASS_MODE, boolean mode);</para>
772 </row></tbody></tgroup></informaltable>
775 <informaltable><tgroup cols="2"><tbody><row><entry
780 <para>File descriptor returned by a previous call to open().</para>
784 <para>int request</para>
787 <para>Equals AUDIO_SET_BYPASS_MODE for this
792 <para>boolean mode</para>
795 <para>Enables or disables the decoding of the current Audio
796 stream in the DVB subsystem.</para>
802 <para>TRUE Bypass is disabled</para>
808 <para>FALSE Bypass is enabled</para>
810 </row></tbody></tgroup></informaltable>
813 <informaltable><tgroup cols="2"><tbody><row><entry
818 <para>fd is not a valid open file descriptor.</para>
822 <para>EINTERNAL</para>
825 <para>Internal error.</para>
832 <para>Illegal input parameter.</para>
834 </row></tbody></tgroup></informaltable>
837 role="subsection"><title>AUDIO_CHANNEL_SELECT</title>
840 <informaltable><tgroup cols="1"><tbody><row><entry
842 <para>This ioctl call asks the Audio Device to select the requested channel if possible.</para>
844 </row></tbody></tgroup></informaltable>
847 <informaltable><tgroup cols="1"><tbody><row><entry
849 <para>int ioctl(int fd, int request =
850 AUDIO_CHANNEL_SELECT, audio_channel_select_t);</para>
852 </row></tbody></tgroup></informaltable>
855 <informaltable><tgroup cols="2"><tbody><row><entry
860 <para>File descriptor returned by a previous call to open().</para>
864 <para>int request</para>
867 <para>Equals AUDIO_CHANNEL_SELECT for this
872 <para>audio_channel_select_t
876 <para>Select the output format of the audio (mono left/right,
879 </row></tbody></tgroup></informaltable>
882 <informaltable><tgroup cols="2"><tbody><row><entry
887 <para>fd is not a valid open file descriptor.</para>
891 <para>EINTERNAL</para>
894 <para>Internal error.</para>
901 <para>Illegal input parameter ch.</para>
903 </row></tbody></tgroup></informaltable>
906 role="subsection"><title>AUDIO_GET_STATUS</title>
909 <informaltable><tgroup cols="1"><tbody><row><entry
911 <para>This ioctl call asks the Audio Device to return the current state of the Audio
914 </row></tbody></tgroup></informaltable>
917 <informaltable><tgroup cols="1"><tbody><row><entry
919 <para>int ioctl(int fd, int request = AUDIO_GET_STATUS,
920 struct audio_status ⋆status);</para>
922 </row></tbody></tgroup></informaltable>
925 <informaltable><tgroup cols="2"><tbody><row><entry
930 <para>File descriptor returned by a previous call to open().</para>
934 <para>int request</para>
937 <para>Equals AUDIO_GET_STATUS for this command.</para>
941 <para>struct audio_status
945 <para>Returns the current state of Audio Device.</para>
947 </row></tbody></tgroup></informaltable>
950 <informaltable><tgroup cols="2"><tbody><row><entry
955 <para>fd is not a valid open file descriptor.</para>
959 <para>EINTERNAL</para>
962 <para>Internal error.</para>
969 <para>status points to invalid address.</para>
971 </row></tbody></tgroup></informaltable>
974 role="subsection"><title>AUDIO_GET_CAPABILITIES</title>
977 <informaltable><tgroup cols="1"><tbody><row><entry
979 <para>This ioctl call asks the Audio Device to tell us about the decoding capabilities
980 of the audio hardware.</para>
982 </row></tbody></tgroup></informaltable>
985 <informaltable><tgroup cols="1"><tbody><row><entry
987 <para>int ioctl(int fd, int request =
988 AUDIO_GET_CAPABILITIES, unsigned int ⋆cap);</para>
990 </row></tbody></tgroup></informaltable>
993 <informaltable><tgroup cols="2"><tbody><row><entry
998 <para>File descriptor returned by a previous call to open().</para>
1002 <para>int request</para>
1005 <para>Equals AUDIO_GET_CAPABILITIES for this
1010 <para>unsigned int *cap</para>
1013 <para>Returns a bit array of supported sound formats.</para>
1015 </row></tbody></tgroup></informaltable>
1018 <informaltable><tgroup cols="2"><tbody><row><entry
1023 <para>fd is not a valid open file descriptor.</para>
1027 <para>EINTERNAL</para>
1030 <para>Internal error.</para>
1037 <para>cap points to an invalid address.</para>
1039 </row></tbody></tgroup></informaltable>
1042 role="subsection"><title>AUDIO_CLEAR_BUFFER</title>
1045 <informaltable><tgroup cols="1"><tbody><row><entry
1047 <para>This ioctl call asks the Audio Device to clear all software and hardware buffers
1048 of the audio decoder device.</para>
1050 </row></tbody></tgroup></informaltable>
1053 <informaltable><tgroup cols="1"><tbody><row><entry
1055 <para>int ioctl(int fd, int request = AUDIO_CLEAR_BUFFER);</para>
1057 </row></tbody></tgroup></informaltable>
1060 <informaltable><tgroup cols="2"><tbody><row><entry
1065 <para>File descriptor returned by a previous call to open().</para>
1069 <para>int request</para>
1072 <para>Equals AUDIO_CLEAR_BUFFER for this command.</para>
1074 </row></tbody></tgroup></informaltable>
1077 <informaltable><tgroup cols="2"><tbody><row><entry
1082 <para>fd is not a valid open file descriptor.</para>
1086 <para>EINTERNAL</para>
1089 <para>Internal error.</para>
1091 </row></tbody></tgroup></informaltable>
1094 role="subsection"><title>AUDIO_SET_ID</title>
1097 <informaltable><tgroup cols="1"><tbody><row><entry
1099 <para>This ioctl selects which sub-stream is to be decoded if a program or system
1100 stream is sent to the video device. If no audio stream type is set the id has to be
1101 in [0xC0,0xDF] for MPEG sound, in [0x80,0x87] for AC3 and in [0xA0,0xA7]
1102 for LPCM. More specifications may follow for other stream types. If the stream
1103 type is set the id just specifies the substream id of the audio stream and only
1104 the first 5 bits are recognized.</para>
1106 </row></tbody></tgroup></informaltable>
1109 <informaltable><tgroup cols="1"><tbody><row><entry
1111 <para>int ioctl(int fd, int request = AUDIO_SET_ID, int
1114 </row></tbody></tgroup></informaltable>
1117 <informaltable><tgroup cols="2"><tbody><row><entry
1122 <para>File descriptor returned by a previous call to open().</para>
1126 <para>int request</para>
1129 <para>Equals AUDIO_SET_ID for this command.</para>
1136 <para>audio sub-stream id</para>
1138 </row></tbody></tgroup></informaltable>
1141 <informaltable><tgroup cols="2"><tbody><row><entry
1146 <para>fd is not a valid open file descriptor.</para>
1150 <para>EINTERNAL</para>
1153 <para>Internal error.</para>
1160 <para>Invalid sub-stream id.</para>
1162 </row></tbody></tgroup></informaltable>
1165 role="subsection"><title>AUDIO_SET_MIXER</title>
1168 <informaltable><tgroup cols="1"><tbody><row><entry
1170 <para>This ioctl lets you adjust the mixer settings of the audio decoder.</para>
1172 </row></tbody></tgroup></informaltable>
1175 <informaltable><tgroup cols="1"><tbody><row><entry
1177 <para>int ioctl(int fd, int request = AUDIO_SET_MIXER,
1178 audio_mixer_t ⋆mix);</para>
1180 </row></tbody></tgroup></informaltable>
1183 <informaltable><tgroup cols="2"><tbody><row><entry
1188 <para>File descriptor returned by a previous call to open().</para>
1192 <para>int request</para>
1195 <para>Equals AUDIO_SET_ID for this command.</para>
1199 <para>audio_mixer_t *mix</para>
1202 <para>mixer settings.</para>
1204 </row></tbody></tgroup></informaltable>
1207 <informaltable><tgroup cols="2"><tbody><row><entry
1212 <para>fd is not a valid open file descriptor.</para>
1216 <para>EINTERNAL</para>
1219 <para>Internal error.</para>
1226 <para>mix points to an invalid address.</para>
1228 </row></tbody></tgroup></informaltable>
1231 role="subsection"><title>AUDIO_SET_STREAMTYPE</title>
1234 <informaltable><tgroup cols="1"><tbody><row><entry
1236 <para>This ioctl tells the driver which kind of audio stream to expect. This is useful
1237 if the stream offers several audio sub-streams like LPCM and AC3.</para>
1239 </row></tbody></tgroup></informaltable>
1242 <informaltable><tgroup cols="1"><tbody><row><entry
1244 <para>int ioctl(fd, int request = AUDIO_SET_STREAMTYPE,
1247 </row></tbody></tgroup></informaltable>
1250 <informaltable><tgroup cols="2"><tbody><row><entry
1255 <para>File descriptor returned by a previous call to open().</para>
1259 <para>int request</para>
1262 <para>Equals AUDIO_SET_STREAMTYPE for this
1267 <para>int type</para>
1270 <para>stream type</para>
1272 </row></tbody></tgroup></informaltable>
1275 <informaltable><tgroup cols="2"><tbody><row><entry
1280 <para>fd is not a valid open file descriptor</para>
1287 <para>type is not a valid or supported stream type.</para>
1289 </row></tbody></tgroup></informaltable>
1292 role="subsection"><title>AUDIO_SET_EXT_ID</title>
1295 <informaltable><tgroup cols="1"><tbody><row><entry
1297 <para>This ioctl can be used to set the extension id for MPEG streams in DVD
1298 playback. Only the first 3 bits are recognized.</para>
1300 </row></tbody></tgroup></informaltable>
1303 <informaltable><tgroup cols="1"><tbody><row><entry
1305 <para>int ioctl(fd, int request = AUDIO_SET_EXT_ID, int
1308 </row></tbody></tgroup></informaltable>
1311 <informaltable><tgroup cols="2"><tbody><row><entry
1316 <para>File descriptor returned by a previous call to open().</para>
1320 <para>int request</para>
1323 <para>Equals AUDIO_SET_EXT_ID for this command.</para>
1330 <para>audio sub_stream_id</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>id is not a valid id.</para>
1349 </row></tbody></tgroup></informaltable>
1352 role="subsection"><title>AUDIO_SET_ATTRIBUTES</title>
1355 <informaltable><tgroup cols="1"><tbody><row><entry
1357 <para>This ioctl is intended for DVD playback and allows you to set certain
1358 information about the audio stream.</para>
1360 </row></tbody></tgroup></informaltable>
1363 <informaltable><tgroup cols="1"><tbody><row><entry
1365 <para>int ioctl(fd, int request = AUDIO_SET_ATTRIBUTES,
1366 audio_attributes_t attr );</para>
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_ATTRIBUTES for this command.</para>
1387 <para>audio_attributes_t
1391 <para>audio attributes according to section ??</para>
1393 </row></tbody></tgroup></informaltable>
1396 <informaltable><tgroup cols="2"><tbody><row><entry
1401 <para>fd is not a valid open file descriptor</para>
1408 <para>attr is not a valid or supported attribute setting.</para>
1410 </row></tbody></tgroup></informaltable>
1413 role="subsection"><title>AUDIO_SET_KARAOKE</title>
1416 <informaltable><tgroup cols="1"><tbody><row><entry
1418 <para>This ioctl allows one to set the mixer settings for a karaoke DVD.</para>
1420 </row></tbody></tgroup></informaltable>
1423 <informaltable><tgroup cols="1"><tbody><row><entry
1425 <para>int ioctl(fd, int request = AUDIO_SET_STREAMTYPE,
1426 audio_karaoke_t ⋆karaoke);</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_STREAMTYPE for this
1448 <para>audio_karaoke_t
1452 <para>karaoke settings according to section ??.</para>
1454 </row></tbody></tgroup></informaltable>
1457 <informaltable><tgroup cols="2"><tbody><row><entry
1462 <para>fd is not a valid open file descriptor</para>
1469 <para>karaoke is not a valid or supported karaoke setting.</para>
1471 </row></tbody></tgroup></informaltable>