summaryrefslogtreecommitdiff
authorxian <an.xi@amlogic.com>2019-10-11 11:02:51 (GMT)
committer Jianxin Pan <jianxin.pan@amlogic.com>2019-10-16 02:58:51 (GMT)
commitb2fa5a5c2f12ebf63d4d5a24c75502c38b1f51b4 (patch)
tree628779ba2e3457c72a4dbf5e5c7646dea61e941e
parentdb5a6e9f99295dcf60731f24d1ba503e8156db97 (diff)
downloadcommon-b2fa5a5c2f12ebf63d4d5a24c75502c38b1f51b4.zip
common-b2fa5a5c2f12ebf63d4d5a24c75502c38b1f51b4.tar.gz
common-b2fa5a5c2f12ebf63d4d5a24c75502c38b1f51b4.tar.bz2
cec: fix tv cec wake up select source issue [6/6]
PD#SWPL-13135 Problem: When tv is waked up by one playback, it may wake up the other playback ans show the source. Solution: LiveTv should take care of the situation and make the right choice with information provided by cec hal service. Verify: verify it on Marconi Change-Id: Ic27cdf77f0796a659400f90f60190354235777f3 Signed-off-by: xian <an.xi@amlogic.com>
Diffstat
-rw-r--r--drivers/amlogic/cec/hdmi_ao_cec.c13
-rw-r--r--include/linux/amlogic/media/vout/hdmi_tx/hdmi_tx_cec_20.h2
2 files changed, 14 insertions, 1 deletions
diff --git a/drivers/amlogic/cec/hdmi_ao_cec.c b/drivers/amlogic/cec/hdmi_ao_cec.c
index e31eff1..949c650 100644
--- a/drivers/amlogic/cec/hdmi_ao_cec.c
+++ b/drivers/amlogic/cec/hdmi_ao_cec.c
@@ -3288,6 +3288,7 @@ static long hdmitx_cec_ioctl(struct file *f,
return -EINVAL;
}
break;
+
case CEC_IOC_SET_FREEZE_MODE:
/* system enter power down freeze mode
* need save current device type and logical addr
@@ -3295,6 +3296,16 @@ static long hdmitx_cec_ioctl(struct file *f,
cec_save_pre_setting();
CEC_ERR("need enter freeze mode\n");
break;
+
+ case CEC_IOC_GET_BOOT_PORT:
+ tmp = cec_dev->wakup_data.wk_port_id;
+ CEC_ERR("Boot port:%#x\n", (unsigned int)tmp);
+ if (copy_to_user(argp, &tmp, _IOC_SIZE(cmd))) {
+ mutex_unlock(&cec_dev->cec_ioctl_mutex);
+ return -EINVAL;
+ }
+ break;
+
default:
CEC_ERR("error ioctrl\n");
break;
@@ -3348,6 +3359,8 @@ static void aocec_early_suspend(struct early_suspend *h)
{
cec_dev->cec_suspend = CEC_PW_STANDBY;
CEC_ERR("%s, suspend sts:%d\n", __func__, cec_dev->cec_suspend);
+ /* reset wakeup reason for considering light sleep situation*/
+ cec_dev->wakeup_reason = 0;
}
static void aocec_late_resume(struct early_suspend *h)
diff --git a/include/linux/amlogic/media/vout/hdmi_tx/hdmi_tx_cec_20.h b/include/linux/amlogic/media/vout/hdmi_tx/hdmi_tx_cec_20.h
index f09515a..e0b1843 100644
--- a/include/linux/amlogic/media/vout/hdmi_tx/hdmi_tx_cec_20.h
+++ b/include/linux/amlogic/media/vout/hdmi_tx/hdmi_tx_cec_20.h
@@ -101,7 +101,7 @@ enum _cec_log_dev_addr_e {
#define CEC_IOC_GET_BOOT_ADDR _IOW(CEC_IOC_MAGIC, 0x10, uint32_t)
#define CEC_IOC_GET_BOOT_REASON _IOW(CEC_IOC_MAGIC, 0x11, uint32_t)
#define CEC_IOC_SET_FREEZE_MODE _IOW(CEC_IOC_MAGIC, 0x12, uint32_t)
-
+#define CEC_IOC_GET_BOOT_PORT _IOW(CEC_IOC_MAGIC, 0x13, uint32_t)
#define CEC_FAIL_NONE 0
#define CEC_FAIL_NACK 1