tvafe: optimize stable time on manual setting [1/1]

PD#SWPL-5052

Problem:
optimize swith channel time

Solution:
lower wait time on manual colorfmt setting
stable time optimized from 500ms -> 300ms

Verify:
x301

Change-Id: I7e7d711d1c3ab0630d41e933c53ce34d0025e860
Signed-off-by: Nian Jing <nian.jing@amlogic.com>
This commit is contained in:
Nian Jing
2019-02-21 20:17:07 +08:00
committed by Jianxin Pan
parent 0b1487316e
commit c2a4eaf9a0
3 changed files with 11 additions and 0 deletions

View File

@@ -323,6 +323,7 @@ void tvafe_dec_start(struct tvin_frontend_s *fe, enum tvin_sig_fmt_e fmt)
enum tvin_port_e port = devp->tvafe.parm.port; enum tvin_port_e port = devp->tvafe.parm.port;
mutex_lock(&devp->afe_mutex); mutex_lock(&devp->afe_mutex);
manual_flag = 0;
if (!(devp->flags & TVAFE_FLAG_DEV_OPENED)) { if (!(devp->flags & TVAFE_FLAG_DEV_OPENED)) {
tvafe_pr_err("tvafe_dec_start(%d) decode havn't opened\n", tvafe_pr_err("tvafe_dec_start(%d) decode havn't opened\n",
@@ -976,6 +977,8 @@ static long tvafe_ioctl(struct file *file,
tvafe->cvd2.manual_fmt = fmt; tvafe->cvd2.manual_fmt = fmt;
tvafe_pr_info("%s: ioctl set cvd2 manual fmt:%s.\n", tvafe_pr_info("%s: ioctl set cvd2 manual fmt:%s.\n",
__func__, tvin_sig_fmt_str(fmt)); __func__, tvin_sig_fmt_str(fmt));
if (fmt != TVIN_SIG_FMT_NULL)
manual_flag = 1;
break; break;
} }
case TVIN_IOC_G_AFE_CVBS_STD: case TVIN_IOC_G_AFE_CVBS_STD:

View File

@@ -92,9 +92,11 @@ static int atv_stable_fmt_check_enable;
static int atv_prestable_out_cnt = 100; static int atv_prestable_out_cnt = 100;
static int other_stable_out_cnt = EXIT_STABLE_MAX_CNT; static int other_stable_out_cnt = EXIT_STABLE_MAX_CNT;
static int other_unstable_out_cnt = BACK_STABLE_MAX_CNT; static int other_unstable_out_cnt = BACK_STABLE_MAX_CNT;
static int manual_unstable_out_cnt = 30;
static int other_unstable_in_cnt = UNSTABLE_MAX_CNT; static int other_unstable_in_cnt = UNSTABLE_MAX_CNT;
static int nosig_in_cnt = NOSIG_MAX_CNT; static int nosig_in_cnt = NOSIG_MAX_CNT;
static int nosig2_unstable_cnt = EXIT_NOSIG_MAX_CNT; static int nosig2_unstable_cnt = EXIT_NOSIG_MAX_CNT;
bool manual_flag;
#ifdef DEBUG_SUPPORT #ifdef DEBUG_SUPPORT
module_param(back_nosig_max_cnt, int, 0664); module_param(back_nosig_max_cnt, int, 0664);
@@ -408,6 +410,9 @@ void tvin_smr(struct vdin_dev_s *devp)
(port == TVIN_PORT_CVBS0)) && (port == TVIN_PORT_CVBS0)) &&
(devp->flags & VDIN_FLAG_SNOW_FLAG)) (devp->flags & VDIN_FLAG_SNOW_FLAG))
unstb_in = sm_p->atv_unstable_out_cnt; unstb_in = sm_p->atv_unstable_out_cnt;
else if ((port == TVIN_PORT_CVBS3) &&
manual_flag)
unstb_in = manual_unstable_out_cnt;
else if ((port >= TVIN_PORT_HDMI0) && else if ((port >= TVIN_PORT_HDMI0) &&
(port <= TVIN_PORT_HDMI7)) (port <= TVIN_PORT_HDMI7))
unstb_in = sm_p->hdmi_unstable_out_cnt; unstb_in = sm_p->hdmi_unstable_out_cnt;

View File

@@ -49,6 +49,9 @@ struct tvin_sm_s {
int atv_stable_out_cnt; int atv_stable_out_cnt;
int hdmi_unstable_out_cnt; int hdmi_unstable_out_cnt;
}; };
extern bool manual_flag;
void tvin_smr(struct vdin_dev_s *pdev); void tvin_smr(struct vdin_dev_s *pdev);
void tvin_smr_init(int index); void tvin_smr_init(int index);
void reset_tvin_smr(unsigned int index); void reset_tvin_smr(unsigned int index);