Pulse-Eight / libcec

USB CEC Adapter communication Library http://libcec.pulse-eight.com/
Other
721 stars 290 forks source link

Zidoo smart TV box with libcec #401

Closed jmgirven closed 6 years ago

jmgirven commented 6 years ago

Can you just confirm for me that libcec does not require a Pulse-Eight USB-CEC adapter? It instead requires a box that supports HDMI CEC?

I have a Zidoo X9S smart TV box that supports HDMI CEC and wondered if I could get libcec to send a mute command to it. This gets out of what you support as you are still working on mainline Linux 4.8 kernel (#67) though. I found a very old build of libcec claiming to work on Android, and I was testing it out. I believe it is libcec v2.2.0. I have written some Android JNI code to utilise libcec, but get stuck with:

g_config.Clear();
g_callbacks.Clear();
snprintf(g_config.strDeviceName, 13, "CECTest");
g_config.clientVersion       = CEC_CONFIG_VERSION;
g_config.bActivateSource     = 0;
g_config.callbacks           = &g_callbacks;

ICECAdapter *parser = LibCecInitialise(&g_config, "libcec.so");
parser->InitVideoStandalone();
int8_t iDevicesFound = parser->FindAdapters(devices, count, NULL);

Not finding any devices. I wondered if I had completely misunderstood the purpose of libcec!

Hedda commented 6 years ago

@jmgirven The whole chain must be supported. As it is; mainline LibCEC does not yet support the HDMI CEC framework for Linux kernel (as requested in https://github.com/Pulse-Eight/libcec/issues/67 ), so even if the Zidoo X9S supports the HDMI CEC framework for Linux kernel on Linux as an operating-system then you still have to wait until https://github.com/Pulse-Eight/libcec/pull/380 is merged into mainline LibCEC and the next major release is of is available and then wait further until kernal with support for it used by Android OS on Zidoo X9S. In short; do not expect to see support for it on any existing Android boxes running Android OS. This feature will sooner be seen when running Linux on those boxes, and then probably in Android OS on future Android boxes once such boxes are sold with Android OS that uses newer Linux kernels which has support for the HDMI CEC chips used by box hardware.