Giter VIP home page Giter VIP logo

Comments (5)

phhusson avatar phhusson commented on July 27, 2024 1

FWIW, CEC framework and cec on dw-hdmi support has been mainlined.
It now integrates the support for 4-bytes words, and it fixed the various EDID problems yo uhad.

I've enabled and tested CEC on rk3399-firefly with the following patch:
https://gist.github.com/phhusson/fffeb89ae7b179d685a9386b9dd44a1c

I'm afraid you'll still need your gpio7c0/gpio7c7 hack though.
(On the rk3399 there is only one CEC pin, so no problem)

from kernel.

phhusson avatar phhusson commented on July 27, 2024

gpio7c0/gpio7c7 hack should no longer be needed with https://patchwork.kernel.org/patch/10006451/

from kernel.

mcerveny avatar mcerveny commented on July 27, 2024

Series of commits from UPSTREAM.

from kernel.

mcerveny avatar mcerveny commented on July 27, 2024

I successfully tested CEC (Rock64/RK3328). There is only need to enable CEC in kernel config (mcerveny/rockchip-linux@ce35f37) and test with utility cec-compliance/cec-ctl (apt-get install v4l-utils (1.12.3-1)).
Compliance test:

# ## There is TV set and BD-player on CEC bus
# cec-compliance -v -T
		CEC_ADAP_G_CAPS returned 0 (Success)
cec-compliance SHA                 : not available

Driver Info:
	Driver Name                : dwhdmi-rockchip
	Adapter Name               : dw_hdmi
	Capabilities               : 0x0000000e
		Logical Addresses
		Transmit
		Passthrough
	Driver version             : 4.4.103
	Available Logical Addresses: 4
		CEC_ADAP_G_PHYS_ADDR returned 0 (Success)
	Physical Address           : 2.0.0.0
		CEC_ADAP_G_LOG_ADDRS returned 0 (Success)
	Logical Address Mask       : 0x0100
	CEC Version                : 2.0
	Vendor ID                  : 0xaabbcc
	Logical Addresses          : 1 (Allow RC Passthrough)

	  Logical Address          : 8
	    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:
		CEC_TRANSMIT returned 0 (Success)
		CEC_TRANSMIT returned 0 (Success)
		CEC_TRANSMIT returned 0 (Success)
		CEC_TRANSMIT returned 0 (Success)
		CEC_TRANSMIT returned 0 (Success)
		CEC_TRANSMIT returned 0 (Success)
		CEC_TRANSMIT returned 0 (Success)
		CEC_TRANSMIT returned 0 (Success)
		CEC_TRANSMIT returned 0 (Success)
		CEC_TRANSMIT returned 0 (Success)
		CEC_TRANSMIT returned 0 (Success)
		CEC_TRANSMIT returned 0 (Success)
		CEC_TRANSMIT returned 0 (Success)
		CEC_TRANSMIT returned 0 (Success)
		CEC_TRANSMIT returned 0 (Success)
	Polling: OK

Network topology:
	System Information for device 0 (TV) from device 8 (Playback Device 2):
		CEC Version                : 		CEC_TRANSMIT returned 0 (Success)
1.4
		Physical Address           : 		CEC_TRANSMIT returned 0 (Success)
0.0.0.0
		Primary Device Type        : TV
		Vendor ID                  : 		CEC_TRANSMIT returned 0 (Success)
0x00e091
		OSD Name                   : 		CEC_TRANSMIT returned 0 (Success)
Tx, OK, Rx, Timeout
		CEC_TRANSMIT returned 0 (Success)
		Menu Language              : kor
		Power Status               : 		CEC_TRANSMIT returned 0 (Success)
On
	System Information for device 4 (Playback Device 1) from device 8 (Playback Device 2):
		CEC Version                : 		CEC_TRANSMIT returned 0 (Success)
1.4
		Physical Address           : 		CEC_TRANSMIT returned 0 (Success)
1.0.0.0
		Primary Device Type        : Playback
		Vendor ID                  : 		CEC_TRANSMIT returned 0 (Success)
