HDMI-CEC is not working

I just plugged in my Vero 2 and restored backed up settings from Vero 1, but CEC is not working at all. I seem to remember the settings being under “peripherals” in input, but that is greyed out. Am I missing something? How do I change CEC settings on Vero 2?

For example, when I change the volume on Vero 1, it adjusts the volume on my receiver. On Vero 2 it adjusts the internal volume (i.e., not useful).

Just to clarify:

  • No CEC functions work at all?
  • Can you upload some logs via My OSMC?
  • What TV do you have? Is there an AVR in between?

Sam

Yes, it seems that there is no CEC functionality at all; no volume control and the projector remote does not control OSMC like it did with Vero 1.

Here is the output of dmesg | grep cec… What logs should I upload via My OSMC?

[Fri Feb 19 16:29:55 2016] Kernel command line: init=/init console=ttyS0,115200n8 no_console_suspend storage=1 vdaccfg=0xa000 logo=osd1,loaded,0x7900000,720p50hz,full hdmimode=720p50hz cvbsmode=576cvbs androidboot.firstboot=0 hdmitx= console=tty0 consoleblank=0 hdmitx=cecf mac=00:11:22:33:44:55 osmcdev=vero2 root=/dev/vero-nand/root quiet scaling_min_freq=696000 scaling_max_freq=1536000
[Fri Feb 19 16:29:55 2016] hdmitx: cec: Function List: enable, one touch play, one touch standby, auto power by tv
[Fri Feb 19 16:29:55 2016] hdmitx: cec: HDMI aml_read_reg32(P_AO_DEBUG_REG0):0xf
[Fri Feb 19 16:29:55 2016] hdmitx: cec: HDMI hdmi_cec_func_config:0xf
[Fri Feb 19 16:29:55 2016] hdmitx: system: not find cec config
[Fri Feb 19 16:29:55 2016] hdmitx: cec: CEC not ready
[Fri Feb 19 16:29:59 2016] hdmi: cec_pm: cec config:0x0
[Fri Feb 19 16:29:59 2016] hdmitx: cec: CEC init
[Fri Feb 19 16:29:59 2016] input: cec_input as /devices/virtual/input/input5
[Fri Feb 19 16:29:59 2016] hdmitx: cec: CEC task process
[Fri Feb 19 16:29:59 2016] hdmitx: cec: hdmitx_device->cec_init_ready:0x1
[Fri Feb 19 16:30:14 2016] hdmitx: cec: CEC node init
[Fri Feb 19 16:30:14 2016] hdmitx: cec: cec_func_config: 0xf; P_AO_DEBUG_REG0:0xf
[Fri Feb 19 16:30:14 2016] hdmitx: cec: Set PWM_E out put RTC 32K!
[Fri Feb 19 16:30:14 2016] hdmitx: cec: enable:int mask:0x6
[Fri Feb 19 16:30:14 2016] hdmitx: cec: CEC: start poll dev
[Fri Feb 19 16:30:14 2016] hdmitx: cec: CEC_LOGICAL_ADDR0:0x1f
[Fri Feb 19 16:30:14 2016] hdmitx: cec: now tx_stat:0
[Fri Feb 19 16:30:14 2016] hdmitx: cec: start poll
[Fri Feb 19 16:30:15 2016] hdmitx: cec: end poll, tx_stat:1
[Fri Feb 19 16:30:15 2016] hdmitx: cec: tx busy timeout
[Fri Feb 19 16:30:15 2016] hdmitx: cec: try log addr 4 busy, retry:4
[Fri Feb 19 16:30:15 2016] hdmitx: cec: hw reset :logical addr:0x14
[Fri Feb 19 16:30:15 2016] hdmitx: cec: now tx_stat:0
[Fri Feb 19 16:30:15 2016] hdmitx: cec: start poll
[Fri Feb 19 16:30:15 2016] hdmitx: cec: end poll, tx_stat:3
[Fri Feb 19 16:30:15 2016] hdmitx: cec: CEC: poll online logic device: 0x4 BOOL: 0
[Fri Feb 19 16:30:15 2016] hdmitx: cec: player_dev[0]:0x4
[Fri Feb 19 16:30:15 2016] hdmitx: cec: physical address:0x1500
[Fri Feb 19 16:30:15 2016] hdmitx: cec: Set logical address: 4
[Fri Feb 19 16:30:16 2016] hdmitx: cec: aocec irq 2
[Fri Feb 19 16:30:16 2016] hdmitx: cec: aocec irq 2
[Fri Feb 19 16:30:16 2016] hdmitx: cec: aocec irq 2
[Fri Feb 19 16:30:16 2016] hdmitx: cec: aocec irq 2
[Fri Feb 19 16:30:17 2016] hdmitx: cec: aocec irq 2
[Fri Feb 19 16:30:17 2016] hdmitx: cec: aocec irq 2
[Fri Feb 19 16:30:17 2016] hdmitx: cec: cec node init: cec features ok !

