~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/Documentation/admin-guide/media/cec.rst

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /Documentation/admin-guide/media/cec.rst (Version linux-6.12-rc7) and /Documentation/admin-guide/media/cec.rst (Version linux-6.11.7)


  1 .. SPDX-License-Identifier: GPL-2.0                 1 .. SPDX-License-Identifier: GPL-2.0
  2                                                     2 
  3 ========                                            3 ========
  4 HDMI CEC                                            4 HDMI CEC
  5 ========                                            5 ========
  6                                                     6 
  7 Supported hardware in mainline                      7 Supported hardware in mainline
  8 ==============================                      8 ==============================
  9                                                     9 
 10 HDMI Transmitters:                                 10 HDMI Transmitters:
 11                                                    11 
 12 - Exynos4                                          12 - Exynos4
 13 - Exynos5                                          13 - Exynos5
 14 - STIH4xx HDMI CEC                                 14 - STIH4xx HDMI CEC
 15 - V4L2 adv7511 (same HW, but a different drive     15 - V4L2 adv7511 (same HW, but a different driver from the drm adv7511)
 16 - stm32                                            16 - stm32
 17 - Allwinner A10 (sun4i)                            17 - Allwinner A10 (sun4i)
 18 - Raspberry Pi                                     18 - Raspberry Pi
 19 - dw-hdmi (Synopsis IP)                            19 - dw-hdmi (Synopsis IP)
 20 - amlogic (meson ao-cec and ao-cec-g12a)           20 - amlogic (meson ao-cec and ao-cec-g12a)
 21 - drm adv7511/adv7533                              21 - drm adv7511/adv7533
 22 - omap4                                            22 - omap4
 23 - tegra                                            23 - tegra
 24 - rk3288, rk3399                                   24 - rk3288, rk3399
 25 - tda998x                                          25 - tda998x
 26 - DisplayPort CEC-Tunneling-over-AUX on i915,      26 - DisplayPort CEC-Tunneling-over-AUX on i915, nouveau and amdgpu
 27 - ChromeOS EC CEC                                  27 - ChromeOS EC CEC
 28 - CEC for SECO boards (UDOO x86).                  28 - CEC for SECO boards (UDOO x86).
 29 - Chrontel CH7322                                  29 - Chrontel CH7322
 30                                                    30 
 31                                                    31 
 32 HDMI Receivers:                                    32 HDMI Receivers:
 33                                                    33 
 34 - adv7604/11/12                                    34 - adv7604/11/12
 35 - adv7842                                          35 - adv7842
 36 - tc358743                                         36 - tc358743
 37                                                    37 
 38 USB Dongles (see below for additional informat     38 USB Dongles (see below for additional information on how to use these
 39 dongles):                                          39 dongles):
 40                                                    40 
 41 - Pulse-Eight: the pulse8-cec driver implement     41 - Pulse-Eight: the pulse8-cec driver implements the following module option:
 42   ``persistent_config``: by default this is of     42   ``persistent_config``: by default this is off, but when set to 1 the driver
 43   will store the current settings to the devic     43   will store the current settings to the device's internal eeprom and restore
 44   it the next time the device is connected to      44   it the next time the device is connected to the USB port.
 45                                                << 
 46 - RainShadow Tech. Note: this driver does not      45 - RainShadow Tech. Note: this driver does not support the persistent_config
 47   module option of the Pulse-Eight driver. The     46   module option of the Pulse-Eight driver. The hardware supports it, but I
 48   have no plans to add this feature. But I acc     47   have no plans to add this feature. But I accept patches :-)
 49                                                    48 
 50 - Extron DA HD 4K PLUS HDMI Distribution Ampli << 
 51   :ref:`extron_da_hd_4k_plus` for more informa << 
 52                                                << 
 53 Miscellaneous:                                     49 Miscellaneous:
 54                                                    50 
 55 - vivid: emulates a CEC receiver and CEC trans     51 - vivid: emulates a CEC receiver and CEC transmitter.
 56   Can be used to test CEC applications without     52   Can be used to test CEC applications without actual CEC hardware.
 57                                                    53 
 58 - cec-gpio. If the CEC pin is hooked up to a G     54 - cec-gpio. If the CEC pin is hooked up to a GPIO pin then
 59   you can control the CEC line through this dr     55   you can control the CEC line through this driver. This supports error
 60   injection as well.                               56   injection as well.
 61                                                    57 
 62 - cec-gpio and Allwinner A10 (or any other dri     58 - cec-gpio and Allwinner A10 (or any other driver that uses the CEC pin
 63   framework to drive the CEC pin directly): th     59   framework to drive the CEC pin directly): the CEC pin framework uses
 64   high-resolution timers. These timers are aff     60   high-resolution timers. These timers are affected by NTP daemons that
 65   speed up or slow down the clock to sync with     61   speed up or slow down the clock to sync with the official time. The
 66   chronyd server will by default increase or d     62   chronyd server will by default increase or decrease the clock by
 67   1/12th. This will cause the CEC timings to g     63   1/12th. This will cause the CEC timings to go out of spec. To fix this,
 68   add a 'maxslewrate 40000' line to chronyd.co     64   add a 'maxslewrate 40000' line to chronyd.conf. This limits the clock
 69   frequency change to 1/25th, which keeps the      65   frequency change to 1/25th, which keeps the CEC timings within spec.
 70                                                    66 
 71                                                    67 
 72 Utilities                                          68 Utilities
 73 =========                                          69 =========
 74                                                    70 
 75 Utilities are available here: https://git.linu     71 Utilities are available here: https://git.linuxtv.org/v4l-utils.git
 76                                                    72 
 77 ``utils/cec-ctl``: control a CEC device            73 ``utils/cec-ctl``: control a CEC device
 78                                                    74 
 79 ``utils/cec-compliance``: test compliance of a     75 ``utils/cec-compliance``: test compliance of a remote CEC device
 80                                                    76 
 81 ``utils/cec-follower``: emulate a CEC follower     77 ``utils/cec-follower``: emulate a CEC follower device
 82                                                    78 
 83 Note that ``cec-ctl`` has support for the CEC      79 Note that ``cec-ctl`` has support for the CEC Hospitality Profile as is
 84 used in some hotel displays. See http://www.ht     80 used in some hotel displays. See http://www.htng.org.
 85                                                    81 
 86 Note that the libcec library (https://github.c     82 Note that the libcec library (https://github.com/Pulse-Eight/libcec) supports
 87 the linux CEC framework.                           83 the linux CEC framework.
 88                                                    84 
 89 If you want to get the CEC specification, then     85 If you want to get the CEC specification, then look at the References of
 90 the HDMI wikipedia page: https://en.wikipedia.     86 the HDMI wikipedia page: https://en.wikipedia.org/wiki/HDMI. CEC is part
 91 of the HDMI specification. HDMI 1.3 is freely      87 of the HDMI specification. HDMI 1.3 is freely available (very similar to
 92 HDMI 1.4 w.r.t. CEC) and should be good enough     88 HDMI 1.4 w.r.t. CEC) and should be good enough for most things.
 93                                                    89 
 94                                                    90 
 95 DisplayPort to HDMI Adapters with working CEC      91 DisplayPort to HDMI Adapters with working CEC
 96 =============================================      92 =============================================
 97                                                    93 
 98 Background: most adapters do not support the C     94 Background: most adapters do not support the CEC Tunneling feature,
 99 and of those that do many did not actually con     95 and of those that do many did not actually connect the CEC pin.
