Commit | Line | Data |
---|---|---|
47d23e36 MCC |
1 | .. -*- coding: utf-8; mode: rst -*- |
2 | ||
3 | .. _audio_fopen: | |
4 | ||
586027ce | 5 | ================ |
47d23e36 MCC |
6 | DVB audio open() |
7 | ================ | |
8 | ||
15e7d615 | 9 | Name |
586027ce | 10 | ---- |
47d23e36 | 11 | |
586027ce | 12 | DVB audio open() |
47d23e36 | 13 | |
cf8076c3 | 14 | .. attention:: This ioctl is deprecated |
15e7d615 MCC |
15 | |
16 | Synopsis | |
47d23e36 MCC |
17 | -------- |
18 | ||
cf8076c3 MCC |
19 | .. c:function:: int open(const char *deviceName, int flags) |
20 | :name: dvb-audio-open | |
47d23e36 | 21 | |
47d23e36 | 22 | |
15e7d615 | 23 | Arguments |
586027ce | 24 | --------- |
47d23e36 MCC |
25 | |
26 | .. flat-table:: | |
27 | :header-rows: 0 | |
28 | :stub-columns: 0 | |
29 | ||
30 | ||
31 | - .. row 1 | |
32 | ||
33 | - const char \*deviceName | |
34 | ||
35 | - Name of specific audio device. | |
36 | ||
37 | - .. row 2 | |
38 | ||
39 | - int flags | |
40 | ||
41 | - A bit-wise OR of the following flags: | |
42 | ||
43 | - .. row 3 | |
44 | ||
45 | - | |
46 | - O_RDONLY read-only access | |
47 | ||
48 | - .. row 4 | |
49 | ||
50 | - | |
51 | - O_RDWR read/write access | |
52 | ||
53 | - .. row 5 | |
54 | ||
55 | - | |
56 | - O_NONBLOCK open in non-blocking mode | |
57 | ||
58 | - .. row 6 | |
59 | ||
60 | - | |
61 | - (blocking mode is the default) | |
62 | ||
63 | ||
15e7d615 | 64 | Description |
586027ce | 65 | ----------- |
47d23e36 | 66 | |
586027ce MCC |
67 | This system call opens a named audio device (e.g. |
68 | /dev/dvb/adapter0/audio0) for subsequent use. When an open() call has | |
69 | succeeded, the device will be ready for use. The significance of | |
70 | blocking or non-blocking mode is described in the documentation for | |
71 | functions where there is a difference. It does not affect the semantics | |
72 | of the open() call itself. A device opened in blocking mode can later be | |
73 | put into non-blocking mode (and vice versa) using the F_SETFL command | |
74 | of the fcntl system call. This is a standard system call, documented in | |
75 | the Linux manual page for fcntl. Only one user can open the Audio Device | |
76 | in O_RDWR mode. All other attempts to open the device in this mode will | |
77 | fail, and an error code will be returned. If the Audio Device is opened | |
78 | in O_RDONLY mode, the only ioctl call that can be used is | |
79 | AUDIO_GET_STATUS. All other call will return with an error code. | |
47d23e36 MCC |
80 | |
81 | ||
15e7d615 | 82 | Return Value |
586027ce MCC |
83 | ------------ |
84 | ||
16dac354 MCC |
85 | .. tabularcolumns:: |p{2.5cm}|p{15.0cm}| |
86 | ||
47d23e36 MCC |
87 | .. flat-table:: |
88 | :header-rows: 0 | |
89 | :stub-columns: 0 | |
90 | ||
91 | ||
92 | - .. row 1 | |
93 | ||
94 | - ``ENODEV`` | |
95 | ||
96 | - Device driver not loaded/available. | |
97 | ||
98 | - .. row 2 | |
99 | ||
100 | - ``EBUSY`` | |
101 | ||
102 | - Device or resource busy. | |
103 | ||
104 | - .. row 3 | |
105 | ||
106 | - ``EINVAL`` | |
107 | ||
108 | - Invalid argument. |