• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1.. -*- coding: utf-8; mode: rst -*-
2
3.. _audio_fopen:
4
5=======================
6Digital TV audio open()
7=======================
8
9Name
10----
11
12Digital TV audio open()
13
14.. attention:: This ioctl is deprecated
15
16Synopsis
17--------
18
19.. c:function:: int open(const char *deviceName, int flags)
20    :name: dvb-audio-open
21
22
23Arguments
24---------
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
64Description
65-----------
66
67This system call opens a named audio device (e.g.
68/dev/dvb/adapter0/audio0) for subsequent use. When an open() call has
69succeeded, the device will be ready for use. The significance of
70blocking or non-blocking mode is described in the documentation for
71functions where there is a difference. It does not affect the semantics
72of the open() call itself. A device opened in blocking mode can later be
73put into non-blocking mode (and vice versa) using the F_SETFL command
74of the fcntl system call. This is a standard system call, documented in
75the Linux manual page for fcntl. Only one user can open the Audio Device
76in O_RDWR mode. All other attempts to open the device in this mode will
77fail, and an error code will be returned. If the Audio Device is opened
78in O_RDONLY mode, the only ioctl call that can be used is
79AUDIO_GET_STATUS. All other call will return with an error code.
80
81
82Return Value
83------------
84
85.. tabularcolumns:: |p{2.5cm}|p{15.0cm}|
86
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.
109