0x00e091
		OSD Name                   : 		CEC_TRANSMIT returned 0 (Success)
'BD_PLAYER'
		CEC_TRANSMIT returned 0 (Success)
		Power Status               : 		CEC_TRANSMIT returned 0 (Success)
Standby

Total: 1, Succeeded: 1, Failed: 0, Warnings: 0

Button test:

# ## press some buttons on tv-remote control
# cec-ctl --playback -o Rock64 -V 0xaabbcc -M -T 
		CEC_ADAP_G_CAPS returned 0 (Success)
Driver Info:
	Driver Name                : dwhdmi-rockchip
	Adapter Name               : dw_hdmi
	Capabilities               : 0x0000000e
		Logical Addresses
		Transmit
		Passthrough
	Driver version             : 4.4.103
	Available Logical Addresses: 4
		CEC_ADAP_G_PHYS_ADDR returned 0 (Success)
	Physical Address           : 2.0.0.0
		CEC_ADAP_S_LOG_ADDRS returned 0 (Success)
		CEC_ADAP_S_LOG_ADDRS returned 0 (Success)
		CEC_ADAP_G_LOG_ADDRS returned 0 (Success)
	Logical Address Mask       : 0x0100
	CEC Version                : 2.0
	Vendor ID                  : 0xaabbcc
	OSD Name                   : 'Rock64'
	Logical Addresses          : 1 (Allow RC Passthrough)

	  Logical Address          : 8 (Playback Device 2)
	    Primary Device Type    : Playback
	    Logical Address Type   : Playback
	    All Device Types       : Playback
	    RC TV Profile          : None
	    Device Features        :
		None


Monitor All mode is not supported, falling back to regular monitoring
		CEC_S_MODE returned 0 (Success)
		CEC_DQEVENT returned 0 (Success)

Event: State Change: PA: 2.0.0.0, LA mask: 0x0100
		CEC_RECEIVE returned 0 (Success)
Transmitted by Playback Device 2 to all (8 to 15): CEC_MSG_REPORT_FEATURES (0xa6):
	cec-version: version-2-0 (0x06)
	all-device-types: playback (0x10)
	rc-profile: tv-profile-none (0x00)
	dev-features: 0 (0x00)
		CEC_RECEIVE returned 0 (Success)
Transmitted by Playback Device 2 to all (8 to 15): CEC_MSG_REPORT_PHYSICAL_ADDR (0x84):
	phys-addr: 2.0.0.0
	prim-devtype: playback (0x04)
		CEC_RECEIVE returned 0 (Success)
Received from TV to Playback Device 2 (0 to 8): CEC_MSG_FEATURE_ABORT (0x00):
	abort-msg: 166 (0xa6)
	reason: unrecognized-op (0x00)
		CEC_RECEIVE returned 0 (Success)
Received from TV to Playback Device 2 (0 to 8): CEC_MSG_GIVE_DEVICE_POWER_STATUS (0x8f)
		CEC_RECEIVE returned 0 (Success)
Transmitted by Playback Device 2 to TV (8 to 0): CEC_MSG_FEATURE_ABORT (0x00):
	abort-msg: 143 (0x8f)
	reason: unrecognized-op (0x00)
		CEC_RECEIVE returned 0 (Success)
Received from TV to all (0 to 15): CEC_MSG_DEVICE_VENDOR_ID (0x87):
	vendor-id: 57489 (0x0000e091)
		CEC_RECEIVE returned 0 (Success)
Received from TV to Playback Device 2 (0 to 8): CEC_MSG_GIVE_DEVICE_VENDOR_ID (0x8c)
		CEC_RECEIVE returned 0 (Success)
Transmitted by Playback Device 2 to all (8 to 15): CEC_MSG_DEVICE_VENDOR_ID (0x87):
	vendor-id: 11189196 (0x00aabbcc)
		CEC_RECEIVE returned 0 (Success)
Received from TV to Playback Device 2 (0 to 8): CEC_MSG_GIVE_OSD_NAME (0x46)
		CEC_RECEIVE returned 0 (Success)
