I’ve upgraded to the latest dev release of kodi, but ever since, I’m unable to control the volume of my AVR with the volume keys of the vero 4K+ remote.
My vero 4k+ is connected to my AVR (Onkyo), so volume control should happen on my AVR. This works perfectly fine with Kodi 17.6 (and the corresponding kernel that vero uses). After specifying that kodi is connected to an AVR in the peripheral > input devices > cec settings.
I’ve upgraded to the latest Kodi version (as documented here, and that also installed a new kernel.
I guess something has changed here, since now, the volume keys don’t controll the avr anymore, but the kodi volume itself (what should be at 100% at all times).
Allright, I dug into the Kodi code, and I might have a clue, but I don’t see why it worked fine before the upgrade, unless something has changed with the cec-driver… @sam_nazarko or @gmc knows this maybe?
When I look at the code that handles the cec stuff in kodi:
Kodi is asking always first for the TV OSD name, but my tv isn’t responding since CEC is turned off. I assume this is where CecLogMessage - Write: write failed has something to do. I guess this makes the call to GetDeviceOSDName fail, causing the entire SetInitialConfiguration function to fail.
If it would succeed, it would get to the UpdateAudioSystemStatus function, and that functions makes kodi see my avr, and setup everything so it controls the avr instead of its own volume.
If I enable CEC on my TV, the avr is detected and volume control works fine, I can disable the CEC on my TV afterwards and it will keep working. After a reboot however, it is again broken.
Looking at the blame of that file, I don’t see any recent change that could cause a difference, but there might be a different driver for AOCEC? This is just guessing. Maybe that driver is reporting an error on the GetDeviceOSDName call?
@sam_nazarko die you check that kodi function? Do you agree that that function to set the osd on the TV should only be executed when it is connected to a TV?
I guess that code to check the cec of the tv needs to be commented out, or at least be behind an if statement. I would gladly do this myself, but I’m not sure what the ideal workflow is to compile this myself to check out the patches.
I’ve tried to look into this a bit more, but there are quite some patches in the osmc repo that change cec behavior, so I’m not really sure where to look. Maybe a patch from below breaks it?
Okay, sorry guys. It seems that if you keep the option “Switch source to this device on startup” selected (like it is by default). It will not use CEC with my AVR, because it gets stuck in the waitReady() function. This seems unlogical. I only noticed this by reading the source code of the waitReady() function.
My Vero4K+ is updated and I can’t get CEC volume control to work, the volume buttons keep wanting to change the normal Kodi volume which of course doesn’t help for passthrough audio.
I think it is. I don’t use the “Switch source to this device on startup” setting anymore, but this really is a Kodi bug. The whole CEC implementation feels (and looks, I checked the code) rather hacky.