Skip to content

Commit 056f282

Browse files
Hans Verkuilmchehab
authored andcommitted
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: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
1 parent 6bb8ef9 commit 056f282

File tree

10 files changed

+2780
-0
lines changed

10 files changed

+2780
-0
lines changed

Documentation/admin-guide/media/cec.rst

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,14 @@ dongles):
4242
``persistent_config``: by default this is off, but when set to 1 the driver
4343
will store the current settings to the device's internal eeprom and restore
4444
it the next time the device is connected to the USB port.
45+
4546
- RainShadow Tech. Note: this driver does not support the persistent_config
4647
module option of the Pulse-Eight driver. The hardware supports it, but I
4748
have no plans to add this feature. But I accept patches :-)
4849

50+
- Extron DA HD 4K PLUS HDMI Distribution Amplifier. See
51+
:ref:`extron_da_hd_4k_plus` for more information.
52+
4953
Miscellaneous:
5054

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

379383
You can also use this as a full-fledged CEC device by configuring it
380384
using ``cec-ctl --tv -p0.0.0.0`` or ``cec-ctl --playback -p1.0.0.0``.
385+
386+
.. _extron_da_hd_4k_plus:
387+
388+
Extron DA HD 4K PLUS CEC Adapter driver
389+
=======================================
390+
391+
This driver is for the Extron DA HD 4K PLUS series of HDMI Distribution
392+
Amplifiers: https://www.extron.com/product/dahd4kplusseries
393+
394+
The 2, 4 and 6 port models are supported.
395+
396+
Firmware version 1.02.0001 or higher is required.
397+
398+
Note that older Extron hardware revisions have a problem with the CEC voltage,
399+
which may mean that CEC will not work. This is fixed in hardware revisions
400+
E34814 and up.
401+
402+
The CEC support has two modes: the first is a manual mode where userspace has
403+
to manually control CEC for the HDMI Input and all HDMI Outputs. While this gives
404+
full control, it is also complicated.
405+
406+
The second mode is an automatic mode, which is selected if the module option
407+
``vendor_id`` is set. In that case the driver controls CEC and CEC messages
408+
received in the input will be distributed to the outputs. It is still possible
409+
to use the /dev/cecX devices to talk to the connected devices directly, but it is
410+
the driver that configures everything and deals with things like Hotplug Detect
411+
changes.
412+
413+
The driver also takes care of the EDIDs: /dev/videoX devices are created to
414+
read the EDIDs and (for the HDMI Input port) to set the EDID.
415+
416+
By default userspace is responsible to set the EDID for the HDMI Input
417+
according to the EDIDs of the connected displays. But if the ``manufacturer_name``
418+
module option is set, then the driver will take care of setting the EDID
419+
of the HDMI Input based on the supported resolutions of the connected displays.
420+
Currently the driver only supports resolutions 1080p60 and 4kp60: if all connected
421+
displays support 4kp60, then it will advertise 4kp60 on the HDMI input, otherwise
422+
it will fall back to an EDID that just reports 1080p60.
423+
424+
The status of the Extron is reported in ``/sys/kernel/debug/cec/cecX/status``.
425+
426+
The extron-da-hd-4k-plus driver implements the following module options:
427+
428+
``debug``
429+
---------
430+
431+
If set to 1, then all serial port traffic is shown.
432+
433+
``vendor_id``
434+
-------------
435+
436+
The CEC Vendor ID to report to connected displays.
437+
438+
If set, then the driver will take care of distributing CEC messages received
439+
on the input to the HDMI outputs. This is done for the following CEC messages:
440+
441+
- <Standby>
442+
- <Image View On> and <Text View On>
443+
- <Give Device Power Status>
444+
- <Set System Audio Mode>
445+
- <Request Current Latency>
446+
447+
If not set, then userspace is responsible for this, and it will have to
448+
configure the CEC devices for HDMI Input and the HDMI Outputs manually.
449+
450+
``manufacturer_name``
451+
---------------------
452+
453+
A three character manufacturer name that is used in the EDID for the HDMI
454+
Input. If not set, then userspace is reponsible for configuring an EDID.
455+
If set, then the driver will update the EDID automatically based on the
456+
resolutions supported by the connected displays, and it will not be possible
457+
anymore to manually set the EDID for the HDMI Input.
458+
459+
``hpd_never_low``
460+
-----------------
461+
462+
If set, then the Hotplug Detect pin of the HDMI Input will always be high,
463+
even if nothing is connected to the HDMI Outputs. If not set (the default)
464+
then the Hotplug Detect pin of the HDMI input will go low if all the detected
465+
Hotplug Detect pins of the HDMI Outputs are also low.
466+
467+
This option may be changed dynamically.

MAINTAINERS

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8461,6 +8461,13 @@ F: lib/bootconfig.c
84618461
F: tools/bootconfig/*
84628462
F: tools/bootconfig/scripts/*
84638463

8464+
EXTRON DA HD 4K PLUS CEC DRIVER
8465+
M: Hans Verkuil <[email protected]>
8466+
8467+
S: Maintained
8468+
T: git git://linuxtv.org/media_tree.git
8469+
F: drivers/media/cec/usb/extron-da-hd-4k-plus/
8470+
84648471
EXYNOS DP DRIVER
84658472
M: Jingoo Han <[email protected]>
84668473

drivers/media/cec/usb/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
# USB drivers
44

55
if USB_SUPPORT && TTY
6+
source "drivers/media/cec/usb/extron-da-hd-4k-plus/Kconfig"
67
source "drivers/media/cec/usb/pulse8/Kconfig"
78
source "drivers/media/cec/usb/rainshadow/Kconfig"
89
endif

drivers/media/cec/usb/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@
22
#
33
# Makefile for the CEC USB device drivers.
44
#
5+
obj-$(CONFIG_USB_EXTRON_DA_HD_4K_PLUS_CEC) += extron-da-hd-4k-plus/
56
obj-$(CONFIG_USB_PULSE8_CEC) += pulse8/
67
obj-$(CONFIG_USB_RAINSHADOW_CEC) += rainshadow/
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# SPDX-License-Identifier: GPL-2.0-only
2+
config USB_EXTRON_DA_HD_4K_PLUS_CEC
3+
tristate "Extron DA HD 4K Plus CEC driver"
4+
depends on VIDEO_DEV
5+
depends on USB
6+
depends on USB_ACM
7+
select CEC_CORE
8+
select SERIO
9+
select SERIO_SERPORT
10+
help
11+
This is a CEC driver for the Extron DA HD 4K Plus HDMI Splitter.
12+
13+
To compile this driver as a module, choose M here: the
14+
module will be called extron-da-hd-4k-plus-cec.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
extron-da-hd-4k-plus-cec-objs := extron-da-hd-4k-plus.o cec-splitter.o
2+
obj-$(CONFIG_USB_EXTRON_DA_HD_4K_PLUS_CEC) := extron-da-hd-4k-plus-cec.o
3+
4+
all:
5+
$(MAKE) -C $(KDIR) M=$(shell pwd) modules
6+
7+
install:
8+
$(MAKE) -C $(KDIR) M=$(shell pwd) modules_install

0 commit comments

Comments
 (0)