X-Git-Url: http://git.cascardo.info/?p=cascardo%2Flinux.git;a=blobdiff_plain;f=Documentation%2Fmedia%2Fuapi%2Fcec%2Fcec-ioc-receive.rst;h=d585b1bba6ac4313850000707959508c9ab648bf;hp=025a3851ab76391152f80fd14b8e19c17f2debc1;hb=350d32395bee1a21deec504a253b336e20d9f35a;hpb=5049d31bc34d64b255b0470cace7d0221f0d6b0f diff --git a/Documentation/media/uapi/cec/cec-ioc-receive.rst b/Documentation/media/uapi/cec/cec-ioc-receive.rst index 025a3851ab76..d585b1bba6ac 100644 --- a/Documentation/media/uapi/cec/cec-ioc-receive.rst +++ b/Documentation/media/uapi/cec/cec-ioc-receive.rst @@ -40,7 +40,8 @@ Description and is currently only available as a staging kernel module. To receive a CEC message the application has to fill in the -``timeout`` field of :c:type:`struct cec_msg` and pass it to :ref:`ioctl CEC_RECEIVE `. +``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`` @@ -54,9 +55,9 @@ A received message can be: 2. the result of an earlier non-blocking transmit (the ``sequence`` field will be non-zero). -To send a CEC message the application has to fill in the -:c:type:`struct cec_msg` and pass it to -:ref:`ioctl CEC_TRANSMIT `. The :ref:`ioctl CEC_TRANSMIT ` is only available if +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 @@ -76,7 +77,7 @@ result. .. tabularcolumns:: |p{1.0cm}|p{3.5cm}|p{13.0cm}| -.. _cec-msg: +.. c:type:: cec_msg .. cssclass:: longtable @@ -94,7 +95,7 @@ result. - Timestamp 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(2)`. + the same clock from userspace use :c:func:`clock_gettime`. - .. row 2 @@ -104,7 +105,7 @@ result. - Timestamp 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(2)`. + the same clock from userspace use :c:func:`clock_gettime`. - .. row 3