That looks OK to me.

Debugging CEC when it is in the kernel is quite tricky, which is why we are going to work on libCEC. The very nature of CEC can also be buggy.

You can try sending a reset signal:

echo 0x0 > /sys/class/amhdmitx/amhdmitx0/cec_config

That seems to fix some TVs, like old Samsung sets and I am considering sending an extra reboot on bootup.

Is there an AVR between the projector? I’m assuming so. Can you wire it directly to the projector?

Sam

No luck with the rest command.

I have Vero plugged into an Onkyo TX-NR808 receiver that outputs to an Epson Powerlight 3020.

I suppose I could plug the projector directly into the Vero (sort of a pain in the neck though), but the only feature that I a interested in is controlling the receiver volume from the Vero remote, so communication with the receiver is what I need to fix.

It’s a real bummer, too, because I much prefer the RF remote on the Vero 2.

Ok, tried plugging into the projector directly, still nothing. This is what dmesg outputs when I switched cables and pressed buttons on the projector remote:

[Fri Feb 19 16:56:58 2016] hdmitx: cec: CEC node init
[Fri Feb 19 16:57:18 2016] hdmitx: cec: CEC node init
[Fri Feb 19 16:57:37 2016] hdmitx: cec: cec_func_config entry :0x0 : 0x0
[Fri Feb 19 16:57:53 2016] hdmitx: cec: CEC node init
[Fri Feb 19 16:58:10 2016] hdmitx: cec: CEC node init

The projector remote does still control the volume on the receiver and the Steam Link still switches inputs automatically, so it seems the Vero is the only device not working with CEC.

A little more information…

I called up the “HDMI Link” menu on the projector and it sees Vero as “MBox.” I used the projector to switch to another input (Chromecast) and then back to “MBox.” It did, indeed switch to Vero and it activated the “Power” menu (i.e., it was showing the power sub-menu when it switched inputs back to Vero).

Once it switched back, however, MBox (Vero) no longer showed up in the menu and this popped up in dmesg:

[Fri Feb 19 17:04:11 2016] hdmitx: cec: CEC task process
[Fri Feb 19 17:04:12 2016] hdmitx: cec: CEC node init
[Fri Feb 19 17:04:12 2016] hdmitx: cec: cec_func_config: 0xf; P_AO_DEBUG_REG0:0xf
[Fri Feb 19 17:04:12 2016] hdmitx: cec: Set PWM_E out put RTC 32K!
[Fri Feb 19 17:04:12 2016] hdmitx: cec: enable:int mask:0x6
[Fri Feb 19 17:04:12 2016] hdmitx: cec: CEC: start poll dev
[Fri Feb 19 17:04:12 2016] hdmitx: cec: CEC_LOGICAL_ADDR0:0x1f
[Fri Feb 19 17:04:12 2016] hdmitx: cec: now tx_stat:0
[Fri Feb 19 17:04:12 2016] hdmitx: cec: start poll
[Fri Feb 19 17:04:12 2016] hdmitx: cec: end poll, tx_stat:2
[Fri Feb 19 17:04:12 2016] hdmitx: cec: CEC: poll online logic device: 0x4 BOOL: 1
[Fri Feb 19 17:04:12 2016] hdmitx: cec: player_dev[0]:0x4
[Fri Feb 19 17:04:12 2016] hdmitx: cec: CEC: start poll dev
[Fri Feb 19 17:04:12 2016] hdmitx: cec: CEC_LOGICAL_ADDR0:0x1f
[Fri Feb 19 17:04:12 2016] hdmitx: cec: now tx_stat:0
[Fri Feb 19 17:04:12 2016] hdmitx: cec: start poll
[Fri Feb 19 17:04:12 2016] hdmitx: cec: end poll, tx_stat:0
[Fri Feb 19 17:04:12 2016] hdmitx: cec: CEC: poll online logic device: 0x8 BOOL: 1
[Fri Feb 19 17:04:12 2016] hdmitx: cec: player_dev[1]:0x8
[Fri Feb 19 17:04:12 2016] hdmitx: cec: CEC: start poll dev
[Fri Feb 19 17:04:12 2016] hdmitx: cec: CEC_LOGICAL_ADDR0:0x0
[Fri Feb 19 17:04:12 2016] hdmitx: cec: now tx_stat:0
[Fri Feb 19 17:04:12 2016] hdmitx: cec: start poll
[Fri Feb 19 17:04:12 2016] hdmitx: cec: end poll, tx_stat:0
[Fri Feb 19 17:04:12 2016] hdmitx: cec: CEC: poll online logic device: 0xb BOOL: 1
[Fri Feb 19 17:04:12 2016] hdmitx: cec: player_dev[2]:0xb
[Fri Feb 19 17:04:12 2016] hdmitx: cec: Can't get a valid logical address
[Fri Feb 19 17:04:47 2016] hdmitx: cec: aocec irq 4

