please choosego to mobile | Continue to access the PC version
View: 37299|Reply: 38

[WIP] HDMI CEC - need support

[Copy link]
Published in 2015-11-4 20:03:21 | Show all floors |Read mode
Edited by darqoq at 2015-11-6 11:51

I want to use HDMI - CEC on Android (for Kodi)I see that Android TRONFY X2 (http://www.orangepi.org/orangepi ... =615&page=2#pid5690) supports it using events:
  1. root@dolphin-fvd-p1:/mnt/shell/emulated/0 # cat /proc/bus/input/devices
  2. I: Bus=0019 Vendor=0001 Product=0001 Version=0100
  3. N: Name="hdmi-cec"
  4. P: Phys=
  5. S: Sysfs=/devices/virtual/input/input0
  6. U: Uniq=
  7. H: Handlers=kbd event0 cpufreq_interactive
  8. B: PROP=0
  9. B: EV=3
  10. B: KEY=2 0 0 0 0 0 0 40000000 1e1680 0 0 10000000
Copy code




Probably I need to connect libcec to uinput because libcec doesn't support it directly, so I need use this daemon (https://github.com/bramp/libcec-daemon)
I compiled libcec  and libplatform (using this method http://0x1c3.blogspot.com/2015/0 ... ndroid-example.html)
but I can't compile libcec-daemon (I also compiled liblog4cplus - needed by this daemon).

Is anybody intrested to suppport this process ?
Orange PI PC

4

threads

1118

posts

9141

credits

Moderator

Rank: 7Rank: 7Rank: 7

credits
9141
Published in 2016-6-14 02:51:08 | Show all floors
Great! I will soon create a test image for my OpenELEC fork and ask people to test it, if this is ok with you? That way we will get at least some feedback. Later on I would like to include this patch to my H3 linux repo where I collecting all sorts of useful patches.

0

threads

7

posts

267

credits

Intermediate member

Rank: 3Rank: 3

credits
267
Published in 2016-6-4 13:25:41 | Show all floors
Now i can send and receive with my driver. But it seems that it has some timing problems. I hope i get this sorted out when cleaning up the driver from the debug code. After cleanup and adding some comments i will release the code from the driver and my libcec patch.

0

threads

2

posts

21

credits

Novice

Rank: 1

credits
21
Published in 2015-11-4 22:21:28 | Show all floors
Hello

Would love to have HDMI CEC support.

3

threads

165

posts

1203

credits

Gold member

Rank: 6Rank: 6

credits
1203
Published in 2015-11-6 18:08:44 | Show all floors
I found this on ORDROID forum:
http://forum.odroid.com/viewtopic.php?f=60&t=14445

It may be a good hint for the right direction.
 Author| Published in 2015-11-6 18:48:12 | Show all floors
Dima replied at 2015-11-6 11:08
I found this on ORDROID forum:
http://forum.odroid.com/viewtopic.php?f=60&t=14445

No, it is not a right direction.
ODROID-XU uses Exynos, and this is supported by libcec (use /dev/CEC, see - see https://github.com/Pulse-Eight/l ... /include/cectypes.h)
Orange Pi PC uses Allwinner, and this is NOT supported by libcec.

But, MAYBE it is possible using events, because libcec-daemon can connect libcec to uinput.


Orange PI PC

3

threads

165

posts

1203

credits

Gold member

Rank: 6Rank: 6

credits
1203
Published in 2015-11-12 20:10:05 | Show all floors
Have you actually tried evtest (from the IR remote tutorial) on event0 with the compiled libcec?
 Author| Published in 2015-11-12 20:41:25 | Show all floors
Yes, earlier I have tested event0 (it shows some info) - but nothing happend when push some buttons on my remote, because to use it your TV have to find connected HDMI-CEC controller.
I think the main problem is:  How to tell cec-client to read event0 ?
I have read this thread that someone try to communicate with a serial interface (http://stackoverflow.com/questio ... -to-tv-minix-libcec).
Orange PI PC

3

threads

165

posts

1203

credits

Gold member

Rank: 6Rank: 6

credits
1203
Published in 2015-11-12 22:31:22 | Show all floors
Well, that's the interesting part. I do not have the compiled libcec. But on 1 SD card I have the loboris build (without CEC in input devices). When I try to push any button on the TV remote, it just says to me that the device does not support that function.

However, when using the TRONFY X2 ROM, the TV does not give any error. So it does recognize that some CEC client is attached. However, also absolutely no response in evtest on the buttons. I thought it might be lack of libcec, but clearly it wasn't.
Too bad that I'm not that familiar with development to actually help...

Have you maybe tried CEC on any Linux distro?
 Author| Published in 2015-11-13 03:07:59 | Show all floors
Edited by darqoq at 2015-12-31 14:47
Dima replied at 2015-11-12 15:31
Well, that's the interesting part. I do not have the compiled libcec. But on 1 SD card I have the lo ...

If you want, you can find binaries on my mega
- libcec 2.0.1 (from http://forum.odroid.com/viewtopic.php?f=60&t=14445)
- libcec 3.0.1 (mine https://mega.nz/#F!PgtDyT4C!hzAGAsAaUANlxg0HflF1aA)

Orange PI PC
 Author| Published in 2015-11-14 01:03:07 | Show all floors
Dima replied at 2015-11-12 13:10
Have you actually tried evtest (from the IR remote tutorial) on event0 with the compiled libcec?

Here is evtest result
  1. root@dolphin-fvd-p1:/mnt/shell/emulated/0 # ./evtest
  2. No device specified, trying to scan all of /dev/input/event*
  3. Available devices:
  4. /dev/input/event0:      hdmi-cec
  5. /dev/input/event1:      vmouse
  6. /dev/input/event2:      sunxi-gpiokey
  7. /dev/input/event3:      sunxi-ths
  8. /dev/input/event4:      sunxi-ir
  9. /dev/input/event5:      Virtual.Acc
  10. Select the device event number [0-5]: 0
  11. Input driver version is 1.0.1
  12. Input device ID: bus 0x19 vendor 0x1 product 0x1 version 0x100
  13. Input device name: "hdmi-cec"
  14. Supported events:
  15.   Event type 0 (EV_SYN)
  16.   Event type 1 (EV_KEY)
  17.     Event code 28 (KEY_ENTER)
  18.     Event code 103 (KEY_UP)
  19.     Event code 105 (KEY_LEFT)
  20.     Event code 106 (KEY_RIGHT)
  21.     Event code 108 (KEY_DOWN)
  22.     Event code 113 (KEY_MUTE)
  23.     Event code 114 (KEY_VOLUMEDOWN)
  24.     Event code 115 (KEY_VOLUMEUP)
  25.     Event code 116 (KEY_POWER)
  26.     Event code 158 (KEY_BACK)
  27.     Event code 353 (KEY_SELECT)
  28. Properties:
  29. Testing ... (interrupt to exit)
Copy code


Orange PI PC

3

threads

165

posts

1203

credits

Gold member

Rank: 6Rank: 6

credits
1203
Published in 2015-11-14 16:35:33 | Show all floors
Yup, exactly the same result here...
Also tried libcec 2 (cause 3 that you compiled is not supported by Kodi). And it still did nothing. Has to be deeper.
Maybe it's again some funky driver? Like with the IR remote that you have to manually reload?

Actually no clue what would be the solution. I really lack dev-experience to actually find the solution.
I'd love to have HDMI-CEC. Because most remotes are incompatible. And most universal remotes are ugly as hell (and expensive). Though they do work! Which is cool.
You need to log in before you can reply login | Register

Points Rule

Quick reply Top Return list