100 Unfortunately, this means that while a CEC dev     96 Unfortunately, this means that while a CEC device is created, it
101 is actually all alone in the world and will ne     97 is actually all alone in the world and will never be able to see other
102 CEC devices.                                       98 CEC devices.
103                                                    99 
104 This is a list of known working adapters that     100 This is a list of known working adapters that have CEC Tunneling AND
105 that properly connected the CEC pin. If you fi    101 that properly connected the CEC pin. If you find adapters that work
106 but are not in this list, then drop me a note.    102 but are not in this list, then drop me a note.
107                                                   103 
108 To test: hook up your DP-to-HDMI adapter to a     104 To test: hook up your DP-to-HDMI adapter to a CEC capable device
109 (typically a TV), then run::                      105 (typically a TV), then run::
110                                                   106 
111         cec-ctl --playback      # Configure th    107         cec-ctl --playback      # Configure the PC as a CEC Playback device
112         cec-ctl -S              # Show the CEC    108         cec-ctl -S              # Show the CEC topology
113                                                   109 
114 The ``cec-ctl -S`` command should show at leas    110 The ``cec-ctl -S`` command should show at least two CEC devices,
115 ourselves and the CEC device you are connected    111 ourselves and the CEC device you are connected to (i.e. typically the TV).
116                                                   112 
117 General note: I have only seen this work with     113 General note: I have only seen this work with the Parade PS175, PS176 and
118 PS186 chipsets and the MegaChips 2900. While M    114 PS186 chipsets and the MegaChips 2900. While MegaChips 28x0 claims CEC support,
119 I have never seen it work.                        115 I have never seen it work.
120                                                   116 
121 USB-C to HDMI                                     117 USB-C to HDMI
122 -------------                                     118 -------------
123                                                   119 
124 Samsung Multiport Adapter EE-PW700: https://ww    120 Samsung Multiport Adapter EE-PW700: https://www.samsung.com/ie/support/model/EE-PW700BBEGWW/
125                                                   121 
126 Kramer ADC-U31C/HF: https://www.kramerav.com/p    122 Kramer ADC-U31C/HF: https://www.kramerav.com/product/ADC-U31C/HF
127                                                   123 
128 Club3D CAC-2504: https://www.club-3d.com/en/de    124 Club3D CAC-2504: https://www.club-3d.com/en/detail/2449/usb_3.1_type_c_to_hdmi_2.0_uhd_4k_60hz_active_adapter/
129                                                   125 
130 DisplayPort to HDMI                               126 DisplayPort to HDMI
131 -------------------                               127 -------------------
132                                                   128 
133 Club3D CAC-1080: https://www.club-3d.com/en/de    129 Club3D CAC-1080: https://www.club-3d.com/en/detail/2442/displayport_1.4_to_hdmi_2.0b_hdr/
134                                                   130 
135 CableCreation (SKU: CD0712): https://www.cable    131 CableCreation (SKU: CD0712): https://www.cablecreation.com/products/active-displayport-to-hdmi-adapter-4k-hdr
136                                                   132 
137 HP DisplayPort to HDMI True 4k Adapter (P/N 2J    133 HP DisplayPort to HDMI True 4k Adapter (P/N 2JA63AA): https://www.hp.com/us-en/shop/pdp/hp-displayport-to-hdmi-true-4k-adapter
138                                                   134 
139 Mini-DisplayPort to HDMI                          135 Mini-DisplayPort to HDMI
140 ------------------------                          136 ------------------------
141                                                   137 
142 Club3D CAC-1180: https://www.club-3d.com/en/de    138 Club3D CAC-1180: https://www.club-3d.com/en/detail/2443/mini_displayport_1.4_to_hdmi_2.0b_hdr/
143                                                   139 
144 Note that passive adapters will never work, yo    140 Note that passive adapters will never work, you need an active adapter.
145                                                   141 
146 The Club3D adapters in this list are all MegaC    142 The Club3D adapters in this list are all MegaChips 2900 based. Other Club3D adapters
147 are PS176 based and do NOT have the CEC pin ho    143 are PS176 based and do NOT have the CEC pin hooked up, so only the three Club3D
148 adapters above are known to work.                 144 adapters above are known to work.
149                                                   145 
150 I suspect that MegaChips 2900 based designs in    146 I suspect that MegaChips 2900 based designs in general are likely to work
151 whereas with the PS176 it is more hit-and-miss    147 whereas with the PS176 it is more hit-and-miss (mostly miss). The PS186 is
152 likely to have the CEC pin hooked up, it looks    148 likely to have the CEC pin hooked up, it looks like they changed the reference
153 design for that chipset.                          149 design for that chipset.
154                                                   150 
155                                                   151 
156 USB CEC Dongles                                   152 USB CEC Dongles
157 ===============                                   153 ===============
158                                                   154 
159 These dongles appear as ``/dev/ttyACMX`` devic    155 These dongles appear as ``/dev/ttyACMX`` devices and need the ``inputattach``
160 utility to create the ``/dev/cecX`` devices. S    156 utility to create the ``/dev/cecX`` devices. Support for the Pulse-Eight
161 has been added to ``inputattach`` 1.6.0. Suppo    157 has been added to ``inputattach`` 1.6.0. Support for the Rainshadow Tech has
162 been added to ``inputattach`` 1.6.1.              158 been added to ``inputattach`` 1.6.1.
163                                                   159 
164 You also need udev rules to automatically star    160 You also need udev rules to automatically start systemd services::
165                                                   161 
166         SUBSYSTEM=="tty", KERNEL=="ttyACM[0-9]    162         SUBSYSTEM=="tty", KERNEL=="ttyACM[0-9]*", ATTRS{idVendor}=="2548", ATTRS{idProduct}=="1002", ACTION=="add", TAG+="systemd", ENV{SYSTEMD_WANTS}+="pulse8-cec-inputattach@%k.service"
167         SUBSYSTEM=="tty", KERNEL=="ttyACM[0-9]    163         SUBSYSTEM=="tty", KERNEL=="ttyACM[0-9]*", ATTRS{idVendor}=="2548", ATTRS{idProduct}=="1001", ACTION=="add", TAG+="systemd", ENV{SYSTEMD_WANTS}+="pulse8-cec-inputattach@%k.service"
168         SUBSYSTEM=="tty", KERNEL=="ttyACM[0-9]    164         SUBSYSTEM=="tty", KERNEL=="ttyACM[0-9]*", ATTRS{idVendor}=="04d8", ATTRS{idProduct}=="ff59", ACTION=="add", TAG+="systemd", ENV{SYSTEMD_WANTS}+="rainshadow-cec-inputattach@%k.service"
169                                                   165 
170 and these systemd services:                       166 and these systemd services:
171                                                   167 
172 For Pulse-Eight make /lib/systemd/system/pulse    168 For Pulse-Eight make /lib/systemd/system/pulse8-cec-inputattach@.service::
173                                                   169 
174         [Unit]                                    170         [Unit]
175         Description=inputattach for pulse8-cec    171         Description=inputattach for pulse8-cec device on %I
176                                                   172 
177         [Service]                                 173         [Service]
178         Type=simple                               174         Type=simple
179         ExecStart=/usr/bin/inputattach --pulse    175         ExecStart=/usr/bin/inputattach --pulse8-cec /dev/%I
180                                                   176 
181 For the RainShadow Tech make /lib/systemd/syst    177 For the RainShadow Tech make /lib/systemd/system/rainshadow-cec-inputattach@.service::
182                                                   178 
183         [Unit]                                    179         [Unit]
184         Description=inputattach for rainshadow    180         Description=inputattach for rainshadow-cec device on %I
185                                                   181 
186         [Service]                                 182         [Service]
187         Type=simple                               183         Type=simple
188         ExecStart=/usr/bin/inputattach --rains    184         ExecStart=/usr/bin/inputattach --rainshadow-cec /dev/%I
189                                                   185 
190                                                   186 
191 For proper suspend/resume support create: /lib    187 For proper suspend/resume support create: /lib/systemd/system/restart-cec-inputattach.service::
192                                                   188 
193         [Unit]                                    189         [Unit]
194         Description=restart inputattach for ce    190         Description=restart inputattach for cec devices
195         After=suspend.target                      191         After=suspend.target
196                                                   192 
197         [Service]                                 193         [Service]
198         Type=forking                              194         Type=forking
199         ExecStart=/bin/bash -c 'for d in /dev/    195         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'
200                                                   196 
201         [Install]                                 197         [Install]
202         WantedBy=suspend.target                   198         WantedBy=suspend.target
203                                                   199 
204 And run ``systemctl enable restart-cec-inputat    200 And run ``systemctl enable restart-cec-inputattach``.
205                                                   201 
206 To automatically set the physical address of t    202 To automatically set the physical address of the CEC device whenever the
207 EDID changes, you can use ``cec-ctl`` with the    203 EDID changes, you can use ``cec-ctl`` with the ``-E`` option::
208                                                   204 
209         cec-ctl -E /sys/class/drm/card0-DP-1/e    205         cec-ctl -E /sys/class/drm/card0-DP-1/edid
210                                                   206 
211 This assumes the dongle is connected to the ca    207 This assumes the dongle is connected to the card0-DP-1 output (``xrandr`` will tell
212 you which output is used) and it will poll for    208 you which output is used) and it will poll for changes to the EDID and update
213 the Physical Address whenever they occur.         209 the Physical Address whenever they occur.
214                                                   210 
215 To automatically run this command you can use     211 To automatically run this command you can use cron. Edit crontab with
216 ``crontab -e`` and add this line::                212 ``crontab -e`` and add this line::
217                                                   213 
218         @reboot /usr/local/bin/cec-ctl -E /sys    214         @reboot /usr/local/bin/cec-ctl -E /sys/class/drm/card0-DP-1/edid
219                                                   215 
220 This only works for display drivers that expos    216 This only works for display drivers that expose the EDID in ``/sys/class/drm``,
221 such as the i915 driver.                          217 such as the i915 driver.
222                                                   218 
223                                                   219 
224 CEC Without HPD                                   220 CEC Without HPD
225 ===============                                   221 ===============
226                                                   222 
227 Some displays when in standby mode have no HDM    223 Some displays when in standby mode have no HDMI Hotplug Detect signal, but
228 CEC is still enabled so connected devices can     224 CEC is still enabled so connected devices can send an <Image View On> CEC
229 message in order to wake up such displays. Unf    225 message in order to wake up such displays. Unfortunately, not all CEC
230 adapters can support this. An example is the O    226 adapters can support this. An example is the Odroid-U3 SBC that has a
231 level-shifter that is powered off when the HPD    227 level-shifter that is powered off when the HPD signal is low, thus
232 blocking the CEC pin. Even though the SoC can     228 blocking the CEC pin. Even though the SoC can use CEC without a HPD,
233 the level-shifter will prevent this from funct    229 the level-shifter will prevent this from functioning.
234                                                   230 
235 There is a CEC capability flag to signal this:    231 There is a CEC capability flag to signal this: ``CEC_CAP_NEEDS_HPD``.
236 If set, then the hardware cannot wake up displ    232 If set, then the hardware cannot wake up displays with this behavior.
237                                                   233 
238 Note for CEC application implementers: the <Im    234 Note for CEC application implementers: the <Image View On> message must
239 be the first message you send, don't send any     235 be the first message you send, don't send any other messages before.
240 Certain very bad but unfortunately not uncommo    236 Certain very bad but unfortunately not uncommon CEC implementations
241 get very confused if they receive anything els    237 get very confused if they receive anything else but this message and
242 they won't wake up.                               238 they won't wake up.
243                                                   239 
244 When writing a driver it can be tricky to test    240 When writing a driver it can be tricky to test this. There are two
245 ways to do this:                                  241 ways to do this:
246                                                   242 
247 1) Get a Pulse-Eight USB CEC dongle, connect a    243 1) Get a Pulse-Eight USB CEC dongle, connect an HDMI cable from your
248    device to the Pulse-Eight, but do not conne    244    device to the Pulse-Eight, but do not connect the Pulse-Eight to
249    the display.                                   245    the display.
250                                                   246 
251    Now configure the Pulse-Eight dongle::         247    Now configure the Pulse-Eight dongle::
252                                                   248 
253         cec-ctl -p0.0.0.0 --tv                    249         cec-ctl -p0.0.0.0 --tv
254                                                   250 
255    and start monitoring::                         251    and start monitoring::
256                                                   252 
257         sudo cec-ctl -M                           253         sudo cec-ctl -M
258                                                   254 
259    On the device you are testing run::            255    On the device you are testing run::
260                                                   256 
261         cec-ctl --playback                        257         cec-ctl --playback
262                                                   258 
263    It should report a physical address of f.f.    259    It should report a physical address of f.f.f.f. Now run this
264    command::                                      260    command::
265                                                   261 
266         cec-ctl -t0 --image-view-on               262         cec-ctl -t0 --image-view-on
267                                                   263 
268    The Pulse-Eight should see the <Image View     264    The Pulse-Eight should see the <Image View On> message. If not,
269    then something (hardware and/or software) i    265    then something (hardware and/or software) is preventing the CEC
270    message from going out.                        266    message from going out.
271                                                   267 
272    To make sure you have the wiring correct ju    268    To make sure you have the wiring correct just connect the
273    Pulse-Eight to a CEC-enabled display and ru    269    Pulse-Eight to a CEC-enabled display and run the same command
274    on your device: now there is a HPD, so you     270    on your device: now there is a HPD, so you should see the command
275    arriving at the Pulse-Eight.                   271    arriving at the Pulse-Eight.
276                                                   272 
277 2) If you have another linux device supporting    273 2) If you have another linux device supporting CEC without HPD, then
278    you can just connect your device to that de    274    you can just connect your device to that device. Yes, you can connect
279    two HDMI outputs together. You won't have a    275    two HDMI outputs together. You won't have a HPD (which is what we
280    want for this test), but the second device     276    want for this test), but the second device can monitor the CEC pin.
281                                                   277 
282    Otherwise use the same commands as in 1.       278    Otherwise use the same commands as in 1.
283                                                   279 
284 If CEC messages do not come through when there    280 If CEC messages do not come through when there is no HPD, then you
285 need to figure out why. Typically it is either    281 need to figure out why. Typically it is either a hardware restriction
286 or the software powers off the CEC core when t    282 or the software powers off the CEC core when the HPD goes low. The
287 first cannot be corrected of course, the secon    283 first cannot be corrected of course, the second will likely required
288 driver changes.                                   284 driver changes.
289                                                   285 
290                                                   286 
291 Microcontrollers & CEC                            287 Microcontrollers & CEC
292 ======================                            288 ======================
293                                                   289 
294 We have seen some CEC implementations in displ    290 We have seen some CEC implementations in displays that use a microcontroller
295 to sample the bus. This does not have to be a     291 to sample the bus. This does not have to be a problem, but some implementations
296 have timing issues. This is hard to discover u    292 have timing issues. This is hard to discover unless you can hook up a low-level
297 CEC debugger (see the next section).              293 CEC debugger (see the next section).
298                                                   294 
299 You will see cases where the CEC transmitter h    295 You will see cases where the CEC transmitter holds the CEC line high or low for
300 a longer time than is allowed. For directed me    296 a longer time than is allowed. For directed messages this is not a problem since
301 if that happens the message will not be Acked     297 if that happens the message will not be Acked and it will be retransmitted.
302 For broadcast messages no such mechanism exist    298 For broadcast messages no such mechanism exists.
303                                                   299 
304 It's not clear what to do about this. It is pr    300 It's not clear what to do about this. It is probably wise to transmit some
305 broadcast messages twice to reduce the chance     301 broadcast messages twice to reduce the chance of them being lost. Specifically
306 <Standby> and <Active Source> are candidates f    302 <Standby> and <Active Source> are candidates for that.
307                                                   303 
308                                                   304 
309 Making a CEC debugger                             305 Making a CEC debugger
310 =====================                             306 =====================
311                                                   307 
312 By using a Raspberry Pi 4B and some cheap comp    308 By using a Raspberry Pi 4B and some cheap components you can make
313 your own low-level CEC debugger.                  309 your own low-level CEC debugger.
314                                                   310 
315 The critical component is one of these HDMI fe    311 The critical component is one of these HDMI female-female passthrough connectors
316 (full soldering type 1):                          312 (full soldering type 1):
317                                                   313 
318 https://elabbay.myshopify.com/collections/came    314 https://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
319                                                   315 
320 The video quality is variable and certainly no    316 The video quality is variable and certainly not enough to pass-through 4kp60
321 (594 MHz) video. You might be able to support     317 (594 MHz) video. You might be able to support 4kp30, but more likely you will
322 be limited to 1080p60 (148.5 MHz). But for CEC    318 be limited to 1080p60 (148.5 MHz). But for CEC testing that is fine.
323                                                   319 
324 You need a breadboard and some breadboard wire    320 You need a breadboard and some breadboard wires:
325                                                   321 
326 http://www.dx.com/p/diy-40p-male-to-female-mal    322 http://www.dx.com/p/diy-40p-male-to-female-male-to-male-female-to-female-dupont-line-wire-3pcs-356089#.WYLOOXWGN7I
327                                                   323 
328 If you want to monitor the HPD and/or 5V lines    324 If you want to monitor the HPD and/or 5V lines as well, then you need one of
329 these 5V to 3.3V level shifters:                  325 these 5V to 3.3V level shifters:
330                                                   326 
331 https://www.adafruit.com/product/757              327 https://www.adafruit.com/product/757
332                                                   328 
333 (This is just where I got these components, th    329 (This is just where I got these components, there are many other places you
334 can get similar things).                          330 can get similar things).
335                                                   331 
336 The ground pin of the HDMI connector needs to     332 The ground pin of the HDMI connector needs to be connected to a ground
337 pin of the Raspberry Pi, of course.               333 pin of the Raspberry Pi, of course.
338                                                   334 
339 The CEC pin of the HDMI connector needs to be     335 The CEC pin of the HDMI connector needs to be connected to these pins:
340 GPIO 6 and GPIO 7. The optional HPD pin of the    336 GPIO 6 and GPIO 7. The optional HPD pin of the HDMI connector should
341 be connected via the level shifter to these pi    337 be connected via the level shifter to these pins: GPIO 23 and GPIO 12.
342 The optional 5V pin of the HDMI connector shou    338 The optional 5V pin of the HDMI connector should be connected via the
343 level shifter to these pins: GPIO 25 and GPIO     339 level shifter to these pins: GPIO 25 and GPIO 22. Monitoring the HPD and
344 5V lines is not necessary, but it is helpful.     340 5V lines is not necessary, but it is helpful.
345                                                   341 
346 This device tree addition in ``arch/arm/boot/d    342 This device tree addition in ``arch/arm/boot/dts/bcm2711-rpi-4-b.dts``
347 will hook up the cec-gpio driver correctly::      343 will hook up the cec-gpio driver correctly::
348                                                   344 
349         cec@6 {                                   345         cec@6 {
350                 compatible = "cec-gpio";          346                 compatible = "cec-gpio";
351                 cec-gpios = <&gpio 6 (GPIO_ACT    347                 cec-gpios = <&gpio 6 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
352                 hpd-gpios = <&gpio 23 GPIO_ACT    348                 hpd-gpios = <&gpio 23 GPIO_ACTIVE_HIGH>;
353                 v5-gpios = <&gpio 25 GPIO_ACTI    349                 v5-gpios = <&gpio 25 GPIO_ACTIVE_HIGH>;
354         };                                        350         };
355                                                   351 
356         cec@7 {                                   352         cec@7 {
357                 compatible = "cec-gpio";          353                 compatible = "cec-gpio";
358                 cec-gpios = <&gpio 7 (GPIO_ACT    354                 cec-gpios = <&gpio 7 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
359                 hpd-gpios = <&gpio 12 GPIO_ACT    355                 hpd-gpios = <&gpio 12 GPIO_ACTIVE_HIGH>;
360                 v5-gpios = <&gpio 22 GPIO_ACTI    356                 v5-gpios = <&gpio 22 GPIO_ACTIVE_HIGH>;
361         };                                        357         };
362                                                   358 
363 If you haven't hooked up the HPD and/or 5V lin    359 If you haven't hooked up the HPD and/or 5V lines, then just delete those
364 lines.                                            360 lines.
365                                                   361 
366 This dts change will enable two cec GPIO devic    362 This dts change will enable two cec GPIO devices: I typically use one to
367 send/receive CEC commands and the other to mon    363 send/receive CEC commands and the other to monitor. If you monitor using
368 an unconfigured CEC adapter then it will use G    364 an unconfigured CEC adapter then it will use GPIO interrupts which makes
369 monitoring very accurate.                         365 monitoring very accurate.
370                                                   366 
371 If you just want to monitor traffic, then a si    367 If you just want to monitor traffic, then a single instance is sufficient.
372 The minimum configuration is one HDMI female-f    368 The minimum configuration is one HDMI female-female passthrough connector
373 and two female-female breadboard wires: one fo    369 and two female-female breadboard wires: one for connecting the HDMI ground
374 pin to a ground pin on the Raspberry Pi, and t    370 pin to a ground pin on the Raspberry Pi, and the other to connect the HDMI
375 CEC pin to GPIO 6 on the Raspberry Pi.            371 CEC pin to GPIO 6 on the Raspberry Pi.
376                                                   372 
377 The documentation on how to use the error inje    373 The documentation on how to use the error injection is here: :ref:`cec_pin_error_inj`.
378                                                   374 
379 ``cec-ctl --monitor-pin`` will do low-level CE    375 ``cec-ctl --monitor-pin`` will do low-level CEC bus sniffing and analysis.
380 You can also store the CEC traffic to file usi    376 You can also store the CEC traffic to file using ``--store-pin`` and analyze
381 it later using ``--analyze-pin``.                 377 it later using ``--analyze-pin``.
382                                                   378 
383 You can also use this as a full-fledged CEC de    379 You can also use this as a full-fledged CEC device by configuring it
384 using ``cec-ctl --tv -p0.0.0.0`` or ``cec-ctl     380 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 se << 
392 Amplifiers: https://www.extron.com/product/dah << 
393                                                << 
394 The 2, 4 and 6 port models are supported.      << 
395                                                << 
396 Firmware version 1.02.0001 or higher is requir << 
397                                                << 
398 Note that older Extron hardware revisions have << 
399 which may mean that CEC will not work. This is << 
400 E34814 and up.                                 << 
401                                                << 
402 The CEC support has two modes: the first is a  << 
403 to manually control CEC for the HDMI Input and << 
404 full control, it is also complicated.          << 
405                                                << 
406 The second mode is an automatic mode, which is << 
407 ``vendor_id`` is set. In that case the driver  << 
408 received in the input will be distributed to t << 
409 to use the /dev/cecX devices to talk to the co << 
410 the driver that configures everything and deal << 
411 changes.                                       << 
412                                                << 
413 The driver also takes care of the EDIDs: /dev/ << 
414 read the EDIDs and (for the HDMI Input port) t << 
415                                                << 
416 By default userspace is responsible to set the << 
417 according to the EDIDs of the connected displa << 
418 module option is set, then the driver will tak << 
419 of the HDMI Input based on the supported resol << 
420 Currently the driver only supports resolutions << 
421 displays support 4kp60, then it will advertise << 
422 it will fall back to an EDID that just reports << 
423                                                << 
424 The status of the Extron is reported in ``/sys << 
425                                                << 
426 The extron-da-hd-4k-plus driver implements the << 
427                                                << 
428 ``debug``                                      << 
429 ---------                                      << 
430                                                << 
431 If set to 1, then all serial port traffic is s << 
432                                                << 
433 ``vendor_id``                                  << 
434 -------------                                  << 
435                                                << 
436 The CEC Vendor ID to report to connected displ << 
437                                                << 
438 If set, then the driver will take care of dist << 
439 on the input to the HDMI outputs. This is done << 
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  << 
448 configure the CEC devices for HDMI Input and t << 
449                                                << 
450 ``manufacturer_name``                          << 
451 ---------------------                          << 
452                                                << 
453 A three character manufacturer name that is us << 
454 Input. If not set, then userspace is reponsibl << 
455 If set, then the driver will update the EDID a << 
456 resolutions supported by the connected display << 
457 anymore to manually set the EDID for the HDMI  << 
458                                                << 
459 ``hpd_never_low``                              << 
460 -----------------                              << 
461                                                << 
462 If set, then the Hotplug Detect pin of the HDM << 
463 even if nothing is connected to the HDMI Outpu << 
464 then the Hotplug Detect pin of the HDMI input  << 
465 Hotplug Detect pins of the HDMI Outputs are al << 
466                                                << 
467 This option may be changed dynamically.        << 
                                                      

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php