I was using cec-client on a Raspberry to send hdmi cec messages to my tv to turn it on and off. I’m now looking for a more powerfull SoC that can do the same things but faster. On the hardware page of the Rock Pi 4 I found that this device should also support hdmi cec and I was also able to install the cec-client using this command:
sudo apt-get install cec-utils
But the problem now is that the cec-client does not find any devices:
sudo cec-client -l
libCEC version: 4.0.2, compiled on Linux-4.4.0-142-generic … , features: P8_USB, DRM, P8_detect, randr
Found devices: NONE
I’m using the Ubuntu server image. Is there any tutorial how to get the cec-client to work on this board?
I’ve managed to compile the kernel with the cec drivers. The cec0 device is showing up and I can use it, but the cec-ctl command doesn’t find my tv. (I know that cec works on my tv because it works with the Raspberry Pi)
Here is the output from sudo cec-compliance -v -T:
CEC_ADAP_G_CAPS returned 0 (Success)
cec-compliance SHA : not available
CEC_ADAP_G_PHYS_ADDR returned 0 (Success)
CEC_ADAP_G_LOG_ADDRS returned 0 (Success)
Driver Info:
Driver Name : dwhdmi-rockchip
Adapter Name : dw_hdmi
Capabilities : 0x0000000e
Logical Addresses
Transmit
Passthrough
Driver version : 4.4.154
Available Logical Addresses: 4
Physical Address : 2.0.0.0
Logical Address Mask : 0x0010
CEC Version : 2.0
Vendor ID : 0x000c03
Logical Addresses : 1 (Allow RC Passthrough)
Logical Address : 4 (Playback Device 1)
Primary Device Type : Playback
Logical Address Type : Playback
All Device Types : Playback
RC TV Profile : None
Device Features :
None
Compliance test for device /dev/cec0:
The test results mean the following:
OK Supported correctly by the device.
OK (Not Supported) Not supported and not mandatory for the device.
OK (Presumed) Presumably supported. Manually check to confirm.
OK (Unexpected) Supported correctly but is not expected to be supported for this device.
OK (Refused) Supported by the device, but was refused.
FAIL Failed and was expected to be supported by this device.
Find remote devices:
MSG_POLL: Sequence: 670 Tx Timestamp: 2965.508s Length: 1
MSG_POLL: Sequence: 671 Tx Timestamp: 2965.567s Length: 1
MSG_POLL: Sequence: 672 Tx Timestamp: 2965.626s Length: 1
MSG_POLL: Sequence: 673 Tx Timestamp: 2965.686s Length: 1
MSG_POLL: Sequence: 674 Tx Timestamp: 2965.686s Length: 1
MSG_POLL: Sequence: 675 Tx Timestamp: 2965.746s Length: 1
MSG_POLL: Sequence: 676 Tx Timestamp: 2965.805s Length: 1
MSG_POLL: Sequence: 677 Tx Timestamp: 2965.864s Length: 1
MSG_POLL: Sequence: 678 Tx Timestamp: 2965.924s Length: 1
MSG_POLL: Sequence: 679 Tx Timestamp: 2965.983s Length: 1
MSG_POLL: Sequence: 680 Tx Timestamp: 2966.043s Length: 1
MSG_POLL: Sequence: 681 Tx Timestamp: 2966.102s Length: 1
MSG_POLL: Sequence: 682 Tx Timestamp: 2966.161s Length: 1
MSG_POLL: Sequence: 683 Tx Timestamp: 2966.221s Length: 1
MSG_POLL: Sequence: 684 Tx Timestamp: 2966.280s Length: 1
Polling: OK
Network topology:
Total: 1, Succeeded: 1, Failed: 0, Warnings: 0
Normally the tv should now appear in the Network Topology as far as I understand. Any ideas what could be the problem?
I think we did not enable the CEC pin in the device tree. You can enable it with the following patch and try. I am sorry we don’t have a TV with CEC in the office so we can not test for you.
Thanks for the quick help, now everything works and I’m able to turn the tv on and off. Could you please implement those changes into the kernel? I could also send a pull request with my changes on GitHub.