Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1267c60a authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab
Browse files

[media] doc-rst: improve CEC documentation



Lots of fixups relating to references.

Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent 6710ea47
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -29,7 +29,7 @@ Arguments

``request``
    CEC ioctl request code as defined in the cec.h header file, for
    example CEC_ADAP_G_CAPS.
    example :ref:`CEC_ADAP_G_CAPS`.

``argp``
    Pointer to a request-specific structure.
+5 −5
Original line number Diff line number Diff line
@@ -32,11 +32,11 @@ Arguments
    Open flags. Access mode must be ``O_RDWR``.

    When the ``O_NONBLOCK`` flag is given, the
    :ref:`CEC_RECEIVE` ioctl will return EAGAIN
    error code when no message is available, and the
    :ref:`CEC_TRANSMIT`,
    :ref:`CEC_ADAP_S_PHYS_ADDR` and
    :ref:`CEC_ADAP_S_LOG_ADDRS` ioctls
    :ref:`CEC_RECEIVE <CEC_RECEIVE>` ioctl will return the EAGAIN
    error code when no message is available, and ioctls
    :ref:`CEC_TRANSMIT <CEC_TRANSMIT>`,
    :ref:`CEC_ADAP_S_PHYS_ADDR <CEC_ADAP_S_PHYS_ADDR>` and
    :ref:`CEC_ADAP_S_LOG_ADDRS <CEC_ADAP_S_LOG_ADDRS>`
    all act in non-blocking mode.

    Other flags have no effect.
+5 −5
Original line number Diff line number Diff line
@@ -34,7 +34,7 @@ Description
.. note:: This documents the proposed CEC API. This API is not yet finalized
   and is currently only available as a staging kernel module.

All cec devices must support the :ref:`CEC_ADAP_G_CAPS` ioctl. To query
All cec devices must support :ref:`ioctl CEC_ADAP_G_CAPS <CEC_ADAP_G_CAPS>`. To query
device information, applications call the ioctl with a pointer to a
struct :ref:`cec_caps <cec-caps>`. The driver fills the structure and
returns the information to the application. The ioctl never fails.
@@ -100,7 +100,7 @@ returns the information to the application. The ioctl never fails.
       -  0x00000001

       -  Userspace has to configure the physical address by calling
	  :ref:`CEC_ADAP_S_PHYS_ADDR`. If
	  :ref:`ioctl CEC_ADAP_S_PHYS_ADDR <CEC_ADAP_S_PHYS_ADDR>`. If
	  this capability isn't set, then setting the physical address is
	  handled by the kernel whenever the EDID is set (for an HDMI
	  receiver) or read (for an HDMI transmitter).
@@ -112,7 +112,7 @@ returns the information to the application. The ioctl never fails.
       -  0x00000002

       -  Userspace has to configure the logical addresses by calling
	  :ref:`CEC_ADAP_S_LOG_ADDRS`. If
	  :ref:`ioctl CEC_ADAP_S_LOG_ADDRS <CEC_ADAP_S_LOG_ADDRS>`. If
	  this capability isn't set, then the kernel will have configured
	  this.

@@ -123,7 +123,7 @@ returns the information to the application. The ioctl never fails.
       -  0x00000004

       -  Userspace can transmit CEC messages by calling
	  :ref:`CEC_TRANSMIT`. This implies that
	  :ref:`ioctl CEC_TRANSMIT <CEC_TRANSMIT>`. This implies that
	  userspace can be a follower as well, since being able to transmit
	  messages is a prerequisite of becoming a follower. If this
	  capability isn't set, then the kernel will handle all CEC
@@ -136,7 +136,7 @@ returns the information to the application. The ioctl never fails.
       -  0x00000008

       -  Userspace can use the passthrough mode by calling
	  :ref:`CEC_S_MODE`.
	  :ref:`ioctl CEC_S_MODE <CEC_S_MODE>`.

    -  .. _`CEC-CAP-RC`:

+11 −13
Original line number Diff line number Diff line
@@ -4,9 +4,9 @@
.. _CEC_ADAP_G_LOG_ADDRS:
.. _CEC_ADAP_S_LOG_ADDRS:

