[media] docs-next: stop abusing on the cpp domain
[deliverable/linux.git] / Documentation / media / uapi / dvb / audio-fopen.rst
CommitLineData
47d23e36
MCC
1.. -*- coding: utf-8; mode: rst -*-
2
3.. _audio_fopen:
4
586027ce 5================
47d23e36
MCC
6DVB audio open()
7================
8
15e7d615 9Name
586027ce 10----
47d23e36 11
586027ce 12DVB audio open()
47d23e36 13
15e7d615
MCC
14
15Synopsis
47d23e36
MCC
16--------
17
1b81f010 18.. c:function:: int open(const char *deviceName, int flags)
47d23e36 19
47d23e36 20
15e7d615 21Arguments
586027ce 22---------
47d23e36
MCC
23
24.. flat-table::
25 :header-rows: 0
26 :stub-columns: 0
27
28
29 - .. row 1
30
31 - const char \*deviceName
32
33 - Name of specific audio device.
34
35 - .. row 2
36
37 - int flags
38
39 - A bit-wise OR of the following flags:
40
41 - .. row 3
42
43 -
44 - O_RDONLY read-only access
45
46 - .. row 4
47
48 -
49 - O_RDWR read/write access
50
51 - .. row 5
52
53 -
54 - O_NONBLOCK open in non-blocking mode
55
56 - .. row 6
57
58 -
59 - (blocking mode is the default)
60
61
15e7d615 62Description
586027ce 63-----------
47d23e36 64
586027ce
MCC
65This system call opens a named audio device (e.g.
66/dev/dvb/adapter0/audio0) for subsequent use. When an open() call has
67succeeded, the device will be ready for use. The significance of
68blocking or non-blocking mode is described in the documentation for
69functions where there is a difference. It does not affect the semantics
70of the open() call itself. A device opened in blocking mode can later be
71put into non-blocking mode (and vice versa) using the F_SETFL command
72of the fcntl system call. This is a standard system call, documented in
73the Linux manual page for fcntl. Only one user can open the Audio Device
74in O_RDWR mode. All other attempts to open the device in this mode will
75fail, and an error code will be returned. If the Audio Device is opened
76in O_RDONLY mode, the only ioctl call that can be used is
77AUDIO_GET_STATUS. All other call will return with an error code.
47d23e36
MCC
78
79
15e7d615 80Return Value
586027ce
MCC
81------------
82
16dac354
MCC
83.. tabularcolumns:: |p{2.5cm}|p{15.0cm}|
84
47d23e36
MCC
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.
This page took 0.06581 seconds and 5 git commands to generate.