use hdmi_cec device only for VU

This commit is contained in:
TangoCash
2020-06-10 16:31:52 +02:00
committed by Thilo Graf
parent 162be459ac
commit 6137874561

View File

@@ -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;