if ((port >= TVIN_PORT_CVBS0) && (port <= TVIN_PORT_CVBS3)) {
ret = tvafe_cvd2_no_sig(&tvafe->cvd2, &devp->mem);
- /*fix black side when config atv snow*/
- if (ret && (port == TVIN_PORT_CVBS3) &&
- (devp->flags & TVAFE_FLAG_DEV_SNOW_FLAG) &&
- (tvafe->cvd2.config_fmt == TVIN_SIG_FMT_CVBS_PAL_I) &&
- (tvafe->cvd2.info.state != TVAFE_CVD2_STATE_FIND))
- tvafe_snow_config_acd();
- else if ((tvafe->cvd2.config_fmt == TVIN_SIG_FMT_CVBS_PAL_I) &&
- (tvafe->cvd2.info.state == TVAFE_CVD2_STATE_FIND) &&
- (port == TVIN_PORT_CVBS3))
- tvafe_snow_config_acd_resume();
-
/* normal sigal & adc reg error, reload source mux */
if (tvafe->cvd2.info.adc_reload_en && !ret)
-
tvafe_set_source_muxing(port, devp->pinmux);
-
}
return ret;
if ((cvd2->vd_port == TVIN_PORT_CVBS3) ||
(cvd2->vd_port == TVIN_PORT_CVBS0)) {
-#if ((defined CONFIG_AM_R840) || (defined CONFIG_AM_MXL661))
+ /*config 0 for tuner R840/mxl661*/
+ /*si2151 si2159 r842 may need set 1*/
W_APB_BIT(CVD2_VSYNC_SIGNAL_THRESHOLD, 0,
VS_SIGNAL_AUTO_TH_BIT, VS_SIGNAL_AUTO_TH_WID);
-#else
- W_APB_BIT(CVD2_VSYNC_SIGNAL_THRESHOLD, 1,
- VS_SIGNAL_AUTO_TH_BIT, VS_SIGNAL_AUTO_TH_WID);
-#endif
+
/* vsync signal is not good */
W_APB_REG(CVD2_NOISE_THRESHOLD, 0x00);
/*0x8e035e is debug test result*/
if (acd_h_config)
W_APB_REG(ACD_REG_2D, acd_h_config);
+ acd_h = acd_h_back;
}
/*only for pal-i*/
void tvafe_snow_config_acd_resume(void)
extern void ldim_set_matrix(int *data, int reg_sel);
extern void tvafe_snow_config(unsigned int onoff);
extern void tvafe_snow_config_clamp(unsigned int onoff);
+extern void tvafe_snow_config_acd(void);
+extern void tvafe_snow_config_acd_resume(void);
extern void vdin_vf_reg(struct vdin_dev_s *devp);
extern void vdin_vf_unreg(struct vdin_dev_s *devp);
extern void vdin_pause_dec(struct vdin_dev_s *devp);
++sm_p->state_cnt;
#ifdef CONFIG_AMLOGIC_MEDIA_TVIN_AFE
if ((port == TVIN_PORT_CVBS3) &&
- (devp->flags & VDIN_FLAG_SNOW_FLAG))
+ (devp->flags & VDIN_FLAG_SNOW_FLAG)) {
tvafe_snow_config_clamp(1);
+ /*fix black side when config atv snow*/
+ tvafe_snow_config_acd();
+ }
#endif
if (sm_ops->nosig(devp->frontend)) {
sm_p->exit_nosig_cnt = 0;
devp->unstable_flag = true;
#ifdef CONFIG_AMLOGIC_MEDIA_TVIN_AFE
if ((port == TVIN_PORT_CVBS3) &&
- (devp->flags & VDIN_FLAG_SNOW_FLAG))
+ (devp->flags & VDIN_FLAG_SNOW_FLAG)) {
tvafe_snow_config_clamp(0);
+ /*fix black side when config atv snow*/
+ tvafe_snow_config_acd_resume();
+ }
#endif
if (sm_ops->nosig(devp->frontend)) {
nosig = true;