^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) .. c:namespace:: CEC
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) .. _CEC_DQEVENT:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) *****************
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) ioctl CEC_DQEVENT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) *****************
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) Name
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) ====
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) CEC_DQEVENT - Dequeue a CEC event
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) Synopsis
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) ========
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) .. c:macro:: CEC_DQEVENT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) ``int ioctl(int fd, CEC_DQEVENT, struct cec_event *argp)``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) Arguments
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) =========
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) ``fd``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) File descriptor returned by :c:func:`open()`.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) ``argp``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) Description
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) ===========
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) CEC devices can send asynchronous events. These can be retrieved by
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) calling :c:func:`CEC_DQEVENT`. If the file descriptor is in
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) non-blocking mode and no event is pending, then it will return -1 and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) set errno to the ``EAGAIN`` error code.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) The internal event queues are per-filehandle and per-event type. If
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) there is no more room in a queue then the last event is overwritten with
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) the new one. This means that intermediate results can be thrown away but
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) that the latest event is always available. This also means that is it
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) possible to read two successive events that have the same value (e.g.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) two :ref:`CEC_EVENT_STATE_CHANGE <CEC-EVENT-STATE-CHANGE>` events with
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) the same state). In that case the intermediate state changes were lost but
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) it is guaranteed that the state did change in between the two events.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47) .. tabularcolumns:: |p{1.2cm}|p{2.9cm}|p{13.4cm}|
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) .. c:type:: cec_event_state_change
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) .. flat-table:: struct cec_event_state_change
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) :header-rows: 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53) :stub-columns: 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54) :widths: 1 1 8
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56) * - __u16
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57) - ``phys_addr``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 58) - The current physical address. This is ``CEC_PHYS_ADDR_INVALID`` if no
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 59) valid physical address is set.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 60) * - __u16
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 61) - ``log_addr_mask``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 62) - The current set of claimed logical addresses. This is 0 if no logical
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 63) addresses are claimed or if ``phys_addr`` is ``CEC_PHYS_ADDR_INVALID``.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 64) If bit 15 is set (``1 << CEC_LOG_ADDR_UNREGISTERED``) then this device
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 65) has the unregistered logical address. In that case all other bits are 0.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 66) * - __u16
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 67) - ``have_conn_info``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 68) - If non-zero, then HDMI connector information is available.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 69) This field is only valid if ``CEC_CAP_CONNECTOR_INFO`` is set. If that
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 70) capability is set and ``have_conn_info`` is zero, then that indicates
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 71) that the HDMI connector device is not instantiated, either because
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 72) the HDMI driver is still configuring the device or because the HDMI
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 73) device was unbound.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 74)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 75) .. c:type:: cec_event_lost_msgs
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 76)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 77) .. tabularcolumns:: |p{1.0cm}|p{2.0cm}|p{14.5cm}|
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 78)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 79) .. flat-table:: struct cec_event_lost_msgs
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 80) :header-rows: 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 81) :stub-columns: 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 82) :widths: 1 1 16
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 83)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 84) * - __u32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 85) - ``lost_msgs``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 86) - Set to the number of lost messages since the filehandle was opened
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 87) or since the last time this event was dequeued for this
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 88) filehandle. The messages lost are the oldest messages. So when a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 89) new message arrives and there is no more room, then the oldest
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 90) message is discarded to make room for the new one. The internal
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 91) size of the message queue guarantees that all messages received in
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 92) the last two seconds will be stored. Since messages should be
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 93) replied to within a second according to the CEC specification,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 94) this is more than enough.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 95)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 96) .. tabularcolumns:: |p{1.0cm}|p{4.4cm}|p{2.5cm}|p{9.6cm}|
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 97)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 98) .. c:type:: cec_event
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 99)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) .. flat-table:: struct cec_event
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) :header-rows: 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) :stub-columns: 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) :widths: 1 1 8
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105) * - __u64
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) - ``ts``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) - Timestamp of the event in ns.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) The timestamp has been taken from the ``CLOCK_MONOTONIC`` clock.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) To access the same clock from userspace use :c:func:`clock_gettime`.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112) * - __u32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) - ``event``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) - The CEC event type, see :ref:`cec-events`.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) * - __u32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116) - ``flags``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117) - Event flags, see :ref:`cec-event-flags`.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118) * - union {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) - (anonymous)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) * - struct cec_event_state_change
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) - ``state_change``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122) - The new adapter state as sent by the :ref:`CEC_EVENT_STATE_CHANGE <CEC-EVENT-STATE-CHANGE>`
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123) event.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124) * - struct cec_event_lost_msgs
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125) - ``lost_msgs``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126) - The number of lost messages as sent by the :ref:`CEC_EVENT_LOST_MSGS <CEC-EVENT-LOST-MSGS>`
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127) event.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128) * - }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129) -
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131) .. tabularcolumns:: |p{5.6cm}|p{0.9cm}|p{11.0cm}|
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133) .. _cec-events:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) .. flat-table:: CEC Events Types
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136) :header-rows: 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137) :stub-columns: 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138) :widths: 3 1 16
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140) * .. _`CEC-EVENT-STATE-CHANGE`:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142) - ``CEC_EVENT_STATE_CHANGE``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143) - 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144) - Generated when the CEC Adapter's state changes. When open() is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145) called an initial event will be generated for that filehandle with
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) the CEC Adapter's state at that time.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) * .. _`CEC-EVENT-LOST-MSGS`:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149) - ``CEC_EVENT_LOST_MSGS``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150) - 2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151) - Generated if one or more CEC messages were lost because the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152) application didn't dequeue CEC messages fast enough.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153) * .. _`CEC-EVENT-PIN-CEC-LOW`:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155) - ``CEC_EVENT_PIN_CEC_LOW``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156) - 3
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157) - Generated if the CEC pin goes from a high voltage to a low voltage.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158) Only applies to adapters that have the ``CEC_CAP_MONITOR_PIN``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159) capability set.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160) * .. _`CEC-EVENT-PIN-CEC-HIGH`:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162) - ``CEC_EVENT_PIN_CEC_HIGH``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163) - 4
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164) - Generated if the CEC pin goes from a low voltage to a high voltage.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165) Only applies to adapters that have the ``CEC_CAP_MONITOR_PIN``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166) capability set.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167) * .. _`CEC-EVENT-PIN-HPD-LOW`:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169) - ``CEC_EVENT_PIN_HPD_LOW``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170) - 5
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171) - Generated if the HPD pin goes from a high voltage to a low voltage.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172) Only applies to adapters that have the ``CEC_CAP_MONITOR_PIN``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 173) capability set. When open() is called, the HPD pin can be read and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 174) if the HPD is low, then an initial event will be generated for that
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 175) filehandle.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176) * .. _`CEC-EVENT-PIN-HPD-HIGH`:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178) - ``CEC_EVENT_PIN_HPD_HIGH``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179) - 6
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180) - Generated if the HPD pin goes from a low voltage to a high voltage.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181) Only applies to adapters that have the ``CEC_CAP_MONITOR_PIN``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182) capability set. When open() is called, the HPD pin can be read and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183) if the HPD is high, then an initial event will be generated for that
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184) filehandle.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 185) * .. _`CEC-EVENT-PIN-5V-LOW`:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 186)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 187) - ``CEC_EVENT_PIN_5V_LOW``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 188) - 6
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 189) - Generated if the 5V pin goes from a high voltage to a low voltage.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 190) Only applies to adapters that have the ``CEC_CAP_MONITOR_PIN``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 191) capability set. When open() is called, the 5V pin can be read and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 192) if the 5V is low, then an initial event will be generated for that
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 193) filehandle.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 194) * .. _`CEC-EVENT-PIN-5V-HIGH`:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 195)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 196) - ``CEC_EVENT_PIN_5V_HIGH``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 197) - 7
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 198) - Generated if the 5V pin goes from a low voltage to a high voltage.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 199) Only applies to adapters that have the ``CEC_CAP_MONITOR_PIN``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 200) capability set. When open() is called, the 5V pin can be read and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 201) if the 5V is high, then an initial event will be generated for that
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 202) filehandle.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 203)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 204) .. tabularcolumns:: |p{6.0cm}|p{0.6cm}|p{10.9cm}|
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 205)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 206) .. _cec-event-flags:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 207)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 208) .. flat-table:: CEC Event Flags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 209) :header-rows: 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 210) :stub-columns: 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 211) :widths: 3 1 8
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 212)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 213) * .. _`CEC-EVENT-FL-INITIAL-STATE`:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 214)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 215) - ``CEC_EVENT_FL_INITIAL_STATE``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 216) - 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 217) - Set for the initial events that are generated when the device is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 218) opened. See the table above for which events do this. This allows
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 219) applications to learn the initial state of the CEC adapter at
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 220) open() time.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 221) * .. _`CEC-EVENT-FL-DROPPED-EVENTS`:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 222)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 223) - ``CEC_EVENT_FL_DROPPED_EVENTS``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 224) - 2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 225) - Set if one or more events of the given event type have been dropped.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 226) This is an indication that the application cannot keep up.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 227)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 228)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 229) Return Value
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 230) ============
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 231)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 232) On success 0 is returned, on error -1 and the ``errno`` variable is set
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 233) appropriately. The generic error codes are described at the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 234) :ref:`Generic Error Codes <gen-errors>` chapter.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 235)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 236) The :ref:`ioctl CEC_DQEVENT <CEC_DQEVENT>` can return the following
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 237) error codes:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 238)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 239) EAGAIN
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 240) This is returned when the filehandle is in non-blocking mode and there
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 241) are no pending events.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 242)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 243) ERESTARTSYS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 244) An interrupt (e.g. Ctrl-C) arrived while in blocking mode waiting for
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 245) events to arrive.