avin: dynamic en/disable avdetect for compatibility

PD#161632: dynamic en/disable avdetect for compatibility

Change-Id: Icb3038323292ca246c5aaac499b58c75a89c2ec1
Signed-off-by: Nian Jing <nian.jing@amlogic.com>
This commit is contained in:
Nian Jing
2018-04-04 18:28:02 +08:00
committed by Yixun Lan
parent 1a9fd1c3a4
commit 618d9ba48e
2 changed files with 20 additions and 0 deletions

View File

@@ -347,6 +347,15 @@ void tvafe_dec_start(struct tvin_frontend_s *fe, enum tvin_sig_fmt_e fmt)
((port == TVIN_PORT_CVBS1) || (port == TVIN_PORT_CVBS2)))
W_APB_REG(CVD2_H_LOOP_MAXSTATE, 0x9);
#ifdef CONFIG_AMLOGIC_MEDIA_TVIN_AVDETECT
if (tvafe_cpu_type() == CPU_TYPE_TXLX) {
if (port == TVIN_PORT_CVBS1)
tvafe_avin_detect_ch1_anlog_enable(0);
else if (port == TVIN_PORT_CVBS2)
tvafe_avin_detect_ch2_anlog_enable(0);
}
#endif
tvafe->parm.info.fmt = fmt;
tvafe->parm.info.status = TVIN_SIG_STATUS_STABLE;
@@ -404,6 +413,15 @@ void tvafe_dec_stop(struct tvin_frontend_s *fe, enum tvin_port_e port)
#endif
tvafe_cvd2_set_default_de(&tvafe->cvd2);
}
#ifdef CONFIG_AMLOGIC_MEDIA_TVIN_AVDETECT
if (tvafe_cpu_type() == CPU_TYPE_TXLX) {
if (port == TVIN_PORT_CVBS1)
tvafe_avin_detect_ch1_anlog_enable(1);
else if (port == TVIN_PORT_CVBS2)
tvafe_avin_detect_ch2_anlog_enable(1);
}
#endif
devp->flags &= (~TVAFE_FLAG_DEV_STARTED);
tvafe_pr_info("%s stop port:0x%x ok.\n", __func__, port);

View File

@@ -110,6 +110,8 @@ void tvafe_cha1_SYNCTIP_close_config(void);
void tvafe_cha2_SYNCTIP_close_config(void);
void tvafe_cha1_detect_restart_config(void);
void tvafe_cha2_detect_restart_config(void);
void tvafe_avin_detect_ch1_anlog_enable(bool enable);
void tvafe_avin_detect_ch2_anlog_enable(bool enable);
/*opened port,1:av1, 2:av2, 0:none av*/
extern unsigned int avport_opened;