sphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget)/translations/zh_CN/admin-guide/media/cecmodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget)/translations/zh_TW/admin-guide/media/cecmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget)/translations/it_IT/admin-guide/media/cecmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget)/translations/ja_JP/admin-guide/media/cecmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget)/translations/ko_KR/admin-guide/media/cecmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget)/translations/sp_SP/admin-guide/media/cecmodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhcomment)}(h SPDX-License-Identifier: GPL-2.0h]h SPDX-License-Identifier: GPL-2.0}hhsbah}(h]h ]h"]h$]h&] xml:spacepreserveuh1hhhhhhC/var/lib/git/docbuild/linux/Documentation/admin-guide/media/cec.rsthKubhsection)}(hhh](htitle)}(hHDMI CECh]hHDMI CEC}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hSupported hardware in mainlineh]hSupported hardware in mainline}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh paragraph)}(hHDMI Transmitters:h]hHDMI Transmitters:}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK hhhhubh bullet_list)}(hhh](h list_item)}(hExynos4h]h)}(hhh]hExynos4}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK hhubah}(h]h ]h"]h$]h&]uh1hhhhhhhhNubh)}(hExynos5h]h)}(hj h]hExynos5}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK hjubah}(h]h ]h"]h$]h&]uh1hhhhhhhhNubh)}(hSTIH4xx HDMI CECh]h)}(hj!h]hSTIH4xx HDMI CEC}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1hhhhhhhhNubh)}(hCV4L2 adv7511 (same HW, but a different driver from the drm adv7511)h]h)}(hj8h]hCV4L2 adv7511 (same HW, but a different driver from the drm adv7511)}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj6ubah}(h]h ]h"]h$]h&]uh1hhhhhhhhNubh)}(hstm32h]h)}(hjOh]hstm32}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjMubah}(h]h ]h"]h$]h&]uh1hhhhhhhhNubh)}(hAllwinner A10 (sun4i)h]h)}(hjfh]hAllwinner A10 (sun4i)}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjdubah}(h]h ]h"]h$]h&]uh1hhhhhhhhNubh)}(h Raspberry Pih]h)}(hj}h]h Raspberry Pi}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj{ubah}(h]h ]h"]h$]h&]uh1hhhhhhhhNubh)}(hdw-hdmi (Synopsis IP)h]h)}(hjh]hdw-hdmi (Synopsis IP)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1hhhhhhhhNubh)}(h&amlogic (meson ao-cec and ao-cec-g12a)h]h)}(hjh]h&amlogic (meson ao-cec and ao-cec-g12a)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1hhhhhhhhNubh)}(hdrm adv7511/adv7533h]h)}(hjh]hdrm adv7511/adv7533}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1hhhhhhhhNubh)}(homap4h]h)}(hjh]homap4}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1hhhhhhhhNubh)}(htegrah]h)}(hjh]htegra}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1hhhhhhhhNubh)}(hrk3288, rk3399h]h)}(hjh]hrk3288, rk3399}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1hhhhhhhhNubh)}(htda998xh]h)}(hjh]htda998x}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1hhhhhhhhNubh)}(h>DisplayPort CEC-Tunneling-over-AUX on i915, nouveau and amdgpuh]h)}(hj5h]h>DisplayPort CEC-Tunneling-over-AUX on i915, nouveau and amdgpu}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj3ubah}(h]h ]h"]h$]h&]uh1hhhhhhhhNubh)}(hChromeOS EC CECh]h)}(hjLh]hChromeOS EC CEC}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjJubah}(h]h ]h"]h$]h&]uh1hhhhhhhhNubh)}(hCEC for SECO boards (UDOO x86).h]h)}(hjch]hCEC for SECO boards (UDOO x86).}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjaubah}(h]h ]h"]h$]h&]uh1hhhhhhhhNubh)}(hChrontel CH7322 h]h)}(hChrontel CH7322h]hChrontel CH7322}(hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjxubah}(h]h ]h"]h$]h&]uh1hhhhhhhhNubeh}(h]h ]h"]h$]h&]bullet-uh1hhhhK hhhhubh)}(hHDMI Receivers:h]hHDMI Receivers:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK hhhhubh)}(hhh](h)}(h adv7604/11/12h]h)}(hjh]h adv7604/11/12}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK"hjubah}(h]h ]h"]h$]h&]uh1hhjhhhhhNubh)}(hadv7842h]h)}(hjh]hadv7842}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK#hjubah}(h]h ]h"]h$]h&]uh1hhjhhhhhNubh)}(h tc358743 h]h)}(htc358743h]htc358743}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK$hjubah}(h]h ]h"]h$]h&]uh1hhjhhhhhNubeh}(h]h ]h"]h$]h&]jjuh1hhhhK"hhhhubh)}(hOUSB Dongles (see below for additional information on how to use these dongles):h]hOUSB Dongles (see below for additional information on how to use these dongles):}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK&hhhhubh)}(hhh](h)}(hXPulse-Eight: the pulse8-cec driver implements the following module option: ``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. h]h)}(hXPulse-Eight: the pulse8-cec driver implements the following module option: ``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.h](hKPulse-Eight: the pulse8-cec driver implements the following module option: }(hj hhhNhNubhliteral)}(h``persistent_config``h]hpersistent_config}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh: 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.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK)hjubah}(h]h ]h"]h$]h&]uh1hhjhhhhhNubh)}(hRainShadow 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 :-) h]h)}(hRainShadow 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 :-)h]hRainShadow 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 :-)}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK.hj2ubah}(h]h ]h"]h$]h&]uh1hhjhhhhhNubh)}(hhExtron DA HD 4K PLUS HDMI Distribution Amplifier. See :ref:`extron_da_hd_4k_plus` for more information. h]h)}(hgExtron DA HD 4K PLUS HDMI Distribution Amplifier. See :ref:`extron_da_hd_4k_plus` for more information.h](h6Extron DA HD 4K PLUS HDMI Distribution Amplifier. See }(hjNhhhNhNubh)}(h:ref:`extron_da_hd_4k_plus`h]hinline)}(hjXh]hextron_da_hd_4k_plus}(hj\hhhNhNubah}(h]h ](xrefstdstd-refeh"]h$]h&]uh1jZhjVubah}(h]h ]h"]h$]h&]refdocadmin-guide/media/cec refdomainjgreftyperef refexplicitrefwarn reftargetextron_da_hd_4k_plusuh1hhhhK2hjNubh for more information.}(hjNhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK2hjJubah}(h]h ]h"]h$]h&]uh1hhjhhhhhNubeh}(h]h ]h"]h$]h&]jjuh1hhhhK)hhhhubh)}(hMiscellaneous:h]hMiscellaneous:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK5hhhhubh)}(hhh](h)}(hvvivid: emulates a CEC receiver and CEC transmitter. Can be used to test CEC applications without actual CEC hardware. h]h)}(huvivid: emulates a CEC receiver and CEC transmitter. Can be used to test CEC applications without actual CEC hardware.h]huvivid: emulates a CEC receiver and CEC transmitter. Can be used to test CEC applications without actual CEC hardware.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK7hjubah}(h]h ]h"]h$]h&]uh1hhjhhhhhNubh)}(hcec-gpio. If the CEC pin is hooked up to a GPIO pin then you can control the CEC line through this driver. This supports error injection as well. h]h)}(hcec-gpio. If the CEC pin is hooked up to a GPIO pin then you can control the CEC line through this driver. This supports error injection as well.h]hcec-gpio. If the CEC pin is hooked up to a GPIO pin then you can control the CEC line through this driver. This supports error injection as well.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK:hjubah}(h]h ]h"]h$]h&]uh1hhjhhhhhNubh)}(hX*cec-gpio and Allwinner A10 (or any other driver that uses the CEC pin framework to drive the CEC pin directly): the CEC pin framework uses high-resolution timers. These timers are affected by NTP daemons that speed up or slow down the clock to sync with the official time. The chronyd server will by default increase or decrease the clock by 1/12th. This will cause the CEC timings to go out of spec. To fix this, add a 'maxslewrate 40000' line to chronyd.conf. This limits the clock frequency change to 1/25th, which keeps the CEC timings within spec. h]h)}(hX(cec-gpio and Allwinner A10 (or any other driver that uses the CEC pin framework to drive the CEC pin directly): the CEC pin framework uses high-resolution timers. These timers are affected by NTP daemons that speed up or slow down the clock to sync with the official time. The chronyd server will by default increase or decrease the clock by 1/12th. This will cause the CEC timings to go out of spec. To fix this, add a 'maxslewrate 40000' line to chronyd.conf. This limits the clock frequency change to 1/25th, which keeps the CEC timings within spec.h]hX,cec-gpio and Allwinner A10 (or any other driver that uses the CEC pin framework to drive the CEC pin directly): the CEC pin framework uses high-resolution timers. These timers are affected by NTP daemons that speed up or slow down the clock to sync with the official time. The chronyd server will by default increase or decrease the clock by 1/12th. This will cause the CEC timings to go out of spec. To fix this, add a ‘maxslewrate 40000’ line to chronyd.conf. This limits the clock frequency change to 1/25th, which keeps the CEC timings within spec.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK>hjubah}(h]h ]h"]h$]h&]uh1hhjhhhhhNubeh}(h]h ]h"]h$]h&]jjuh1hhhhK7hhhhubeh}(h]supported-hardware-in-mainlineah ]h"]supported hardware in mainlineah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h Utilitiesh]h Utilities}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKIubh)}(hCUtilities are available here: https://git.linuxtv.org/v4l-utils.gith](hUtilities are available here: }(hj hhhNhNubh reference)}(h%https://git.linuxtv.org/v4l-utils.gith]h%https://git.linuxtv.org/v4l-utils.git}(hjhhhNhNubah}(h]h ]h"]h$]h&]refurijuh1jhj ubeh}(h]h ]h"]h$]h&]uh1hhhhKKhjhhubh)}(h'``utils/cec-ctl``: control a CEC deviceh](j)}(h``utils/cec-ctl``h]h utils/cec-ctl}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj(ubh: control a CEC device}(hj(hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKMhjhhubh)}(h@``utils/cec-compliance``: test compliance of a remote CEC deviceh](j)}(h``utils/cec-compliance``h]hutils/cec-compliance}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjDubh(: test compliance of a remote CEC device}(hjDhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKOhjhhubh)}(h5``utils/cec-follower``: emulate a CEC follower deviceh](j)}(h``utils/cec-follower``h]hutils/cec-follower}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj`ubh: emulate a CEC follower device}(hj`hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKQhjhhubh)}(h}Note that ``cec-ctl`` has support for the CEC Hospitality Profile as is used in some hotel displays. See http://www.htng.org.h](h Note that }(hj|hhhNhNubj)}(h ``cec-ctl``h]hcec-ctl}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj|ubhT has support for the CEC Hospitality Profile as is used in some hotel displays. See }(hj|hhhNhNubj)}(hhttp://www.htng.orgh]hhttp://www.htng.org}(hjhhhNhNubah}(h]h ]h"]h$]h&]refurijuh1jhj|ubh.}(hj|hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKShjhhubh)}(hfNote that the libcec library (https://github.com/Pulse-Eight/libcec) supports the linux CEC framework.h](hNote that the libcec library (}(hjhhhNhNubj)}(h%https://github.com/Pulse-Eight/libcech]h%https://github.com/Pulse-Eight/libcec}(hjhhhNhNubah}(h]h ]h"]h$]h&]refurijuh1jhjubh#) supports the linux CEC framework.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKVhjhhubh)}(hXIf you want to get the CEC specification, then look at the References of the HDMI wikipedia page: https://en.wikipedia.org/wiki/HDMI. CEC is part of the HDMI specification. HDMI 1.3 is freely available (very similar to HDMI 1.4 w.r.t. CEC) and should be good enough for most things.h](hbIf you want to get the CEC specification, then look at the References of the HDMI wikipedia page: }(hjhhhNhNubj)}(h"https://en.wikipedia.org/wiki/HDMIh]h"https://en.wikipedia.org/wiki/HDMI}(hjhhhNhNubah}(h]h ]h"]h$]h&]refurijuh1jhjubh. CEC is part of the HDMI specification. HDMI 1.3 is freely available (very similar to HDMI 1.4 w.r.t. CEC) and should be good enough for most things.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKYhjhhubeh}(h] utilitiesah ]h"] utilitiesah$]h&]uh1hhhhhhhhKIubh)}(hhh](h)}(h-DisplayPort to HDMI Adapters with working CECh]h-DisplayPort to HDMI Adapters with working CEC}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhK`ubh)}(hXBackground: most adapters do not support the CEC Tunneling feature, and of those that do many did not actually connect the CEC pin. Unfortunately, this means that while a CEC device is created, it is actually all alone in the world and will never be able to see other CEC devices.h]hXBackground: most adapters do not support the CEC Tunneling feature, and of those that do many did not actually connect the CEC pin. Unfortunately, this means that while a CEC device is created, it is actually all alone in the world and will never be able to see other CEC devices.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKbhjhhubh)}(hThis is a list of known working adapters that have CEC Tunneling AND that properly connected the CEC pin. If you find adapters that work but are not in this list, then drop me a note.h]hThis is a list of known working adapters that have CEC Tunneling AND that properly connected the CEC pin. If you find adapters that work but are not in this list, then drop me a note.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhjhhubh)}(h]To test: hook up your DP-to-HDMI adapter to a CEC capable device (typically a TV), then run::h]h\To test: hook up your DP-to-HDMI adapter to a CEC capable device (typically a TV), then run:}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKlhjhhubh literal_block)}(hscec-ctl --playback # Configure the PC as a CEC Playback device cec-ctl -S # Show the CEC topologyh]hscec-ctl --playback # Configure the PC as a CEC Playback device cec-ctl -S # Show the CEC topology}hj6sbah}(h]h ]h"]h$]h&]hhuh1j4hhhKohjhhubh)}(hThe ``cec-ctl -S`` command should show at least two CEC devices, ourselves and the CEC device you are connected to (i.e. typically the TV).h](hThe }(hjDhhhNhNubj)}(h``cec-ctl -S``h]h cec-ctl -S}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjDubhy command should show at least two CEC devices, ourselves and the CEC device you are connected to (i.e. typically the TV).}(hjDhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKrhjhhubh)}(hGeneral note: I have only seen this work with the Parade PS175, PS176 and PS186 chipsets and the MegaChips 2900. While MegaChips 28x0 claims CEC support, I have never seen it work.h]hGeneral note: I have only seen this work with the Parade PS175, PS176 and PS186 chipsets and the MegaChips 2900. While MegaChips 28x0 claims CEC support, I have never seen it work.}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKuhjhhubh)}(hhh](h)}(h USB-C to HDMIh]h USB-C to HDMI}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjrhhhhhKzubh)}(h\Samsung Multiport Adapter EE-PW700: https://www.samsung.com/ie/support/model/EE-PW700BBEGWW/h](h$Samsung Multiport Adapter EE-PW700: }(hjhhhNhNubj)}(h8https://www.samsung.com/ie/support/model/EE-PW700BBEGWW/h]h8https://www.samsung.com/ie/support/model/EE-PW700BBEGWW/}(hjhhhNhNubah}(h]h ]h"]h$]h&]refurijuh1jhjubeh}(h]h ]h"]h$]h&]uh1hhhhK|hjrhhubh)}(h@Kramer ADC-U31C/HF: https://www.kramerav.com/product/ADC-U31C/HFh](hKramer ADC-U31C/HF: }(hjhhhNhNubj)}(h,https://www.kramerav.com/product/ADC-U31C/HFh]h,https://www.kramerav.com/product/ADC-U31C/HF}(hjhhhNhNubah}(h]h ]h"]h$]h&]refurijuh1jhjubeh}(h]h ]h"]h$]h&]uh1hhhhK~hjrhhubh)}(hnClub3D CAC-2504: https://www.club-3d.com/en/detail/2449/usb_3.1_type_c_to_hdmi_2.0_uhd_4k_60hz_active_adapter/h](hClub3D CAC-2504: }(hjhhhNhNubj)}(h]https://www.club-3d.com/en/detail/2449/usb_3.1_type_c_to_hdmi_2.0_uhd_4k_60hz_active_adapter/h]h]https://www.club-3d.com/en/detail/2449/usb_3.1_type_c_to_hdmi_2.0_uhd_4k_60hz_active_adapter/}(hjhhhNhNubah}(h]h ]h"]h$]h&]refurijuh1jhjubeh}(h]h ]h"]h$]h&]uh1hhhhKhjrhhubeh}(h] usb-c-to-hdmiah ]h"] usb-c to hdmiah$]h&]uh1hhjhhhhhKzubh)}(hhh](h)}(hDisplayPort to HDMIh]hDisplayPort to HDMI}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(hYClub3D CAC-1080: https://www.club-3d.com/en/detail/2442/displayport_1.4_to_hdmi_2.0b_hdr/h](hClub3D CAC-1080: }(hjhhhNhNubj)}(hHhttps://www.club-3d.com/en/detail/2442/displayport_1.4_to_hdmi_2.0b_hdr/h]hHhttps://www.club-3d.com/en/detail/2442/displayport_1.4_to_hdmi_2.0b_hdr/}(hjhhhNhNubah}(h]h ]h"]h$]h&]refurijuh1jhjubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hmCableCreation (SKU: CD0712): https://www.cablecreation.com/products/active-displayport-to-hdmi-adapter-4k-hdrh](hCableCreation (SKU: CD0712): }(hjhhhNhNubj)}(hPhttps://www.cablecreation.com/products/active-displayport-to-hdmi-adapter-4k-hdrh]hPhttps://www.cablecreation.com/products/active-displayport-to-hdmi-adapter-4k-hdr}(hjhhhNhNubah}(h]h ]h"]h$]h&]refurijuh1jhjubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(h~HP DisplayPort to HDMI True 4k Adapter (P/N 2JA63AA): https://www.hp.com/us-en/shop/pdp/hp-displayport-to-hdmi-true-4k-adapterh](h6HP DisplayPort to HDMI True 4k Adapter (P/N 2JA63AA): }(hj-hhhNhNubj)}(hHhttps://www.hp.com/us-en/shop/pdp/hp-displayport-to-hdmi-true-4k-adapterh]hHhttps://www.hp.com/us-en/shop/pdp/hp-displayport-to-hdmi-true-4k-adapter}(hj5hhhNhNubah}(h]h ]h"]h$]h&]refurij7uh1jhj-ubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhubeh}(h]displayport-to-hdmiah ]h"]displayport to hdmiah$]h&]uh1hhjhhhhhKubh)}(hhh](h)}(hMini-DisplayPort to HDMIh]hMini-DisplayPort to HDMI}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjRhhhhhKubh)}(h^Club3D CAC-1180: https://www.club-3d.com/en/detail/2443/mini_displayport_1.4_to_hdmi_2.0b_hdr/h](hClub3D CAC-1180: }(hjchhhNhNubj)}(hMhttps://www.club-3d.com/en/detail/2443/mini_displayport_1.4_to_hdmi_2.0b_hdr/h]hMhttps://www.club-3d.com/en/detail/2443/mini_displayport_1.4_to_hdmi_2.0b_hdr/}(hjkhhhNhNubah}(h]h ]h"]h$]h&]refurijmuh1jhjcubeh}(h]h ]h"]h$]h&]uh1hhhhKhjRhhubh)}(hGNote that passive adapters will never work, you need an active adapter.h]hGNote that passive adapters will never work, you need an active adapter.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjRhhubh)}(hThe Club3D adapters in this list are all MegaChips 2900 based. Other Club3D adapters are PS176 based and do NOT have the CEC pin hooked up, so only the three Club3D adapters above are known to work.h]hThe Club3D adapters in this list are all MegaChips 2900 based. Other Club3D adapters are PS176 based and do NOT have the CEC pin hooked up, so only the three Club3D adapters above are known to work.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjRhhubh)}(hI suspect that MegaChips 2900 based designs in general are likely to work whereas with the PS176 it is more hit-and-miss (mostly miss). The PS186 is likely to have the CEC pin hooked up, it looks like they changed the reference design for that chipset.h]hI suspect that MegaChips 2900 based designs in general are likely to work whereas with the PS176 it is more hit-and-miss (mostly miss). The PS186 is likely to have the CEC pin hooked up, it looks like they changed the reference design for that chipset.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjRhhubeh}(h]mini-displayport-to-hdmiah ]h"]mini-displayport to hdmiah$]h&]uh1hhjhhhhhKubeh}(h]-displayport-to-hdmi-adapters-with-working-cecah ]h"]-displayport to hdmi adapters with working cecah$]h&]uh1hhhhhhhhK`ubh)}(hhh](h)}(hUSB CEC Donglesh]hUSB CEC Dongles}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(hXThese dongles appear as ``/dev/ttyACMX`` devices and need the ``inputattach`` utility to create the ``/dev/cecX`` devices. Support for the Pulse-Eight has been added to ``inputattach`` 1.6.0. Support for the Rainshadow Tech has been added to ``inputattach`` 1.6.1.h](hThese dongles appear as }(hjhhhNhNubj)}(h``/dev/ttyACMX``h]h /dev/ttyACMX}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh devices and need the }(hjhhhNhNubj)}(h``inputattach``h]h inputattach}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh utility to create the }(hjhhhNhNubj)}(h ``/dev/cecX``h]h /dev/cecX}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh8 devices. Support for the Pulse-Eight has been added to }(hjhhhNhNubj)}(h``inputattach``h]h inputattach}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh: 1.6.0. Support for the Rainshadow Tech has been added to }(hjhhhNhNubj)}(h``inputattach``h]h inputattach}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh 1.6.1.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hBYou also need udev rules to automatically start systemd services::h]hAYou also need udev rules to automatically start systemd services:}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj5)}(hXSUBSYSTEM=="tty", KERNEL=="ttyACM[0-9]*", ATTRS{idVendor}=="2548", ATTRS{idProduct}=="1002", ACTION=="add", TAG+="systemd", ENV{SYSTEMD_WANTS}+="pulse8-cec-inputattach@%k.service" SUBSYSTEM=="tty", KERNEL=="ttyACM[0-9]*", ATTRS{idVendor}=="2548", ATTRS{idProduct}=="1001", ACTION=="add", TAG+="systemd", ENV{SYSTEMD_WANTS}+="pulse8-cec-inputattach@%k.service" SUBSYSTEM=="tty", KERNEL=="ttyACM[0-9]*", ATTRS{idVendor}=="04d8", ATTRS{idProduct}=="ff59", ACTION=="add", TAG+="systemd", ENV{SYSTEMD_WANTS}+="rainshadow-cec-inputattach@%k.service"h]hXSUBSYSTEM=="tty", KERNEL=="ttyACM[0-9]*", ATTRS{idVendor}=="2548", ATTRS{idProduct}=="1002", ACTION=="add", TAG+="systemd", ENV{SYSTEMD_WANTS}+="pulse8-cec-inputattach@%k.service" SUBSYSTEM=="tty", KERNEL=="ttyACM[0-9]*", ATTRS{idVendor}=="2548", ATTRS{idProduct}=="1001", ACTION=="add", TAG+="systemd", ENV{SYSTEMD_WANTS}+="pulse8-cec-inputattach@%k.service" SUBSYSTEM=="tty", KERNEL=="ttyACM[0-9]*", ATTRS{idVendor}=="04d8", ATTRS{idProduct}=="ff59", ACTION=="add", TAG+="systemd", ENV{SYSTEMD_WANTS}+="rainshadow-cec-inputattach@%k.service"}hjAsbah}(h]h ]h"]h$]h&]hhuh1j4hhhKhjhhubh)}(hand these systemd services:h]hand these systemd services:}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hJFor Pulse-Eight make /lib/systemd/system/pulse8-cec-inputattach@.service::h]hIFor Pulse-Eight make /lib/systemd/system/pulse8-cec-inputattach@.service:}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj5)}(h[Unit] Description=inputattach for pulse8-cec device on %I [Service] Type=simple ExecStart=/usr/bin/inputattach --pulse8-cec /dev/%Ih]h[Unit] Description=inputattach for pulse8-cec device on %I [Service] Type=simple ExecStart=/usr/bin/inputattach --pulse8-cec /dev/%I}hjksbah}(h]h ]h"]h$]h&]hhuh1j4hhhKhjhhubh)}(hVFor the RainShadow Tech make /lib/systemd/system/rainshadow-cec-inputattach@.service::h]hUFor the RainShadow Tech make /lib/systemd/system/rainshadow-cec-inputattach@.service:}(hjyhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj5)}(h[Unit] Description=inputattach for rainshadow-cec device on %I [Service] Type=simple ExecStart=/usr/bin/inputattach --rainshadow-cec /dev/%Ih]h[Unit] Description=inputattach for rainshadow-cec device on %I [Service] Type=simple ExecStart=/usr/bin/inputattach --rainshadow-cec /dev/%I}hjsbah}(h]h ]h"]h$]h&]hhuh1j4hhhKhjhhubh)}(h_For proper suspend/resume support create: /lib/systemd/system/restart-cec-inputattach.service::h]h^For proper suspend/resume support create: /lib/systemd/system/restart-cec-inputattach.service:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj5)}(hXp[Unit] Description=restart inputattach for cec devices After=suspend.target [Service] Type=forking ExecStart=/bin/bash -c 'for d in /dev/serial/by-id/usb-Pulse-Eight*; do /usr/bin/inputattach --daemon --pulse8-cec $d; done; for d in /dev/serial/by-id/usb-RainShadow_Tech*; do /usr/bin/inputattach --daemon --rainshadow-cec $d; done' [Install] WantedBy=suspend.targeth]hXp[Unit] Description=restart inputattach for cec devices After=suspend.target [Service] Type=forking ExecStart=/bin/bash -c 'for d in /dev/serial/by-id/usb-Pulse-Eight*; do /usr/bin/inputattach --daemon --pulse8-cec $d; done; for d in /dev/serial/by-id/usb-RainShadow_Tech*; do /usr/bin/inputattach --daemon --rainshadow-cec $d; done' [Install] WantedBy=suspend.target}hjsbah}(h]h ]h"]h$]h&]hhuh1j4hhhKhjhhubh)}(h5And run ``systemctl enable restart-cec-inputattach``.h](hAnd run }(hjhhhNhNubj)}(h,``systemctl enable restart-cec-inputattach``h]h(systemctl enable restart-cec-inputattach}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hTo automatically set the physical address of the CEC device whenever the EDID changes, you can use ``cec-ctl`` with the ``-E`` option::h](hcTo automatically set the physical address of the CEC device whenever the EDID changes, you can use }(hjhhhNhNubj)}(h ``cec-ctl``h]hcec-ctl}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh with the }(hjhhhNhNubj)}(h``-E``h]h-E}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh option:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj5)}(h)cec-ctl -E /sys/class/drm/card0-DP-1/edidh]h)cec-ctl -E /sys/class/drm/card0-DP-1/edid}hjsbah}(h]h ]h"]h$]h&]hhuh1j4hhhKhjhhubh)}(hThis assumes the dongle is connected to the card0-DP-1 output (``xrandr`` will tell you which output is used) and it will poll for changes to the EDID and update the Physical Address whenever they occur.h](h?This assumes the dongle is connected to the card0-DP-1 output (}(hjhhhNhNubj)}(h ``xrandr``h]hxrandr}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh will tell you which output is used) and it will poll for changes to the EDID and update the Physical Address whenever they occur.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hhTo automatically run this command you can use cron. Edit crontab with ``crontab -e`` and add this line::h](hFTo automatically run this command you can use cron. Edit crontab with }(hj1hhhNhNubj)}(h``crontab -e``h]h crontab -e}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj1ubh and add this line:}(hj1hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj5)}(h@@reboot /usr/local/bin/cec-ctl -E /sys/class/drm/card0-DP-1/edidh]h@@reboot /usr/local/bin/cec-ctl -E /sys/class/drm/card0-DP-1/edid}hjQsbah}(h]h ]h"]h$]h&]hhuh1j4hhhKhjhhubh)}(hhThis only works for display drivers that expose the EDID in ``/sys/class/drm``, such as the i915 driver.h](h CEC message in order to wake up such displays. Unfortunately, not all CEC adapters can support this. An example is the Odroid-U3 SBC that has a level-shifter that is powered off when the HPD signal is low, thus blocking the CEC pin. Even though the SoC can use CEC without a HPD, the level-shifter will prevent this from functioning.h]hXSome displays when in standby mode have no HDMI Hotplug Detect signal, but CEC is still enabled so connected devices can send an CEC message in order to wake up such displays. Unfortunately, not all CEC adapters can support this. An example is the Odroid-U3 SBC that has a level-shifter that is powered off when the HPD signal is low, thus blocking the CEC pin. Even though the SoC can use CEC without a HPD, the level-shifter will prevent this from functioning.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hThere is a CEC capability flag to signal this: ``CEC_CAP_NEEDS_HPD``. If set, then the hardware cannot wake up displays with this behavior.h](h/There is a CEC capability flag to signal this: }(hjhhhNhNubj)}(h``CEC_CAP_NEEDS_HPD``h]hCEC_CAP_NEEDS_HPD}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhG. If set, then the hardware cannot wake up displays with this behavior.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hX)Note for CEC application implementers: the message must be the first message you send, don't send any other messages before. Certain very bad but unfortunately not uncommon CEC implementations get very confused if they receive anything else but this message and they won't wake up.h]hX-Note for CEC application implementers: the message must be the first message you send, don’t send any other messages before. Certain very bad but unfortunately not uncommon CEC implementations get very confused if they receive anything else but this message and they won’t wake up.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hSWhen writing a driver it can be tricky to test this. There are two ways to do this:h]hSWhen writing a driver it can be tricky to test this. There are two ways to do this:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubhenumerated_list)}(hhh](h)}(hXGet a Pulse-Eight USB CEC dongle, connect an HDMI cable from your device to the Pulse-Eight, but do not connect the Pulse-Eight to the display. Now configure the Pulse-Eight dongle:: cec-ctl -p0.0.0.0 --tv and start monitoring:: sudo cec-ctl -M On the device you are testing run:: cec-ctl --playback It should report a physical address of f.f.f.f. Now run this command:: cec-ctl -t0 --image-view-on The Pulse-Eight should see the message. If not, then something (hardware and/or software) is preventing the CEC message from going out. To make sure you have the wiring correct just connect the Pulse-Eight to a CEC-enabled display and run the same command on your device: now there is a HPD, so you should see the command arriving at the Pulse-Eight. h](h)}(hGet a Pulse-Eight USB CEC dongle, connect an HDMI cable from your device to the Pulse-Eight, but do not connect the Pulse-Eight to the display.h]hGet a Pulse-Eight USB CEC dongle, connect an HDMI cable from your device to the Pulse-Eight, but do not connect the Pulse-Eight to the display.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubh)}(h&Now configure the Pulse-Eight dongle::h]h%Now configure the Pulse-Eight dongle:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubj5)}(hcec-ctl -p0.0.0.0 --tvh]hcec-ctl -p0.0.0.0 --tv}hj sbah}(h]h ]h"]h$]h&]hhuh1j4hhhKhjubh)}(hand start monitoring::h]hand start monitoring:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubj5)}(hsudo cec-ctl -Mh]hsudo cec-ctl -M}hj# sbah}(h]h ]h"]h$]h&]hhuh1j4hhhMhjubh)}(h#On the device you are testing run::h]h"On the device you are testing run:}(hj1 hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubj5)}(hcec-ctl --playbackh]hcec-ctl --playback}hj? sbah}(h]h ]h"]h$]h&]hhuh1j4hhhMhjubh)}(hFIt should report a physical address of f.f.f.f. Now run this command::h]hEIt should report a physical address of f.f.f.f. Now run this command:}(hjM hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubj5)}(hcec-ctl -t0 --image-view-onh]hcec-ctl -t0 --image-view-on}hj[ sbah}(h]h ]h"]h$]h&]hhuh1j4hhhM hjubh)}(hThe Pulse-Eight should see the message. If not, then something (hardware and/or software) is preventing the CEC message from going out.h]hThe Pulse-Eight should see the message. If not, then something (hardware and/or software) is preventing the CEC message from going out.}(hji hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubh)}(hTo make sure you have the wiring correct just connect the Pulse-Eight to a CEC-enabled display and run the same command on your device: now there is a HPD, so you should see the command arriving at the Pulse-Eight.h]hTo make sure you have the wiring correct just connect the Pulse-Eight to a CEC-enabled display and run the same command on your device: now there is a HPD, so you should see the command arriving at the Pulse-Eight.}(hjw hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubeh}(h]h ]h"]h$]h&]uh1hhjhhhhhNubh)}(hX8If you have another linux device supporting CEC without HPD, then you can just connect your device to that device. Yes, you can connect two HDMI outputs together. You won't have a HPD (which is what we want for this test), but the second device can monitor the CEC pin. Otherwise use the same commands as in 1. h](h)}(hX If you have another linux device supporting CEC without HPD, then you can just connect your device to that device. Yes, you can connect two HDMI outputs together. You won't have a HPD (which is what we want for this test), but the second device can monitor the CEC pin.h]hXIf you have another linux device supporting CEC without HPD, then you can just connect your device to that device. Yes, you can connect two HDMI outputs together. You won’t have a HPD (which is what we want for this test), but the second device can monitor the CEC pin.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubh)}(h(Otherwise use the same commands as in 1.h]h(Otherwise use the same commands as in 1.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubeh}(h]h ]h"]h$]h&]uh1hhjhhhhhNubeh}(h]h ]h"]h$]h&]enumtypearabicprefixhsuffix)uh1jhjhhhhhKubh)}(hX If CEC messages do not come through when there is no HPD, then you need to figure out why. Typically it is either a hardware restriction or the software powers off the CEC core when the HPD goes low. The first cannot be corrected of course, the second will likely required driver changes.h]hX If CEC messages do not come through when there is no HPD, then you need to figure out why. Typically it is either a hardware restriction or the software powers off the CEC core when the HPD goes low. The first cannot be corrected of course, the second will likely required driver changes.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubeh}(h]cec-without-hpdah ]h"]cec without hpdah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hMicrocontrollers & CECh]hMicrocontrollers & CEC}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hhhhhM$ubh)}(hXWe have seen some CEC implementations in displays that use a microcontroller to sample the bus. This does not have to be a problem, but some implementations have timing issues. This is hard to discover unless you can hook up a low-level CEC debugger (see the next section).h]hXWe have seen some CEC implementations in displays that use a microcontroller to sample the bus. This does not have to be a problem, but some implementations have timing issues. This is hard to discover unless you can hook up a low-level CEC debugger (see the next section).}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM&hj hhubh)}(hXYou will see cases where the CEC transmitter holds the CEC line high or low for a longer time than is allowed. For directed messages this is not a problem since if that happens the message will not be Acked and it will be retransmitted. For broadcast messages no such mechanism exists.h]hXYou will see cases where the CEC transmitter holds the CEC line high or low for a longer time than is allowed. For directed messages this is not a problem since if that happens the message will not be Acked and it will be retransmitted. For broadcast messages no such mechanism exists.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM+hj hhubh)}(hIt's not clear what to do about this. It is probably wise to transmit some broadcast messages twice to reduce the chance of them being lost. Specifically and are candidates for that.h]hIt’s not clear what to do about this. It is probably wise to transmit some broadcast messages twice to reduce the chance of them being lost. Specifically and are candidates for that.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM0hj hhubeh}(h]microcontrollers-cecah ]h"]microcontrollers & cecah$]h&]uh1hhhhhhhhM$ubh)}(hhh](h)}(hMaking a CEC debuggerh]hMaking a CEC debugger}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hhhhhM6ubh)}(hbBy using a Raspberry Pi 4B and some cheap components you can make your own low-level CEC debugger.h]hbBy using a Raspberry Pi 4B and some cheap components you can make your own low-level CEC debugger.}(hj& hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM8hj hhubh)}(hiThe critical component is one of these HDMI female-female passthrough connectors (full soldering type 1):h]hiThe critical component is one of these HDMI female-female passthrough connectors (full soldering type 1):}(hj4 hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM;hj hhubh)}(hhttps://elabbay.myshopify.com/collections/camera/products/hdmi-af-af-v1a-hdmi-type-a-female-to-hdmi-type-a-female-pass-through-adapter-breakout-board?variant=45533926147h]j)}(hjD h]hhttps://elabbay.myshopify.com/collections/camera/products/hdmi-af-af-v1a-hdmi-type-a-female-to-hdmi-type-a-female-pass-through-adapter-breakout-board?variant=45533926147}(hjF hhhNhNubah}(h]h ]h"]h$]h&]refurijD uh1jhjB ubah}(h]h ]h"]h$]h&]uh1hhhhM>hj hhubh)}(hThe video quality is variable and certainly not enough to pass-through 4kp60 (594 MHz) video. You might be able to support 4kp30, but more likely you will be limited to 1080p60 (148.5 MHz). But for CEC testing that is fine.h]hThe video quality is variable and certainly not enough to pass-through 4kp60 (594 MHz) video. You might be able to support 4kp30, but more likely you will be limited to 1080p60 (148.5 MHz). But for CEC testing that is fine.}(hjZ hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM@hj hhubh)}(h0You need a breadboard and some breadboard wires:h]h0You need a breadboard and some breadboard wires:}(hjh hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMDhj hhubh)}(hrhttp://www.dx.com/p/diy-40p-male-to-female-male-to-male-female-to-female-dupont-line-wire-3pcs-356089#.WYLOOXWGN7Ih]j)}(hjx h]hrhttp://www.dx.com/p/diy-40p-male-to-female-male-to-male-female-to-female-dupont-line-wire-3pcs-356089#.WYLOOXWGN7I}(hjz hhhNhNubah}(h]h ]h"]h$]h&]refurijx uh1jhjv ubah}(h]h ]h"]h$]h&]uh1hhhhMFhj hhubh)}(hmIf you want to monitor the HPD and/or 5V lines as well, then you need one of these 5V to 3.3V level shifters:h]hmIf you want to monitor the HPD and/or 5V lines as well, then you need one of these 5V to 3.3V level shifters:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMHhj hhubh)}(h$https://www.adafruit.com/product/757h]j)}(hj h]h$https://www.adafruit.com/product/757}(hj hhhNhNubah}(h]h ]h"]h$]h&]refurij uh1jhj ubah}(h]h ]h"]h$]h&]uh1hhhhMKhj hhubh)}(hd(This is just where I got these components, there are many other places you can get similar things).h]hd(This is just where I got these components, there are many other places you can get similar things).}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMMhj hhubh)}(hjThe ground pin of the HDMI connector needs to be connected to a ground pin of the Raspberry Pi, of course.h]hjThe ground pin of the HDMI connector needs to be connected to a ground pin of the Raspberry Pi, of course.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMPhj hhubh)}(hXThe CEC pin of the HDMI connector needs to be connected to these pins: GPIO 6 and GPIO 7. The optional HPD pin of the HDMI connector should be connected via the level shifter to these pins: GPIO 23 and GPIO 12. The optional 5V pin of the HDMI connector should be connected via the level shifter to these pins: GPIO 25 and GPIO 22. Monitoring the HPD and 5V lines is not necessary, but it is helpful.h]hXThe CEC pin of the HDMI connector needs to be connected to these pins: GPIO 6 and GPIO 7. The optional HPD pin of the HDMI connector should be connected via the level shifter to these pins: GPIO 23 and GPIO 12. The optional 5V pin of the HDMI connector should be connected via the level shifter to these pins: GPIO 25 and GPIO 22. Monitoring the HPD and 5V lines is not necessary, but it is helpful.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMShj hhubh)}(hsThis device tree addition in ``arch/arm/boot/dts/bcm2711-rpi-4-b.dts`` will hook up the cec-gpio driver correctly::h](hThis device tree addition in }(hj hhhNhNubj)}(h)``arch/arm/boot/dts/bcm2711-rpi-4-b.dts``h]h%arch/arm/boot/dts/bcm2711-rpi-4-b.dts}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh, will hook up the cec-gpio driver correctly:}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMZhj hhubj5)}(hXcec@6 { compatible = "cec-gpio"; cec-gpios = <&gpio 6 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>; hpd-gpios = <&gpio 23 GPIO_ACTIVE_HIGH>; v5-gpios = <&gpio 25 GPIO_ACTIVE_HIGH>; }; cec@7 { compatible = "cec-gpio"; cec-gpios = <&gpio 7 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>; hpd-gpios = <&gpio 12 GPIO_ACTIVE_HIGH>; v5-gpios = <&gpio 22 GPIO_ACTIVE_HIGH>; };h]hXcec@6 { compatible = "cec-gpio"; cec-gpios = <&gpio 6 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>; hpd-gpios = <&gpio 23 GPIO_ACTIVE_HIGH>; v5-gpios = <&gpio 25 GPIO_ACTIVE_HIGH>; }; cec@7 { compatible = "cec-gpio"; cec-gpios = <&gpio 7 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>; hpd-gpios = <&gpio 12 GPIO_ACTIVE_HIGH>; v5-gpios = <&gpio 22 GPIO_ACTIVE_HIGH>; };}hj sbah}(h]h ]h"]h$]h&]hhuh1j4hhhM]hj hhubh)}(hOIf you haven't hooked up the HPD and/or 5V lines, then just delete those lines.h]hQIf you haven’t hooked up the HPD and/or 5V lines, then just delete those lines.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMkhj hhubh)}(hThis dts change will enable two cec GPIO devices: I typically use one to send/receive CEC commands and the other to monitor. If you monitor using an unconfigured CEC adapter then it will use GPIO interrupts which makes monitoring very accurate.h]hThis dts change will enable two cec GPIO devices: I typically use one to send/receive CEC commands and the other to monitor. If you monitor using an unconfigured CEC adapter then it will use GPIO interrupts which makes monitoring very accurate.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMnhj hhubh)}(hXQIf you just want to monitor traffic, then a single instance is sufficient. The minimum configuration is one HDMI female-female passthrough connector and two female-female breadboard wires: one for connecting the HDMI ground pin to a ground pin on the Raspberry Pi, and the other to connect the HDMI CEC pin to GPIO 6 on the Raspberry Pi.h]hXQIf you just want to monitor traffic, then a single instance is sufficient. The minimum configuration is one HDMI female-female passthrough connector and two female-female breadboard wires: one for connecting the HDMI ground pin to a ground pin on the Raspberry Pi, and the other to connect the HDMI CEC pin to GPIO 6 on the Raspberry Pi.}(hj( hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMshj hhubh)}(hVThe documentation on how to use the error injection is here: :ref:`cec_pin_error_inj`.h](h=The documentation on how to use the error injection is here: }(hj6 hhhNhNubh)}(h:ref:`cec_pin_error_inj`h]j[)}(hj@ h]hcec_pin_error_inj}(hjB hhhNhNubah}(h]h ](jfstdstd-refeh"]h$]h&]uh1jZhj> ubah}(h]h ]h"]h$]h&]refdocjs refdomainjL reftyperef refexplicitrefwarnjycec_pin_error_injuh1hhhhMyhj6 ubh.}(hj6 hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMyhj hhubh)}(h``cec-ctl --monitor-pin`` will do low-level CEC bus sniffing and analysis. You can also store the CEC traffic to file using ``--store-pin`` and analyze it later using ``--analyze-pin``.h](j)}(h``cec-ctl --monitor-pin``h]hcec-ctl --monitor-pin}(hjl hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjh ubhc will do low-level CEC bus sniffing and analysis. You can also store the CEC traffic to file using }(hjh hhhNhNubj)}(h``--store-pin``h]h --store-pin}(hj~ hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjh ubh and analyze it later using }(hjh hhhNhNubj)}(h``--analyze-pin``h]h --analyze-pin}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjh ubh.}(hjh hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM{hj hhubh)}(hYou 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``.h](hKYou can also use this as a full-fledged CEC device by configuring it using }(hj hhhNhNubj)}(h``cec-ctl --tv -p0.0.0.0``h]hcec-ctl --tv -p0.0.0.0}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh or }(hj hhhNhNubj)}(h ``cec-ctl --playback -p1.0.0.0``h]hcec-ctl --playback -p1.0.0.0}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj hhubhtarget)}(h.. _extron_da_hd_4k_plus:h]h}(h]h ]h"]h$]h&]refidextron-da-hd-4k-plusuh1j hMhj hhhhubeh}(h]making-a-cec-debuggerah ]h"]making a cec debuggerah$]h&]uh1hhhhhhhhM6ubh)}(hhh](h)}(h'Extron DA HD 4K PLUS CEC Adapter driverh]h'Extron DA HD 4K PLUS CEC Adapter driver}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hhhhhMubh)}(hThis driver is for the Extron DA HD 4K PLUS series of HDMI Distribution Amplifiers: https://www.extron.com/product/dahd4kplusseriesh](hTThis driver is for the Extron DA HD 4K PLUS series of HDMI Distribution Amplifiers: }(hj hhhNhNubj)}(h/https://www.extron.com/product/dahd4kplusseriesh]h/https://www.extron.com/product/dahd4kplusseries}(hj hhhNhNubah}(h]h ]h"]h$]h&]refurij uh1jhj ubeh}(h]h ]h"]h$]h&]uh1hhhhMhj hhubh)}(h)The 2, 4 and 6 port models are supported.h]h)The 2, 4 and 6 port models are supported.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj hhubh)}(h1Firmware version 1.02.0001 or higher is required.h]h1Firmware version 1.02.0001 or higher is required.}(hj, hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj hhubh)}(hNote 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.h]hNote 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.}(hj: hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj hhubh)}(hThe 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.h]hThe 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.}(hjH hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj hhubh)}(hXThe 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.h](hMThe second mode is an automatic mode, which is selected if the module option }(hjV hhhNhNubj)}(h ``vendor_id``h]h vendor_id}(hj^ hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjV ubhX8 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.}(hjV hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj hhubh)}(hThe 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.h]hThe 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.}(hjv hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj hhubh)}(hXBy 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.h](hBy default userspace is responsible to set the EDID for the HDMI Input according to the EDIDs of the connected displays. But if the }(hj hhhNhNubj)}(h``manufacturer_name``h]hmanufacturer_name}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubhXv 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.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj hhubh)}(hNThe status of the Extron is reported in ``/sys/kernel/debug/cec/cecX/status``.h](h(The status of the Extron is reported in }(hj hhhNhNubj)}(h%``/sys/kernel/debug/cec/cecX/status``h]h!/sys/kernel/debug/cec/cecX/status}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj hhubh)}(hHThe extron-da-hd-4k-plus driver implements the following module options:h]hHThe extron-da-hd-4k-plus driver implements the following module options:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj hhubh)}(hhh](h)}(h ``debug``h]j)}(hj h]hdebug}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1hhj hhhhhMubh)}(h3If set to 1, then all serial port traffic is shown.h]h3If set to 1, then all serial port traffic is shown.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj hhubeh}(h]debugah ]h"]debugah$]h&]uh1hhj hhhhhMubh)}(hhh](h)}(h ``vendor_id``h]j)}(hj h]h vendor_id}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1hhj hhhhhMubh)}(h2The CEC Vendor ID to report to connected displays.h]h2The CEC Vendor ID to report to connected displays.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj hhubh)}(hIf 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:h]hIf 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:}(hj* hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj hhubh)}(hhh](h)}(h h]h)}(hj= h]h }(hj? hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj; ubah}(h]h ]h"]h$]h&]uh1hhj8 hhhhhNubh)}(h" and h]h)}(hjT h]h" and }(hjV hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjR ubah}(h]h ]h"]h$]h&]uh1hhj8 hhhhhNubh)}(hh]h)}(hjk h]h}(hjm hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhji ubah}(h]h ]h"]h$]h&]uh1hhj8 hhhhhNubh)}(hh]h)}(hj h]h}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1hhj8 hhhhhNubh)}(h h]h)}(hh]h}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1hhj8 hhhhhNubeh}(h]h ]h"]h$]h&]jjuh1hhhhMhj hhubh)}(hIf 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.h]hIf 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.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj hhubeh}(h] vendor-idah ]h"] vendor_idah$]h&]uh1hhj hhhhhMubh)}(hhh](h)}(h``manufacturer_name``h]j)}(hj h]hmanufacturer_name}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1hhj hhhhhMubh)}(hX]A three character manufacturer name that is used in the EDID for the HDMI Input. If not set, then userspace is responsible 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.h]hX]A three character manufacturer name that is used in the EDID for the HDMI Input. If not set, then userspace is responsible 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.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj hhubeh}(h]manufacturer-nameah ]h"]manufacturer_nameah$]h&]uh1hhj hhhhhMubh)}(hhh](h)}(h``hpd_never_low``h]j)}(hjh]h hpd_never_low}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1hhj hhhhhMubh)}(hXIf 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.h]hXIf 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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj hhubh)}(h'This option may be changed dynamically.h]h'This option may be changed dynamically.}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj hhubeh}(h] hpd-never-lowah ]h"] hpd_never_lowah$]h&]uh1hhj hhhhhMubeh}(h]('extron-da-hd-4k-plus-cec-adapter-driverj eh ]h"]('extron da hd 4k plus cec adapter driverextron_da_hd_4k_pluseh$]h&]uh1hhhhhhhhMexpect_referenced_by_name}j?j sexpect_referenced_by_id}j j subeh}(h]hdmi-cecah ]h"]hdmi cecah$]h&]uh1hhhhhhhhKubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(hN generatorN datestampN source_linkN source_urlN toc_backlinksentryfootnote_backlinksK sectnum_xformKstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjqerror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh _destinationN _config_files]7/var/lib/git/docbuild/linux/Documentation/docutils.confafile_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformKsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}j ]j asnameids}(jKjHjjjjjjjjjOjLjjjjj j j j j j j?j j>j;j j j j j j j6j3u nametypes}(jKjjjjjOjjj j j j?j>j j j j6uh}(jHhjhjjjjjjrjLjjjRjjj jj j j j j j j;j j j j j j j j3j u footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages]hsystem_message)}(hhh]h)}(hhh]h:Hyperlink target "extron-da-hd-4k-plus" is not referenced.}hjsbah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]levelKtypeINFOsourcehlineMuh1juba transformerN include_log] decorationNhhub.