************************************************
ioctl CEC_ADAP_G_LOG_ADDRS, CEC_ADAP_S_LOG_ADDRS
************************************************
****************************************************
ioctls CEC_ADAP_G_LOG_ADDRS and CEC_ADAP_S_LOG_ADDRS
****************************************************

Name
====
@@ -38,19 +38,17 @@ Description
.. note:: This documents the proposed CEC API. This API is not yet finalized
   and is currently only available as a staging kernel module.

To query the current CEC logical addresses, applications call the
:ref:`CEC_ADAP_G_LOG_ADDRS` ioctl with a pointer to a
:c:type:`struct cec_log_addrs` structure where the drivers stores
the logical addresses.
To query the current CEC logical addresses, applications call
:ref:`ioctl CEC_ADAP_G_LOG_ADDRS <CEC_ADAP_G_LOG_ADDRS>` with a pointer to a
:c:type:`struct cec_log_addrs` where the driver stores the logical addresses.

To set new logical addresses, applications fill in struct
:c:type:`struct cec_log_addrs` and call the :ref:`CEC_ADAP_S_LOG_ADDRS`
ioctl with a pointer to this struct. The :ref:`CEC_ADAP_S_LOG_ADDRS` ioctl
To set new logical addresses, applications fill in
:c:type:`struct cec_log_addrs` and call :ref:`ioctl CEC_ADAP_S_LOG_ADDRS <CEC_ADAP_S_LOG_ADDRS>`
with a pointer to this struct. The :ref:`ioctl CEC_ADAP_S_LOG_ADDRS <CEC_ADAP_S_LOG_ADDRS>`
is only available if ``CEC_CAP_LOG_ADDRS`` is set (ENOTTY error code is
returned otherwise). This ioctl will block until all requested logical
addresses have been claimed. :ref:`CEC_ADAP_S_LOG_ADDRS` can only be called
by a file handle in initiator mode (see
:ref:`CEC_S_MODE`).
addresses have been claimed. The :ref:`ioctl CEC_ADAP_S_LOG_ADDRS <CEC_ADAP_S_LOG_ADDRS>` can only be called
by a file handle in initiator mode (see :ref:`CEC_S_MODE`).


.. _cec-log-addrs:
+8 −8
Original line number Diff line number Diff line
@@ -4,9 +4,9 @@
.. _CEC_ADAP_G_PHYS_ADDR:
.. _CEC_ADAP_S_PHYS_ADDR:

************************************************
ioctl CEC_ADAP_G_PHYS_ADDR, CEC_ADAP_S_PHYS_ADDR
************************************************
****************************************************
ioctls CEC_ADAP_G_PHYS_ADDR and CEC_ADAP_S_PHYS_ADDR
****************************************************

Name
====
@@ -37,15 +37,15 @@ Description
.. note:: This documents the proposed CEC API. This API is not yet finalized
   and is currently only available as a staging kernel module.

To query the current physical address applications call the
:ref:`CEC_ADAP_G_PHYS_ADDR` ioctl with a pointer to an __u16 where the
To query the current physical address applications call
:ref:`ioctl CEC_ADAP_G_PHYS_ADDR <CEC_ADAP_G_PHYS_ADDR>` with a pointer to a __u16 where the
driver stores the physical address.

To set a new physical address applications store the physical address in
an __u16 and call the :ref:`CEC_ADAP_S_PHYS_ADDR` ioctl with a pointer to
this integer. :ref:`CEC_ADAP_S_PHYS_ADDR` is only available if
a __u16 and call :ref:`ioctl CEC_ADAP_S_PHYS_ADDR <CEC_ADAP_S_PHYS_ADDR>` with a pointer to
this integer. The :ref:`ioctl CEC_ADAP_S_PHYS_ADDR <CEC_ADAP_S_PHYS_ADDR>` is only available if
``CEC_CAP_PHYS_ADDR`` is set (ENOTTY error code will be returned
otherwise). :ref:`CEC_ADAP_S_PHYS_ADDR` can only be called by a file handle
otherwise). The :ref:`ioctl CEC_ADAP_S_PHYS_ADDR <CEC_ADAP_S_PHYS_ADDR>` can only be called by a file handle
in initiator mode (see :ref:`CEC_S_MODE`), if not
EBUSY error code will be returned.

Loading