Linux 4.8.3
[linux/fpc-iii.git] / Documentation / media / uapi / dvb / audio-fwrite.rst
blobca95b9be0c2a5d9dd1ae4e0559b9d5e560a2d7ea
1 .. -*- coding: utf-8; mode: rst -*-
3 .. _audio_fwrite:
5 =================
6 DVB audio write()
7 =================
9 Name
10 ----
12 DVB audio write()
15 Synopsis
16 --------
18 .. cpp:function:: size_t write(int fd, const void *buf, size_t count)
21 Arguments
22 ---------
24 .. flat-table::
25     :header-rows:  0
26     :stub-columns: 0
29     -  .. row 1
31        -  int fd
33        -  File descriptor returned by a previous call to open().
35     -  .. row 2
37        -  void \*buf
39        -  Pointer to the buffer containing the PES data.
41     -  .. row 3
43        -  size_t count
45        -  Size of buf.
48 Description
49 -----------
51 This system call can only be used if AUDIO_SOURCE_MEMORY is selected
52 in the ioctl call AUDIO_SELECT_SOURCE. The data provided shall be in
53 PES format. If O_NONBLOCK is not specified the function will block
54 until buffer space is available. The amount of data to be transferred is
55 implied by count.
58 Return Value
59 ------------
61 .. flat-table::
62     :header-rows:  0
63     :stub-columns: 0
66     -  .. row 1
68        -  ``EPERM``
70        -  Mode AUDIO_SOURCE_MEMORY not selected.
72     -  .. row 2
74        -  ``ENOMEM``
76        -  Attempted to write more data than the internal buffer can hold.
78     -  .. row 3
80        -  ``EBADF``
82        -  fd is not a valid open file descriptor.