summaryrefslogtreecommitdiff
authorTao Zeng <tao.zeng@amlogic.com>2015-12-31 03:19:09 (GMT)
committer Tao Zeng <tao.zeng@amlogic.com>2015-12-31 03:19:09 (GMT)
commit196602fd1b668810caf44787a81c4a6888064799 (patch)
tree1dc8c07073c638e41252b44a860b4847e250b070
parent53c019c2ebf958765fc2fcdcd224263319739937 (diff)
downloadhdmi_cec-196602fd1b668810caf44787a81c4a6888064799.zip
hdmi_cec-196602fd1b668810caf44787a81c4a6888064799.tar.gz
hdmi_cec-196602fd1b668810caf44787a81c4a6888064799.tar.bz2
PD#116311: add ARC support for cec HAL
Change-Id: If417ddd085d2403d1f86373c478ee45f5a5b1482
Diffstat
-rw-r--r--hdmi_cec.c6
-rw-r--r--hdmi_cec.h1
2 files changed, 5 insertions, 2 deletions
diff --git a/hdmi_cec.c b/hdmi_cec.c
index 9ef9d23..e729b0c 100644
--- a/hdmi_cec.c
+++ b/hdmi_cec.c
@@ -135,6 +135,7 @@ static void check_connect_status(struct aml_cec_hal *hal)
}
prev_status &= ~(bit);
prev_status |= ((port ? 1 : 0) << i);
+ D("now status:%x\n", prev_status);
}
}
hal->con_status = prev_status;
@@ -427,10 +428,11 @@ static void cec_set_option(const struct hdmi_cec_device* dev, int flag, int valu
*/
static void cec_set_audio_return_channel(const struct hdmi_cec_device* dev, int port_id, int flag)
{
+ int ret;
if (!hal_info || hal_info->fd < 0)
return ;
- /* TODO: */
- D("dev:%p, port id:%d, flag:%x\n", dev, port_id, flag);
+ ret = ioctl(hal_info->fd, CEC_IOC_SET_ARC_ENABLE, flag);
+ D("dev:%p, port id:%d, flag:%x, ret:%d\n", dev, port_id, flag, ret);
}
/*
diff --git a/hdmi_cec.h b/hdmi_cec.h
index fd8cde2..e27acb5 100644
--- a/hdmi_cec.h
+++ b/hdmi_cec.h
@@ -16,6 +16,7 @@
#define CEC_IOC_ADD_LOGICAL_ADDR _IOW(CEC_IOC_MAGIC, 0x0B, uint32_t)
#define CEC_IOC_CLR_LOGICAL_ADDR _IOW(CEC_IOC_MAGIC, 0x0C, uint32_t)
#define CEC_IOC_SET_DEV_TYPE _IOW(CEC_IOC_MAGIC, 0x0D, uint32_t)
+#define CEC_IOC_SET_ARC_ENABLE _IOW(CEC_IOC_MAGIC, 0x0E, uint32_t)
#define CEC_FAIL_NONE 0
#define CEC_FAIL_NACK 1