Sending the reset command did not make MBox (vero) reappear in the HDMI Link menu. Only rebooting Vero made it reappear.

To summarize, there is some form of communication because the projector “sees” Vero as something called “MBox,” but switching inputs via the projector generates a “Can’t get a valid logical address” error and removes it from the projector HDMI Link menu.

Ok… more info (sorry).

Now, all of a sudden, the projector remote controls Vero!

[Fri Feb 19 17:14:35 2016] hdmitx: cec: CEC task process
[Fri Feb 19 17:14:35 2016] hdmitx: cec: aocec irq 4
[Fri Feb 19 17:14:35 2016] hdmitx: cec: CEC[11]: rx msg len: 2   dat: 0b 45
[Fri Feb 19 17:14:35 2016] hdmitx: cec: CEC task process
[Fri Feb 19 17:14:36 2016] hdmitx: cec: aocec irq 4
[Fri Feb 19 17:14:36 2016] hdmitx: cec: CEC[11]: rx msg len: 3   dat: 0b 44 01
[Fri Feb 19 17:14:36 2016] hdmitx: cec: : Key pressed
[Fri Feb 19 17:14:36 2016] hdmitx: cec: :operands_irq[0]:0x1
[Fri Feb 19 17:14:36 2016] hdmitx: cec: :key map:103
[Fri Feb 19 17:14:36 2016] hdmitx: cec: CEC task process
[Fri Feb 19 17:14:36 2016] hdmitx: cec: aocec irq 4
[Fri Feb 19 17:14:36 2016] hdmitx: cec: CEC[11]: rx msg len: 2   dat: 0b 45
[Fri Feb 19 17:14:36 2016] hdmitx: cec: CEC task process

But Vero still does not control the receiver volume (which, sadly, is the only thing I need to work). I should mention that with Vero 1, CEC was really flaky and needed to be rebooted while the receiver was on in order to function correctly. (Though once it started working it would stay that way until Vero power cycled or installed an update while the receiver was off, so like, weeks.)

I have no idea what else to try…

:key map:103

Was this the volume key?

It will print the keys as you press them. It’s possible they’re not mapped yet. The keys are set via uinput. We may be able to do some remapping.

Sam

No, that was a directional key. The volume keys on the projector remote control the receiver.

Is there anything I can do to help debug this problem?

Having volume control on the Vero remote is very important to me; it allows me to keep the other remotes out of the reach of my kids :slightly_smiling:

You will get more control when we complete the libCEC port

If I understand you correctly the volume key is controlling the TV rather than the device, but some other buttons work. I’m not sure yet what must be done to capture the volume button, but I will try and investigate

Will also PM when libCEC is ready for testing

Sam

Ok, I will sit tight for now.

No, I don’t have a TV. The volume key controls only Vero’s internal volume.

Here is a summary:

• I want the volume controls on osmc to control my AV receiver via cec, but it instead only adjusts the analog volume on Vero 2 (i.e., it says “Volume xxx%”)

• My projector sometimes manages to connect to Vero 2 and its remote allows me to navigate menus on osmc, but it stops working a few minutes after restarting Vero.

• Vero does receive power on/off events via cec, which toggle the “power” menu when I switch on the projector or AV receiver. But apparently nothing else (at least, consistently.)

• All of my other devices (AV receiver, projector, Steamlink and Chromecast) communicate perfectly over cec.

Got you

I will increase verbosity of CEC in the next update so we can see what’s going on

Sam

There is another one working on a cec driver for amlogic that supports libcec? My driver for the Wetek Play/Core is not perfekt but works better and better. I would like to exchange experiences with this other developer. Who is it?

Gerald

Gerald,

I took a look at your work on the new kernel driver and libCEC userland work. I didn’t get it to work on Vero 2, and assumed that it was specific to WeTek Play. I haven’t had time to look at why yet.

The only TV I have which implements CEC is an LG 32LH3000 which I have limited access to, so this is slowing me down. There is definitely a race condition: sometimes I can get CEC to work using the current in-kernel driver and sometimes it needs a reset (which also seems problematic). Documentation for this driver seems non-existent.

Userland implementation will be better for fine grained control (repeat filter), disabling the driver without /proc/cmdline changes anyway.

You should know that “didn’t get it to work” is too less. Provide me with the syslog.

1 Like

As per our discussion in IRC I tried an older driver. I will try the new one and give you journalctl if it is still problematic.

Sam

Wait a day, or so. Currently working on something that seems to make it even more reliable, need some time for tests.

It is not easy without docu and a seriously broken driver from the vendor ;).

i’m facing the same problem, let me know if i can help you somehow with log parsing etc

(note: sometime it works)

Just an update on this.

I merged Gerald’s (@gda) latest work and it appears to be working well. It’s much improved over the AMLogic CEC driver and will provide configuration for things like repeat presses and make it easier to toggle CEC as these settings will be available via the Peripherals menu in Kodi as they are on other platforms

Sam

3 Likes