Transmitted by Playback Device 2 to TV (8 to 0): CEC_MSG_SET_OSD_NAME (0x47):
	name: Rock64
		CEC_RECEIVE returned 0 (Success)
Received from TV to all (0 to 15): CEC_MSG_DEVICE_VENDOR_ID (0x87):
	vendor-id: 57489 (0x0000e091)
		CEC_RECEIVE returned 0 (Success)
Received from TV to all (0 to 15): CEC_MSG_DEVICE_VENDOR_ID (0x87):
	vendor-id: 57489 (0x0000e091)
		CEC_RECEIVE returned 0 (Success)
Received from TV to all (0 to 15): CEC_MSG_DEVICE_VENDOR_ID (0x87):
	vendor-id: 57489 (0x0000e091)
		CEC_RECEIVE returned 0 (Success)
Received from TV to all (0 to 15): CEC_MSG_DEVICE_VENDOR_ID (0x87):
	vendor-id: 57489 (0x0000e091)
		CEC_RECEIVE returned 0 (Success)
Received from TV to Playback Device 2 (0 to 8): CEC_MSG_POLL
		CEC_RECEIVE returned 0 (Success)
Received from TV to all (0 to 15): CEC_MSG_DEVICE_VENDOR_ID (0x87):
	vendor-id: 57489 (0x0000e091)
		CEC_RECEIVE returned 0 (Success)
Received from TV to all (0 to 15): CEC_MSG_DEVICE_VENDOR_ID (0x87):
	vendor-id: 57489 (0x0000e091)
		CEC_RECEIVE returned 0 (Success)
Received from TV to all (0 to 15): CEC_MSG_DEVICE_VENDOR_ID (0x87):
	vendor-id: 57489 (0x0000e091)
		CEC_RECEIVE returned 0 (Success)
Received from TV to all (0 to 15): CEC_MSG_DEVICE_VENDOR_ID (0x87):
	vendor-id: 57489 (0x0000e091)
		CEC_RECEIVE returned 0 (Success)
Received from TV to Playback Device 2 (0 to 8): CEC_MSG_POLL
Transmitted by Playback Device 2 to all (8 to 15): CEC_MSG_DEVICE_VENDOR_ID (0x87):
	vendor-id: 11189196 (0x00aabbcc)
		CEC_RECEIVE returned 0 (Success)
Received from Playback Device 1 to all (4 to 15): CEC_MSG_DEVICE_VENDOR_ID (0x87):
	vendor-id: 57489 (0x0000e091)
		CEC_RECEIVE returned 0 (Success)
Received from TV to Playback Device 2 (0 to 8): CEC_MSG_GIVE_DEVICE_POWER_STATUS (0x8f)
		CEC_RECEIVE returned 0 (Success)
Transmitted by Playback Device 2 to TV (8 to 0): CEC_MSG_FEATURE_ABORT (0x00):
	abort-msg: 143 (0x8f)
	reason: unrecognized-op (0x00)
		CEC_RECEIVE returned 0 (Success)
Received from TV to Playback Device 2 (0 to 8): CEC_MSG_GIVE_OSD_NAME (0x46)
		CEC_RECEIVE returned 0 (Success)
Transmitted by Playback Device 2 to TV (8 to 0): CEC_MSG_SET_OSD_NAME (0x47):
	name: Rock64
		CEC_RECEIVE returned 0 (Success)
Received from TV to Playback Device 2 (0 to 8): CEC_MSG_GIVE_DEVICE_POWER_STATUS (0x8f)
		CEC_RECEIVE returned 0 (Success)
Transmitted by Playback Device 2 to TV (8 to 0): CEC_MSG_FEATURE_ABORT (0x00):
	abort-msg: 143 (0x8f)
	reason: unrecognized-op (0x00)
		CEC_RECEIVE returned 0 (Success)
Received from TV to Playback Device 2 (0 to 8): CEC_MSG_USER_CONTROL_PRESSED (0x44):
	ui-cmd: Power On Function (0x6d)
		CEC_RECEIVE returned 0 (Success)
