Commit 056f2821 authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab
Browse files

media: cec: extron-da-hd-4k-plus: add the Extron DA HD 4K Plus CEC driver



Add support for the Extron DA HD 4K Plus series of 4K HDMI
Distrubution Amplifiers (aka HDMI Splitters).

These devices support CEC and this driver adds support for the
CEC protocol for both the input and all outputs (2, 4 or 6 outputs,
depending on the model).

It also exports the EDID from the outputs and allows reading and
setting the EDID of the input.

Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent 6bb8ef90
Loading
Loading
Loading
Loading
+87 −0
Original line number Diff line number Diff line
@@ -42,10 +42,14 @@ dongles):
  ``persistent_config``: by default this is off, but when set to 1 the driver
  will store the current settings to the device's internal eeprom and restore
  it the next time the device is connected to the USB port.

- RainShadow Tech. Note: this driver does not support the persistent_config
  module option of the Pulse-Eight driver. The hardware supports it, but I
  have no plans to add this feature. But I accept patches :-)

- Extron DA HD 4K PLUS HDMI Distribution Amplifier. See
  :ref:`extron_da_hd_4k_plus` for more information.

Miscellaneous:

- vivid: emulates a CEC receiver and CEC transmitter.
@@ -378,3 +382,86 @@ it later using ``--analyze-pin``.

You can also use this as a full-fledged CEC device by configuring it
using ``cec-ctl --tv -p0.0.0.0`` or ``cec-ctl --playback -p1.0.0.0``.

.. _extron_da_hd_4k_plus:

Extron DA HD 4K PLUS CEC Adapter driver
=======================================

This driver is for the Extron DA HD 4K PLUS series of HDMI Distribution
Amplifiers: https://www.extron.com/product/dahd4kplusseries

The 2, 4 and 6 port models are supported.

Firmware version 1.02.0001 or higher is required.

Note that older Extron hardware revisions have a problem with the CEC voltage,
which may mean that CEC will not work. This is fixed in hardware revisions
E34814 and up.

The CEC support has two modes: the first is a manual mode where userspace has
to manually control CEC for the HDMI Input and all HDMI Outputs. While this gives
full control, it is also complicated.

The second mode is an automatic mode, which is selected if the module option
``vendor_id`` is set. In that case the driver controls CEC and CEC messages
received in the input will be distributed to the outputs. It is still possible
to use the /dev/cecX devices to talk to the connected devices directly, but it is
the driver that configures everything and deals with things like Hotplug Detect
changes.

The driver also takes care of the EDIDs: /dev/videoX devices are created to
read the EDIDs and (for the HDMI Input port) to set the EDID.

By default userspace is responsible to set the EDID for the HDMI Input
according to the EDIDs of the connected displays. But if the ``manufacturer_name``
module option is set, then the driver will take care of setting the EDID
of the HDMI Input based on the supported resolutions of the connected displays.
Currently the driver only supports resolutions 1080p60 and 4kp60: if all connected
displays support 4kp60, then it will advertise 4kp60 on the HDMI input, otherwise
it will fall back to an EDID that just reports 1080p60.

The status of the Extron is reported in ``/sys/kernel/debug/cec/cecX/status``.

The extron-da-hd-4k-plus driver implements the following module options:

``debug``
---------

If set to 1, then all serial port traffic is shown.

``vendor_id``
-------------

The CEC Vendor ID to report to connected displays.

If set, then the driver will take care of distributing CEC messages received
on the input to the HDMI outputs. This is done for the following CEC messages:

- <Standby>
- <Image View On> and <Text View On>
- <Give Device Power Status>
- <Set System Audio Mode>
- <Request Current Latency>

If not set, then userspace is responsible for this, and it will have to
configure the CEC devices for HDMI Input and the HDMI Outputs manually.

``manufacturer_name``
---------------------

A three character manufacturer name that is used in the EDID for the HDMI
Input. If not set, then userspace is reponsible for configuring an EDID.
If set, then the driver will update the EDID automatically based on the
resolutions supported by the connected displays, and it will not be possible
anymore to manually set the EDID for the HDMI Input.

``hpd_never_low``
-----------------

If set, then the Hotplug Detect pin of the HDMI Input will always be high,
even if nothing is connected to the HDMI Outputs. If not set (the default)
then the Hotplug Detect pin of the HDMI input will go low if all the detected
Hotplug Detect pins of the HDMI Outputs are also low.

This option may be changed dynamically.
+7 −0
Original line number Diff line number Diff line
@@ -8461,6 +8461,13 @@ F: lib/bootconfig.c
F:	tools/bootconfig/*
F:	tools/bootconfig/scripts/*
EXTRON DA HD 4K PLUS CEC DRIVER
M:	Hans Verkuil <hverkuil@xs4all.nl>
L:	linux-media@vger.kernel.org
S:	Maintained
T:	git git://linuxtv.org/media_tree.git
F:	drivers/media/cec/usb/extron-da-hd-4k-plus/
EXYNOS DP DRIVER
M:	Jingoo Han <jingoohan1@gmail.com>
L:	dri-devel@lists.freedesktop.org
+1 −0
Original line number Diff line number Diff line
@@ -3,6 +3,7 @@
# USB drivers

if USB_SUPPORT && TTY
source "drivers/media/cec/usb/extron-da-hd-4k-plus/Kconfig"
source "drivers/media/cec/usb/pulse8/Kconfig"
source "drivers/media/cec/usb/rainshadow/Kconfig"
endif
+1 −0
Original line number Diff line number Diff line
@@ -2,5 +2,6 @@
#
# Makefile for the CEC USB device drivers.
#
obj-$(CONFIG_USB_EXTRON_DA_HD_4K_PLUS_CEC) += extron-da-hd-4k-plus/
obj-$(CONFIG_USB_PULSE8_CEC) += pulse8/
obj-$(CONFIG_USB_RAINSHADOW_CEC) += rainshadow/
+14 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0-only
config USB_EXTRON_DA_HD_4K_PLUS_CEC
	tristate "Extron DA HD 4K Plus CEC driver"
	depends on VIDEO_DEV
	depends on USB
	depends on USB_ACM
	select CEC_CORE
	select SERIO
	select SERIO_SERPORT
	help
	  This is a CEC driver for the Extron DA HD 4K Plus HDMI Splitter.

	  To compile this driver as a module, choose M here: the
	  module will be called extron-da-hd-4k-plus-cec.
Loading