rockchip: minor fixes for hdmi_cec device module

Signed-off-by: hmz007 <hmz007@gmail.com>
master
hmz007 3 years ago
parent 642ea1f7a9
commit ae83535071

@ -510,13 +510,14 @@ int rk_hdmi_cec_init(struct hdmi_cec_context_t *dev)
dev->phy_addr = 0;
dev->en_mask = CEC_WAKE | CEC_ENABLE;
dev->fd = open(HDMI_DEV_PATH,O_RDWR | O_CLOEXEC,0);
ALOGD("%s open %s", __func__, HDMI_DEV_PATH);
if (dev->fd < 0) {
ALOGE("%s open error!", __func__);
ALOGE("cec %s\n", strerror(errno));
ALOGE("%s failed to open %s, %d", __func__, HDMI_DEV_PATH, errno);
} else {
ALOGI("%s dev->fd = %d", __func__, dev->fd);
}
ALOGI("%s dev->fd = %d", __func__, dev->fd);
property_set("vendor.sys.hdmicec.version",HDMI_CEC_HAL_VERSION);
init_uevent_thread(dev);

@ -33,6 +33,7 @@
#include <unistd.h>
#include <pthread.h>
#include "rk_hdmi_cec.h"
#define HDMI_CEC_UEVENT_THREAD_NAME "HdmiCecThread"
static int validcecmessage(hdmi_event_t cec_event)
@ -108,7 +109,7 @@ static void* uevent_loop(void* param)
fd[0] = ctx->fd;
if (fd[0] < 0) {
ALOGE("%s:not able to open cec state node", __func__);
ALOGE("%s: unable to open cec state node", __func__);
return NULL;
}
@ -117,8 +118,8 @@ static void* uevent_loop(void* param)
pfd[0].events = POLLIN | POLLRDNORM | POLLPRI;
while (true) {
usleep(1000);
int err = poll(&pfd[0], 1, 20);
// usleep(1000);
int err = poll(&pfd[0], 1, -1);
if (!err) {
continue;

Loading…
Cancel
Save