use hdmi_cec device only for VU

Origin commit data
------------------
Branch: master
Commit: 6f85e1aab2
Author: TangoCash <eric@loxat.de>
Date: 2020-06-10 (Wed, 10 Jun 2020)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
TangoCash
2020-06-10 16:31:52 +02:00
committed by vanhofen
parent 8b937da111
commit 6a772df307

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;