(04-28-2017, 10:03 AM) Craz_tyle Wrote: Can you provide any photo of your works?

level RFCv2



UPDATE2 (from Hans Verkuil): CEC API is finalized. The last missing piece (CEC notifier framework) will be merged for 4.12. After that it is up to Russell King to post the dw-hdmi CEC driver for inclusion into 4.13. UPDATE1 (from Jonas Karlman (Kwiboo)): There is updated code here (level cec-18 from Russell King, I did not find it erlier) and also found nearly the same work from Kwiboo (for 4.10) UPDATE2 (from Hans Verkuil): CEC API is finalized. The last missing piece (CEC notifier framework) will be merged for 4.12. After that it is up to Russell King to post the dw-hdmi CEC driver for inclusion into 4.13.

UPDATE3: See video (older slides not updated "resources" slide)

Code: # /root/v4l-utils/utils/cec-ctl/cec-ctl --playback -o TinkerBoard -V 0xaabbcc -M -T --cec-version-1.4

CEC_ADAP_G_CAPS returned 0 (Success)

Driver Info:

Driver Name : dwhdmi-rockchip

Adapter Name : dw_hdmi

Capabilities : 0x00000006

Logical Addresses

Transmit

Driver version : 4.4.55

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 : 0x0010

CEC Version : 1.4

Vendor ID : 0xaabbcc

OSD Name : 'TinkerBoard'

Logical Addresses : 1



Logical Address : 4 (Playback Device 1)

Primary Device Type : Playback

Logical Address Type : Playback





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: 0x0010

CEC_RECEIVE returned 0 (Success)

