sphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget;/translations/zh_CN/userspace-api/media/cec/cec-ioc-receivemodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget;/translations/zh_TW/userspace-api/media/cec/cec-ioc-receivemodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget;/translations/it_IT/userspace-api/media/cec/cec-ioc-receivemodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget;/translations/ja_JP/userspace-api/media/cec/cec-ioc-receivemodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget;/translations/ko_KR/userspace-api/media/cec/cec-ioc-receivemodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget;/translations/sp_SP/userspace-api/media/cec/cec-ioc-receivemodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhcomment)}(h8SPDX-License-Identifier: GFDL-1.1-no-invariants-or-laterh]h8SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later}hhsbah}(h]h ]h"]h$]h&] xml:spacepreserveuh1hhhhhhU/var/lib/git/docbuild/linux/Documentation/userspace-api/media/cec/cec-ioc-receive.rsthKubhtarget)}(h.. _CEC_TRANSMIT:h]h}(h]h ]h"]h$]h&]refid cec-transmituh1hhKhhhhhhubh)}(h.. _CEC_RECEIVE:h]h}(h]h ]h"]h$]h&]h cec-receiveuh1hhKhhhhhhexpect_referenced_by_name} cec_transmithsexpect_referenced_by_id}hhsubhsection)}(hhh](htitle)}(h#ioctls CEC_RECEIVE and CEC_TRANSMITh]h#ioctls CEC_RECEIVE and CEC_TRANSMIT}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhK ubh)}(hhh](h)}(hNameh]hName}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhK ubh paragraph)}(h=CEC_RECEIVE, CEC_TRANSMIT - Receive or transmit a CEC messageh]h=CEC_RECEIVE, CEC_TRANSMIT - Receive or transmit a CEC message}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubeh}(h]nameah ]h"]nameah$]h&]uh1hhhhhhhhK ubh)}(hhh](h)}(hSynopsish]hSynopsis}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubhindex)}(hhh]h}(h]h ]h"]h$]h&]entries](singleCEC.CEC_RECEIVE (C macro)c.CEC.CEC_RECEIVEhNtauh1j!hjhhhNhNubhdesc)}(hhh](hdesc_signature)}(h CEC_RECEIVEh]hdesc_signature_line)}(h CEC_RECEIVEh]h desc_name)}(h CEC_RECEIVEh]h desc_sig_name)}(hj;h]h CEC_RECEIVE}(hjKhhhNhNubah}(h]h ]nah"]h$]h&]uh1jIhjEubah}(h]h ](sig-namedescnameeh"]h$]h&]hhuh1jChj?hhhhhKubah}(h]h ]h"]h$]h&]hh add_permalinkuh1j=sphinx_line_type declaratorhj9hhhhhKubah}(h]j0ah ](sig sig-objecteh"]h$]h&] is_multiline _toc_parts) _toc_namehuh1j7hhhKhj4hhubh desc_content)}(hhh]h}(h]h ]h"]h$]h&]uh1juhj4hhhhhKubeh}(h]h ](cmacroeh"]h$]h&]domainjobjtypejdesctypejnoindex noindexentrynocontentsentryuh1j2hhhjhNhNubh)}(h8``int ioctl(int fd, CEC_RECEIVE, struct cec_msg *argp)``h]hliteral)}(hjh]h4int ioctl(int fd, CEC_RECEIVE, struct cec_msg *argp)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj")}(hhh]h}(h]h ]h"]h$]h&]entries](j.CEC.CEC_TRANSMIT (C macro)c.CEC.CEC_TRANSMIThNtauh1j!hjhhhNhNubj3)}(hhh](j8)}(h CEC_TRANSMITh]j>)}(h CEC_TRANSMITh]jD)}(h CEC_TRANSMITh]jJ)}(hjh]h CEC_TRANSMIT}(hjhhhNhNubah}(h]h ]jUah"]h$]h&]uh1jIhjubah}(h]h ](j\j]eh"]h$]h&]hhuh1jChjhhhhhKubah}(h]h ]h"]h$]h&]hhjguh1j=jhjihjhhhhhKubah}(h]jah ](jmjneh"]h$]h&]jrjs)jthuh1j7hhhKhjhhubjv)}(hhh]h}(h]h ]h"]h$]h&]uh1juhjhhhhhKubeh}(h]h ](jmacroeh"]h$]h&]jjjjjjjjjuh1j2hhhjhNhNubh)}(h9``int ioctl(int fd, CEC_TRANSMIT, struct cec_msg *argp)``h]j)}(hjh]h5int ioctl(int fd, CEC_TRANSMIT, struct cec_msg *argp)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubeh}(h]synopsisah ]h"]synopsisah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h Argumentsh]h Arguments}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubhdefinition_list)}(hhh](hdefinition_list_item)}(h5``fd`` File descriptor returned by :c:func:`open()`. h](hterm)}(h``fd``h]j)}(hj2h]hfd}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj0ubah}(h]h ]h"]h$]h&]uh1j.hhhKhj*ubh definition)}(hhh]h)}(h-File descriptor returned by :c:func:`open()`.h](hFile descriptor returned by }(hjLhhhNhNubh)}(h:c:func:`open()`h]j)}(hjVh]hopen()}(hjXhhhNhNubah}(h]h ](xrefjc-funceh"]h$]h&]uh1jhjTubah}(h]h ]h"]h$]h&]refdoc'userspace-api/media/cec/cec-ioc-receive refdomainjreftypefunc refexplicitrefwarn c:parent_keysphinx.domains.c LookupKey)}data]ju ASTIdentifier)} identifierCECsbNasb reftargetopenuh1hhhhKhjLubh.}(hjLhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjIubah}(h]h ]h"]h$]h&]uh1jGhj*ubeh}(h]h ]h"]h$]h&]uh1j(hhhKhj%ubj))}(h$``argp`` Pointer to struct cec_msg. h](j/)}(h``argp``h]j)}(hjh]hargp}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j.hhhK"hjubjH)}(hhh]h)}(hPointer to struct cec_msg.h]hPointer to struct cec_msg.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK"hjubah}(h]h ]h"]h$]h&]uh1jGhjubeh}(h]h ]h"]h$]h&]uh1j(hhhK"hj%hhubeh}(h]h ]h"]h$]h&]uh1j#hjhhhhhNubeh}(h] argumentsah ]h"] argumentsah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h Descriptionh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhK%ubh)}(hXTo receive a CEC message the application has to fill in the ``timeout`` field of struct :c:type:`cec_msg` and pass it to :ref:`ioctl CEC_RECEIVE `. If the file descriptor is in non-blocking mode and there are no received messages pending, then it will return -1 and set errno to the ``EAGAIN`` error code. If the file descriptor is in blocking mode and ``timeout`` is non-zero and no message arrived within ``timeout`` milliseconds, then it will return -1 and set errno to the ``ETIMEDOUT`` error code.h](h`h]hinline)}(hj1h]hioctl CEC_RECEIVE}(hj5hhhNhNubah}(h]h ](jbstdstd-refeh"]h$]h&]uh1j3hj/ubah}(h]h ]h"]h$]h&]refdocjn refdomainj?reftyperef refexplicitrefwarnj cec_receiveuh1hhhhK'hjubh. If the file descriptor is in non-blocking mode and there are no received messages pending, then it will return -1 and set errno to the }(hjhhhNhNubj)}(h ``EAGAIN``h]hEAGAIN}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh< error code. If the file descriptor is in blocking mode and }(hjhhhNhNubj)}(h ``timeout``h]htimeout}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh+ is non-zero and no message arrived within }(hjhhhNhNubj)}(h ``timeout``h]htimeout}(hjyhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh; milliseconds, then it will return -1 and set errno to the }(hjhhhNhNubj)}(h ``ETIMEDOUT``h]h ETIMEDOUT}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh error code.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK'hjhhubh)}(hA received message can be:h]hA received message can be:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK0hjhhubhenumerated_list)}(hhh](h list_item)}(ha message received from another CEC device (the ``sequence`` field will be 0, ``tx_status`` will be 0 and ``rx_status`` will be non-zero).h]h)}(ha message received from another CEC device (the ``sequence`` field will be 0, ``tx_status`` will be 0 and ``rx_status`` will be non-zero).h](h0a message received from another CEC device (the }(hjhhhNhNubj)}(h ``sequence``h]hsequence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh field will be 0, }(hjhhhNhNubj)}(h ``tx_status``h]h tx_status}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh will be 0 and }(hjhhhNhNubj)}(h ``rx_status``h]h rx_status}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh will be non-zero).}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK2hjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(hthe transmit result of an earlier non-blocking transmit (the ``sequence`` field will be non-zero, ``tx_status`` will be non-zero and ``rx_status`` will be 0).h]h)}(hthe transmit result of an earlier non-blocking transmit (the ``sequence`` field will be non-zero, ``tx_status`` will be non-zero and ``rx_status`` will be 0).h](h=the transmit result of an earlier non-blocking transmit (the }(hj hhhNhNubj)}(h ``sequence``h]hsequence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh field will be non-zero, }(hj hhhNhNubj)}(h ``tx_status``h]h tx_status}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh will be non-zero and }(hj hhhNhNubj)}(h ``rx_status``h]h rx_status}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh will be 0).}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK4hjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(hthe reply to an earlier non-blocking transmit (the ``sequence`` field will be non-zero, ``tx_status`` will be 0 and ``rx_status`` will be non-zero). h]h)}(hthe reply to an earlier non-blocking transmit (the ``sequence`` field will be non-zero, ``tx_status`` will be 0 and ``rx_status`` will be non-zero).h](h3the reply to an earlier non-blocking transmit (the }(hjXhhhNhNubj)}(h ``sequence``h]hsequence}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjXubh field will be non-zero, }(hjXhhhNhNubj)}(h ``tx_status``h]h tx_status}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjXubh will be 0 and }(hjXhhhNhNubj)}(h ``rx_status``h]h rx_status}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjXubh will be non-zero).}(hjXhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK7hjTubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubeh}(h]h ]h"]h$]h&]enumtypearabicprefixhsuffix.uh1jhjhhhhhK2ubh)}(hX]To send a CEC message the application has to fill in the struct :c:type:`cec_msg` and pass it to :ref:`ioctl CEC_TRANSMIT `. The :ref:`ioctl CEC_TRANSMIT ` is only available if ``CEC_CAP_TRANSMIT`` is set. If there is no more room in the transmit queue, then it will return -1 and set errno to the ``EBUSY`` error code. The transmit queue has enough room for 18 messages (about 1 second worth of 2-byte messages). Note that the CEC kernel framework will also reply to core messages (see :ref:`cec-core-processing`), so it is not a good idea to fully fill up the transmit queue.h](h@To send a CEC message the application has to fill in the struct }(hjhhhNhNubh)}(h:c:type:`cec_msg`h]j)}(hjh]hcec_msg}(hjhhhNhNubah}(h]h ](jbjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocjn refdomainjreftypetype refexplicitrefwarnjtjxjcec_msguh1hhhhK:hjubh and pass it to }(hjhhhNhNubh)}(h(:ref:`ioctl CEC_TRANSMIT `h]j4)}(hjh]hioctl CEC_TRANSMIT}(hjhhhNhNubah}(h]h ](jbstdstd-refeh"]h$]h&]uh1j3hjubah}(h]h ]h"]h$]h&]refdocjn refdomainjreftyperef refexplicitrefwarnj cec_transmituh1hhhhK:hjubh. The }(hjhhhNhNubh)}(h(:ref:`ioctl CEC_TRANSMIT `h]j4)}(hjh]hioctl CEC_TRANSMIT}(hjhhhNhNubah}(h]h ](jbstdstd-refeh"]h$]h&]uh1j3hjubah}(h]h ]h"]h$]h&]refdocjn refdomainj reftyperef refexplicitrefwarnj cec_transmituh1hhhhK:hjubh is only available if }(hjhhhNhNubj)}(h``CEC_CAP_TRANSMIT``h]hCEC_CAP_TRANSMIT}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhe is set. If there is no more room in the transmit queue, then it will return -1 and set errno to the }(hjhhhNhNubj)}(h ``EBUSY``h]hEBUSY}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh error code. The transmit queue has enough room for 18 messages (about 1 second worth of 2-byte messages). Note that the CEC kernel framework will also reply to core messages (see }(hjhhhNhNubh)}(h:ref:`cec-core-processing`h]j4)}(hjFh]hcec-core-processing}(hjHhhhNhNubah}(h]h ](jbstdstd-refeh"]h$]h&]uh1j3hjDubah}(h]h ]h"]h$]h&]refdocjn refdomainjRreftyperef refexplicitrefwarnjcec-core-processinguh1hhhhK:hjubh@), so it is not a good idea to fully fill up the transmit queue.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK:hjhhubh)}(hXIf the file descriptor is in non-blocking mode then the transmit will return 0 and the result of the transmit will be available via :ref:`ioctl CEC_RECEIVE ` once the transmit has finished. If a non-blocking transmit also specified waiting for a reply, then the reply will arrive in a later message. The ``sequence`` field can be used to associate both transmit results and replies with the original transmit.h](hIf the file descriptor is in non-blocking mode then the transmit will return 0 and the result of the transmit will be available via }(hjnhhhNhNubh)}(h&:ref:`ioctl CEC_RECEIVE `h]j4)}(hjxh]hioctl CEC_RECEIVE}(hjzhhhNhNubah}(h]h ](jbstdstd-refeh"]h$]h&]uh1j3hjvubah}(h]h ]h"]h$]h&]refdocjn refdomainjreftyperef refexplicitrefwarnj cec_receiveuh1hhhhKDhjnubh once the transmit has finished. If a non-blocking transmit also specified waiting for a reply, then the reply will arrive in a later message. The }(hjnhhhNhNubj)}(h ``sequence``h]hsequence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjnubh] field can be used to associate both transmit results and replies with the original transmit.}(hjnhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKDhjhhubh)}(hNormally calling :ref:`ioctl CEC_TRANSMIT ` when the physical address is invalid (due to e.g. a disconnect) will return ``ENONET``.h](hNormally calling }(hjhhhNhNubh)}(h(:ref:`ioctl CEC_TRANSMIT `h]j4)}(hjh]hioctl CEC_TRANSMIT}(hjhhhNhNubah}(h]h ](jbstdstd-refeh"]h$]h&]uh1j3hjubah}(h]h ]h"]h$]h&]refdocjn refdomainjreftyperef refexplicitrefwarnj cec_transmituh1hhhhKLhjubhM when the physical address is invalid (due to e.g. a disconnect) will return }(hjhhhNhNubj)}(h ``ENONET``h]hENONET}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKLhjhhubh)}(hHowever, the CEC specification allows sending messages from 'Unregistered' to 'TV' when the physical address is invalid since some TVs pull the hotplug detect pin of the HDMI connector low when they go into standby, or when switching to another input.h]hXHowever, the CEC specification allows sending messages from ‘Unregistered’ to ‘TV’ when the physical address is invalid since some TVs pull the hotplug detect pin of the HDMI connector low when they go into standby, or when switching to another input.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKOhjhhubh)}(hX.When the hotplug detect pin goes low the EDID disappears, and thus the physical address, but the cable is still connected and CEC still works. In order to detect/wake up the device it is allowed to send poll and 'Image/Text View On' messages from initiator 0xf ('Unregistered') to destination 0 ('TV').h]hX:When the hotplug detect pin goes low the EDID disappears, and thus the physical address, but the cable is still connected and CEC still works. In order to detect/wake up the device it is allowed to send poll and ‘Image/Text View On’ messages from initiator 0xf (‘Unregistered’) to destination 0 (‘TV’).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKThjhhubhtabular_col_spec)}(hhh]h}(h]h ]h"]h$]h&]spec|p{1.0cm}|p{3.5cm}|p{12.8cm}|uh1jhhhKYhjhhubj")}(hhh]h}(h]h ]h"]h$]h&]entries](j.CEC.cec_msg (C type) c.CEC.cec_msghNtauh1j!hjhhhNhNubj3)}(hhh](j8)}(hcec_msgh]j>)}(h type cec_msgh](hdesc_sig_keyword)}(htypeh]htype}(hj:hhhNhNubah}(h]h ]kah"]h$]h&]uh1j8hj4hhhhhK[ubhdesc_sig_space)}(h h]h }(hjKhhhNhNubah}(h]h ]wah"]h$]h&]uh1jIhj4hhhhhK[ubjD)}(hcec_msgh]jJ)}(hj2h]hcec_msg}(hj^hhhNhNubah}(h]h ]jUah"]h$]h&]uh1jIhjZubah}(h]h ](j\j]eh"]h$]h&]hhuh1jChj4hhhhhK[ubeh}(h]h ]h"]h$]h&]hhjguh1j=jhjihj0hhhhhK[ubah}(h]j+ah ](jmjneh"]h$]h&]jrjs)jthuh1j7hhhK[hj-hhubjv)}(hhh]h}(h]h ]h"]h$]h&]uh1juhj-hhhhhK[ubeh}(h]h ](jtypeeh"]h$]h&]jjjjjjjjjuh1j2hhhjhNhNubhtable)}(hhh](h)}(hstruct cec_msgh]hstruct cec_msg}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK_hjubhtgroup)}(hhh](hcolspec)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jhjubj)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jhjubj)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jhjubhtbody)}(hhh](hrow)}(hhh](hentry)}(hhh]h)}(h__u64h]h__u64}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKdhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h ``tx_ts``h]j)}(hjh]htx_ts}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhKehjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hTimestamp in ns of when the last byte of the message was transmitted. The timestamp has been taken from the ``CLOCK_MONOTONIC`` clock. To access the same clock from userspace use :c:func:`clock_gettime`.h](hlTimestamp in ns of when the last byte of the message was transmitted. The timestamp has been taken from the }(hj hhhNhNubj)}(h``CLOCK_MONOTONIC``h]hCLOCK_MONOTONIC}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh4 clock. To access the same clock from userspace use }(hj hhhNhNubh)}(h:c:func:`clock_gettime`h]j)}(hj'h]hclock_gettime()}(hj)hhhNhNubah}(h]h ](jbjc-funceh"]h$]h&]uh1jhj%ubah}(h]h ]h"]h$]h&]refdocjn refdomainjreftypefunc refexplicitrefwarnjtjxj clock_gettimeuh1hhhhKfhj ubh.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKfhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h__u64h]h__u64}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKihj]ubah}(h]h ]h"]h$]h&]uh1jhjZubj)}(hhh]h)}(h ``rx_ts``h]j)}(hjyh]hrx_ts}(hj{hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjwubah}(h]h ]h"]h$]h&]uh1hhhhKjhjtubah}(h]h ]h"]h$]h&]uh1jhjZubj)}(hhh]h)}(hTimestamp in ns of when the last byte of the message was received. The timestamp has been taken from the ``CLOCK_MONOTONIC`` clock. To access the same clock from userspace use :c:func:`clock_gettime`.h](hiTimestamp in ns of when the last byte of the message was received. The timestamp has been taken from the }(hjhhhNhNubj)}(h``CLOCK_MONOTONIC``h]hCLOCK_MONOTONIC}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh4 clock. To access the same clock from userspace use }(hjhhhNhNubh)}(h:c:func:`clock_gettime`h]j)}(hjh]hclock_gettime()}(hjhhhNhNubah}(h]h ](jbjc-funceh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocjn refdomainjreftypefunc refexplicitrefwarnjtjxj clock_gettimeuh1hhhhKkhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKkhjubah}(h]h ]h"]h$]h&]uh1jhjZubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h__u32h]h__u32}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKnhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h``len``h]j)}(hjh]hlen}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhKohjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hXAThe length of the message. For :ref:`ioctl CEC_TRANSMIT ` this is filled in by the application. The driver will fill this in for :ref:`ioctl CEC_RECEIVE `. For :ref:`ioctl CEC_TRANSMIT ` it will be filled in by the driver with the length of the reply message if ``reply`` was set.h](hThe length of the message. For }(hj#hhhNhNubh)}(h(:ref:`ioctl CEC_TRANSMIT `h]j4)}(hj-h]hioctl CEC_TRANSMIT}(hj/hhhNhNubah}(h]h ](jbstdstd-refeh"]h$]h&]uh1j3hj+ubah}(h]h ]h"]h$]h&]refdocjn refdomainj9reftyperef refexplicitrefwarnj cec_transmituh1hhhhKphj#ubhH this is filled in by the application. The driver will fill this in for }(hj#hhhNhNubh)}(h&:ref:`ioctl CEC_RECEIVE `h]j4)}(hjQh]hioctl CEC_RECEIVE}(hjShhhNhNubah}(h]h ](jbstdstd-refeh"]h$]h&]uh1j3hjOubah}(h]h ]h"]h$]h&]refdocjn refdomainj]reftyperef refexplicitrefwarnj cec_receiveuh1hhhhKphj#ubh. For }(hj#hhhNhNubh)}(h(:ref:`ioctl CEC_TRANSMIT `h]j4)}(hjuh]hioctl CEC_TRANSMIT}(hjwhhhNhNubah}(h]h ](jbstdstd-refeh"]h$]h&]uh1j3hjsubah}(h]h ]h"]h$]h&]refdocjn refdomainjreftyperef refexplicitrefwarnj cec_transmituh1hhhhKphj#ubhL it will be filled in by the driver with the length of the reply message if }(hj#hhhNhNubj)}(h ``reply``h]hreply}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj#ubh was set.}(hj#hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKphj ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h__u32h]h__u32}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKthjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h ``timeout``h]j)}(hjh]htimeout}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhKuhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hXThe timeout in milliseconds. This is the time the device will wait for a message to be received before timing out. If it is set to 0, then it will wait indefinitely when it is called by :ref:`ioctl CEC_RECEIVE `. If it is 0 and it is called by :ref:`ioctl CEC_TRANSMIT `, then it will be replaced by 1000 if the ``reply`` is non-zero or ignored if ``reply`` is 0.h](hThe timeout in milliseconds. This is the time the device will wait for a message to be received before timing out. If it is set to 0, then it will wait indefinitely when it is called by }(hjhhhNhNubh)}(h&:ref:`ioctl CEC_RECEIVE `h]j4)}(hj h]hioctl CEC_RECEIVE}(hj hhhNhNubah}(h]h ](jbstdstd-refeh"]h$]h&]uh1j3hj ubah}(h]h ]h"]h$]h&]refdocjn refdomainj reftyperef refexplicitrefwarnj cec_receiveuh1hhhhKvhjubh!. If it is 0 and it is called by }(hjhhhNhNubh)}(h(:ref:`ioctl CEC_TRANSMIT `h]j4)}(hj& h]hioctl CEC_TRANSMIT}(hj( hhhNhNubah}(h]h ](jbstdstd-refeh"]h$]h&]uh1j3hj$ ubah}(h]h ]h"]h$]h&]refdocjn refdomainj2 reftyperef refexplicitrefwarnj cec_transmituh1hhhhKvhjubh*, then it will be replaced by 1000 if the }(hjhhhNhNubj)}(h ``reply``h]hreply}(hjH hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh is non-zero or ignored if }(hjhhhNhNubj)}(h ``reply``h]hreply}(hjZ hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh is 0.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKvhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h__u32h]h__u32}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK|hj ubah}(h]h ]h"]h$]h&]uh1jhj~ ubj)}(hhh]h)}(h ``sequence``h]j)}(hj h]hsequence}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1hhhhK}hj ubah}(h]h ]h"]h$]h&]uh1jhj~ ubj)}(hhh](h)}(hX!A non-zero sequence number is automatically assigned by the CEC framework for all transmitted messages. It is used by the CEC framework when it queues the transmit result for a non-blocking transmit. This allows the application to associate the received message with the original transmit.h]hX!A non-zero sequence number is automatically assigned by the CEC framework for all transmitted messages. It is used by the CEC framework when it queues the transmit result for a non-blocking transmit. This allows the application to associate the received message with the original transmit.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK~hj ubh)}(hXIn addition, if a non-blocking transmit will wait for a reply (ii.e. ``timeout`` was not 0), then the ``sequence`` field of the reply will be set to the sequence value of the original transmit. This allows the application to associate the received message with the original transmit.h](hEIn addition, if a non-blocking transmit will wait for a reply (ii.e. }(hj hhhNhNubj)}(h ``timeout``h]htimeout}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh was not 0), then the }(hj hhhNhNubj)}(h ``sequence``h]hsequence}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh field of the reply will be set to the sequence value of the original transmit. This allows the application to associate the received message with the original transmit.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj ubeh}(h]h ]h"]h$]h&]uh1jhj~ ubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h__u32h]h__u32}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(h ``flags``h]j)}(hj& h]hflags}(hj( hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj$ ubah}(h]h ]h"]h$]h&]uh1hhhhKhj! ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(h>Flags. See :ref:`cec-msg-flags` for a list of available flags.h](h Flags. See }(hjD hhhNhNubh)}(h:ref:`cec-msg-flags`h]j4)}(hjN h]h cec-msg-flags}(hjP hhhNhNubah}(h]h ](jbstdstd-refeh"]h$]h&]uh1j3hjL ubah}(h]h ]h"]h$]h&]refdocjn refdomainjZ reftyperef refexplicitrefwarnj cec-msg-flagsuh1hhhhKhjD ubh for a list of available flags.}(hjD hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjA ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h__u8h]h__u8}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(h ``msg[16]``h]j)}(hj h]hmsg[16]}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(hX>The message payload. For :ref:`ioctl CEC_TRANSMIT ` this is filled in by the application. The driver will fill this in for :ref:`ioctl CEC_RECEIVE `. For :ref:`ioctl CEC_TRANSMIT ` it will be filled in by the driver with the payload of the reply message if ``timeout`` was set.h](hThe message payload. For }(hj hhhNhNubh)}(h(:ref:`ioctl CEC_TRANSMIT `h]j4)}(hj h]hioctl CEC_TRANSMIT}(hj hhhNhNubah}(h]h ](jbstdstd-refeh"]h$]h&]uh1j3hj ubah}(h]h ]h"]h$]h&]refdocjn refdomainj reftyperef refexplicitrefwarnj cec_transmituh1hhhhKhj ubhH this is filled in by the application. The driver will fill this in for }(hj hhhNhNubh)}(h&:ref:`ioctl CEC_RECEIVE `h]j4)}(hj h]hioctl CEC_RECEIVE}(hj hhhNhNubah}(h]h ](jbstdstd-refeh"]h$]h&]uh1j3hj ubah}(h]h ]h"]h$]h&]refdocjn refdomainj reftyperef refexplicitrefwarnj cec_receiveuh1hhhhKhj ubh. For }(hj hhhNhNubh)}(h(:ref:`ioctl CEC_TRANSMIT `h]j4)}(hj h]hioctl CEC_TRANSMIT}(hj hhhNhNubah}(h]h ](jbstdstd-refeh"]h$]h&]uh1j3hj ubah}(h]h ]h"]h$]h&]refdocjn refdomainj reftyperef refexplicitrefwarnj cec_transmituh1hhhhKhj ubhM it will be filled in by the driver with the payload of the reply message if }(hj hhhNhNubj)}(h ``timeout``h]htimeout}(hj3 hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh was set.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h__u8h]h__u8}(hj] hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjZ ubah}(h]h ]h"]h$]h&]uh1jhjW ubj)}(hhh]h)}(h ``reply``h]j)}(hjv h]hreply}(hjx hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjt ubah}(h]h ]h"]h$]h&]uh1hhhhKhjq ubah}(h]h ]h"]h$]h&]uh1jhjW ubj)}(hhh](h)}(hXbWait until this message is replied. If ``reply`` is 0 and the ``timeout`` is 0, then don't wait for a reply but return after transmitting the message. Ignored by :ref:`ioctl CEC_RECEIVE `. The case where ``reply`` is 0 (this is the opcode for the Feature Abort message) and ``timeout`` is non-zero is specifically allowed to make it possible to send a message and wait up to ``timeout`` milliseconds for a Feature Abort reply. In this case ``rx_status`` will either be set to :ref:`CEC_RX_STATUS_TIMEOUT ` or :ref:`CEC_RX_STATUS_FEATURE_ABORT `.h](h'Wait until this message is replied. If }(hj hhhNhNubj)}(h ``reply``h]hreply}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh is 0 and the }(hj hhhNhNubj)}(h ``timeout``h]htimeout}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh[ is 0, then don’t wait for a reply but return after transmitting the message. Ignored by }(hj hhhNhNubh)}(h&:ref:`ioctl CEC_RECEIVE `h]j4)}(hj h]hioctl CEC_RECEIVE}(hj hhhNhNubah}(h]h ](jbstdstd-refeh"]h$]h&]uh1j3hj ubah}(h]h ]h"]h$]h&]refdocjn refdomainj reftyperef refexplicitrefwarnj cec_receiveuh1hhhhKhj ubh. The case where }(hj hhhNhNubj)}(h ``reply``h]hreply}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh= is 0 (this is the opcode for the Feature Abort message) and }(hj hhhNhNubj)}(h ``timeout``h]htimeout}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubhZ is non-zero is specifically allowed to make it possible to send a message and wait up to }(hj hhhNhNubj)}(h ``timeout``h]htimeout}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh6 milliseconds for a Feature Abort reply. In this case }(hj hhhNhNubj)}(h ``rx_status``h]h rx_status}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh will either be set to }(hj hhhNhNubh)}(h4:ref:`CEC_RX_STATUS_TIMEOUT `h]j4)}(hj. h]hCEC_RX_STATUS_TIMEOUT}(hj0 hhhNhNubah}(h]h ](jbstdstd-refeh"]h$]h&]uh1j3hj, ubah}(h]h ]h"]h$]h&]refdocjn refdomainj: reftyperef refexplicitrefwarnjcec-rx-status-timeoutuh1hhhhKhj ubh or }(hj hhhNhNubh)}(h@:ref:`CEC_RX_STATUS_FEATURE_ABORT `h]j4)}(hjR h]hCEC_RX_STATUS_FEATURE_ABORT}(hjT hhhNhNubah}(h]h ](jbstdstd-refeh"]h$]h&]uh1j3hjP ubah}(h]h ]h"]h$]h&]refdocjn refdomainj^ reftyperef refexplicitrefwarnjcec-rx-status-feature-abortuh1hhhhKhj ubh.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj ubh)}(hXIf the transmitter message is ``CEC_MSG_INITIATE_ARC`` then the ``reply`` values ``CEC_MSG_REPORT_ARC_INITIATED`` and ``CEC_MSG_REPORT_ARC_TERMINATED`` are processed differently: either value will match both possible replies. The reason is that the ``CEC_MSG_INITIATE_ARC`` message is the only CEC message that has two possible replies other than Feature Abort. The ``reply`` field will be updated with the actual reply so that it is synchronized with the contents of the received message.h](hIf the transmitter message is }(hjz hhhNhNubj)}(h``CEC_MSG_INITIATE_ARC``h]hCEC_MSG_INITIATE_ARC}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjz ubh then the }(hjz hhhNhNubj)}(h ``reply``h]hreply}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjz ubh values }(hjz hhhNhNubj)}(h ``CEC_MSG_REPORT_ARC_INITIATED``h]hCEC_MSG_REPORT_ARC_INITIATED}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjz ubh and }(hjz hhhNhNubj)}(h!``CEC_MSG_REPORT_ARC_TERMINATED``h]hCEC_MSG_REPORT_ARC_TERMINATED}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjz ubhb are processed differently: either value will match both possible replies. The reason is that the }(hjz hhhNhNubj)}(h``CEC_MSG_INITIATE_ARC``h]hCEC_MSG_INITIATE_ARC}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjz ubh] message is the only CEC message that has two possible replies other than Feature Abort. The }(hjz hhhNhNubj)}(h ``reply``h]hreply}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjz ubhr field will be updated with the actual reply so that it is synchronized with the contents of the received message.}(hjz hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj ubeh}(h]h ]h"]h$]h&]uh1jhjW ubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h__u8h]h__u8}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(h ``rx_status``h]j)}(hj h]h rx_status}(hj! hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(haThe status bits of the received message. See :ref:`cec-rx-status` for the possible status values.h](h-The status bits of the received message. See }(hj= hhhNhNubh)}(h:ref:`cec-rx-status`h]j4)}(hjG h]h cec-rx-status}(hjI hhhNhNubah}(h]h ](jbstdstd-refeh"]h$]h&]uh1j3hjE ubah}(h]h ]h"]h$]h&]refdocjn refdomainjS reftyperef refexplicitrefwarnj cec-rx-statusuh1hhhhKhj= ubh for the possible status values.}(hj= hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj: ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h__u8h]h__u8}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj~ ubah}(h]h ]h"]h$]h&]uh1jhj{ ubj)}(hhh]h)}(h ``tx_status``h]j)}(hj h]h tx_status}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhj{ ubj)}(hhh]h)}(hXThe status bits of the transmitted message. See :ref:`cec-tx-status` for the possible status values. When calling :ref:`ioctl CEC_TRANSMIT ` in non-blocking mode, this field will be 0 if the transmit started, or non-0 if the transmit result is known immediately. The latter would be the case when attempting to transmit a Poll message to yourself. That results in a :ref:`CEC_TX_STATUS_NACK ` without ever actually transmitting the Poll message.h](h0The status bits of the transmitted message. See }(hj hhhNhNubh)}(h:ref:`cec-tx-status`h]j4)}(hj h]h cec-tx-status}(hj hhhNhNubah}(h]h ](jbstdstd-refeh"]h$]h&]uh1j3hj ubah}(h]h ]h"]h$]h&]refdocjn refdomainj reftyperef refexplicitrefwarnj cec-tx-statusuh1hhhhKhj ubh. for the possible status values. When calling }(hj hhhNhNubh)}(h(:ref:`ioctl CEC_TRANSMIT `h]j4)}(hj h]hioctl CEC_TRANSMIT}(hj hhhNhNubah}(h]h ](jbstdstd-refeh"]h$]h&]uh1j3hj ubah}(h]h ]h"]h$]h&]refdocjn refdomainj reftyperef refexplicitrefwarnj cec_transmituh1hhhhKhj ubh in non-blocking mode, this field will be 0 if the transmit started, or non-0 if the transmit result is known immediately. The latter would be the case when attempting to transmit a Poll message to yourself. That results in a }(hj hhhNhNubh)}(h.:ref:`CEC_TX_STATUS_NACK `h]j4)}(hj h]hCEC_TX_STATUS_NACK}(hj hhhNhNubah}(h]h ](jbstdstd-refeh"]h$]h&]uh1j3hjubah}(h]h ]h"]h$]h&]refdocjn refdomainjreftyperef refexplicitrefwarnjcec-tx-status-nackuh1hhhhKhj ubh5 without ever actually transmitting the Poll message.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhj{ ubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h__u8h]h__u8}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjAubah}(h]h ]h"]h$]h&]uh1jhj>ubj)}(hhh]h)}(h``tx_arb_lost_cnt``h]j)}(hj]h]htx_arb_lost_cnt}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj[ubah}(h]h ]h"]h$]h&]uh1hhhhKhjXubah}(h]h ]h"]h$]h&]uh1jhj>ubj)}(hhh]h)}(hXA counter of the number of transmit attempts that resulted in the Arbitration Lost error. This is only set if the hardware supports this, otherwise it is always 0. This counter is only valid if the :ref:`CEC_TX_STATUS_ARB_LOST ` status bit is set.h](hA counter of the number of transmit attempts that resulted in the Arbitration Lost error. This is only set if the hardware supports this, otherwise it is always 0. This counter is only valid if the }(hj{hhhNhNubh)}(h6:ref:`CEC_TX_STATUS_ARB_LOST `h]j4)}(hjh]hCEC_TX_STATUS_ARB_LOST}(hjhhhNhNubah}(h]h ](jbstdstd-refeh"]h$]h&]uh1j3hjubah}(h]h ]h"]h$]h&]refdocjn refdomainjreftyperef refexplicitrefwarnjcec-tx-status-arb-lostuh1hhhhKhj{ubh status bit is set.}(hj{hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjxubah}(h]h ]h"]h$]h&]uh1jhj>ubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h__u8h]h__u8}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h``tx_nack_cnt``h]j)}(hjh]h tx_nack_cnt}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hXA counter of the number of transmit attempts that resulted in the Not Acknowledged error. This is only set if the hardware supports this, otherwise it is always 0. This counter is only valid if the :ref:`CEC_TX_STATUS_NACK ` status bit is set.h](hA counter of the number of transmit attempts that resulted in the Not Acknowledged error. This is only set if the hardware supports this, otherwise it is always 0. This counter is only valid if the }(hjhhhNhNubh)}(h.:ref:`CEC_TX_STATUS_NACK `h]j4)}(hjh]hCEC_TX_STATUS_NACK}(hjhhhNhNubah}(h]h ](jbstdstd-refeh"]h$]h&]uh1j3hjubah}(h]h ]h"]h$]h&]refdocjn refdomainj reftyperef refexplicitrefwarnjcec-tx-status-nackuh1hhhhKhjubh status bit is set.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h__u8h]h__u8}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj7ubah}(h]h ]h"]h$]h&]uh1jhj4ubj)}(hhh]h)}(h``tx_low_drive_cnt``h]j)}(hjSh]htx_low_drive_cnt}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjQubah}(h]h ]h"]h$]h&]uh1hhhhKhjNubah}(h]h ]h"]h$]h&]uh1jhj4ubj)}(hhh]h)}(hXA counter of the number of transmit attempts that resulted in the Arbitration Lost error. This is only set if the hardware supports this, otherwise it is always 0. This counter is only valid if the :ref:`CEC_TX_STATUS_LOW_DRIVE ` status bit is set.h](hA counter of the number of transmit attempts that resulted in the Arbitration Lost error. This is only set if the hardware supports this, otherwise it is always 0. This counter is only valid if the }(hjqhhhNhNubh)}(h8:ref:`CEC_TX_STATUS_LOW_DRIVE `h]j4)}(hj{h]hCEC_TX_STATUS_LOW_DRIVE}(hj}hhhNhNubah}(h]h ](jbstdstd-refeh"]h$]h&]uh1j3hjyubah}(h]h ]h"]h$]h&]refdocjn refdomainjreftyperef refexplicitrefwarnjcec-tx-status-low-driveuh1hhhhKhjqubh status bit is set.}(hjqhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjnubah}(h]h ]h"]h$]h&]uh1jhj4ubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h__u8h]h__u8}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h``tx_error_cnt``h]j)}(hjh]h tx_error_cnt}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hX A counter of the number of transmit errors other than Arbitration Lost or Not Acknowledged. This is only set if the hardware supports this, otherwise it is always 0. This counter is only valid if the :ref:`CEC_TX_STATUS_ERROR ` status bit is set.h](hA counter of the number of transmit errors other than Arbitration Lost or Not Acknowledged. This is only set if the hardware supports this, otherwise it is always 0. This counter is only valid if the }(hjhhhNhNubh)}(h0:ref:`CEC_TX_STATUS_ERROR `h]j4)}(hjh]hCEC_TX_STATUS_ERROR}(hjhhhNhNubah}(h]h ](jbstdstd-refeh"]h$]h&]uh1j3hjubah}(h]h ]h"]h$]h&]refdocjn refdomainjreftyperef refexplicitrefwarnjcec-tx-status-erroruh1hhhhKhjubh status bit is set.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]colsKuh1jhjubeh}(h]id1ah ] longtableah"]h$]h&]uh1jhjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]j|p{6.2cm}|p{1.0cm}|p{10.1cm}|uh1jhhhKhjhhubh)}(h.. _cec-msg-flags:h]h}(h]h ]h"]h$]h&]h cec-msg-flagsuh1hhKhjhhhhubj)}(hhh](h)}(hFlags for struct cec_msgh]hFlags for struct cec_msg}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjTubj)}(hhh](j)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jhjeubj)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jhjeubj)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jhjeubj)}(hhh](j)}(hhh](j)}(hhh](h)}(h$.. _`CEC-MSG-FL-REPLY-TO-FOLLOWERS`:h]h}(h]h ]h"]h$]h&]hcec-msg-fl-reply-to-followersuh1hhKhj)}(hhh](jh)}(hXIf a CEC transmit expects a reply, then by default that reply is only sent to the filehandle that called :ref:`ioctl CEC_TRANSMIT `. If this flag is set, then the reply is also sent to all followers, if any. If the filehandle that called :ref:`ioctl CEC_TRANSMIT ` is also a follower, then that filehandle will receive the reply twice: once as the result of the :ref:`ioctl CEC_TRANSMIT `, and once via :ref:`ioctl CEC_RECEIVE `.h](hiIf a CEC transmit expects a reply, then by default that reply is only sent to the filehandle that called }(hjhhhNhNubh)}(h(:ref:`ioctl CEC_TRANSMIT `h]j4)}(hjh]hioctl CEC_TRANSMIT}(hjhhhNhNubah}(h]h ](jbstdstd-refeh"]h$]h&]uh1j3hjubah}(h]h ]h"]h$]h&]refdocjn refdomainjreftyperef refexplicitrefwarnj cec_transmituh1hhhhKhjubhk. If this flag is set, then the reply is also sent to all followers, if any. If the filehandle that called }(hjhhhNhNubh)}(h(:ref:`ioctl CEC_TRANSMIT `h]j4)}(hjh]hioctl CEC_TRANSMIT}(hjhhhNhNubah}(h]h ](jbstdstd-refeh"]h$]h&]uh1j3hjubah}(h]h ]h"]h$]h&]refdocjn refdomainjreftyperef refexplicitrefwarnj cec_transmituh1hhhhKhjubhb is also a follower, then that filehandle will receive the reply twice: once as the result of the }(hjhhhNhNubh)}(h(:ref:`ioctl CEC_TRANSMIT `h]j4)}(hjh]hioctl CEC_TRANSMIT}(hjhhhNhNubah}(h]h ](jbstdstd-refeh"]h$]h&]uh1j3hjubah}(h]h ]h"]h$]h&]refdocjn refdomainjreftyperef refexplicitrefwarnj cec_transmituh1hhhhKhjubh, and once via }(hjhhhNhNubh)}(h&:ref:`ioctl CEC_RECEIVE `h]j4)}(hjh]hioctl CEC_RECEIVE}(hjhhhNhNubah}(h]h ](jbstdstd-refeh"]h$]h&]uh1j3hjubah}(h]h ]h"]h$]h&]refdocjn refdomainjreftyperef refexplicitrefwarnj cec_receiveuh1hhhhKhjubh.}(hjhhhNhNubeh}(h]jah ]h"]cec-msg-fl-reply-to-followersah$]h&]uh1hhhhKhjh}j9jsh}jjsubeh}(h]h ]h"]h$]h&]uh1jhjububh)}(h!``CEC_MSG_FL_REPLY_TO_FOLLOWERS``h]j)}(hjFh]hCEC_MSG_FL_REPLY_TO_FOLLOWERS}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjDubah}(h]h ]h"]h$]h&]uh1hhhhKhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](jh)}(h1h]h1}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjaubeh}(h]h ]h"]h$]h&]uh1jhjubjeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh](h)}(h.. _`CEC-MSG-FL-RAW`:h]h}(h]h ]h"]h$]h&]hcec-msg-fl-rawuh1hhKhj)}(hhh](jh)}(hXNormally CEC messages are validated before transmitting them. If this flag is set when :ref:`ioctl CEC_TRANSMIT ` is called, then no validation takes place and the message is transmitted as-is. This is useful when debugging CEC issues. This flag is only allowed if the process has the ``CAP_SYS_RAWIO`` capability. If that is not set, then the ``EPERM`` error code is returned.h](hWNormally CEC messages are validated before transmitting them. If this flag is set when }(hjhhhNhNubh)}(h(:ref:`ioctl CEC_TRANSMIT `h]j4)}(hjh]hioctl CEC_TRANSMIT}(hjhhhNhNubah}(h]h ](jbstdstd-refeh"]h$]h&]uh1j3hjubah}(h]h ]h"]h$]h&]refdocjn refdomainjreftyperef refexplicitrefwarnj cec_transmituh1hhhhKhjubh is called, then no validation takes place and the message is transmitted as-is. This is useful when debugging CEC issues. This flag is only allowed if the process has the }(hjhhhNhNubj)}(h``CAP_SYS_RAWIO``h]h CAP_SYS_RAWIO}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh* capability. If that is not set, then the }(hjhhhNhNubj)}(h ``EPERM``h]hEPERM}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh error code is returned.}(hjhhhNhNubeh}(h]jah ]h"]cec-msg-fl-rawah$]h&]uh1hhhhKhjh}jjsh}jjsubeh}(h]h ]h"]h$]h&]uh1jhj~ububh)}(h``CEC_MSG_FL_RAW``h]j)}(hjh]hCEC_MSG_FL_RAW}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhKhjubeh}(h]h ]h"]h$]h&]uh1jhj~ubj)}(hhh](jh)}(h2h]h2}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubeh}(h]h ]h"]h$]h&]uh1jhj~ubjeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh](h)}(h!.. _`CEC-MSG-FL-REPLY-VENDOR-ID`:h]h}(h]h ]h"]h$]h&]hcec-msg-fl-reply-vendor-iduh1hhKhj)}(hhh](j1h)}(hX*This flag is only available if the ``CEC_CAP_REPLY_VENDOR_ID`` capability is set. If this flag is set, then the reply is expected to consist of the ``CEC_MSG_VENDOR_COMMAND_WITH_ID`` opcode followed by the Vendor ID (in bytes 1-4 of the message), followed by the ``struct cec_msg`` ``reply`` field.h](h#This flag is only available if the }(hj?hhhNhNubj)}(h``CEC_CAP_REPLY_VENDOR_ID``h]hCEC_CAP_REPLY_VENDOR_ID}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj?ubhV capability is set. If this flag is set, then the reply is expected to consist of the }(hj?hhhNhNubj)}(h"``CEC_MSG_VENDOR_COMMAND_WITH_ID``h]hCEC_MSG_VENDOR_COMMAND_WITH_ID}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj?ubhQ opcode followed by the Vendor ID (in bytes 1-4 of the message), followed by the }(hj?hhhNhNubj)}(h``struct cec_msg``h]hstruct cec_msg}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj?ubh }(hj?hhhNhNubj)}(h ``reply``h]hreply}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj?ubh field.}(hj?hhhNhNubeh}(h]j;ah ]h"]cec-msg-fl-reply-vendor-idah$]h&]uh1hhhhKhj<h}jj1sh}j;j1subh)}(hUNote that this assumes that the byte after the Vendor ID is a vendor-specific opcode.h]hUNote that this assumes that the byte after the Vendor ID is a vendor-specific opcode.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj<ubh)}(hAThis flag makes it easier to wait for replies to vendor commands.h]hAThis flag makes it easier to wait for replies to vendor commands.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj<ubeh}(h]h ]h"]h$]h&]uh1jhj+ububh)}(h``CEC_MSG_FL_REPLY_VENDOR_ID``h]j)}(hjh]hCEC_MSG_FL_REPLY_VENDOR_ID}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhKhj.ubeh}(h]h ]h"]h$]h&]uh1jhj+ubj)}(hhh](j1h)}(h4h]h4}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubeh}(h]h ]h"]h$]h&]uh1jhj+ubj<eh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjeubeh}(h]h ]h"]h$]h&]colsKuh1jhjTubeh}(h](id2jSeh ]h"] cec-msg-flagsah$]h&]uh1jhjhhhNhNh}jjIsh}jSjIsubj)}(hhh]h}(h]h ]h"]h$]h&]j|p{5.6cm}|p{0.9cm}|p{10.8cm}|uh1jhhhKhjhhubh)}(h.. _cec-tx-status:h]h}(h]h ]h"]h$]h&]h cec-tx-statusuh1hhKhjhhhhubj)}(hhh](h)}(hCEC Transmit Statush]hCEC Transmit Status}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubj)}(hhh](j)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jhj1ubj)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jhj1ubj)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jhj1ubj)}(hhh](j)}(hhh](j)}(hhh](h)}(h.. _`CEC-TX-STATUS-OK`:h]h}(h]h ]h"]h$]h&]hcec-tx-status-okuh1hhMhj)}(hhh](j[h)}(hThe message was transmitted successfully. This is mutually exclusive with :ref:`CEC_TX_STATUS_MAX_RETRIES `. Other bits can still be set if earlier attempts met with failure before the transmit was eventually successful.h](hJThe message was transmitted successfully. This is mutually exclusive with }(hjihhhNhNubh)}(h<:ref:`CEC_TX_STATUS_MAX_RETRIES `h]j4)}(hjsh]hCEC_TX_STATUS_MAX_RETRIES}(hjuhhhNhNubah}(h]h ](jbstdstd-refeh"]h$]h&]uh1j3hjqubah}(h]h ]h"]h$]h&]refdocjn refdomainjreftyperef refexplicitrefwarnjcec-tx-status-max-retriesuh1hhhhMhjiubhq. Other bits can still be set if earlier attempts met with failure before the transmit was eventually successful.}(hjihhhNhNubeh}(h]jeah ]h"]cec-tx-status-okah$]h&]uh1hhhhMhjfh}jj[sh}jej[subeh}(h]h ]h"]h$]h&]uh1jhjUububh)}(h``CEC_TX_STATUS_OK``h]j)}(hjh]hCEC_TX_STATUS_OK}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhMhjXubeh}(h]h ]h"]h$]h&]uh1jhjUubj)}(hhh](j[h)}(h0x01h]h0x01}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubeh}(h]h ]h"]h$]h&]uh1jhjUubjfeh}(h]h ]h"]h$]h&]uh1jhjRubj)}(hhh](j)}(hhh](h)}(h.. _`CEC-TX-STATUS-ARB-LOST`:h]h}(h]h ]h"]h$]h&]hcec-tx-status-arb-lostuh1hhM hj)}(hhh](jh)}(hCEC line arbitration was lost, i.e. another transmit started at the same time with a higher priority. Optional status, not all hardware can detect this error condition.h]hCEC line arbitration was lost, i.e. another transmit started at the same time with a higher priority. Optional status, not all hardware can detect this error condition.}(hjhhhNhNubah}(h]jah ]h"]cec-tx-status-arb-lostah$]h&]uh1hhhhMhjh}jjsh}jjsubeh}(h]h ]h"]h$]h&]uh1jhjububh)}(h``CEC_TX_STATUS_ARB_LOST``h]j)}(hj h]hCEC_TX_STATUS_ARB_LOST}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1hhhhM hjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](jh)}(h0x02h]h0x02}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj&ubeh}(h]h ]h"]h$]h&]uh1jhjubjeh}(h]h ]h"]h$]h&]uh1jhjRubj)}(hhh](j)}(hhh](h)}(h.. _`CEC-TX-STATUS-NACK`:h]h}(h]h ]h"]h$]h&]hcec-tx-status-nackuh1hhMhj)}(hhh](jIh)}(hMessage was not acknowledged. Note that some hardware cannot tell apart a 'Not Acknowledged' status from other error conditions, i.e. the result of a transmit is just OK or FAIL. In that case this status will be returned when the transmit failed.h]hMessage was not acknowledged. Note that some hardware cannot tell apart a ‘Not Acknowledged’ status from other error conditions, i.e. the result of a transmit is just OK or FAIL. In that case this status will be returned when the transmit failed.}(hjWhhhNhNubah}(h]jSah ]h"]cec-tx-status-nackah$]h&]uh1hhhhMhjTh}jcjIsh}jSjIsubeh}(h]h ]h"]h$]h&]uh1jhjCububh)}(h``CEC_TX_STATUS_NACK``h]j)}(hjph]hCEC_TX_STATUS_NACK}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjnubah}(h]h ]h"]h$]h&]uh1hhhhMhjFubeh}(h]h ]h"]h$]h&]uh1jhjCubj)}(hhh](jIh)}(h0x04h]h0x04}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubeh}(h]h ]h"]h$]h&]uh1jhjCubjTeh}(h]h ]h"]h$]h&]uh1jhjRubj)}(hhh](j)}(hhh](h)}(h.. _`CEC-TX-STATUS-LOW-DRIVE`:h]h}(h]h ]h"]h$]h&]hcec-tx-status-low-driveuh1hhMhj)}(hhh](jh)}(hLow drive was detected on the CEC bus. This indicates that a follower detected an error on the bus and requests a retransmission. Optional status, not all hardware can detect this error condition.h]hLow drive was detected on the CEC bus. This indicates that a follower detected an error on the bus and requests a retransmission. Optional status, not all hardware can detect this error condition.}(hjhhhNhNubah}(h]jah ]h"]cec-tx-status-low-driveah$]h&]uh1hhhhMhjh}jjsh}jjsubeh}(h]h ]h"]h$]h&]uh1jhjububh)}(h``CEC_TX_STATUS_LOW_DRIVE``h]j)}(hjh]hCEC_TX_STATUS_LOW_DRIVE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhMhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](jh)}(h0x08h]h0x08}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubeh}(h]h ]h"]h$]h&]uh1jhjubjeh}(h]h ]h"]h$]h&]uh1jhjRubj)}(hhh](j)}(hhh](h)}(h.. _`CEC-TX-STATUS-ERROR`:h]h}(h]h ]h"]h$]h&]hcec-tx-status-erroruh1hhM"hj)}(hhh](jh)}(hXSome error occurred. This is used for any errors that do not fit ``CEC_TX_STATUS_ARB_LOST`` or ``CEC_TX_STATUS_LOW_DRIVE``, either because the hardware could not tell which error occurred, or because the hardware tested for other conditions besides those two. Optional status.h](hASome error occurred. This is used for any errors that do not fit }(hj!hhhNhNubj)Z}(h``CEC_TX_STATUS_ARB_LOST``h]hCEC_TX_STATUS_ARB_LOST}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj!ubh or }(hj!hhhNhNubj)}(h``CEC_TX_STATUS_LOW_DRIVE``h]hCEC_TX_STATUS_LOW_DRIVE}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj!ubh, either because the hardware could not tell which error occurred, or because the hardware tested for other conditions besides those two. Optional status.}(hj!hhhNhNubeh}(h]jah ]h"]cec-tx-status-errorah$]h&]uh1hhhhM&hjh}jQjsh}jjsubeh}(h]h ]h"]h$]h&]uh1jhj ububh)}(h``CEC_TX_STATUS_ERROR``h]j)}(hj^h]hCEC_TX_STATUS_ERROR}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj\ubah}(h]h ]h"]h$]h&]uh1hhhhM$hjubeh}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh](jh)}(h0x10h]h0x10}(hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM%hjyubeh}(h]h ]h"]h$]h&]uh1jhj ubjeh}(h]h ]h"]h$]h&]uh1jhjRubj)}(hhh](j)}(hhh](h)}(h .. _`CEC-TX-STATUS-MAX-RETRIES`:h]h}(h]h ]h"]h$]h&]hcec-tx-status-max-retriesuh1hhM*hj)}(hhh](jh)}(hThe transmit failed after one or more retries. This status bit is mutually exclusive with :ref:`CEC_TX_STATUS_OK `. Other bits can still be set to explain which failures were seen.h](hZThe transmit failed after one or more retries. This status bit is mutually exclusive with }(hjhhhNhNubh)}(h*:ref:`CEC_TX_STATUS_OK `h]j4)}(hjh]hCEC_TX_STATUS_OK}(hjhhhNhNubah}(h]h ](jbstdstd-refeh"]h$]h&]uh1j3hjubah}(h]h ]h"]h$]h&]refdocjn refdomainjreftyperef refexplicitrefwarnjcec-tx-status-okuh1hhhhM.hjubhB. Other bits can still be set to explain which failures were seen.}(hjhhhNhNubeh}(h]jah ]h"]cec-tx-status-max-retriesah$]h&]uh1hhhhM.hjh}jjsh}jjsubeh}(h]h ]h"]h$]h&]uh1jhjububh)}(h``CEC_TX_STATUS_MAX_RETRIES``h]j)}(hjh]hCEC_TX_STATUS_MAX_RETRIES}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhM,hjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](jh)}(h0x20h]h0x20}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM-hjubeh}(h]h ]h"]h$]h&]uh1jhjubjeh}(h]h ]h"]h$]h&]uh1jhjRubj)}(hhh](j)}(hhh](h)}(h.. _`CEC-TX-STATUS-ABORTED`:h]h}(h]h ]h"]h$]h&]hcec-tx-status-aborteduh1hhM1hj)}(hhh](j%h)}(hThe transmit was aborted due to an HDMI disconnect, or the adapter was unconfigured, or a transmit was interrupted, or the driver returned an error when attempting to start a transmit.h]hThe transmit was aborted due to an HDMI disconnect, or the adapter was unconfigured, or a transmit was interrupted, or the driver returned an error when attempting to start a transmit.}(hj3hhhNhNubah}(h]j/ah ]h"]cec-tx-status-abortedah$]h&]uh1hhhhM5hj0h}j?j%sh}j/j%subeh}(h]h ]h"]h$]h&]uh1jhjububh)}(h``CEC_TX_STATUS_ABORTED``h]j)}(hjLh]hCEC_TX_STATUS_ABORTED}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjJubah}(h]h ]h"]h$]h&]uh1hhhhM3hj"ubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j%h)}(h0x40h]h0x40}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM4hjgubeh}(h]h ]h"]h$]h&]uh1jhjubj0eh}(h]h ]h"]h$]h&]uh1jhjRubj)}(hhh](j)}(hhh](h)}(h.. _`CEC-TX-STATUS-TIMEOUT`:h]h}(h]h ]h"]h$]h&]hcec-tx-status-timeoutuh1hhM8hj)}(hhh](jh)}(h\The transmit timed out. This should not normally happen and this indicates a driver problem.h]h\The transmit timed out. This should not normally happen and this indicates a driver problem.}(hjhhhNhNubah}(h]jah ]h"]cec-tx-status-timeoutah$]h&]uh1hhhhM<hjh}jjsh}jjsubeh}(h]h ]h"]h$]h&]uh1jhjububh)}(h``CEC_TX_STATUS_TIMEOUT``h]j)}(hjh]hCEC_TX_STATUS_TIMEOUT}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhM:hjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](jh)}(h0x80h]h0x80}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM;hjubeh}(h]h ]h"]h$]h&]uh1jhjubjeh}(h]h ]h"]h$]h&]uh1jhjRubeh}(h]h ]h"]h$]h&]uh1jhj1ubeh}(h]h ]h"]h$]h&]colsKuh1jhj ubeh}(h](id3jeh ]h"] cec-tx-statusah$]h&]uh1jhjhhhNhNh}jjsh}jjsubj)}(hhh]h}(h]h ]h"]h$]h&]j|p{5.6cm}|p{0.9cm}|p{10.8cm}|uh1jhhhM?hjhhubh)}(h.. _cec-rx-status:h]h}(h]h ]h"]h$]h&]h cec-rx-statusuh1hhMAhjhhhhubj)}(hhh](h)}(hCEC Receive Statush]hCEC Receive Status}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMChjubj)}(hhh](j)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jhj&ubj)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jhj&ubj)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jhj&ubj)}(hhh](j)}(hhh](j)}(hhh](h)}(h.. _`CEC-RX-STATUS-OK`:h]h}(h]h ]h"]h$]h&]hcec-rx-status-okuh1hhMHhj)}(hhh](jPh)}(h&The message was received successfully.h]h&The message was received successfully.}(hj^hhhNhNubah}(h]jZah ]h"]cec-rx-status-okah$]h&]uh1hhhhMLhj[h}jjjPsh}jZjPsubeh}(h]h ]h"]h$]h&]uh1jhjJububh)}(h``CEC_RX_STATUS_OK``h]j)}(hjwh]hCEC_RX_STATUS_OK}(hjyhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjuubah}(h]h ]h"]h$]h&]uh1hhhhMJhjMubeh}(h]h ]h"]h$]h&]uh1jhjJubj)}(hhh](jPh)}(h0x01h]h0x01}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMKhjubeh}(h]h ]h"]h$]h&]uh1jhjJubj[eh}(h]h ]h"]h$]h&]uh1jhjGubj)}(hhh](j)}(hhh](h)}(h.. _`CEC-RX-STATUS-TIMEOUT`:h]h}(h]h ]h"]h$]h&]hcec-rx-status-timeoutuh1hhMMhj)}(hhh](jh)}(h6The reply to an earlier transmitted message timed out.h]h6The reply to an earlier transmitted message timed out.}(hjhhhNhNubah}(h]jah ]h"]cec-rx-status-timeoutah$]h&]uh1hhhhMQhjh}jjsh}jjsubeh}(h]h ]h"]h$]h&]uh1jhjububh)}(h``CEC_RX_STATUS_TIMEOUT``h]j)}(hjh]hCEC_RX_STATUS_TIMEOUT}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhMOhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](jh)}(h0x02h]h0x02}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMPhjubeh}(h]h ]h"]h$]h&]uh1jhjubjeh}(h]h ]h"]h$]h&]uh1jhjGubj)}(hhh](j)}(hhh](h)}(h".. _`CEC-RX-STATUS-FEATURE-ABORT`:h]h}(h]h ]h"]h$]h&]hcec-rx-status-feature-abortuh1hhMRhj)}(hhh](jh)}(hThe message was received successfully but the reply was ``CEC_MSG_FEATURE_ABORT``. This status is only set if this message was the reply to an earlier transmitted message.h](h8The message was received successfully but the reply was }(hj(hhhNhNubj)}(h``CEC_MSG_FEATURE_ABORT``h]hCEC_MSG_FEATURE_ABORT}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj(ubhZ. This status is only set if this message was the reply to an earlier transmitted message.}(hj(hhhNhNubeh}(h]j$ah ]h"]cec-rx-status-feature-abortah$]h&]uh1hhhhMVhj%h}jFjsh}j$jsubeh}(h]h ]h"]h$]h&]uh1jhjububh)}(h``CEC_RX_STATUS_FEATURE_ABORT``h]j)}(hjSh]hCEC_RX_STATUS_FEATURE_ABORT}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjQubah}(h]h ]h"]h$]h&]uh1hhhhMThjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](jh)}(h0x04h]h0x04}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMUhjnubeh}(h]h ]h"]h$]h&]uh1jhjubj%eh}(h]h ]h"]h$]h&]uh1jhjGubj)}(hhh](j)}(hhh](h)}(h.. _`CEC-RX-STATUS-ABORTED`:h]h}(h]h ]h"]h$]h&]hcec-rx-status-aborteduh1hhMYhj)}(hhh](jh)}(hThe wait for a reply to an earlier transmitted message was aborted because the HDMI cable was disconnected, the adapter was unconfigured or the :ref:`CEC_TRANSMIT ` that waited for a reply was interrupted.h](hThe wait for a reply to an earlier transmitted message was aborted because the HDMI cable was disconnected, the adapter was unconfigured or the }(hjhhhNhNubh)}(h!:ref:`CEC_TRANSMIT `h]j4)}(hjh]h CEC_TRANSMIT}(hjhhhNhNubah}(h]h ](jbstdstd-refeh"]h$]h&]uh1j3hjubah}(h]h ]h"]h$]h&]refdocjn refdomainjreftyperef refexplicitrefwarnj cec_receiveuh1hhhhM]hjubh) that waited for a reply was interrupted.}(hjhhhNhNubeh}(h]jah ]h"]cec-rx-status-abortedah$]h&]uh1hhhhM]hjh}jjsh}jjsubeh}(h]h ]h"]h$]h&]uh1jhjububh)}(h``CEC_RX_STATUS_ABORTED``h]j)}(hjh]hCEC_RX_STATUS_ABORTED}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhM[hjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](jh)}(h0x08h]h0x08}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM\hjubeh}(h]h ]h"]h$]h&]uh1jhjubjeh}(h]h ]h"]h$]h&]uh1jhjGubeh}(h]h ]h"]h$]h&]uh1jhj&ubeh}(h]h ]h"]h$]h&]colsKuh1jhjubeh}(h](id4jeh ]h"] cec-rx-statusah$]h&]uh1jhjhhhNhNh}j&j sh}jj subeh}(h] descriptionah ]h"] descriptionah$]h&]uh1hhhhhhhhK%ubh)}(hhh](h)}(h Return Valueh]h Return Value}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj3hhhhhMdubh)}(hOn success 0 is returned, on error -1 and the ``errno`` variable is set appropriately. The generic error codes are described at the :ref:`Generic Error Codes ` chapter.h](h.On success 0 is returned, on error -1 and the }(hjDhhhNhNubj)}(h ``errno``h]herrno}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjDubhM variable is set appropriately. The generic error codes are described at the }(hjDhhhNhNubh)}(h':ref:`Generic Error Codes `h]j4)}(hj`h]hGeneric Error Codes}(hjbhhhNhNubah}(h]h ](jbstdstd-refeh"]h$]h&]uh1j3hj^ubah}(h]h ]h"]h$]h&]refdocjn refdomainjlreftyperef refexplicitrefwarnj gen-errorsuh1hhhhMfhjDubh chapter.}(hjDhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMfhj3hhubh)}(hPThe :ref:`ioctl CEC_RECEIVE ` can return the following error codes:h](hThe }(hjhhhNhNubh)}(h&:ref:`ioctl CEC_RECEIVE `h]j4)}(hjh]hioctl CEC_RECEIVE}(hjhhhNhNubah}(h]h ](jbstdstd-refeh"]h$]h&]uh1j3hjubah}(h]h ]h"]h$]h&]refdocjn refdomainjreftyperef refexplicitrefwarnj cec_receiveuh1hhhhMjhjubh& can return the following error codes:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMjhj3hhubj$)}(hhh](j))}(hYEAGAIN No messages are in the receive queue, and the filehandle is in non-blocking mode. h](j/)}(hEAGAINh]hEAGAIN}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j.hhhMnhjubjH)}(hhh]h)}(hQNo messages are in the receive queue, and the filehandle is in non-blocking mode.h]hQNo messages are in the receive queue, and the filehandle is in non-blocking mode.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMnhjubah}(h]h ]h"]h$]h&]uh1jGhjubeh}(h]h ]h"]h$]h&]uh1j(hhhMnhjubj))}(hCETIMEDOUT The ``timeout`` was reached while waiting for a message. h](j/)}(h ETIMEDOUTh]h ETIMEDOUT}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j.hhhMqhjubjH)}(hhh]h)}(h8The ``timeout`` was reached while waiting for a message.h](hThe }(hjhhhNhNubj)}(h ``timeout``h]htimeout}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh) was reached while waiting for a message.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMqhjubah}(h]h ]h"]h$]h&]uh1jGhjubeh}(h]h ]h"]h$]h&]uh1j(hhhMqhjhhubj))}(hEERESTARTSYS The wait for a message was interrupted (e.g. by Ctrl-C). h](j/)}(h ERESTARTSYSh]h ERESTARTSYS}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1j.hhhMthj-ubjH)}(hhh]h)}(h8The wait for a message was interrupted (e.g. by Ctrl-C).h]h8The wait for a message was interrupted (e.g. by Ctrl-C).}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMthj?ubah}(h]h ]h"]h$]h&]uh1jGhj-ubeh}(h]h ]h"]h$]h&]uh1j(hhhMthjhhubeh}(h]h ]h"]h$]h&]uh1j#hj3hhhhhNubh)}(hRThe :ref:`ioctl CEC_TRANSMIT ` can return the following error codes:h](hThe }(hjbhhhNhNubh)}(h(:ref:`ioctl CEC_TRANSMIT `h]j4)}(hjlh]hioctl CEC_TRANSMIT}(hjnhhhNhNubah}(h]h ](jbstdstd-refeh"]h$]h&]uh1j3hjjubah}(h]h ]h"]h$]h&]refdocjn refdomainjxreftyperef refexplicitrefwarnj cec_transmituh1hhhhMvhjbubh& can return the following error codes:}(hjbhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMvhj3hhubj$)}(hhh](j))}(hWENOTTY The ``CEC_CAP_TRANSMIT`` capability wasn't set, so this ioctl is not supported. h](j/)}(hENOTTYh]hENOTTY}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j.hhhMzhjubjH)}(hhh]h)}(hOThe ``CEC_CAP_TRANSMIT`` capability wasn't set, so this ioctl is not supported.h](hThe }(hjhhhNhNubj)}(h``CEC_CAP_TRANSMIT``h]hCEC_CAP_TRANSMIT}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh9 capability wasn’t set, so this ioctl is not supported.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMzhjubah}(h]h ]h"]h$]h&]uh1jGhjubeh}(h]h ]h"]h$]h&]uh1j(hhhMzhjubj))}(hEPERM The CEC adapter is not configured, i.e. :ref:`ioctl CEC_ADAP_S_LOG_ADDRS ` has never been called, or ``CEC_MSG_FL_RAW`` was used from a process that did not have the ``CAP_SYS_RAWIO`` capability. h](j/)}(hEPERMh]hEPERM}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j.hhhMhjubjH)}(hhh]h)}(hThe CEC adapter is not configured, i.e. :ref:`ioctl CEC_ADAP_S_LOG_ADDRS ` has never been called, or ``CEC_MSG_FL_RAW`` was used from a process that did not have the ``CAP_SYS_RAWIO`` capability.h](h(The CEC adapter is not configured, i.e. }(hjhhhNhNubh)}(h8:ref:`ioctl CEC_ADAP_S_LOG_ADDRS `h]j4)}(hjh]hioctl CEC_ADAP_S_LOG_ADDRS}(hjhhhNhNubah}(h]h ](jbstdstd-refeh"]h$]h&]uh1j3hjubah}(h]h ]h"]h$]h&]refdocjn refdomainjreftyperef refexplicitrefwarnjcec_adap_s_log_addrsuh1hhhhM}hjubh has never been called, or }(hjhhhNhNubj)}(h``CEC_MSG_FL_RAW``h]hCEC_MSG_FL_RAW}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh/ was used from a process that did not have the }(hjhhhNhNubj)}(h``CAP_SYS_RAWIO``h]h CAP_SYS_RAWIO}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh capability.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM}hjubah}(h]h ]h"]h$]h&]uh1jGhjubeh}(h]h ]h"]h$]h&]uh1j(hhhMhjhhubj))}(hXYENONET The CEC adapter is not configured, i.e. :ref:`ioctl CEC_ADAP_S_LOG_ADDRS ` was called, but the physical address is invalid so no logical address was claimed. An exception is made in this case for transmits from initiator 0xf ('Unregistered') to destination 0 ('TV'). In that case the transmit will proceed as usual. h](j/)}(hENONETh]hENONET}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1j.hhhMhjOubjH)}(hhh]h)}(hXQThe CEC adapter is not configured, i.e. :ref:`ioctl CEC_ADAP_S_LOG_ADDRS ` was called, but the physical address is invalid so no logical address was claimed. An exception is made in this case for transmits from initiator 0xf ('Unregistered') to destination 0 ('TV'). In that case the transmit will proceed as usual.h](h(The CEC adapter is not configured, i.e. }(hjdhhhNhNubh)}(h8:ref:`ioctl CEC_ADAP_S_LOG_ADDRS `h]j4)}(hjnh]hioctl CEC_ADAP_S_LOG_ADDRS}(hjphhhNhNubah}(h]h ](jbstdstd-refeh"]h$]h&]uh1j3hjlubah}(h]h ]h"]h$]h&]refdocjn refdomainjzreftyperef refexplicitrefwarnjcec_adap_s_log_addrsuh1hhhhMhjdubh was called, but the physical address is invalid so no logical address was claimed. An exception is made in this case for transmits from initiator 0xf (‘Unregistered’) to destination 0 (‘TV’). In that case the transmit will proceed as usual.}(hjdhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjaubah}(h]h ]h"]h$]h&]uh1jGhjOubeh}(h]h ]h"]h$]h&]uh1j(hhhMhjhhubj))}(hEBUSY Another filehandle is in exclusive follower or initiator mode, or the filehandle is in mode ``CEC_MODE_NO_INITIATOR``. This is also returned if the transmit queue is full. h](j/)}(hEBUSYh]hEBUSY}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j.hhhMhjubjH)}(hhh]h)}(hAnother filehandle is in exclusive follower or initiator mode, or the filehandle is in mode ``CEC_MODE_NO_INITIATOR``. This is also returned if the transmit queue is full.h](h\Another filehandle is in exclusive follower or initiator mode, or the filehandle is in mode }(hjhhhNhNubj)}(h``CEC_MODE_NO_INITIATOR``h]hCEC_MODE_NO_INITIATOR}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh6. This is also returned if the transmit queue is full.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jGhjubeh}(h]h ]h"]h$]h&]uh1j(hhhMhjhhubj))}(h