Merge tag 'for-v4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux...
[sfrench/cifs-2.6.git] / Documentation / media / uapi / dvb / dmx-set-filter.rst
1 .. Permission is granted to copy, distribute and/or modify this
2 .. document under the terms of the GNU Free Documentation License,
3 .. Version 1.1 or any later version published by the Free Software
4 .. Foundation, with no Invariant Sections, no Front-Cover Texts
5 .. and no Back-Cover Texts. A copy of the license is included at
6 .. Documentation/media/uapi/fdl-appendix.rst.
7 ..
8 .. TODO: replace it to GFDL-1.1-or-later WITH no-invariant-sections
9
10 .. _DMX_SET_FILTER:
11
12 ==============
13 DMX_SET_FILTER
14 ==============
15
16 Name
17 ----
18
19 DMX_SET_FILTER
20
21
22 Synopsis
23 --------
24
25 .. c:function:: int ioctl( int fd, DMX_SET_FILTER, struct dmx_sct_filter_params *params)
26     :name: DMX_SET_FILTER
27
28 Arguments
29 ---------
30
31 ``fd``
32     File descriptor returned by :c:func:`open() <dvb-dmx-open>`.
33
34 ``params``
35
36     Pointer to structure containing filter parameters.
37
38
39 Description
40 -----------
41
42 This ioctl call sets up a filter according to the filter and mask
43 parameters provided. A timeout may be defined stating number of seconds
44 to wait for a section to be loaded. A value of 0 means that no timeout
45 should be applied. Finally there is a flag field where it is possible to
46 state whether a section should be CRC-checked, whether the filter should
47 be a ”one-shot” filter, i.e. if the filtering operation should be
48 stopped after the first section is received, and whether the filtering
49 operation should be started immediately (without waiting for a
50 :ref:`DMX_START` ioctl call). If a filter was previously set-up, this
51 filter will be canceled, and the receive buffer will be flushed.
52
53
54 Return Value
55 ------------
56
57
58 On success 0 is returned.
59
60 On error -1 is returned, and the ``errno`` variable is set
61 appropriately.
62
63 The generic error codes are described at the
64 :ref:`Generic Error Codes <gen-errors>` chapter.