~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/Documentation/userspace-api/media/cec/cec-ioc-receive.rst

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /Documentation/userspace-api/media/cec/cec-ioc-receive.rst (Version linux-6.12-rc7) and /Documentation/userspace-api/media/cec/cec-ioc-receive.rst (Version linux-5.8.18)


  1 .. SPDX-License-Identifier: GFDL-1.1-no-invari !!   1 .. Permission is granted to copy, distribute and/or modify this
  2 .. c:namespace:: CEC                           !!   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/userspace-api/media/fdl-appendix.rst.
                                                   >>   7 ..
                                                   >>   8 .. TODO: replace it to GFDL-1.1-or-later WITH no-invariant-sections
  3                                                     9 
  4 .. _CEC_TRANSMIT:                                  10 .. _CEC_TRANSMIT:
  5 .. _CEC_RECEIVE:                                   11 .. _CEC_RECEIVE:
  6                                                    12 
  7 ***********************************                13 ***********************************
  8 ioctls CEC_RECEIVE and CEC_TRANSMIT                14 ioctls CEC_RECEIVE and CEC_TRANSMIT
  9 ***********************************                15 ***********************************
 10                                                    16 
 11 Name                                               17 Name
 12 ====                                               18 ====
 13                                                    19 
 14 CEC_RECEIVE, CEC_TRANSMIT - Receive or transmi     20 CEC_RECEIVE, CEC_TRANSMIT - Receive or transmit a CEC message
 15                                                    21 
                                                   >>  22 
 16 Synopsis                                           23 Synopsis
 17 ========                                           24 ========
 18                                                    25 
 19 .. c:macro:: CEC_RECEIVE                       !!  26 .. c:function:: int ioctl( int fd, CEC_RECEIVE, struct cec_msg \*argp )
 20                                                !!  27     :name: CEC_RECEIVE
 21 ``int ioctl(int fd, CEC_RECEIVE, struct cec_ms << 
 22                                                    28 
 23 .. c:macro:: CEC_TRANSMIT                      !!  29 .. c:function:: int ioctl( int fd, CEC_TRANSMIT, struct cec_msg \*argp )
 24                                                !!  30     :name: CEC_TRANSMIT
 25 ``int ioctl(int fd, CEC_TRANSMIT, struct cec_m << 
 26                                                    31 
 27 Arguments                                          32 Arguments
 28 =========                                          33 =========
 29                                                    34 
 30 ``fd``                                             35 ``fd``
 31     File descriptor returned by :c:func:`open( !!  36     File descriptor returned by :c:func:`open() <cec-open>`.
 32                                                    37 
 33 ``argp``                                           38 ``argp``
 34     Pointer to struct cec_msg.                     39     Pointer to struct cec_msg.
 35                                                    40 
 36 Description                                        41 Description
 37 ===========                                        42 ===========
 38                                                    43 
 39 To receive a CEC message the application has t     44 To receive a CEC message the application has to fill in the
 40 ``timeout`` field of struct :c:type:`cec_msg`      45 ``timeout`` field of struct :c:type:`cec_msg` and pass it to
 41 :ref:`ioctl CEC_RECEIVE <CEC_RECEIVE>`.            46 :ref:`ioctl CEC_RECEIVE <CEC_RECEIVE>`.
 42 If the file descriptor is in non-blocking mode     47 If the file descriptor is in non-blocking mode and there are no received
 43 messages pending, then it will return -1 and s     48 messages pending, then it will return -1 and set errno to the ``EAGAIN``
 44 error code. If the file descriptor is in block     49 error code. If the file descriptor is in blocking mode and ``timeout``
 45 is non-zero and no message arrived within ``ti     50 is non-zero and no message arrived within ``timeout`` milliseconds, then
 46 it will return -1 and set errno to the ``ETIME     51 it will return -1 and set errno to the ``ETIMEDOUT`` error code.
 47                                                    52 
 48 A received message can be:                         53 A received message can be:
 49                                                    54 
 50 1. a message received from another CEC device      55 1. a message received from another CEC device (the ``sequence`` field will
 51    be 0, ``tx_status`` will be 0 and ``rx_stat !!  56    be 0).
 52 2. the transmit result of an earlier non-block !!  57 2. the result of an earlier non-blocking transmit (the ``sequence`` field will
 53    field will be non-zero, ``tx_status`` will  !!  58    be non-zero).
 54    will be 0).                                 << 
 55 3. the reply to an earlier non-blocking transm << 
 56    be non-zero, ``tx_status`` will be 0 and `` << 
 57                                                    59 
 58 To send a CEC message the application has to f     60 To send a CEC message the application has to fill in the struct
 59 :c:type:`cec_msg` and pass it to :ref:`ioctl C     61 :c:type:`cec_msg` and pass it to :ref:`ioctl CEC_TRANSMIT <CEC_TRANSMIT>`.
 60 The :ref:`ioctl CEC_TRANSMIT <CEC_TRANSMIT>` i     62 The :ref:`ioctl CEC_TRANSMIT <CEC_TRANSMIT>` is only available if
 61 ``CEC_CAP_TRANSMIT`` is set. If there is no mo     63 ``CEC_CAP_TRANSMIT`` is set. If there is no more room in the transmit
 62 queue, then it will return -1 and set errno to     64 queue, then it will return -1 and set errno to the ``EBUSY`` error code.
 63 The transmit queue has enough room for 18 mess     65 The transmit queue has enough room for 18 messages (about 1 second worth
 64 of 2-byte messages). Note that the CEC kernel      66 of 2-byte messages). Note that the CEC kernel framework will also reply
 65 to core messages (see :ref:`cec-core-processin     67 to core messages (see :ref:`cec-core-processing`), so it is not a good
 66 idea to fully fill up the transmit queue.          68 idea to fully fill up the transmit queue.
 67                                                    69 
 68 If the file descriptor is in non-blocking mode     70 If the file descriptor is in non-blocking mode then the transmit will
 69 return 0 and the result of the transmit will b     71 return 0 and the result of the transmit will be available via
 70 :ref:`ioctl CEC_RECEIVE <CEC_RECEIVE>` once th !!  72 :ref:`ioctl CEC_RECEIVE <CEC_RECEIVE>` once the transmit has finished
 71 If a non-blocking transmit also specified wait !!  73 (including waiting for a reply, if requested).
 72 the reply will arrive in a later message. The  !!  74 
 73 be used to associate both transmit results and !!  75 The ``sequence`` field is filled in for every transmit and this can be
 74 transmit.                                      !!  76 checked against the received messages to find the corresponding transmit
                                                   >>  77 result.
 75                                                    78 
 76 Normally calling :ref:`ioctl CEC_TRANSMIT <CEC     79 Normally calling :ref:`ioctl CEC_TRANSMIT <CEC_TRANSMIT>` when the physical
 77 address is invalid (due to e.g. a disconnect)      80 address is invalid (due to e.g. a disconnect) will return ``ENONET``.
 78                                                    81 
 79 However, the CEC specification allows sending      82 However, the CEC specification allows sending messages from 'Unregistered' to
 80 'TV' when the physical address is invalid sinc     83 'TV' when the physical address is invalid since some TVs pull the hotplug detect
 81 pin of the HDMI connector low when they go int     84 pin of the HDMI connector low when they go into standby, or when switching to
 82 another input.                                     85 another input.
 83                                                    86 
 84 When the hotplug detect pin goes low the EDID      87 When the hotplug detect pin goes low the EDID disappears, and thus the
 85 physical address, but the cable is still conne     88 physical address, but the cable is still connected and CEC still works.
 86 In order to detect/wake up the device it is al     89 In order to detect/wake up the device it is allowed to send poll and 'Image/Text
 87 View On' messages from initiator 0xf ('Unregis     90 View On' messages from initiator 0xf ('Unregistered') to destination 0 ('TV').
 88                                                    91 
 89 .. tabularcolumns:: |p{1.0cm}|p{3.5cm}|p{12.8c !!  92 .. tabularcolumns:: |p{1.0cm}|p{3.5cm}|p{13.0cm}|
 90                                                    93 
 91 .. c:type:: cec_msg                                94 .. c:type:: cec_msg
 92                                                    95 
 93 .. cssclass:: longtable                            96 .. cssclass:: longtable
 94                                                    97 
 95 .. flat-table:: struct cec_msg                     98 .. flat-table:: struct cec_msg
 96     :header-rows:  0                               99     :header-rows:  0
 97     :stub-columns: 0                              100     :stub-columns: 0
 98     :widths:       1 1 16                         101     :widths:       1 1 16
 99                                                   102 
100     * - __u64                                     103     * - __u64
101       - ``tx_ts``                                 104       - ``tx_ts``
102       - Timestamp in ns of when the last byte     105       - Timestamp in ns of when the last byte of the message was transmitted.
103         The timestamp has been taken from the     106         The timestamp has been taken from the ``CLOCK_MONOTONIC`` clock. To access
104         the same clock from userspace use :c:f    107         the same clock from userspace use :c:func:`clock_gettime`.
105     * - __u64                                     108     * - __u64
106       - ``rx_ts``                                 109       - ``rx_ts``
107       - Timestamp in ns of when the last byte     110       - Timestamp in ns of when the last byte of the message was received.
108         The timestamp has been taken from the     111         The timestamp has been taken from the ``CLOCK_MONOTONIC`` clock. To access
109         the same clock from userspace use :c:f    112         the same clock from userspace use :c:func:`clock_gettime`.
110     * - __u32                                     113     * - __u32
111       - ``len``                                   114       - ``len``
112       - The length of the message. For :ref:`i    115       - The length of the message. For :ref:`ioctl CEC_TRANSMIT <CEC_TRANSMIT>` this is filled in
113         by the application. The driver will fi    116         by the application. The driver will fill this in for
114         :ref:`ioctl CEC_RECEIVE <CEC_RECEIVE>`    117         :ref:`ioctl CEC_RECEIVE <CEC_RECEIVE>`. For :ref:`ioctl CEC_TRANSMIT <CEC_TRANSMIT>` it will be
115         filled in by the driver with the lengt    118         filled in by the driver with the length of the reply message if ``reply`` was set.
116     * - __u32                                     119     * - __u32
117       - ``timeout``                               120       - ``timeout``
118       - The timeout in milliseconds. This is t    121       - The timeout in milliseconds. This is the time the device will wait
119         for a message to be received before ti    122         for a message to be received before timing out. If it is set to 0,
120         then it will wait indefinitely when it    123         then it will wait indefinitely when it is called by :ref:`ioctl CEC_RECEIVE <CEC_RECEIVE>`.
121         If it is 0 and it is called by :ref:`i    124         If it is 0 and it is called by :ref:`ioctl CEC_TRANSMIT <CEC_TRANSMIT>`,
122         then it will be replaced by 1000 if th    125         then it will be replaced by 1000 if the ``reply`` is non-zero or
123         ignored if ``reply`` is 0.                126         ignored if ``reply`` is 0.
124     * - __u32                                     127     * - __u32
125       - ``sequence``                              128       - ``sequence``
126       - A non-zero sequence number is automati    129       - A non-zero sequence number is automatically assigned by the CEC framework
127         for all transmitted messages. It is us    130         for all transmitted messages. It is used by the CEC framework when it queues
128         the transmit result for a non-blocking !! 131         the transmit result (when transmit was called in non-blocking mode). This
129         to associate the received message with !! 132         allows the application to associate the received message with the original
130                                                !! 133         transmit.
131         In addition, if a non-blocking transmi << 
132         was not 0), then the ``sequence`` fiel << 
133         value of the original transmit. This a << 
134         received message with the original tra << 
135     * - __u32                                     134     * - __u32
136       - ``flags``                                 135       - ``flags``
137       - Flags. See :ref:`cec-msg-flags` for a     136       - Flags. See :ref:`cec-msg-flags` for a list of available flags.
138     * - __u8                                      137     * - __u8
                                                   >> 138       - ``tx_status``
                                                   >> 139       - The status bits of the transmitted message. See
                                                   >> 140         :ref:`cec-tx-status` for the possible status values. It is 0 if
                                                   >> 141         this message was received, not transmitted.
                                                   >> 142     * - __u8
139       - ``msg[16]``                               143       - ``msg[16]``
140       - The message payload. For :ref:`ioctl C    144       - The message payload. For :ref:`ioctl CEC_TRANSMIT <CEC_TRANSMIT>` this is filled in by the
141         application. The driver will fill this    145         application. The driver will fill this in for :ref:`ioctl CEC_RECEIVE <CEC_RECEIVE>`.
142         For :ref:`ioctl CEC_TRANSMIT <CEC_TRAN    146         For :ref:`ioctl CEC_TRANSMIT <CEC_TRANSMIT>` it will be filled in by the driver with
143         the payload of the reply message if ``    147         the payload of the reply message if ``timeout`` was set.
144     * - __u8                                      148     * - __u8
145       - ``reply``                                 149       - ``reply``
146       - Wait until this message is replied. If    150       - Wait until this message is replied. If ``reply`` is 0 and the
147         ``timeout`` is 0, then don't wait for     151         ``timeout`` is 0, then don't wait for a reply but return after
148         transmitting the message. Ignored by :    152         transmitting the message. Ignored by :ref:`ioctl CEC_RECEIVE <CEC_RECEIVE>`.
149         The case where ``reply`` is 0 (this is    153         The case where ``reply`` is 0 (this is the opcode for the Feature Abort
150         message) and ``timeout`` is non-zero i    154         message) and ``timeout`` is non-zero is specifically allowed to make it
151         possible to send a message and wait up    155         possible to send a message and wait up to ``timeout`` milliseconds for a
152         Feature Abort reply. In this case ``rx    156         Feature Abort reply. In this case ``rx_status`` will either be set
153         to :ref:`CEC_RX_STATUS_TIMEOUT <CEC-RX    157         to :ref:`CEC_RX_STATUS_TIMEOUT <CEC-RX-STATUS-TIMEOUT>` or
154         :ref:`CEC_RX_STATUS_FEATURE_ABORT <CEC    158         :ref:`CEC_RX_STATUS_FEATURE_ABORT <CEC-RX-STATUS-FEATURE-ABORT>`.
155                                                   159 
156         If the transmitter message is ``CEC_MS    160         If the transmitter message is ``CEC_MSG_INITIATE_ARC`` then the ``reply``
157         values ``CEC_MSG_REPORT_ARC_INITIATED`    161         values ``CEC_MSG_REPORT_ARC_INITIATED`` and ``CEC_MSG_REPORT_ARC_TERMINATED``
158         are processed differently: either valu    162         are processed differently: either value will match both possible replies.
159         The reason is that the ``CEC_MSG_INITI    163         The reason is that the ``CEC_MSG_INITIATE_ARC`` message is the only CEC
160         message that has two possible replies     164         message that has two possible replies other than Feature Abort. The
161         ``reply`` field will be updated with t    165         ``reply`` field will be updated with the actual reply so that it is
162         synchronized with the contents of the     166         synchronized with the contents of the received message.
163     * - __u8                                      167     * - __u8
164       - ``rx_status``                             168       - ``rx_status``
165       - The status bits of the received messag    169       - The status bits of the received message. See
166         :ref:`cec-rx-status` for the possible  !! 170         :ref:`cec-rx-status` for the possible status values. It is 0 if
                                                   >> 171         this message was transmitted, not received, unless this is the
                                                   >> 172         reply to a transmitted message. In that case both ``rx_status``
                                                   >> 173         and ``tx_status`` are set.
167     * - __u8                                      174     * - __u8
168       - ``tx_status``                             175       - ``tx_status``
169       - The status bits of the transmitted mes    176       - The status bits of the transmitted message. See
170         :ref:`cec-tx-status` for the possible  !! 177         :ref:`cec-tx-status` for the possible status values. It is 0 if
171         When calling :ref:`ioctl CEC_TRANSMIT  !! 178         this message was received, not transmitted.
172         this field will be 0 if the transmit s << 
173         result is known immediately. The latte << 
174         to transmit a Poll message to yourself << 
175         :ref:`CEC_TX_STATUS_NACK <CEC-TX-STATU << 
176         transmitting the Poll message.         << 
177     * - __u8                                      179     * - __u8
178       - ``tx_arb_lost_cnt``                       180       - ``tx_arb_lost_cnt``
179       - A counter of the number of transmit at    181       - A counter of the number of transmit attempts that resulted in the
180         Arbitration Lost error. This is only s    182         Arbitration Lost error. This is only set if the hardware supports
181         this, otherwise it is always 0. This c    183         this, otherwise it is always 0. This counter is only valid if the
182         :ref:`CEC_TX_STATUS_ARB_LOST <CEC-TX-S    184         :ref:`CEC_TX_STATUS_ARB_LOST <CEC-TX-STATUS-ARB-LOST>` status bit is set.
183     * - __u8                                      185     * - __u8
184       - ``tx_nack_cnt``                           186       - ``tx_nack_cnt``
185       - A counter of the number of transmit at    187       - A counter of the number of transmit attempts that resulted in the
186         Not Acknowledged error. This is only s    188         Not Acknowledged error. This is only set if the hardware supports
187         this, otherwise it is always 0. This c    189         this, otherwise it is always 0. This counter is only valid if the
188         :ref:`CEC_TX_STATUS_NACK <CEC-TX-STATU    190         :ref:`CEC_TX_STATUS_NACK <CEC-TX-STATUS-NACK>` status bit is set.
189     * - __u8                                      191     * - __u8
190       - ``tx_low_drive_cnt``                      192       - ``tx_low_drive_cnt``
191       - A counter of the number of transmit at    193       - A counter of the number of transmit attempts that resulted in the
192         Arbitration Lost error. This is only s    194         Arbitration Lost error. This is only set if the hardware supports
193         this, otherwise it is always 0. This c    195         this, otherwise it is always 0. This counter is only valid if the
194         :ref:`CEC_TX_STATUS_LOW_DRIVE <CEC-TX-    196         :ref:`CEC_TX_STATUS_LOW_DRIVE <CEC-TX-STATUS-LOW-DRIVE>` status bit is set.
195     * - __u8                                      197     * - __u8
196       - ``tx_error_cnt``                          198       - ``tx_error_cnt``
197       - A counter of the number of transmit er    199       - A counter of the number of transmit errors other than Arbitration
198         Lost or Not Acknowledged. This is only    200         Lost or Not Acknowledged. This is only set if the hardware
199         supports this, otherwise it is always     201         supports this, otherwise it is always 0. This counter is only
200         valid if the :ref:`CEC_TX_STATUS_ERROR    202         valid if the :ref:`CEC_TX_STATUS_ERROR <CEC-TX-STATUS-ERROR>` status bit is set.
201                                                   203 
202 .. tabularcolumns:: |p{6.2cm}|p{1.0cm}|p{10.1c !! 204 
                                                   >> 205 .. tabularcolumns:: |p{6.2cm}|p{1.0cm}|p{10.3cm}|
203                                                   206 
204 .. _cec-msg-flags:                                207 .. _cec-msg-flags:
205                                                   208 
206 .. flat-table:: Flags for struct cec_msg          209 .. flat-table:: Flags for struct cec_msg
207     :header-rows:  0                              210     :header-rows:  0
208     :stub-columns: 0                              211     :stub-columns: 0
209     :widths:       3 1 4                          212     :widths:       3 1 4
210                                                   213 
211     * .. _`CEC-MSG-FL-REPLY-TO-FOLLOWERS`:        214     * .. _`CEC-MSG-FL-REPLY-TO-FOLLOWERS`:
212                                                   215 
213       - ``CEC_MSG_FL_REPLY_TO_FOLLOWERS``         216       - ``CEC_MSG_FL_REPLY_TO_FOLLOWERS``
214       - 1                                         217       - 1
215       - If a CEC transmit expects a reply, the    218       - If a CEC transmit expects a reply, then by default that reply is only sent to
216         the filehandle that called :ref:`ioctl    219         the filehandle that called :ref:`ioctl CEC_TRANSMIT <CEC_TRANSMIT>`. If this
217         flag is set, then the reply is also se    220         flag is set, then the reply is also sent to all followers, if any. If the
218         filehandle that called :ref:`ioctl CEC    221         filehandle that called :ref:`ioctl CEC_TRANSMIT <CEC_TRANSMIT>` is also a
219         follower, then that filehandle will re    222         follower, then that filehandle will receive the reply twice: once as the
220         result of the :ref:`ioctl CEC_TRANSMIT    223         result of the :ref:`ioctl CEC_TRANSMIT <CEC_TRANSMIT>`, and once via
221         :ref:`ioctl CEC_RECEIVE <CEC_RECEIVE>`    224         :ref:`ioctl CEC_RECEIVE <CEC_RECEIVE>`.
222                                                   225 
223     * .. _`CEC-MSG-FL-RAW`:                       226     * .. _`CEC-MSG-FL-RAW`:
224                                                   227 
225       - ``CEC_MSG_FL_RAW``                        228       - ``CEC_MSG_FL_RAW``
226       - 2                                         229       - 2
227       - Normally CEC messages are validated be    230       - Normally CEC messages are validated before transmitting them. If this
228         flag is set when :ref:`ioctl CEC_TRANS    231         flag is set when :ref:`ioctl CEC_TRANSMIT <CEC_TRANSMIT>` is called,
229         then no validation takes place and the    232         then no validation takes place and the message is transmitted as-is.
230         This is useful when debugging CEC issu    233         This is useful when debugging CEC issues.
231         This flag is only allowed if the proce    234         This flag is only allowed if the process has the ``CAP_SYS_RAWIO``
232         capability. If that is not set, then t    235         capability. If that is not set, then the ``EPERM`` error code is
233         returned.                                 236         returned.
234                                                   237 
235     * .. _`CEC-MSG-FL-REPLY-VENDOR-ID`:        << 
236                                                << 
237       - ``CEC_MSG_FL_REPLY_VENDOR_ID``         << 
238       - 4                                      << 
239       - This flag is only available if the ``C << 
240         is set. If this flag is set, then the  << 
241         the ``CEC_MSG_VENDOR_COMMAND_WITH_ID`` << 
242         (in bytes 1-4 of the message), followe << 
243         ``reply`` field.                       << 
244                                                << 
245         Note that this assumes that the byte a << 
246         vendor-specific opcode.                << 
247                                                   238 
248         This flag makes it easier to wait for  !! 239 .. tabularcolumns:: |p{5.6cm}|p{0.9cm}|p{11.0cm}|
249                                                << 
250 .. tabularcolumns:: |p{5.6cm}|p{0.9cm}|p{10.8c << 
251                                                   240 
252 .. _cec-tx-status:                                241 .. _cec-tx-status:
253                                                   242 
254 .. flat-table:: CEC Transmit Status               243 .. flat-table:: CEC Transmit Status
255     :header-rows:  0                              244     :header-rows:  0
256     :stub-columns: 0                              245     :stub-columns: 0
257     :widths:       3 1 16                         246     :widths:       3 1 16
258                                                   247 
259     * .. _`CEC-TX-STATUS-OK`:                     248     * .. _`CEC-TX-STATUS-OK`:
260                                                   249 
261       - ``CEC_TX_STATUS_OK``                      250       - ``CEC_TX_STATUS_OK``
262       - 0x01                                      251       - 0x01
263       - The message was transmitted successful    252       - The message was transmitted successfully. This is mutually
264         exclusive with :ref:`CEC_TX_STATUS_MAX    253         exclusive with :ref:`CEC_TX_STATUS_MAX_RETRIES <CEC-TX-STATUS-MAX-RETRIES>`.
265         Other bits can still be set if earlier    254         Other bits can still be set if earlier attempts met with failure before
266         the transmit was eventually successful    255         the transmit was eventually successful.
267     * .. _`CEC-TX-STATUS-ARB-LOST`:               256     * .. _`CEC-TX-STATUS-ARB-LOST`:
268                                                   257 
269       - ``CEC_TX_STATUS_ARB_LOST``                258       - ``CEC_TX_STATUS_ARB_LOST``
270       - 0x02                                      259       - 0x02
271       - CEC line arbitration was lost, i.e. an    260       - CEC line arbitration was lost, i.e. another transmit started at the
272         same time with a higher priority. Opti    261         same time with a higher priority. Optional status, not all hardware
273         can detect this error condition.          262         can detect this error condition.
274     * .. _`CEC-TX-STATUS-NACK`:                   263     * .. _`CEC-TX-STATUS-NACK`:
275                                                   264 
276       - ``CEC_TX_STATUS_NACK``                    265       - ``CEC_TX_STATUS_NACK``
277       - 0x04                                      266       - 0x04
278       - Message was not acknowledged. Note tha    267       - Message was not acknowledged. Note that some hardware cannot tell apart
279         a 'Not Acknowledged' status from other    268         a 'Not Acknowledged' status from other error conditions, i.e. the result
280         of a transmit is just OK or FAIL. In t    269         of a transmit is just OK or FAIL. In that case this status will be
281         returned when the transmit failed.        270         returned when the transmit failed.
282     * .. _`CEC-TX-STATUS-LOW-DRIVE`:              271     * .. _`CEC-TX-STATUS-LOW-DRIVE`:
283                                                   272 
284       - ``CEC_TX_STATUS_LOW_DRIVE``               273       - ``CEC_TX_STATUS_LOW_DRIVE``
285       - 0x08                                      274       - 0x08
286       - Low drive was detected on the CEC bus.    275       - Low drive was detected on the CEC bus. This indicates that a
287         follower detected an error on the bus     276         follower detected an error on the bus and requests a
288         retransmission. Optional status, not a    277         retransmission. Optional status, not all hardware can detect this
289         error condition.                          278         error condition.
290     * .. _`CEC-TX-STATUS-ERROR`:                  279     * .. _`CEC-TX-STATUS-ERROR`:
291                                                   280 
292       - ``CEC_TX_STATUS_ERROR``                   281       - ``CEC_TX_STATUS_ERROR``
293       - 0x10                                      282       - 0x10
294       - Some error occurred. This is used for     283       - Some error occurred. This is used for any errors that do not fit
295         ``CEC_TX_STATUS_ARB_LOST`` or ``CEC_TX    284         ``CEC_TX_STATUS_ARB_LOST`` or ``CEC_TX_STATUS_LOW_DRIVE``, either because
296         the hardware could not tell which erro    285         the hardware could not tell which error occurred, or because the hardware
297         tested for other conditions besides th    286         tested for other conditions besides those two. Optional status.
298     * .. _`CEC-TX-STATUS-MAX-RETRIES`:            287     * .. _`CEC-TX-STATUS-MAX-RETRIES`:
299                                                   288 
300       - ``CEC_TX_STATUS_MAX_RETRIES``             289       - ``CEC_TX_STATUS_MAX_RETRIES``
301       - 0x20                                      290       - 0x20
302       - The transmit failed after one or more     291       - The transmit failed after one or more retries. This status bit is
303         mutually exclusive with :ref:`CEC_TX_S    292         mutually exclusive with :ref:`CEC_TX_STATUS_OK <CEC-TX-STATUS-OK>`.
304         Other bits can still be set to explain    293         Other bits can still be set to explain which failures were seen.
305     * .. _`CEC-TX-STATUS-ABORTED`:                294     * .. _`CEC-TX-STATUS-ABORTED`:
306                                                   295 
307       - ``CEC_TX_STATUS_ABORTED``                 296       - ``CEC_TX_STATUS_ABORTED``
308       - 0x40                                      297       - 0x40
309       - The transmit was aborted due to an HDM    298       - The transmit was aborted due to an HDMI disconnect, or the adapter
310         was unconfigured, or a transmit was in    299         was unconfigured, or a transmit was interrupted, or the driver
311         returned an error when attempting to s    300         returned an error when attempting to start a transmit.
312     * .. _`CEC-TX-STATUS-TIMEOUT`:                301     * .. _`CEC-TX-STATUS-TIMEOUT`:
313                                                   302 
314       - ``CEC_TX_STATUS_TIMEOUT``                 303       - ``CEC_TX_STATUS_TIMEOUT``
315       - 0x80                                      304       - 0x80
316       - The transmit timed out. This should no    305       - The transmit timed out. This should not normally happen and this
317         indicates a driver problem.               306         indicates a driver problem.
318                                                   307 
319 .. tabularcolumns:: |p{5.6cm}|p{0.9cm}|p{10.8c !! 308 
                                                   >> 309 .. tabularcolumns:: |p{5.6cm}|p{0.9cm}|p{11.0cm}|
320                                                   310 
321 .. _cec-rx-status:                                311 .. _cec-rx-status:
322                                                   312 
323 .. flat-table:: CEC Receive Status                313 .. flat-table:: CEC Receive Status
324     :header-rows:  0                              314     :header-rows:  0
325     :stub-columns: 0                              315     :stub-columns: 0
326     :widths:       3 1 16                         316     :widths:       3 1 16
327                                                   317 
328     * .. _`CEC-RX-STATUS-OK`:                     318     * .. _`CEC-RX-STATUS-OK`:
329                                                   319 
330       - ``CEC_RX_STATUS_OK``                      320       - ``CEC_RX_STATUS_OK``
331       - 0x01                                      321       - 0x01
332       - The message was received successfully.    322       - The message was received successfully.
333     * .. _`CEC-RX-STATUS-TIMEOUT`:                323     * .. _`CEC-RX-STATUS-TIMEOUT`:
334                                                   324 
335       - ``CEC_RX_STATUS_TIMEOUT``                 325       - ``CEC_RX_STATUS_TIMEOUT``
336       - 0x02                                      326       - 0x02
337       - The reply to an earlier transmitted me    327       - The reply to an earlier transmitted message timed out.
338     * .. _`CEC-RX-STATUS-FEATURE-ABORT`:          328     * .. _`CEC-RX-STATUS-FEATURE-ABORT`:
339                                                   329 
340       - ``CEC_RX_STATUS_FEATURE_ABORT``           330       - ``CEC_RX_STATUS_FEATURE_ABORT``
341       - 0x04                                      331       - 0x04
342       - The message was received successfully     332       - The message was received successfully but the reply was
343         ``CEC_MSG_FEATURE_ABORT``. This status    333         ``CEC_MSG_FEATURE_ABORT``. This status is only set if this message
344         was the reply to an earlier transmitte    334         was the reply to an earlier transmitted message.
345     * .. _`CEC-RX-STATUS-ABORTED`:                335     * .. _`CEC-RX-STATUS-ABORTED`:
346                                                   336 
347       - ``CEC_RX_STATUS_ABORTED``                 337       - ``CEC_RX_STATUS_ABORTED``
348       - 0x08                                      338       - 0x08
349       - The wait for a reply to an earlier tra    339       - The wait for a reply to an earlier transmitted message was aborted
350         because the HDMI cable was disconnecte    340         because the HDMI cable was disconnected, the adapter was unconfigured
351         or the :ref:`CEC_TRANSMIT <CEC_RECEIVE    341         or the :ref:`CEC_TRANSMIT <CEC_RECEIVE>` that waited for a
352         reply was interrupted.                    342         reply was interrupted.
                                                   >> 343 
353                                                   344 
354                                                   345 
355 Return Value                                      346 Return Value
356 ============                                      347 ============
357                                                   348 
358 On success 0 is returned, on error -1 and the     349 On success 0 is returned, on error -1 and the ``errno`` variable is set
359 appropriately. The generic error codes are des    350 appropriately. The generic error codes are described at the
360 :ref:`Generic Error Codes <gen-errors>` chapte    351 :ref:`Generic Error Codes <gen-errors>` chapter.
361                                                   352 
362 The :ref:`ioctl CEC_RECEIVE <CEC_RECEIVE>` can    353 The :ref:`ioctl CEC_RECEIVE <CEC_RECEIVE>` can return the following
363 error codes:                                      354 error codes:
364                                                   355 
365 EAGAIN                                            356 EAGAIN
366     No messages are in the receive queue, and     357     No messages are in the receive queue, and the filehandle is in non-blocking mode.
367                                                   358 
368 ETIMEDOUT                                         359 ETIMEDOUT
369     The ``timeout`` was reached while waiting     360     The ``timeout`` was reached while waiting for a message.
370                                                   361 
371 ERESTARTSYS                                       362 ERESTARTSYS
372     The wait for a message was interrupted (e.    363     The wait for a message was interrupted (e.g. by Ctrl-C).
373                                                   364 
374 The :ref:`ioctl CEC_TRANSMIT <CEC_TRANSMIT>` c    365 The :ref:`ioctl CEC_TRANSMIT <CEC_TRANSMIT>` can return the following
375 error codes:                                      366 error codes:
376                                                   367 
377 ENOTTY                                            368 ENOTTY
378     The ``CEC_CAP_TRANSMIT`` capability wasn't    369     The ``CEC_CAP_TRANSMIT`` capability wasn't set, so this ioctl is not supported.
379                                                   370 
380 EPERM                                             371 EPERM
381     The CEC adapter is not configured, i.e. :r    372     The CEC adapter is not configured, i.e. :ref:`ioctl CEC_ADAP_S_LOG_ADDRS <CEC_ADAP_S_LOG_ADDRS>`
382     has never been called, or ``CEC_MSG_FL_RAW    373     has never been called, or ``CEC_MSG_FL_RAW`` was used from a process that
383     did not have the ``CAP_SYS_RAWIO`` capabil    374     did not have the ``CAP_SYS_RAWIO`` capability.
384                                                   375 
385 ENONET                                            376 ENONET
386     The CEC adapter is not configured, i.e. :r    377     The CEC adapter is not configured, i.e. :ref:`ioctl CEC_ADAP_S_LOG_ADDRS <CEC_ADAP_S_LOG_ADDRS>`
387     was called, but the physical address is in    378     was called, but the physical address is invalid so no logical address was claimed.
388     An exception is made in this case for tran    379     An exception is made in this case for transmits from initiator 0xf ('Unregistered')
389     to destination 0 ('TV'). In that case the     380     to destination 0 ('TV'). In that case the transmit will proceed as usual.
390                                                   381 
391 EBUSY                                             382 EBUSY
392     Another filehandle is in exclusive followe    383     Another filehandle is in exclusive follower or initiator mode, or the filehandle
393     is in mode ``CEC_MODE_NO_INITIATOR``. This    384     is in mode ``CEC_MODE_NO_INITIATOR``. This is also returned if the transmit
394     queue is full.                                385     queue is full.
395                                                   386 
396 EINVAL                                            387 EINVAL
397     The contents of struct :c:type:`cec_msg` i    388     The contents of struct :c:type:`cec_msg` is invalid.
398                                                   389 
399 ERESTARTSYS                                       390 ERESTARTSYS
400     The wait for a successful transmit was int    391     The wait for a successful transmit was interrupted (e.g. by Ctrl-C).
                                                      

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php