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======================= 13Digital TV audio open() 14======================= 15 16Name 17---- 18 19Digital TV audio open() 20 21.. attention:: This ioctl is deprecated 22 23Synopsis 24-------- 25 26.. c:function:: int open(const char *deviceName, int flags) 27 :name: dvb-audio-open 28 29 30Arguments 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 71Description 72----------- 73 74This system call opens a named audio device (e.g. 75/dev/dvb/adapter0/audio0) for subsequent use. When an open() call has 76succeeded, the device will be ready for use. The significance of 77blocking or non-blocking mode is described in the documentation for 78functions where there is a difference. It does not affect the semantics 79of the open() call itself. A device opened in blocking mode can later be 80put into non-blocking mode (and vice versa) using the F_SETFL command 81of the fcntl system call. This is a standard system call, documented in 82the Linux manual page for fcntl. Only one user can open the Audio Device 83in O_RDWR mode. All other attempts to open the device in this mode will 84fail, and an error code will be returned. If the Audio Device is opened 85in O_RDONLY mode, the only ioctl call that can be used is 86AUDIO_GET_STATUS. All other call will return with an error code. 87 88 89Return 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. 116