Skip to content

Commit

Permalink
Merge tag 'media/v4.10-3' of git://git.kernel.org/pub/scm/linux/kerne…
Browse files Browse the repository at this point in the history
…l/git/mchehab/linux-media

Pull media fixes from Mauro Carvalho Chehab:
 "A few documentation fixes at CEC (with got promoted from staging for
  4.10), and one fix on its core."

* tag 'media/v4.10-3' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media:
  [media] cec: fix wrong last_la determination
  [media] cec-intro.rst: mention the v4l-utils package and CEC utilities
  [media] cec rst: remove "This API is not yet finalized" notice
  • Loading branch information
Linus Torvalds committed Feb 6, 2017
2 parents 396bf4c + f9f96fc commit 72df5eb
Showing 12 changed files with 13 additions and 56 deletions.
5 changes: 0 additions & 5 deletions Documentation/media/uapi/cec/cec-func-close.rst
Original file line number Diff line number Diff line change
@@ -33,11 +33,6 @@ Arguments
Description
===========
.. note::
This documents the proposed CEC API. This API is not yet finalized
and is currently only available as a staging kernel module.
Closes the cec device. Resources associated with the file descriptor are
freed. The device configuration remain unchanged.
5 changes: 0 additions & 5 deletions Documentation/media/uapi/cec/cec-func-ioctl.rst
Original file line number Diff line number Diff line change
@@ -39,11 +39,6 @@ Arguments
Description
===========
.. note::
This documents the proposed CEC API. This API is not yet finalized
and is currently only available as a staging kernel module.
The :c:func:`ioctl()` function manipulates cec device parameters. The
argument ``fd`` must be an open file descriptor.
5 changes: 0 additions & 5 deletions Documentation/media/uapi/cec/cec-func-open.rst
Original file line number Diff line number Diff line change
@@ -46,11 +46,6 @@ Arguments
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 open a cec device applications call :c:func:`open()` with the
desired device name. The function has no side effects; the device
configuration remain unchanged.
5 changes: 0 additions & 5 deletions Documentation/media/uapi/cec/cec-func-poll.rst
Original file line number Diff line number Diff line change
@@ -39,11 +39,6 @@ Arguments
Description
===========
.. note::
This documents the proposed CEC API. This API is not yet finalized
and is currently only available as a staging kernel module.
With the :c:func:`poll()` function applications can wait for CEC
events.
17 changes: 12 additions & 5 deletions Documentation/media/uapi/cec/cec-intro.rst
Original file line number Diff line number Diff line change
@@ -3,11 +3,6 @@
Introduction
============

.. note::

This documents the proposed CEC API. This API is not yet finalized
and is currently only available as a staging kernel module.

HDMI connectors provide a single pin for use by the Consumer Electronics
Control protocol. This protocol allows different devices connected by an
HDMI cable to communicate. The protocol for CEC version 1.4 is defined
@@ -31,3 +26,15 @@ control just the CEC pin.
Drivers that support CEC will create a CEC device node (/dev/cecX) to
give userspace access to the CEC adapter. The
:ref:`CEC_ADAP_G_CAPS` ioctl will tell userspace what it is allowed to do.

In order to check the support and test it, it is suggested to download
the `v4l-utils <https://git.linuxtv.org/v4l-utils.git/>`_ package. It
provides three tools to handle CEC:

- cec-ctl: the Swiss army knife of CEC. Allows you to configure, transmit
and monitor CEC messages.

- cec-compliance: does a CEC compliance test of a remote CEC device to
determine how compliant the CEC implementation is.

- cec-follower: emulates a CEC follower.
5 changes: 0 additions & 5 deletions Documentation/media/uapi/cec/cec-ioc-adap-g-caps.rst
Original file line number Diff line number Diff line change
@@ -29,11 +29,6 @@ Arguments
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 :ref:`ioctl CEC_ADAP_G_CAPS <CEC_ADAP_G_CAPS>`. To query
device information, applications call the ioctl with a pointer to a
struct :c:type:`cec_caps`. The driver fills the structure and
5 changes: 0 additions & 5 deletions Documentation/media/uapi/cec/cec-ioc-adap-g-log-addrs.rst
Original file line number Diff line number Diff line change
@@ -35,11 +35,6 @@ Arguments
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
:ref:`ioctl CEC_ADAP_G_LOG_ADDRS <CEC_ADAP_G_LOG_ADDRS>` with a pointer to a
struct :c:type:`cec_log_addrs` where the driver stores the logical addresses.
5 changes: 0 additions & 5 deletions Documentation/media/uapi/cec/cec-ioc-adap-g-phys-addr.rst
Original file line number Diff line number Diff line change
@@ -35,11 +35,6 @@ Arguments
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
: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.
5 changes: 0 additions & 5 deletions Documentation/media/uapi/cec/cec-ioc-dqevent.rst
Original file line number Diff line number Diff line change
@@ -30,11 +30,6 @@ Arguments
Description
===========
.. note::
This documents the proposed CEC API. This API is not yet finalized
and is currently only available as a staging kernel module.
CEC devices can send asynchronous events. These can be retrieved by
calling :c:func:`CEC_DQEVENT`. If the file descriptor is in
non-blocking mode and no event is pending, then it will return -1 and
5 changes: 0 additions & 5 deletions Documentation/media/uapi/cec/cec-ioc-g-mode.rst
Original file line number Diff line number Diff line change
@@ -31,11 +31,6 @@ Arguments
Description
===========
.. note::
This documents the proposed CEC API. This API is not yet finalized
and is currently only available as a staging kernel module.
By default any filehandle can use :ref:`CEC_TRANSMIT`, but in order to prevent
applications from stepping on each others toes it must be possible to
obtain exclusive access to the CEC adapter. This ioctl sets the
5 changes: 0 additions & 5 deletions Documentation/media/uapi/cec/cec-ioc-receive.rst
Original file line number Diff line number Diff line change
@@ -34,11 +34,6 @@ Arguments
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 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 <CEC_RECEIVE>`.
2 changes: 1 addition & 1 deletion drivers/media/cec/cec-adap.c
Original file line number Diff line number Diff line change
@@ -1206,7 +1206,7 @@ static int cec_config_thread_func(void *arg)
las->log_addr[i] = CEC_LOG_ADDR_INVALID;
if (last_la == CEC_LOG_ADDR_INVALID ||
last_la == CEC_LOG_ADDR_UNREGISTERED ||
!(last_la & type2mask[type]))
!((1 << last_la) & type2mask[type]))
last_la = la_list[0];

err = cec_config_log_addr(adap, i, last_la);

0 comments on commit 72df5eb

Please sign in to comment.