Transmitted by Playback Device 1 to all (4 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 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 1 (0 to 4): CEC_MSG_GIVE_DEVICE_VENDOR_ID (0x8c)

CEC_RECEIVE returned 0 (Success)

Transmitted by Playback Device 1 to all (4 to 15): CEC_MSG_DEVICE_VENDOR_ID (0x87):

vendor-id: 11189196 (0x00aabbcc)

CEC_RECEIVE returned 0 (Success)

Received from TV to Playback Device 1 (0 to 4): CEC_MSG_GIVE_DECK_STATUS (0x1a):

status-req: once (0x03)

CEC_RECEIVE returned 0 (Success)

Transmitted by Playback Device 1 to TV (4 to 0): CEC_MSG_FEATURE_ABORT (0x00):

abort-msg: 26 (0x1a)

reason: unrecognized-op (0x00)

CEC_RECEIVE returned 0 (Success)

Received from TV to Playback Device 1 (0 to 4): CEC_MSG_GIVE_OSD_NAME (0x46)

CEC_RECEIVE returned 0 (Success)

Transmitted by Playback Device 1 to TV (4 to 0): CEC_MSG_SET_OSD_NAME (0x47):

name: TinkerBoard

CEC_RECEIVE returned 0 (Success)

Received from TV to Playback Device 1 (0 to 4): CEC_MSG_USER_CONTROL_PRESSED (0x44):

ui-cmd: F2 (Red) (0x72)

CEC_RECEIVE returned 0 (Success)

Received from TV to Playback Device 1 (0 to 4): CEC_MSG_USER_CONTROL_RELEASED (0x45)

CEC_RECEIVE returned 0 (Success)

Received from TV to Playback Device 1 (0 to 4): CEC_MSG_USER_CONTROL_PRESSED (0x44):

ui-cmd: F3 (Green) (0x73)

CEC_RECEIVE returned 0 (Success)

Received from TV to Playback Device 1 (0 to 4): CEC_MSG_USER_CONTROL_RELEASED (0x45)

CEC_RECEIVE returned 0 (Success)

Received from TV to Playback Device 1 (0 to 4): CEC_MSG_USER_CONTROL_PRESSED (0x44):

ui-cmd: F4 (Yellow) (0x74)

CEC_RECEIVE returned 0 (Success)

Received from TV to Playback Device 1 (0 to 4): CEC_MSG_USER_CONTROL_RELEASED (0x45)

CEC_RECEIVE returned 0 (Success)

Received from TV to Playback Device 1 (0 to 4): CEC_MSG_USER_CONTROL_PRESSED (0x44):

ui-cmd: F1 (Blue) (0x71)

CEC_RECEIVE returned 0 (Success)

Received from TV to Playback Device 1 (0 to 4): CEC_MSG_USER_CONTROL_RELEASED (0x45)

CEC_RECEIVE returned 0 (Success)

Received from TV to Playback Device 1 (0 to 4): CEC_MSG_GIVE_DECK_STATUS (0x1a):

status-req: once (0x03)

CEC_RECEIVE returned 0 (Success)

Transmitted by Playback Device 1 to TV (4 to 0): CEC_MSG_FEATURE_ABORT (0x00):

abort-msg: 26 (0x1a)

reason: unrecognized-op (0x00)

CEC_RECEIVE returned 0 (Success)

Received from TV to Playback Device 1 (0 to 4): CEC_MSG_USER_CONTROL_PRESSED (0x44):

ui-cmd: Right (0x04)

CEC_RECEIVE returned 0 (Success)

Received from TV to Playback Device 1 (0 to 4): CEC_MSG_USER_CONTROL_RELEASED (0x45)

CEC_RECEIVE returned 0 (Success)

Received from TV to Playback Device 1 (0 to 4): CEC_MSG_GIVE_DECK_STATUS (0x1a):

status-req: once (0x03)

CEC_RECEIVE returned 0 (Success)

Transmitted by Playback Device 1 to TV (4 to 0): CEC_MSG_FEATURE_ABORT (0x00):

abort-msg: 26 (0x1a)

reason: unrecognized-op (0x00)

Received from TV to Playback Device 1 (0 to 4): CEC_MSG_USER_CONTROL_PRESSED (0x44):

ui-cmd: Stop (0x45)

CEC_RECEIVE returned 0 (Success)

Received from TV to Playback Device 1 (0 to 4): CEC_MSG_USER_CONTROL_RELEASED (0x45)

CEC_RECEIVE returned 0 (Success)

Received from TV to Playback Device 1 (0 to 4): CEC_MSG_USER_CONTROL_PRESSED (0x44):

ui-cmd: Play (0x44)

CEC_RECEIVE returned 0 (Success)

Received from TV to Playback Device 1 (0 to 4): CEC_MSG_USER_CONTROL_RELEASED (0x45)

CEC_RECEIVE returned 0 (Success)

Received from TV to Playback Device 1 (0 to 4): CEC_MSG_USER_CONTROL_PRESSED (0x44):

ui-cmd: Pause (0x46)

CEC_RECEIVE returned 0 (Success)

Received from TV to Playback Device 1 (0 to 4): CEC_MSG_USER_CONTROL_RELEASED (0x45)

CEC_RECEIVE returned 0 (Success)

I attached resistor (27kOhm by CEC specs, R0805 size) between pins of transistor (NFET, SOT-23 size) and this does not need more space."Original" location for resistor is marked also but resistor is smaller (1mm - R0402 size?). Also ESD protection diodes are missingsee similar circuit You also need some software. I backported linux CEC (eg. /dev/cec#) from kernel 4.10+ and experimental CEC dw-hdmi driver (, from hverkuil/media_tree ) to rockchip-linux-4.4 (eg. for build scripts, Yocto and TinkerOS kernel as it will be available...). I added request to rockchip-linux to consider support of linux CEC in their sources.The linux CEC is under development now about PATCHv6 (see Hans Verkuil work) maybe it will be done for 4.12 (?!) and also dropped support/update for dw-hdmi. Patches are attached or in my github (Linux is released every ~70 days eg. 4.12 - July 9, 2017 and 4.13 - September 17, 2017)I tested it with v4l-utils with lg-tv and some "keypressed" on remote. I am not aware if "kodi" already supports /dev/cec#.