Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid
[cascardo/linux.git] / Documentation / media / uapi / dvb / dmx-fread.rst
1 .. -*- coding: utf-8; mode: rst -*-
2
3 .. _dmx_fread:
4
5 ================
6 DVB demux read()
7 ================
8
9 Name
10 ----
11
12 DVB demux read()
13
14
15 Synopsis
16 --------
17
18 .. c:function:: size_t read(int fd, void *buf, size_t count)
19     :name: dvb-dmx-read
20
21 Arguments
22 ---------
23
24 ``fd``
25   File descriptor returned by a previous call to :c:func:`open() <dvb-ca-open>`.
26
27  ``buf``
28    Buffer to be filled
29
30 ``count``
31    Max number of bytes to read
32
33 Description
34 -----------
35
36 This system call returns filtered data, which might be section or PES
37 data. The filtered data is transferred from the driver’s internal
38 circular buffer to buf. The maximum amount of data to be transferred is
39 implied by count.
40
41 Return Value
42 ------------
43
44 .. tabularcolumns:: |p{2.5cm}|p{15.0cm}|
45
46 .. flat-table::
47     :header-rows:  0
48     :stub-columns: 0
49
50
51     -  .. row 1
52
53        -  ``EWOULDBLOCK``
54
55        -  No data to return and O_NONBLOCK was specified.
56
57     -  .. row 2
58
59        -  ``EBADF``
60
61        -  fd is not a valid open file descriptor.
62
63     -  .. row 3
64
65        -  ``ECRC``
66
67        -  Last section had a CRC error - no data returned. The buffer is
68           flushed.
69
70     -  .. row 4
71
72        -  ``EOVERFLOW``
73
74        -
75
76     -  .. row 5
77
78        -
79        -  The filtered data was not read from the buffer in due time,
80           resulting in non-read data being lost. The buffer is flushed.
81
82     -  .. row 6
83
84        -  ``ETIMEDOUT``
85
86        -  The section was not loaded within the stated timeout period. See
87           ioctl DMX_SET_FILTER for how to set a timeout.
88
89     -  .. row 7
90
91        -  ``EFAULT``
92
93        -  The driver failed to write to the callers buffer due to an invalid
94           \*buf pointer.