summaryrefslogtreecommitdiff
authorJinping Wang <jinping.wang@amlogic.com>2017-11-08 03:10:43 (GMT)
committer Jinping Wang <jinping.wang@amlogic.com>2017-11-08 03:10:43 (GMT)
commit5b90f2da12cbb6c1c16e4724d597c03a9aafd1c5 (patch)
treecb65eaa3d8652ca88648f042d854b578b7da363d
parent9943e268dc4d47d9502a710fe9948fa702d0b59f (diff)
downloadframeworks-5b90f2da12cbb6c1c16e4724d597c03a9aafd1c5.zip
frameworks-5b90f2da12cbb6c1c16e4724d597c03a9aafd1c5.tar.gz
frameworks-5b90f2da12cbb6c1c16e4724d597c03a9aafd1c5.tar.bz2
cec: set cecEnabled when set system cec control [1/1]
PD# 153580 set cecEnabled when set system cec control Change-Id: I0893f2102d48ab3e4f896b29d89526c64c61f494
Diffstat
-rw-r--r--services/hdmicec/libhdmi_cec/HdmiCecControl.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/services/hdmicec/libhdmi_cec/HdmiCecControl.cpp b/services/hdmicec/libhdmi_cec/HdmiCecControl.cpp
index 0f33da7..babcb55 100644
--- a/services/hdmicec/libhdmi_cec/HdmiCecControl.cpp
+++ b/services/hdmicec/libhdmi_cec/HdmiCecControl.cpp
@@ -151,8 +151,10 @@ void HdmiCecControl::threadLoop()
ALOGD("[hcc] file open ok, fd = %d.", mCecDevice.mFd);
while (mCecDevice.mRun) {
- if (!mCecDevice.isCecEnabled)
+ if (!mCecDevice.isCecEnabled) {
+ usleep(1000 * 1000);
continue;
+ }
checkConnectStatus();
memset(msg_buf, 0, sizeof(msg_buf));
@@ -331,6 +333,7 @@ void HdmiCecControl::setOption(int flag, int value)
case HDMI_OPTION_SYSTEM_CEC_CONTROL:
ret = ioctl(mCecDevice.mFd, CEC_IOC_SET_OPTION_SYS_CTRL, value);
+ mCecDevice.isCecEnabled = (value == 1) ? true : false;
mCecDevice.isCecControlled = (value == 1) ? true : false;
break;