1.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2.. c:namespace:: DTV.audio 3 4.. _audio_fopen: 5 6======================= 7Digital TV audio open() 8======================= 9 10Name 11---- 12 13Digital TV audio open() 14 15.. attention:: This ioctl is deprecated 16 17Synopsis 18-------- 19 20.. c:function:: int open(const char *deviceName, int flags) 21 22Arguments 23--------- 24 25.. flat-table:: 26 :header-rows: 0 27 :stub-columns: 0 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 61Description 62----------- 63 64This system call opens a named audio device (e.g. 65/dev/dvb/adapter0/audio0) for subsequent use. When an open() call has 66succeeded, the device will be ready for use. The significance of 67blocking or non-blocking mode is described in the documentation for 68functions where there is a difference. It does not affect the semantics 69of the open() call itself. A device opened in blocking mode can later be 70put into non-blocking mode (and vice versa) using the F_SETFL command 71of the fcntl system call. This is a standard system call, documented in 72the Linux manual page for fcntl. Only one user can open the Audio Device 73in O_RDWR mode. All other attempts to open the device in this mode will 74fail, and an error code will be returned. If the Audio Device is opened 75in O_RDONLY mode, the only ioctl call that can be used is 76AUDIO_GET_STATUS. All other call will return with an error code. 77 78Return Value 79------------ 80 81.. tabularcolumns:: |p{2.5cm}|p{15.0cm}| 82 83.. flat-table:: 84 :header-rows: 0 85 :stub-columns: 0 86 87 - .. row 1 88 89 - ``ENODEV`` 90 91 - Device driver not loaded/available. 92 93 - .. row 2 94 95 - ``EBUSY`` 96 97 - Device or resource busy. 98 99 - .. row 3 100 101 - ``EINVAL`` 102 103 - Invalid argument. 104