Received from TV to Playback Device 2 (0 to 8): CEC_MSG_USER_CONTROL_PRESSED (0x44):
	ui-cmd: Down (0x02)
		CEC_RECEIVE returned 0 (Success)
Received from TV to Playback Device 2 (0 to 8): CEC_MSG_USER_CONTROL_RELEASED (0x45)
		CEC_RECEIVE returned 0 (Success)
Received from TV to Playback Device 2 (0 to 8): CEC_MSG_USER_CONTROL_PRESSED (0x44):
	ui-cmd: Play (0x44)
		CEC_RECEIVE returned 0 (Success)
Received from TV to Playback Device 2 (0 to 8): CEC_MSG_USER_CONTROL_RELEASED (0x45)
		CEC_RECEIVE returned 0 (Success)
Received from TV to Playback Device 2 (0 to 8): CEC_MSG_USER_CONTROL_PRESSED (0x44):
	ui-cmd: Pause (0x46)
		CEC_RECEIVE returned 0 (Success)
Received from TV to Playback Device 2 (0 to 8): CEC_MSG_USER_CONTROL_RELEASED (0x45)
		CEC_RECEIVE returned 0 (Success)
Received from TV to Playback Device 2 (0 to 8): CEC_MSG_USER_CONTROL_PRESSED (0x44):
	ui-cmd: Stop (0x45)
		CEC_RECEIVE returned 0 (Success)
Received from TV to Playback Device 2 (0 to 8): CEC_MSG_USER_CONTROL_RELEASED (0x45)
		CEC_RECEIVE returned 0 (Success)
Received from TV to Playback Device 2 (0 to 8): CEC_MSG_USER_CONTROL_PRESSED (0x44):
	ui-cmd: Up (0x01)
		CEC_RECEIVE returned 0 (Success)
Received from TV to Playback Device 2 (0 to 8): CEC_MSG_USER_CONTROL_RELEASED (0x45)
		CEC_RECEIVE returned 0 (Success)
	ui-cmd: F2 (Red) (0x72)
		CEC_RECEIVE returned 0 (Success)
Received from TV to Playback Device 2 (0 to 8): CEC_MSG_USER_CONTROL_RELEASED (0x45)
		CEC_RECEIVE returned 0 (Success)
Received from TV to Playback Device 2 (0 to 8): CEC_MSG_USER_CONTROL_PRESSED (0x44):
	ui-cmd: F3 (Green) (0x73)
		CEC_RECEIVE returned 0 (Success)
Received from TV to Playback Device 2 (0 to 8): CEC_MSG_USER_CONTROL_RELEASED (0x45)
		CEC_RECEIVE returned 0 (Success)
Received from TV to Playback Device 2 (0 to 8): CEC_MSG_USER_CONTROL_PRESSED (0x44):
	ui-cmd: F4 (Yellow) (0x74)
		CEC_RECEIVE returned 0 (Success)
Received from TV to Playback Device 2 (0 to 8): CEC_MSG_USER_CONTROL_RELEASED (0x45)
		CEC_RECEIVE returned 0 (Success)
Received from TV to Playback Device 2 (0 to 8): CEC_MSG_USER_CONTROL_PRESSED (0x44):
	ui-cmd: F1 (Blue) (0x71)
		CEC_RECEIVE returned 0 (Success)
Received from TV to Playback Device 2 (0 to 8): CEC_MSG_USER_CONTROL_RELEASED (0x45)
		CEC_RECEIVE returned 0 (Success)
Received from TV to Playback Device 2 (0 to 8): CEC_MSG_USER_CONTROL_PRESSED (0x44):
	ui-cmd: Back (0x0d)
		CEC_RECEIVE returned 0 (Success)

from kernel.

RosiersRobin avatar RosiersRobin commented on July 27, 2024

Maybe a stupid question, but I currently have a mini pc, that is running a rockchip kernel and debian. However, I want CEC (hardware should have it). Reading this article, it seems like it's it the current kernel (I run 5.10.110) Debian GNU/Linux 11 (bullseye) but I don't have a /etc/cec0 bus, how can I have this? How can I enable this? I don't have the ability to re-compile from source and then flash.

from kernel.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.