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