mirror of
https://github.com/tuxbox-neutrino/libstb-hal.git
synced 2025-08-26 23:13:16 +02:00
use hdmi_cec device only for VU
This commit is contained in:
@@ -121,6 +121,7 @@ bool hdmi_cec::SetCECMode(VIDEO_HDMI_CEC_MODE _deviceType)
|
|||||||
|
|
||||||
hal_info(GREEN"[CEC] switch on %s\n"NORMAL, __func__);
|
hal_info(GREEN"[CEC] switch on %s\n"NORMAL, __func__);
|
||||||
|
|
||||||
|
#if BOXMODEL_VUPLUS_ALL
|
||||||
if (hdmiFd == -1)
|
if (hdmiFd == -1)
|
||||||
{
|
{
|
||||||
hdmiFd = ::open(CEC_HDMIDEV, O_RDWR | O_NONBLOCK | O_CLOEXEC);
|
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 */
|
::ioctl(hdmiFd, 0); /* flush old messages */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if (hdmiFd == -1)
|
if (hdmiFd == -1)
|
||||||
{
|
{
|
||||||
@@ -378,10 +380,13 @@ void hdmi_cec::SetCECState(bool state)
|
|||||||
message.length = 1;
|
message.length = 1;
|
||||||
SendCECMessage(message);
|
SendCECMessage(message);
|
||||||
|
|
||||||
|
#if BOXMODEL_VUPLUS_ALL
|
||||||
int cnt = 0;
|
int cnt = 0;
|
||||||
|
|
||||||
while (tv_off && (cnt < 5))
|
while (tv_off && (cnt < 5))
|
||||||
{
|
{
|
||||||
|
#endif
|
||||||
|
|
||||||
message.initiator = logicalAddress;
|
message.initiator = logicalAddress;
|
||||||
message.destination = CEC_OP_PRIM_DEVTYPE_TV;
|
message.destination = CEC_OP_PRIM_DEVTYPE_TV;
|
||||||
message.data[0] = CEC_MSG_IMAGE_VIEW_ON;
|
message.data[0] = CEC_MSG_IMAGE_VIEW_ON;
|
||||||
@@ -394,8 +399,10 @@ void hdmi_cec::SetCECState(bool state)
|
|||||||
message.length = 1;
|
message.length = 1;
|
||||||
SendCECMessage(message);
|
SendCECMessage(message);
|
||||||
|
|
||||||
|
#if BOXMODEL_VUPLUS_ALL
|
||||||
cnt++;
|
cnt++;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
message.initiator = logicalAddress;
|
message.initiator = logicalAddress;
|
||||||
message.destination = CEC_LOG_ADDR_BROADCAST;
|
message.destination = CEC_LOG_ADDR_BROADCAST;
|
||||||
|
Reference in New Issue
Block a user