18c2ecf20Sopenharmony_ci.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
28c2ecf20Sopenharmony_ci.. c:namespace:: DTV.fe
38c2ecf20Sopenharmony_ci
48c2ecf20Sopenharmony_ci.. _FE_READ_STATUS:
58c2ecf20Sopenharmony_ci
68c2ecf20Sopenharmony_ci********************
78c2ecf20Sopenharmony_ciioctl FE_READ_STATUS
88c2ecf20Sopenharmony_ci********************
98c2ecf20Sopenharmony_ci
108c2ecf20Sopenharmony_ciName
118c2ecf20Sopenharmony_ci====
128c2ecf20Sopenharmony_ci
138c2ecf20Sopenharmony_ciFE_READ_STATUS - Returns status information about the front-end. This call only requires - read-only access to the device
148c2ecf20Sopenharmony_ci
158c2ecf20Sopenharmony_ciSynopsis
168c2ecf20Sopenharmony_ci========
178c2ecf20Sopenharmony_ci
188c2ecf20Sopenharmony_ci.. c:macro:: FE_READ_STATUS
198c2ecf20Sopenharmony_ci
208c2ecf20Sopenharmony_ci``int ioctl(int fd, FE_READ_STATUS, unsigned int *status)``
218c2ecf20Sopenharmony_ci
228c2ecf20Sopenharmony_ciArguments
238c2ecf20Sopenharmony_ci=========
248c2ecf20Sopenharmony_ci
258c2ecf20Sopenharmony_ci``fd``
268c2ecf20Sopenharmony_ci    File descriptor returned by :c:func:`open()`.
278c2ecf20Sopenharmony_ci
288c2ecf20Sopenharmony_ci``status``
298c2ecf20Sopenharmony_ci    pointer to a bitmask integer filled with the values defined by enum
308c2ecf20Sopenharmony_ci    :c:type:`fe_status`.
318c2ecf20Sopenharmony_ci
328c2ecf20Sopenharmony_ciDescription
338c2ecf20Sopenharmony_ci===========
348c2ecf20Sopenharmony_ci
358c2ecf20Sopenharmony_ciAll Digital TV frontend devices support the ``FE_READ_STATUS`` ioctl. It is
368c2ecf20Sopenharmony_ciused to check about the locking status of the frontend after being
378c2ecf20Sopenharmony_cituned. The ioctl takes a pointer to an integer where the status will be
388c2ecf20Sopenharmony_ciwritten.
398c2ecf20Sopenharmony_ci
408c2ecf20Sopenharmony_ci.. note::
418c2ecf20Sopenharmony_ci
428c2ecf20Sopenharmony_ci   The size of status is actually sizeof(enum fe_status), with
438c2ecf20Sopenharmony_ci   varies according with the architecture. This needs to be fixed in the
448c2ecf20Sopenharmony_ci   future.
458c2ecf20Sopenharmony_ci
468c2ecf20Sopenharmony_ciint fe_status
478c2ecf20Sopenharmony_ci=============
488c2ecf20Sopenharmony_ci
498c2ecf20Sopenharmony_ciThe fe_status parameter is used to indicate the current state and/or
508c2ecf20Sopenharmony_cistate changes of the frontend hardware. It is produced using the enum
518c2ecf20Sopenharmony_ci:c:type:`fe_status` values on a bitmask
528c2ecf20Sopenharmony_ci
538c2ecf20Sopenharmony_ciReturn Value
548c2ecf20Sopenharmony_ci============
558c2ecf20Sopenharmony_ci
568c2ecf20Sopenharmony_ciOn success 0 is returned.
578c2ecf20Sopenharmony_ci
588c2ecf20Sopenharmony_ciOn error -1 is returned, and the ``errno`` variable is set
598c2ecf20Sopenharmony_ciappropriately.
608c2ecf20Sopenharmony_ci
618c2ecf20Sopenharmony_ciGeneric error codes are described at the
628c2ecf20Sopenharmony_ci:ref:`Generic Error Codes <gen-errors>` chapter.
63