Merge tag 'powerpc-5.10-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc...
[linux-2.6-microblaze.git] / Documentation / userspace-api / media / dvb / audio-fwrite.rst
1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
2 .. c:namespace:: DTV.audio
3
4 .. _audio_fwrite:
5
6 =========================
7 Digital TV audio write()
8 =========================
9
10 Name
11 ----
12
13 Digital TV audio write()
14
15 .. attention:: This ioctl is deprecated
16
17 Synopsis
18 --------
19
20 .. c:function:: size_t write(int fd, const void *buf, size_t count)
21
22 Arguments
23 ---------
24
25 .. flat-table::
26     :header-rows:  0
27     :stub-columns: 0
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 Description
48 -----------
49
50 This system call can only be used if AUDIO_SOURCE_MEMORY is selected
51 in the ioctl call AUDIO_SELECT_SOURCE. The data provided shall be in
52 PES format. If O_NONBLOCK is not specified the function will block
53 until buffer space is available. The amount of data to be transferred is
54 implied by count.
55
56 Return Value
57 ------------
58
59 .. flat-table::
60     :header-rows:  0
61     :stub-columns: 0
62
63     -  .. row 1
64
65        -  ``EPERM``
66
67        -  Mode AUDIO_SOURCE_MEMORY not selected.
68
69     -  .. row 2
70
71        -  ``ENOMEM``
72
73        -  Attempted to write more data than the internal buffer can hold.
74
75     -  .. row 3
76
77        -  ``EBADF``
78
79        -  fd is not a valid open file descriptor.