0001 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
0002 .. c:namespace:: DTV.audio
0003
0004 .. _audio_fopen:
0005
0006 =======================
0007 Digital TV audio open()
0008 =======================
0009
0010 Name
0011 ----
0012
0013 Digital TV audio open()
0014
0015 .. attention:: This ioctl is deprecated
0016
0017 Synopsis
0018 --------
0019
0020 .. c:function:: int open(const char *deviceName, int flags)
0021
0022 Arguments
0023 ---------
0024
0025 .. flat-table::
0026 :header-rows: 0
0027 :stub-columns: 0
0028
0029 - .. row 1
0030
0031 - const char \*deviceName
0032
0033 - Name of specific audio device.
0034
0035 - .. row 2
0036
0037 - int flags
0038
0039 - A bit-wise OR of the following flags:
0040
0041 - .. row 3
0042
0043 -
0044 - O_RDONLY read-only access
0045
0046 - .. row 4
0047
0048 -
0049 - O_RDWR read/write access
0050
0051 - .. row 5
0052
0053 -
0054 - O_NONBLOCK open in non-blocking mode
0055
0056 - .. row 6
0057
0058 -
0059 - (blocking mode is the default)
0060
0061 Description
0062 -----------
0063
0064 This system call opens a named audio device (e.g.
0065 /dev/dvb/adapter0/audio0) for subsequent use. When an open() call has
0066 succeeded, the device will be ready for use. The significance of
0067 blocking or non-blocking mode is described in the documentation for
0068 functions where there is a difference. It does not affect the semantics
0069 of the open() call itself. A device opened in blocking mode can later be
0070 put into non-blocking mode (and vice versa) using the F_SETFL command
0071 of the fcntl system call. This is a standard system call, documented in
0072 the Linux manual page for fcntl. Only one user can open the Audio Device
0073 in O_RDWR mode. All other attempts to open the device in this mode will
0074 fail, and an error code will be returned. If the Audio Device is opened
0075 in O_RDONLY mode, the only ioctl call that can be used is
0076 AUDIO_GET_STATUS. All other call will return with an error code.
0077
0078 Return Value
0079 ------------
0080
0081 .. tabularcolumns:: |p{2.5cm}|p{15.0cm}|
0082
0083 .. flat-table::
0084 :header-rows: 0
0085 :stub-columns: 0
0086
0087 - .. row 1
0088
0089 - ``ENODEV``
0090
0091 - Device driver not loaded/available.
0092
0093 - .. row 2
0094
0095 - ``EBUSY``
0096
0097 - Device or resource busy.
0098
0099 - .. row 3
0100
0101 - ``EINVAL``
0102
0103 - Invalid argument.