Linux 4.8.3
[linux/fpc-iii.git] / Documentation / media / uapi / dvb / fe-read-status.rst
blob624ed9d06488e2e64caa6caaad800f9674537f93
1 .. -*- coding: utf-8; mode: rst -*-
3 .. _FE_READ_STATUS:
5 ********************
6 ioctl FE_READ_STATUS
7 ********************
9 Name
10 ====
12 FE_READ_STATUS - Returns status information about the front-end. This call only requires - read-only access to the device
15 Synopsis
16 ========
18 .. cpp:function:: int ioctl( int fd, int request, unsigned int *status )
21 Arguments
22 =========
24 ``fd``
25     File descriptor returned by :ref:`open() <frontend_f_open>`.
27 ``request``
28     FE_READ_STATUS
30 ``status``
31     pointer to a bitmask integer filled with the values defined by enum
32     :ref:`fe_status <fe-status>`.
35 Description
36 ===========
38 All DVB frontend devices support the ``FE_READ_STATUS`` ioctl. It is
39 used to check about the locking status of the frontend after being
40 tuned. The ioctl takes a pointer to an integer where the status will be
41 written.
43 .. note:: The size of status is actually sizeof(enum fe_status), with
44    varies according with the architecture. This needs to be fixed in the
45    future.
48 .. _fe-status-t:
50 int fe_status
51 =============
53 The fe_status parameter is used to indicate the current state and/or
54 state changes of the frontend hardware. It is produced using the enum
55 :ref:`fe_status <fe-status>` values on a bitmask
58 .. _fe-status:
60 .. flat-table:: enum fe_status
61     :header-rows:  1
62     :stub-columns: 0
65     -  .. row 1
67        -  ID
69        -  Description
71     -  .. row 2
73        -  .. _FE-HAS-SIGNAL:
75           ``FE_HAS_SIGNAL``
77        -  The frontend has found something above the noise level
79     -  .. row 3
81        -  .. _FE-HAS-CARRIER:
83           ``FE_HAS_CARRIER``
85        -  The frontend has found a DVB signal
87     -  .. row 4
89        -  .. _FE-HAS-VITERBI:
91           ``FE_HAS_VITERBI``
93        -  The frontend FEC inner coding (Viterbi, LDPC or other inner code)
94           is stable
96     -  .. row 5
98        -  .. _FE-HAS-SYNC:
100           ``FE_HAS_SYNC``
102        -  Synchronization bytes was found
104     -  .. row 6
106        -  .. _FE-HAS-LOCK:
108           ``FE_HAS_LOCK``
110        -  The DVB were locked and everything is working
112     -  .. row 7
114        -  .. _FE-TIMEDOUT:
116           ``FE_TIMEDOUT``
118        -  no lock within the last about 2 seconds
120     -  .. row 8
122        -  .. _FE-REINIT:
124           ``FE_REINIT``
126        -  The frontend was reinitialized, application is recommended to
127           reset DiSEqC, tone and parameters
130 Return Value
131 ============
133 On success 0 is returned, on error -1 and the ``errno`` variable is set
134 appropriately. The generic error codes are described at the
135 :ref:`Generic Error Codes <gen-errors>` chapter.