vdin: subtitle is disappear after hot_plug signal cable [1/1]

PD#SWPL-11151

Problem:
signal format is null when start dec

Solution:
do not change signal format when signal is unstable

Verify:
verified by t962x2_x301

Change-Id: I14a9247e83c15aecac1939f3270f46642a6d3a22
Signed-off-by: zhiwei.yuan <zhiwei.yuan@amlogic.com>
This commit is contained in:
zhiwei.yuan
2019-07-15 13:54:19 +08:00
committed by Tao Zeng
parent 5df81882e5
commit fc865a10c3
2 changed files with 23 additions and 15 deletions

View File

@@ -225,12 +225,16 @@ int vdin_open_fe(enum tvin_port_e port, int index, struct vdin_dev_s *devp)
devp->frontend = fe;
devp->parm.port = port;
/* for atv snow function */
/* for atv snow function,no need fmt here*/
#if 0
if ((port == TVIN_PORT_CVBS3) &&
(devp->parm.info.fmt == TVIN_SIG_FMT_NULL))
devp->parm.info.fmt = TVIN_SIG_FMT_CVBS_NTSC_M;
else
devp->parm.info.fmt = TVIN_SIG_FMT_NULL;
#endif
devp->parm.info.status = TVIN_SIG_STATUS_NULL;
/* clear color para*/
memset(&devp->pre_prop, 0, sizeof(devp->pre_prop));
@@ -2428,7 +2432,7 @@ static long vdin_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
mutex_unlock(&devp->fe_lock);
break;
}
if ((devp->parm.info.fmt == TVIN_SIG_FMT_NULL) &&
if ((parm.info.fmt == TVIN_SIG_FMT_NULL) &&
(devp->parm.port == TVIN_PORT_CVBS3)) {
de_fmt_flag = 1;
fmt = devp->parm.info.fmt = TVIN_SIG_FMT_CVBS_NTSC_M;
@@ -2436,6 +2440,7 @@ static long vdin_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
de_fmt_flag = 0;
fmt = devp->parm.info.fmt = parm.info.fmt;
}
devp->fmt_info_p =
(struct tvin_format_s *)tvin_get_fmt_info(fmt);
if (!devp->fmt_info_p) {

View File

@@ -395,7 +395,8 @@ void tvin_smr(struct vdin_dev_s *devp)
if (sm_p->state_cnt >= unstb_in) {
sm_p->state_cnt = unstb_in;
info->status = TVIN_SIG_STATUS_UNSTABLE;
info->fmt = TVIN_SIG_FMT_NULL;
/*info->fmt = TVIN_SIG_FMT_NULL;*/
if (sm_debug_enable &&
!sm_print_unstable) {
pr_info("[smr.%d] unstable\n",
@@ -438,23 +439,14 @@ void tvin_smr(struct vdin_dev_s *devp)
devp->parm.info.fps =
prop->fps;
}
} else
info->fmt = TVIN_SIG_FMT_NULL;
if (info->fmt == TVIN_SIG_FMT_NULL) {
/* remove unsupport status */
info->status = TVIN_SIG_STATUS_UNSTABLE;
if (sm_debug_enable &&
!sm_print_notsup) {
pr_info("[smr.%d] unstable --> not support\n",
devp->index);
sm_print_notsup = 1;
}
} else {
if (sm_ops->fmt_config)
sm_ops->fmt_config(fe);
tvin_smr_init_counter(devp->index);
sm_p->state = TVIN_SM_STATUS_PRESTABLE;
sm_atv_prestable_fmt = info->fmt;
if (sm_debug_enable) {
pr_info("[smr.%d]unstable-->prestable",
devp->index);
@@ -462,11 +454,22 @@ void tvin_smr(struct vdin_dev_s *devp)
info->fmt,
tvin_sig_fmt_str(info->fmt));
}
sm_print_nosig = 0;
sm_print_unstable = 0;
sm_print_fmt_nosig = 0;
sm_print_fmt_chg = 0;
sm_print_prestable = 0;
} else {
info->status = TVIN_SIG_STATUS_UNSTABLE;
if (sm_debug_enable &&
!sm_print_notsup) {
pr_info("[smr.%d] unstable --> not support\n",
devp->index);
sm_print_notsup = 1;
}
}
}
}