blob: 4980ae7953ef382b3721f142c4b677ba1f1a83d9 [file] [log] [blame]
Mauro Carvalho Chehab47d23e32016-07-05 10:37:31 -03001.. -*- coding: utf-8; mode: rst -*-
2
3.. _audio_fwrite:
4
Mauro Carvalho Chehab699f19e2017-09-01 12:28:16 -04005=========================
6Digital TV audio write()
7=========================
Mauro Carvalho Chehab47d23e32016-07-05 10:37:31 -03008
Mauro Carvalho Chehab15e7d612016-07-05 15:14:35 -03009Name
Mauro Carvalho Chehab586027c2016-07-05 07:58:48 -030010----
Mauro Carvalho Chehab47d23e32016-07-05 10:37:31 -030011
Mauro Carvalho Chehab699f19e2017-09-01 12:28:16 -040012Digital TV audio write()
Mauro Carvalho Chehab47d23e32016-07-05 10:37:31 -030013
Mauro Carvalho Chehabcf8076c2016-08-19 16:56:15 -030014.. attention:: This ioctl is deprecated
Mauro Carvalho Chehab15e7d612016-07-05 15:14:35 -030015
16Synopsis
Mauro Carvalho Chehab47d23e32016-07-05 10:37:31 -030017--------
18
Mauro Carvalho Chehab1b81f012016-08-19 12:00:43 -030019.. c:function:: size_t write(int fd, const void *buf, size_t count)
Mauro Carvalho Chehabcf8076c2016-08-19 16:56:15 -030020 :name: dvb-audio-write
Mauro Carvalho Chehab47d23e32016-07-05 10:37:31 -030021
Mauro Carvalho Chehab47d23e32016-07-05 10:37:31 -030022
Mauro Carvalho Chehab15e7d612016-07-05 15:14:35 -030023Arguments
Mauro Carvalho Chehab586027c2016-07-05 07:58:48 -030024---------
Mauro Carvalho Chehab47d23e32016-07-05 10:37:31 -030025
26.. flat-table::
27 :header-rows: 0
28 :stub-columns: 0
29
30
31 - .. row 1
32
33 - int fd
34
35 - File descriptor returned by a previous call to open().
36
37 - .. row 2
38
39 - void \*buf
40
41 - Pointer to the buffer containing the PES data.
42
43 - .. row 3
44
45 - size_t count
46
47 - Size of buf.
48
49
Mauro Carvalho Chehab15e7d612016-07-05 15:14:35 -030050Description
Mauro Carvalho Chehab586027c2016-07-05 07:58:48 -030051-----------
52
53This system call can only be used if AUDIO_SOURCE_MEMORY is selected
54in the ioctl call AUDIO_SELECT_SOURCE. The data provided shall be in
55PES format. If O_NONBLOCK is not specified the function will block
56until buffer space is available. The amount of data to be transferred is
57implied by count.
58
59
Mauro Carvalho Chehab15e7d612016-07-05 15:14:35 -030060Return Value
Mauro Carvalho Chehab47d23e32016-07-05 10:37:31 -030061------------
62
Mauro Carvalho Chehab47d23e32016-07-05 10:37:31 -030063.. flat-table::
64 :header-rows: 0
65 :stub-columns: 0
66
67
68 - .. row 1
69
70 - ``EPERM``
71
72 - Mode AUDIO_SOURCE_MEMORY not selected.
73
74 - .. row 2
75
76 - ``ENOMEM``
77
78 - Attempted to write more data than the internal buffer can hold.
79
80 - .. row 3
81
82 - ``EBADF``
83
84 - fd is not a valid open file descriptor.