Merge tag 'iomap-4.21-merge-3' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux
[sfrench/cifs-2.6.git] / Documentation / media / uapi / dvb / audio-fopen.rst
1 .. Permission is granted to copy, distribute and/or modify this
2 .. document under the terms of the GNU Free Documentation License,
3 .. Version 1.1 or any later version published by the Free Software
4 .. Foundation, with no Invariant Sections, no Front-Cover Texts
5 .. and no Back-Cover Texts. A copy of the license is included at
6 .. Documentation/media/uapi/fdl-appendix.rst.
7 ..
8 .. TODO: replace it to GFDL-1.1-or-later WITH no-invariant-sections
9
10 .. _audio_fopen:
11
12 =======================
13 Digital TV audio open()
14 =======================
15
16 Name
17 ----
18
19 Digital TV audio open()
20
21 .. attention:: This ioctl is deprecated
22
23 Synopsis
24 --------
25
26 .. c:function:: int open(const char *deviceName, int flags)
27     :name: dvb-audio-open
28
29
30 Arguments
31 ---------
32
33 .. flat-table::
34     :header-rows:  0
35     :stub-columns: 0
36
37
38     -  .. row 1
39
40        -  const char \*deviceName
41
42        -  Name of specific audio device.
43
44     -  .. row 2
45
46        -  int flags
47
48        -  A bit-wise OR of the following flags:
49
50     -  .. row 3
51
52        -
53        -  O_RDONLY read-only access
54
55     -  .. row 4
56
57        -
58        -  O_RDWR read/write access
59
60     -  .. row 5
61
62        -
63        -  O_NONBLOCK open in non-blocking mode
64
65     -  .. row 6
66
67        -
68        -  (blocking mode is the default)
69
70
71 Description
72 -----------
73
74 This system call opens a named audio device (e.g.
75 /dev/dvb/adapter0/audio0) for subsequent use. When an open() call has
76 succeeded, the device will be ready for use. The significance of
77 blocking or non-blocking mode is described in the documentation for
78 functions where there is a difference. It does not affect the semantics
79 of the open() call itself. A device opened in blocking mode can later be
80 put into non-blocking mode (and vice versa) using the F_SETFL command
81 of the fcntl system call. This is a standard system call, documented in
82 the Linux manual page for fcntl. Only one user can open the Audio Device
83 in O_RDWR mode. All other attempts to open the device in this mode will
84 fail, and an error code will be returned. If the Audio Device is opened
85 in O_RDONLY mode, the only ioctl call that can be used is
86 AUDIO_GET_STATUS. All other call will return with an error code.
87
88
89 Return Value
90 ------------
91
92 .. tabularcolumns:: |p{2.5cm}|p{15.0cm}|
93
94 .. flat-table::
95     :header-rows:  0
96     :stub-columns: 0
97
98
99     -  .. row 1
100
101        -  ``ENODEV``
102
103        -  Device driver not loaded/available.
104
105     -  .. row 2
106
107        -  ``EBUSY``
108
109        -  Device or resource busy.
110
111     -  .. row 3
112
113        -  ``EINVAL``
114
115        -  Invalid argument.