Merge tag 'ntb-4.8' of git://github.com/jonmason/ntb
[sfrench/cifs-2.6.git] / Documentation / media / uapi / dvb / audio-fwrite.rst
1 .. -*- coding: utf-8; mode: rst -*-
2
3 .. _audio_fwrite:
4
5 =================
6 DVB audio write()
7 =================
8
9 Name
10 ----
11
12 DVB audio write()
13
14
15 Synopsis
16 --------
17
18 .. cpp:function:: size_t write(int fd, const void *buf, size_t count)
19
20
21 Arguments
22 ---------
23
24 .. flat-table::
25     :header-rows:  0
26     :stub-columns: 0
27
28
29     -  .. row 1
30
31        -  int fd
32
33        -  File descriptor returned by a previous call to open().
34
35     -  .. row 2
36
37        -  void \*buf
38
39        -  Pointer to the buffer containing the PES data.
40
41     -  .. row 3
42
43        -  size_t count
44
45        -  Size of buf.
46
47
48 Description
49 -----------
50
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.
56
57
58 Return Value
59 ------------
60
61 .. flat-table::
62     :header-rows:  0
63     :stub-columns: 0
64
65
66     -  .. row 1
67
68        -  ``EPERM``
69
70        -  Mode AUDIO_SOURCE_MEMORY not selected.
71
72     -  .. row 2
73
74        -  ``ENOMEM``
75
76        -  Attempted to write more data than the internal buffer can hold.
77
78     -  .. row 3
79
80        -  ``EBADF``
81
82        -  fd is not a valid open file descriptor.