doc-rst: linux_tv: remove whitespaces
[deliverable/linux.git] / Documentation / linux_tv / media / dvb / audio_function_calls.rst
1 .. -*- coding: utf-8; mode: rst -*-
2
3 .. _audio_function_calls:
4
5 ********************
6 Audio Function Calls
7 ********************
8
9
10 .. _audio_fopen:
11
12 DVB audio open()
13 ================
14
15 Description
16 -----------
17
18 This system call opens a named audio device (e.g.
19 /dev/dvb/adapter0/audio0) for subsequent use. When an open() call has
20 succeeded, the device will be ready for use. The significance of
21 blocking or non-blocking mode is described in the documentation for
22 functions where there is a difference. It does not affect the semantics
23 of the open() call itself. A device opened in blocking mode can later be
24 put into non-blocking mode (and vice versa) using the F_SETFL command
25 of the fcntl system call. This is a standard system call, documented in
26 the Linux manual page for fcntl. Only one user can open the Audio Device
27 in O_RDWR mode. All other attempts to open the device in this mode will
28 fail, and an error code will be returned. If the Audio Device is opened
29 in O_RDONLY mode, the only ioctl call that can be used is
30 AUDIO_GET_STATUS. All other call will return with an error code.
31
32 Synopsis
33 --------
34
35 .. c:function:: int open(const char *deviceName, int flags)
36
37 Arguments
38 ----------
39
40
41
42 .. flat-table::
43 :header-rows: 0
44 :stub-columns: 0
45
46
47 - .. row 1
48
49 - const char \*deviceName
50
51 - Name of specific audio device.
52
53 - .. row 2
54
55 - int flags
56
57 - A bit-wise OR of the following flags:
58
59 - .. row 3
60
61 -
62 - O_RDONLY read-only access
63
64 - .. row 4
65
66 -
67 - O_RDWR read/write access
68
69 - .. row 5
70
71 -
72 - O_NONBLOCK open in non-blocking mode
73
74 - .. row 6
75
76 -
77 - (blocking mode is the default)
78
79
80 Return Value
81 ------------
82
83
84
85 .. flat-table::
86 :header-rows: 0
87 :stub-columns: 0
88
89
90 - .. row 1
91
92 - ``ENODEV``
93
94 - Device driver not loaded/available.
95
96 - .. row 2
97
98 - ``EBUSY``
99
100 - Device or resource busy.
101
102 - .. row 3
103
104 - ``EINVAL``
105
106 - Invalid argument.
107
108
109
110 .. _audio_fclose:
111
112 DVB audio close()
113 =================
114
115 Description
116 -----------
117
118 This system call closes a previously opened audio device.
119
120 Synopsis
121 --------
122
123 .. c:function:: int close(int fd)
124
125 Arguments
126 ----------
127
128
129
130 .. flat-table::
131 :header-rows: 0
132 :stub-columns: 0
133
134
135 - .. row 1
136
137 - int fd
138
139 - File descriptor returned by a previous call to open().
140
141
142 Return Value
143 ------------
144
145
146
147 .. flat-table::
148 :header-rows: 0
149 :stub-columns: 0
150
151
152 - .. row 1
153
154 - ``EBADF``
155
156 - fd is not a valid open file descriptor.
157
158
159
160 .. _audio_fwrite:
161
162 DVB audio write()
163 =================
164
165 Description
166 -----------
167
168 This system call can only be used if AUDIO_SOURCE_MEMORY is selected
169 in the ioctl call AUDIO_SELECT_SOURCE. The data provided shall be in
170 PES format. If O_NONBLOCK is not specified the function will block
171 until buffer space is available. The amount of data to be transferred is
172 implied by count.
173
174 Synopsis
175 --------
176
177 .. c:function:: size_t write(int fd, const void *buf, size_t count)
178
179 Arguments
180 ----------
181
182
183
184 .. flat-table::
185 :header-rows: 0
186 :stub-columns: 0
187
188
189 - .. row 1
190
191 - int fd
192
193 - File descriptor returned by a previous call to open().
194
195 - .. row 2
196
197 - void \*buf
198
199 - Pointer to the buffer containing the PES data.
200
201 - .. row 3
202
203 - size_t count
204
205 - Size of buf.
206
207
208 Return Value
209 ------------
210
211
212
213 .. flat-table::
214 :header-rows: 0
215 :stub-columns: 0
216
217
218 - .. row 1
219
220 - ``EPERM``
221
222 - Mode AUDIO_SOURCE_MEMORY not selected.
223
224 - .. row 2
225
226 - ``ENOMEM``
227
228 - Attempted to write more data than the internal buffer can hold.
229
230 - .. row 3
231
232 - ``EBADF``
233
234 - fd is not a valid open file descriptor.
235
236
237
238 .. _AUDIO_STOP:
239
240 AUDIO_STOP
241 ==========
242
243 Description
244 -----------
245
246 This ioctl call asks the Audio Device to stop playing the current
247 stream.
248
249 Synopsis
250 --------
251
252 .. c:function:: int ioctl(int fd, int request = AUDIO_STOP)
253
254 Arguments
255 ----------
256
257
258
259 .. flat-table::
260 :header-rows: 0
261 :stub-columns: 0
262
263
264 - .. row 1
265
266 - int fd
267
268 - File descriptor returned by a previous call to open().
269
270 - .. row 2
271
272 - int request
273
274 - Equals AUDIO_STOP for this command.
275
276
277 Return Value
278 ------------
279
280 On success 0 is returned, on error -1 and the ``errno`` variable is set
281 appropriately. The generic error codes are described at the
282 :ref:`Generic Error Codes <gen-errors>` chapter.
283
284
285 .. _AUDIO_PLAY:
286
287 AUDIO_PLAY
288 ==========
289
290 Description
291 -----------
292
293 This ioctl call asks the Audio Device to start playing an audio stream
294 from the selected source.
295
296 Synopsis
297 --------
298
299 .. c:function:: int ioctl(int fd, int request = AUDIO_PLAY)
300
301 Arguments
302 ----------
303
304
305
306 .. flat-table::
307 :header-rows: 0
308 :stub-columns: 0
309
310
311 - .. row 1
312
313 - int fd
314
315 - File descriptor returned by a previous call to open().
316
317 - .. row 2
318
319 - int request
320
321 - Equals AUDIO_PLAY for this command.
322
323
324 Return Value
325 ------------
326
327 On success 0 is returned, on error -1 and the ``errno`` variable is set
328 appropriately. The generic error codes are described at the
329 :ref:`Generic Error Codes <gen-errors>` chapter.
330
331
332 .. _AUDIO_PAUSE:
333
334 AUDIO_PAUSE
335 ===========
336
337 Description
338 -----------
339
340 This ioctl call suspends the audio stream being played. Decoding and
341 playing are paused. It is then possible to restart again decoding and
342 playing process of the audio stream using AUDIO_CONTINUE command.
343
344 Synopsis
345 --------
346
347 .. c:function:: int ioctl(int fd, int request = AUDIO_PAUSE)
348
349 Arguments
350 ----------
351
352
353
354 .. flat-table::
355 :header-rows: 0
356 :stub-columns: 0
357
358
359 - .. row 1
360
361 - int fd
362
363 - File descriptor returned by a previous call to open().
364
365 - .. row 2
366
367 - int request
368
369 - Equals AUDIO_PAUSE for this command.
370
371
372 Return Value
373 ------------
374
375 On success 0 is returned, on error -1 and the ``errno`` variable is set
376 appropriately. The generic error codes are described at the
377 :ref:`Generic Error Codes <gen-errors>` chapter.
378
379
380 .. _AUDIO_CONTINUE:
381
382 AUDIO_CONTINUE
383 ==============
384
385 Description
386 -----------
387
388 This ioctl restarts the decoding and playing process previously paused
389 with AUDIO_PAUSE command.
390
391 Synopsis
392 --------
393
394 .. c:function:: int ioctl(int fd, int request = AUDIO_CONTINUE)
395
396 Arguments
397 ----------
398
399
400
401 .. flat-table::
402 :header-rows: 0
403 :stub-columns: 0
404
405
406 - .. row 1
407
408 - int fd
409
410 - File descriptor returned by a previous call to open().
411
412 - .. row 2
413
414 - int request
415
416 - Equals AUDIO_CONTINUE for this command.
417
418
419 Return Value
420 ------------
421
422 On success 0 is returned, on error -1 and the ``errno`` variable is set
423 appropriately. The generic error codes are described at the
424 :ref:`Generic Error Codes <gen-errors>` chapter.
425
426
427 .. _AUDIO_SELECT_SOURCE:
428
429 AUDIO_SELECT_SOURCE
430 ===================
431
432 Description
433 -----------
434
435 This ioctl call informs the audio device which source shall be used for
436 the input data. The possible sources are demux or memory. If
437 AUDIO_SOURCE_MEMORY is selected, the data is fed to the Audio Device
438 through the write command.
439
440 Synopsis
441 --------
442
443 .. c:function:: int ioctl(int fd, int request = AUDIO_SELECT_SOURCE, audio_stream_source_t source)
444
445 Arguments
446 ----------
447
448
449
450 .. flat-table::
451 :header-rows: 0
452 :stub-columns: 0
453
454
455 - .. row 1
456
457 - int fd
458
459 - File descriptor returned by a previous call to open().
460
461 - .. row 2
462
463 - int request
464
465 - Equals AUDIO_SELECT_SOURCE for this command.
466
467 - .. row 3
468
469 - audio_stream_source_t source
470
471 - Indicates the source that shall be used for the Audio stream.
472
473
474 Return Value
475 ------------
476
477 On success 0 is returned, on error -1 and the ``errno`` variable is set
478 appropriately. The generic error codes are described at the
479 :ref:`Generic Error Codes <gen-errors>` chapter.
480
481
482 .. _AUDIO_SET_MUTE:
483
484 AUDIO_SET_MUTE
485 ==============
486
487 Description
488 -----------
489
490 This ioctl is for DVB devices only. To control a V4L2 decoder use the
491 V4L2 :ref:`VIDIOC_DECODER_CMD` with the
492 ``V4L2_DEC_CMD_START_MUTE_AUDIO`` flag instead.
493
494 This ioctl call asks the audio device to mute the stream that is
495 currently being played.
496
497 Synopsis
498 --------
499
500 .. c:function:: int ioctl(int fd, int request = AUDIO_SET_MUTE, boolean state)
501
502 Arguments
503 ----------
504
505
506
507 .. flat-table::
508 :header-rows: 0
509 :stub-columns: 0
510
511
512 - .. row 1
513
514 - int fd
515
516 - File descriptor returned by a previous call to open().
517
518 - .. row 2
519
520 - int request
521
522 - Equals AUDIO_SET_MUTE for this command.
523
524 - .. row 3
525
526 - boolean state
527
528 - Indicates if audio device shall mute or not.
529
530 - .. row 4
531
532 -
533 - TRUE Audio Mute
534
535 - .. row 5
536
537 -
538 - FALSE Audio Un-mute
539
540
541 Return Value
542 ------------
543
544 On success 0 is returned, on error -1 and the ``errno`` variable is set
545 appropriately. The generic error codes are described at the
546 :ref:`Generic Error Codes <gen-errors>` chapter.
547
548
549 .. _AUDIO_SET_AV_SYNC:
550
551 AUDIO_SET_AV_SYNC
552 =================
553
554 Description
555 -----------
556
557 This ioctl call asks the Audio Device to turn ON or OFF A/V
558 synchronization.
559
560 Synopsis
561 --------
562
563 .. c:function:: int ioctl(int fd, int request = AUDIO_SET_AV_SYNC, boolean state)
564
565 Arguments
566 ----------
567
568
569
570 .. flat-table::
571 :header-rows: 0
572 :stub-columns: 0
573
574
575 - .. row 1
576
577 - int fd
578
579 - File descriptor returned by a previous call to open().
580
581 - .. row 2
582
583 - int request
584
585 - Equals AUDIO_AV_SYNC for this command.
586
587 - .. row 3
588
589 - boolean state
590
591 - Tells the DVB subsystem if A/V synchronization shall be ON or OFF.
592
593 - .. row 4
594
595 -
596 - TRUE AV-sync ON
597
598 - .. row 5
599
600 -
601 - FALSE AV-sync OFF
602
603
604 Return Value
605 ------------
606
607 On success 0 is returned, on error -1 and the ``errno`` variable is set
608 appropriately. The generic error codes are described at the
609 :ref:`Generic Error Codes <gen-errors>` chapter.
610
611
612 .. _AUDIO_SET_BYPASS_MODE:
613
614 AUDIO_SET_BYPASS_MODE
615 =====================
616
617 Description
618 -----------
619
620 This ioctl call asks the Audio Device to bypass the Audio decoder and
621 forward the stream without decoding. This mode shall be used if streams
622 that can’t be handled by the DVB system shall be decoded. Dolby
623 DigitalTM streams are automatically forwarded by the DVB subsystem if
624 the hardware can handle it.
625
626 Synopsis
627 --------
628
629 .. c:function:: int ioctl(int fd, int request = AUDIO_SET_BYPASS_MODE, boolean mode)
630
631 Arguments
632 ----------
633
634
635
636 .. flat-table::
637 :header-rows: 0
638 :stub-columns: 0
639
640
641 - .. row 1
642
643 - int fd
644
645 - File descriptor returned by a previous call to open().
646
647 - .. row 2
648
649 - int request
650
651 - Equals AUDIO_SET_BYPASS_MODE for this command.
652
653 - .. row 3
654
655 - boolean mode
656
657 - Enables or disables the decoding of the current Audio stream in
658 the DVB subsystem.
659
660 - .. row 4
661
662 -
663 - TRUE Bypass is disabled
664
665 - .. row 5
666
667 -
668 - FALSE Bypass is enabled
669
670
671 Return Value
672 ------------
673
674 On success 0 is returned, on error -1 and the ``errno`` variable is set
675 appropriately. The generic error codes are described at the
676 :ref:`Generic Error Codes <gen-errors>` chapter.
677
678
679 .. _AUDIO_CHANNEL_SELECT:
680
681 AUDIO_CHANNEL_SELECT
682 ====================
683
684 Description
685 -----------
686
687 This ioctl is for DVB devices only. To control a V4L2 decoder use the
688 V4L2 ``V4L2_CID_MPEG_AUDIO_DEC_PLAYBACK`` control instead.
689
690 This ioctl call asks the Audio Device to select the requested channel if
691 possible.
692
693 Synopsis
694 --------
695
696 .. c:function:: int ioctl(int fd, int request = AUDIO_CHANNEL_SELECT, audio_channel_select_t)
697
698 Arguments
699 ----------
700
701
702
703 .. flat-table::
704 :header-rows: 0
705 :stub-columns: 0
706
707
708 - .. row 1
709
710 - int fd
711
712 - File descriptor returned by a previous call to open().
713
714 - .. row 2
715
716 - int request
717
718 - Equals AUDIO_CHANNEL_SELECT for this command.
719
720 - .. row 3
721
722 - audio_channel_select_t ch
723
724 - Select the output format of the audio (mono left/right, stereo).
725
726
727 Return Value
728 ------------
729
730 On success 0 is returned, on error -1 and the ``errno`` variable is set
731 appropriately. The generic error codes are described at the
732 :ref:`Generic Error Codes <gen-errors>` chapter.
733
734
735 .. _AUDIO_BILINGUAL_CHANNEL_SELECT:
736
737 AUDIO_BILINGUAL_CHANNEL_SELECT
738 ==============================
739
740 Description
741 -----------
742
743 This ioctl is obsolete. Do not use in new drivers. It has been replaced
744 by the V4L2 ``V4L2_CID_MPEG_AUDIO_DEC_MULTILINGUAL_PLAYBACK`` control
745 for MPEG decoders controlled through V4L2.
746
747 This ioctl call asks the Audio Device to select the requested channel
748 for bilingual streams if possible.
749
750 Synopsis
751 --------
752
753 .. c:function:: int ioctl(int fd, int request = AUDIO_BILINGUAL_CHANNEL_SELECT, audio_channel_select_t)
754
755 Arguments
756 ----------
757
758
759
760 .. flat-table::
761 :header-rows: 0
762 :stub-columns: 0
763
764
765 - .. row 1
766
767 - int fd
768
769 - File descriptor returned by a previous call to open().
770
771 - .. row 2
772
773 - int request
774
775 - Equals AUDIO_BILINGUAL_CHANNEL_SELECT for this command.
776
777 - .. row 3
778
779 - audio_channel_select_t ch
780
781 - Select the output format of the audio (mono left/right, stereo).
782
783
784 Return Value
785 ------------
786
787 On success 0 is returned, on error -1 and the ``errno`` variable is set
788 appropriately. The generic error codes are described at the
789 :ref:`Generic Error Codes <gen-errors>` chapter.
790
791
792 .. _AUDIO_GET_PTS:
793
794 AUDIO_GET_PTS
795 =============
796
797 Description
798 -----------
799
800 This ioctl is obsolete. Do not use in new drivers. If you need this
801 functionality, then please contact the linux-media mailing list
802 (`https://linuxtv.org/lists.php <https://linuxtv.org/lists.php>`__).
803
804 This ioctl call asks the Audio Device to return the current PTS
805 timestamp.
806
807 Synopsis
808 --------
809
810 .. c:function:: int ioctl(int fd, int request = AUDIO_GET_PTS, __u64 *pts)
811
812 Arguments
813 ----------
814
815
816
817 .. flat-table::
818 :header-rows: 0
819 :stub-columns: 0
820
821
822 - .. row 1
823
824 - int fd
825
826 - File descriptor returned by a previous call to open().
827
828 - .. row 2
829
830 - int request
831
832 - Equals AUDIO_GET_PTS for this command.
833
834 - .. row 3
835
836 - __u64 \*pts
837
838 - Returns the 33-bit timestamp as defined in ITU T-REC-H.222.0 /
839 ISO/IEC 13818-1.
840
841 The PTS should belong to the currently played frame if possible,
842 but may also be a value close to it like the PTS of the last
843 decoded frame or the last PTS extracted by the PES parser.
844
845
846 Return Value
847 ------------
848
849 On success 0 is returned, on error -1 and the ``errno`` variable is set
850 appropriately. The generic error codes are described at the
851 :ref:`Generic Error Codes <gen-errors>` chapter.
852
853
854 .. _AUDIO_GET_STATUS:
855
856 AUDIO_GET_STATUS
857 ================
858
859 Description
860 -----------
861
862 This ioctl call asks the Audio Device to return the current state of the
863 Audio Device.
864
865 Synopsis
866 --------
867
868 .. c:function:: int ioctl(int fd, int request = AUDIO_GET_STATUS, struct audio_status *status)
869
870 Arguments
871 ----------
872
873
874
875 .. flat-table::
876 :header-rows: 0
877 :stub-columns: 0
878
879
880 - .. row 1
881
882 - int fd
883
884 - File descriptor returned by a previous call to open().
885
886 - .. row 2
887
888 - int request
889
890 - Equals AUDIO_GET_STATUS for this command.
891
892 - .. row 3
893
894 - struct audio_status \*status
895
896 - Returns the current state of Audio Device.
897
898
899 Return Value
900 ------------
901
902 On success 0 is returned, on error -1 and the ``errno`` variable is set
903 appropriately. The generic error codes are described at the
904 :ref:`Generic Error Codes <gen-errors>` chapter.
905
906
907 .. _AUDIO_GET_CAPABILITIES:
908
909 AUDIO_GET_CAPABILITIES
910 ======================
911
912 Description
913 -----------
914
915 This ioctl call asks the Audio Device to tell us about the decoding
916 capabilities of the audio hardware.
917
918 Synopsis
919 --------
920
921 .. c:function:: int ioctl(int fd, int request = AUDIO_GET_CAPABILITIES, unsigned int *cap)
922
923 Arguments
924 ----------
925
926
927
928 .. flat-table::
929 :header-rows: 0
930 :stub-columns: 0
931
932
933 - .. row 1
934
935 - int fd
936
937 - File descriptor returned by a previous call to open().
938
939 - .. row 2
940
941 - int request
942
943 - Equals AUDIO_GET_CAPABILITIES for this command.
944
945 - .. row 3
946
947 - unsigned int \*cap
948
949 - Returns a bit array of supported sound formats.
950
951
952 Return Value
953 ------------
954
955 On success 0 is returned, on error -1 and the ``errno`` variable is set
956 appropriately. The generic error codes are described at the
957 :ref:`Generic Error Codes <gen-errors>` chapter.
958
959
960 .. _AUDIO_CLEAR_BUFFER:
961
962 AUDIO_CLEAR_BUFFER
963 ==================
964
965 Description
966 -----------
967
968 This ioctl call asks the Audio Device to clear all software and hardware
969 buffers of the audio decoder device.
970
971 Synopsis
972 --------
973
974 .. c:function:: int ioctl(int fd, int request = AUDIO_CLEAR_BUFFER)
975
976 Arguments
977 ----------
978
979
980
981 .. flat-table::
982 :header-rows: 0
983 :stub-columns: 0
984
985
986 - .. row 1
987
988 - int fd
989
990 - File descriptor returned by a previous call to open().
991
992 - .. row 2
993
994 - int request
995
996 - Equals AUDIO_CLEAR_BUFFER for this command.
997
998
999 Return Value
1000 ------------
1001
1002 On success 0 is returned, on error -1 and the ``errno`` variable is set
1003 appropriately. The generic error codes are described at the
1004 :ref:`Generic Error Codes <gen-errors>` chapter.
1005
1006
1007 .. _AUDIO_SET_ID:
1008
1009 AUDIO_SET_ID
1010 ============
1011
1012 Description
1013 -----------
1014
1015 This ioctl selects which sub-stream is to be decoded if a program or
1016 system stream is sent to the video device. If no audio stream type is
1017 set the id has to be in [0xC0,0xDF] for MPEG sound, in [0x80,0x87] for
1018 AC3 and in [0xA0,0xA7] for LPCM. More specifications may follow for
1019 other stream types. If the stream type is set the id just specifies the
1020 substream id of the audio stream and only the first 5 bits are
1021 recognized.
1022
1023 Synopsis
1024 --------
1025
1026 .. c:function:: int ioctl(int fd, int request = AUDIO_SET_ID, int id)
1027
1028 Arguments
1029 ----------
1030
1031
1032
1033 .. flat-table::
1034 :header-rows: 0
1035 :stub-columns: 0
1036
1037
1038 - .. row 1
1039
1040 - int fd
1041
1042 - File descriptor returned by a previous call to open().
1043
1044 - .. row 2
1045
1046 - int request
1047
1048 - Equals AUDIO_SET_ID for this command.
1049
1050 - .. row 3
1051
1052 - int id
1053
1054 - audio sub-stream id
1055
1056
1057 Return Value
1058 ------------
1059
1060 On success 0 is returned, on error -1 and the ``errno`` variable is set
1061 appropriately. The generic error codes are described at the
1062 :ref:`Generic Error Codes <gen-errors>` chapter.
1063
1064
1065 .. _AUDIO_SET_MIXER:
1066
1067 AUDIO_SET_MIXER
1068 ===============
1069
1070 Description
1071 -----------
1072
1073 This ioctl lets you adjust the mixer settings of the audio decoder.
1074
1075 Synopsis
1076 --------
1077
1078 .. c:function:: int ioctl(int fd, int request = AUDIO_SET_MIXER, audio_mixer_t *mix)
1079
1080 Arguments
1081 ----------
1082
1083
1084
1085 .. flat-table::
1086 :header-rows: 0
1087 :stub-columns: 0
1088
1089
1090 - .. row 1
1091
1092 - int fd
1093
1094 - File descriptor returned by a previous call to open().
1095
1096 - .. row 2
1097
1098 - int request
1099
1100 - Equals AUDIO_SET_ID for this command.
1101
1102 - .. row 3
1103
1104 - audio_mixer_t \*mix
1105
1106 - mixer settings.
1107
1108
1109 Return Value
1110 ------------
1111
1112 On success 0 is returned, on error -1 and the ``errno`` variable is set
1113 appropriately. The generic error codes are described at the
1114 :ref:`Generic Error Codes <gen-errors>` chapter.
1115
1116
1117 .. _AUDIO_SET_STREAMTYPE:
1118
1119 AUDIO_SET_STREAMTYPE
1120 ====================
1121
1122 Description
1123 -----------
1124
1125 This ioctl tells the driver which kind of audio stream to expect. This
1126 is useful if the stream offers several audio sub-streams like LPCM and
1127 AC3.
1128
1129 Synopsis
1130 --------
1131
1132 .. c:function:: int ioctl(fd, int request = AUDIO_SET_STREAMTYPE, int type)
1133
1134 Arguments
1135 ----------
1136
1137
1138
1139 .. flat-table::
1140 :header-rows: 0
1141 :stub-columns: 0
1142
1143
1144 - .. row 1
1145
1146 - int fd
1147
1148 - File descriptor returned by a previous call to open().
1149
1150 - .. row 2
1151
1152 - int request
1153
1154 - Equals AUDIO_SET_STREAMTYPE for this command.
1155
1156 - .. row 3
1157
1158 - int type
1159
1160 - stream type
1161
1162
1163 Return Value
1164 ------------
1165
1166 On success 0 is returned, on error -1 and the ``errno`` variable is set
1167 appropriately. The generic error codes are described at the
1168 :ref:`Generic Error Codes <gen-errors>` chapter.
1169
1170
1171
1172 .. flat-table::
1173 :header-rows: 0
1174 :stub-columns: 0
1175
1176
1177 - .. row 1
1178
1179 - ``EINVAL``
1180
1181 - type is not a valid or supported stream type.
1182
1183
1184
1185 .. _AUDIO_SET_EXT_ID:
1186
1187 AUDIO_SET_EXT_ID
1188 ================
1189
1190 Description
1191 -----------
1192
1193 This ioctl can be used to set the extension id for MPEG streams in DVD
1194 playback. Only the first 3 bits are recognized.
1195
1196 Synopsis
1197 --------
1198
1199 .. c:function:: int ioctl(fd, int request = AUDIO_SET_EXT_ID, int id)
1200
1201 Arguments
1202 ----------
1203
1204
1205
1206 .. flat-table::
1207 :header-rows: 0
1208 :stub-columns: 0
1209
1210
1211 - .. row 1
1212
1213 - int fd
1214
1215 - File descriptor returned by a previous call to open().
1216
1217 - .. row 2
1218
1219 - int request
1220
1221 - Equals AUDIO_SET_EXT_ID for this command.
1222
1223 - .. row 3
1224
1225 - int id
1226
1227 - audio sub_stream_id
1228
1229
1230 Return Value
1231 ------------
1232
1233 On success 0 is returned, on error -1 and the ``errno`` variable is set
1234 appropriately. The generic error codes are described at the
1235 :ref:`Generic Error Codes <gen-errors>` chapter.
1236
1237
1238
1239 .. flat-table::
1240 :header-rows: 0
1241 :stub-columns: 0
1242
1243
1244 - .. row 1
1245
1246 - ``EINVAL``
1247
1248 - id is not a valid id.
1249
1250
1251
1252 .. _AUDIO_SET_ATTRIBUTES:
1253
1254 AUDIO_SET_ATTRIBUTES
1255 ====================
1256
1257 Description
1258 -----------
1259
1260 This ioctl is intended for DVD playback and allows you to set certain
1261 information about the audio stream.
1262
1263 Synopsis
1264 --------
1265
1266 .. c:function:: int ioctl(fd, int request = AUDIO_SET_ATTRIBUTES, audio_attributes_t attr )
1267
1268 Arguments
1269 ----------
1270
1271
1272
1273 .. flat-table::
1274 :header-rows: 0
1275 :stub-columns: 0
1276
1277
1278 - .. row 1
1279
1280 - int fd
1281
1282 - File descriptor returned by a previous call to open().
1283
1284 - .. row 2
1285
1286 - int request
1287
1288 - Equals AUDIO_SET_ATTRIBUTES for this command.
1289
1290 - .. row 3
1291
1292 - audio_attributes_t attr
1293
1294 - audio attributes according to section ??
1295
1296
1297 Return Value
1298 ------------
1299
1300 On success 0 is returned, on error -1 and the ``errno`` variable is set
1301 appropriately. The generic error codes are described at the
1302 :ref:`Generic Error Codes <gen-errors>` chapter.
1303
1304
1305
1306 .. flat-table::
1307 :header-rows: 0
1308 :stub-columns: 0
1309
1310
1311 - .. row 1
1312
1313 - ``EINVAL``
1314
1315 - attr is not a valid or supported attribute setting.
1316
1317
1318
1319 .. _AUDIO_SET_KARAOKE:
1320
1321 AUDIO_SET_KARAOKE
1322 =================
1323
1324 Description
1325 -----------
1326
1327 This ioctl allows one to set the mixer settings for a karaoke DVD.
1328
1329 Synopsis
1330 --------
1331
1332 .. c:function:: int ioctl(fd, int request = AUDIO_SET_KARAOKE, audio_karaoke_t *karaoke)
1333
1334 Arguments
1335 ----------
1336
1337
1338
1339 .. flat-table::
1340 :header-rows: 0
1341 :stub-columns: 0
1342
1343
1344 - .. row 1
1345
1346 - int fd
1347
1348 - File descriptor returned by a previous call to open().
1349
1350 - .. row 2
1351
1352 - int request
1353
1354 - Equals AUDIO_SET_KARAOKE for this command.
1355
1356 - .. row 3
1357
1358 - audio_karaoke_t \*karaoke
1359
1360 - karaoke settings according to section ??.
1361
1362
1363 Return Value
1364 ------------
1365
1366 On success 0 is returned, on error -1 and the ``errno`` variable is set
1367 appropriately. The generic error codes are described at the
1368 :ref:`Generic Error Codes <gen-errors>` chapter.
1369
1370
1371
1372 .. flat-table::
1373 :header-rows: 0
1374 :stub-columns: 0
1375
1376
1377 - .. row 1
1378
1379 - ``EINVAL``
1380
1381 - karaoke is not a valid or supported karaoke setting.
This page took 0.071772 seconds and 5 git commands to generate.