diff --git a/libarmbox/hdmi_cec.cpp b/libarmbox/hdmi_cec.cpp index 26fa98c..85a8abe 100644 --- a/libarmbox/hdmi_cec.cpp +++ b/libarmbox/hdmi_cec.cpp @@ -121,6 +121,7 @@ bool hdmi_cec::SetCECMode(VIDEO_HDMI_CEC_MODE _deviceType) hal_info(GREEN"[CEC] switch on %s\n"NORMAL, __func__); +#if BOXMODEL_VUPLUS_ALL if (hdmiFd == -1) { hdmiFd = ::open(CEC_HDMIDEV, O_RDWR | O_NONBLOCK | O_CLOEXEC); @@ -129,6 +130,7 @@ bool hdmi_cec::SetCECMode(VIDEO_HDMI_CEC_MODE _deviceType) ::ioctl(hdmiFd, 0); /* flush old messages */ } } +#endif if (hdmiFd == -1) { @@ -378,10 +380,13 @@ void hdmi_cec::SetCECState(bool state) message.length = 1; SendCECMessage(message); +#if BOXMODEL_VUPLUS_ALL int cnt = 0; while (tv_off && (cnt < 5)) { +#endif + message.initiator = logicalAddress; message.destination = CEC_OP_PRIM_DEVTYPE_TV; message.data[0] = CEC_MSG_IMAGE_VIEW_ON; @@ -394,8 +399,10 @@ void hdmi_cec::SetCECState(bool state) message.length = 1; SendCECMessage(message); +#if BOXMODEL_VUPLUS_ALL cnt++; } +#endif message.initiator = logicalAddress; message.destination = CEC_LOG_ADDR_BROADCAST;