]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
media: cec: improve cec status documentation
authorHans Verkuil <hverkuil@xs4all.nl>
Tue, 15 May 2018 07:21:01 +0000 (03:21 -0400)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Fri, 25 May 2018 19:34:50 +0000 (15:34 -0400)
Clarify the description of status bits, particularly w.r.t. ERROR and NACK.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Hans Verkuil <hansverk@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Documentation/media/kapi/cec-core.rst
Documentation/media/uapi/cec/cec-ioc-receive.rst

index a9f53f069a2daa262e1524eba569ce0e82922276..1d989c5443705e4f413eaf57165b9981bf904639 100644 (file)
@@ -246,7 +246,10 @@ CEC_TX_STATUS_LOW_DRIVE:
 CEC_TX_STATUS_ERROR:
        some unspecified error occurred: this can be one of ARB_LOST
        or LOW_DRIVE if the hardware cannot differentiate or something
-       else entirely.
+       else entirely. Some hardware only supports OK and FAIL as the
+       result of a transmit, i.e. there is no way to differentiate
+       between the different possible errors. In that case map FAIL
+       to CEC_TX_STATUS_NACK and not to CEC_TX_STATUS_ERROR.
 
 CEC_TX_STATUS_MAX_RETRIES:
        could not transmit the message after trying multiple times.
index bdad4b197bcd457196a83800246ae10f8087eb7e..e964074cd15b757a00dd4c3cd6e519b920f46879 100644 (file)
@@ -231,26 +231,32 @@ View On' messages from initiator 0xf ('Unregistered') to destination 0 ('TV').
       - ``CEC_TX_STATUS_OK``
       - 0x01
       - The message was transmitted successfully. This is mutually
-       exclusive with :ref:`CEC_TX_STATUS_MAX_RETRIES <CEC-TX-STATUS-MAX-RETRIES>`. Other bits can still
-       be set if earlier attempts met with failure before the transmit
-       was eventually successful.
+       exclusive with :ref:`CEC_TX_STATUS_MAX_RETRIES <CEC-TX-STATUS-MAX-RETRIES>`.
+       Other bits can still be set if earlier attempts met with failure before
+       the transmit was eventually successful.
     * .. _`CEC-TX-STATUS-ARB-LOST`:
 
       - ``CEC_TX_STATUS_ARB_LOST``
       - 0x02
-      - CEC line arbitration was lost.
+      - CEC 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.
     * .. _`CEC-TX-STATUS-NACK`:
 
       - ``CEC_TX_STATUS_NACK``
       - 0x04
-      - Message was not acknowledged.
+      - Message 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.
     * .. _`CEC-TX-STATUS-LOW-DRIVE`:
 
       - ``CEC_TX_STATUS_LOW_DRIVE``
       - 0x08
       - Low drive was detected on the CEC bus. This indicates that a
        follower detected an error on the bus and requests a
-       retransmission.
+       retransmission. Optional status, not all hardware can detect this
+       error condition.
     * .. _`CEC-TX-STATUS-ERROR`:
 
       - ``CEC_TX_STATUS_ERROR``
@@ -258,14 +264,14 @@ View On' messages from initiator 0xf ('Unregistered') to destination 0 ('TV').
       - Some 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.
+       tested for other conditions besides those two. Optional status.
     * .. _`CEC-TX-STATUS-MAX-RETRIES`:
 
       - ``CEC_TX_STATUS_MAX_RETRIES``
       - 0x20
       - The transmit failed after one or more retries. This status bit is
-       mutually exclusive with :ref:`CEC_TX_STATUS_OK <CEC-TX-STATUS-OK>`. Other bits can still
-       be set to explain which failures were seen.
+       mutually exclusive with :ref:`CEC_TX_STATUS_OK <CEC-TX-STATUS-OK>`.
+       Other bits can still be set to explain which failures were seen.
 
 
 .. tabularcolumns:: |p{5.6cm}|p{0.9cm}|p{11.0cm}|