This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
HDMI CEC support?
#1
Is HDMI CEC supported? There are a lot of different informations. On ASUS website, in last FAQ, there is question, but with no answer.
cec-client can not find supported device...



Code:
cec-client -l
libCEC version: 4.0.1, compiled on Linux-3.16.0-4-armmp-lpae ... , features: P8_USB, DRM, P8_detect, randr
Found devices: NONE


Does anyone has working CEC?
Reply
#2
(04-21-2017, 08:29 PM)Rupert_s Wrote: Is HDMI CEC supported? There are a lot of different informations. On ASUS website, in last FAQ, there is question, but with no answer.
cec-client can not find supported device...



Code:
cec-client -l
libCEC version: 4.0.1, compiled on Linux-3.16.0-4-armmp-lpae ... , features: P8_USB, DRM, P8_detect, randr
Found devices: NONE


Does anyone has working CEC?

It is not supported as of yet. Since Asus is not giving a definitive answer they are possibly thinking in supporting it if the hardware permits.

Anyway one possible alternative to CEC is to use GPIO to add an IR receiver. It is quite simple and it works with Kodi. There are many guides in how to do it in raspberry forums.
Reply
#3
Thanks.
I know that, but in my case using IR remote means making a hole (small one) in drawer. ;-(. I'm rather thinking of Rii Mini i13.... I will wait a little for ASUS to make their stand (maybe in meantime my HDMI audio starts work ;-) ).
Reply
#4
Question 
(04-21-2017, 08:29 PM)Rupert_s Wrote: Is HDMI CEC supported? There are a lot of different informations...

I will try to describe situation:
  • Does SOC HW support CEC ? - yes, rk3288 have HW CEC engine (see TRM chapter 32). It is Synopsys DesignWare HDMI (dw-hdmi).
  • Does TinkerBoard HW support it ? - not sure but probably yes, there is only the part of schematics with HDMI-pin 13 (CEC) connected to signal "HDMICEC" but I do not known where it is routed, expecting to port gpio7c0 (multiplex ISP_FLASHTRIGIN/EDPHDMI_CEC_T1/GPIO7_C0) (alternative gpio7c7 (multiplex UART2_TX/IR_TX/PWM3/EDPHDMI_CEC/GPIO7_C7) is used on connector #32 and therefore unusable).
  • Does the dw-hdmi define CEC registers in kernel ? - yes, there are registers
  • Is there any description of dw-hdmi CEC engine to make driver ? - there are missing documentations (probably DWC_hdmi_tx_databook.pdf and/or dwc_hdmi_tx_ew_6gbps-gf28slp18_databook_rockchip.pdf).
  • Is there any other source to dw-hdmi CEC driver ? - yes, there is probably same in dw-hdmi from i.MX6 platform with driver. (Nov. 14, 2016, Hans Verkuil+Russell King).
  • Is the driver integrated ? - no
  • Is this driver supported in libcec ? - libcec is not needed (docs, utilities (cec-ctl, cec-follower, cec-compliance) and sources), but from kernel 4.10+ with device path "/dev/cec#" (or some older imx6 solution with forked libcec for imx6 and device path "/dev/mxc_hdmi_cec")
[-] The following 1 user Likes mcerveny's post:
  • Vikk42
Reply
#5
Bug 
(04-23-2017, 12:20 PM)mcerveny Wrote:
  • Does TinkerBoard HW support it ? - not sure but probably yes, there is only the part of schematics with HDMI-pin 13 (CEC) connected to signal "HDMICEC" but I do not known where it is routed, expecting to port gpio7c0 (multiplex ISP_FLASHTRIGIN/EDPHDMI_CEC_T1/GPIO7_C0).

I have probably bad news (and full schema is still missing). I backported CEC driver and CEC part of new media infrastructure for dw-hdmi from 4.11+ to rockchip-4.4 (32kHz from rk808 is working and routed to rk3288, gpio7c0 is routed to missing part). The CEC communication path between rk3288 (gpio7c0) and HDMI connector is broken.

[Image: tinker-board-cec.jpg]
  • Oscilloscope confirms CEC from hdmi connector on red line.
  • Oscilloscope confirms CEC from rk3288 (gpio7c0) on yellow line.
  • There is missing part (probably the same "WCJ" as next two for DDC (I2C) on the right and some pull-up resistor).
  • There can be another solution on the left ("WCJ" near camera connector) but there is probably missing 0-ohm bridge resistor on end of CEC from HDMI line.
Example usage from new utilities:

"cec-ctl" is CEC client simulating "playback" device and it is pooled/checked from "cec-compliance". As you can see "TV" is not found ("Not Acknowledged" to "cec-compliance" ping)  Sad . Physical Address (2.0.0.0) is correctly learned over EDID.
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)
Transmitted by Unregistered to TV (15 to 0): CEC_MSG_POLL
       Tx, Not Acknowledged, Max Retries
               CEC_RECEIVE returned 0 (Success)
Transmitted by Unregistered to Recording Device 1 (15 to 1): CEC_MSG_POLL
       Tx, Not Acknowledged, Max Retries
               CEC_RECEIVE returned 0 (Success)
Transmitted by Unregistered to Recording Device 2 (15 to 2): CEC_MSG_POLL
       Tx, Not Acknowledged, Max Retries
               CEC_RECEIVE returned 0 (Success)
Transmitted by Unregistered to Tuner 1 (15 to 3): CEC_MSG_POLL
       Tx, Not Acknowledged, Max Retries
               CEC_RECEIVE returned 0 (Success)
Transmitted by Unregistered to Audio System (15 to 5): CEC_MSG_POLL
       Tx, Not Acknowledged, Max Retries
               CEC_RECEIVE returned 0 (Success)
Transmitted by Unregistered to Tuner 2 (15 to 6): CEC_MSG_POLL
       Tx, Not Acknowledged, Max Retries
               CEC_RECEIVE returned 0 (Success)
Transmitted by Unregistered to Tuner 3 (15 to 7): CEC_MSG_POLL
       Tx, Not Acknowledged, Max Retries
               CEC_RECEIVE returned 0 (Success)
Transmitted by Unregistered to Playback Device 2 (15 to 8): CEC_MSG_POLL
       Tx, Not Acknowledged, Max Retries
               CEC_RECEIVE returned 0 (Success)
Transmitted by Unregistered to Playback Device 3 (15 to 9): CEC_MSG_POLL
       Tx, Not Acknowledged, Max Retries
               CEC_RECEIVE returned 0 (Success)
Transmitted by Unregistered to Tuner 4 (15 to 10): CEC_MSG_POLL
       Tx, Not Acknowledged, Max Retries
               CEC_RECEIVE returned 0 (Success)
Transmitted by Unregistered to Playback Device 3 (15 to 11): CEC_MSG_POLL
       Tx, Not Acknowledged, Max Retries
               CEC_RECEIVE returned 0 (Success)
Transmitted by Unregistered to Reserved 1 (15 to 12): CEC_MSG_POLL
       Tx, Not Acknowledged, Max Retries
               CEC_RECEIVE returned 0 (Success)
Transmitted by Unregistered to Reserved 2 (15 to 13): CEC_MSG_POLL
       Tx, Not Acknowledged, Max Retries
               CEC_RECEIVE returned 0 (Success)
Transmitted by Unregistered to Specific (15 to 14): CEC_MSG_POLL
       Tx, Not Acknowledged, Max Retries

"cec-compliance" is pooler/tester of CEC bus.
Code:
# /root/v4l-utils/utils/cec-compliance/cec-compliance  -v -T
        CEC_ADAP_G_CAPS returned 0 (Success)
cec-compliance SHA                 : 7bcf9c69b0fe38fbff8c8e5798b3fb31c34ee1c7

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_G_LOG_ADDRS returned 0 (Success)
    Logical Address Mask       : 0x0010
    CEC Version                : 1.4
    Vendor ID                  : 0xaabbcc
    Logical Addresses          : 1

      Logical Address          : 4
        Primary Device Type    : Playback
        Logical Address Type   : Playback

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:

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

Can someone confirm this situation (ASUS Da Vinci Lab?) ?
Is there any alternate solution ?
What is "WCJ" (I cannot decode package marking but suppose nfet transistor ~ 2n7002) ?

I suppose that ASUS hits the same CEC problem as RPI and decided to remove all components on CEC signal in production board version. Next time some certified and working solution should be used (like TPD5S115 for $ 0.5).
Reply
#6
I'm not smart enough to fully understand it, but I received answer from ASUS:



Quote:The answer is No. Tinker Board/2GB cannot support HDMI CEC . (Since HDMI CEC signal is designed on the board GPIO, it cannot support) .and we will delete this point (No.31) from the FAQ.


So I think ASUS closed case. It's a pity. It's getting worst, I wonder what won't work next...
Reply
#7
Smile 
(04-27-2017, 06:34 PM)Rupert_s Wrote: I'm not smart enough to fully understand it, but I received answer from ASUS:
Quote:The answer is No. Tinker Board/2GB cannot support HDMI CEC . (Since HDMI CEC signal is designed on the board GPIO, it cannot support) .and we will delete this point (No.31) from the FAQ.
ASUS probably do not known about register GRF_SOC_CON8/BIT(12) "grf_hdmi_cec_mux_sel" as I wrote gpio7c0 is unused and routed correctly.

And now the good news. I soldered N-FET SOT23-3 package transistor (randomly chosen from drawer, IRLML0030TRPbF) add 27kOhm resistor R0805 size between gate-source on transistor ... and now I have fully working HDMI CEC  Big Grin. I did not known that ASUS thinks about Tinker Board as tinker board so literally.
[-] The following 1 user Likes mcerveny's post:
  • Vikk42
Reply
#8
Impressive... you've been tinkered. Smile
Reply
#9
Your are a really power tinker!!
(New words about maker? lol

Can you provide any photo of your works?
I'm very interesting about support CEC, if that can work with my TV too.
Reply
#10
(04-28-2017, 10:03 AM)Craz_tyle Wrote: Can you provide any photo of your works?

[Image: tinker-board-cec-transistor.jpg]

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 missing Undecided  see similar circuit.

You also need some software. I backported linux CEC (eg. /dev/cec#) from kernel 4.10+ and experimental CEC dw-hdmi driver (level RFCv2, 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 Sad . Patches are attached or in my github.
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.
(Linux is released every ~70 days eg. 4.12 - July 9, 2017 and 4.13 - September 17, 2017)
UPDATE3: See video (older slides not updated "resources" slide).

I tested it with v4l-utils with lg-tv and some "keypressed" on remote. I am not aware if "kodi" already supports /dev/cec#.

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)


Attached Files
.zip   tinker-board-cec-patch-20170428.zip (Size: 90.43 KB / Downloads: 33)
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)