* but when the input signal frequency offset -0.25MHz,
* demod will be unlocked. That's very strange.
*/
- if (reconfig || amlatvdemod_devp->std != p->param.std ||
+ if (reconfig || !priv->scanning ||
+ amlatvdemod_devp->std != p->param.std ||
amlatvdemod_devp->audmode != p->param.audmode ||
amlatvdemod_devp->if_freq != p->if_freq ||
amlatvdemod_devp->if_inv != p->if_inv ||
#endif
} else {
/* V4L2_COLOR_STD_PAL */
- if (cvbs_std == TVIN_SIG_FMT_CVBS_PAL_M) {
+ if (cvbs_std == TVIN_SIG_FMT_CVBS_PAL_M ||
+ cvbs_std == TVIN_SIG_FMT_CVBS_PAL_CN) {
broad_std = AML_ATV_DEMOD_VIDEO_MODE_PROP_PAL_M;
audio = V4L2_STD_PAL_M;
} else {
atv_dmd_wr_long(APB_BLOCK_ADDR_GDE_EQUAL, 0x30, 0x1d175c);
atv_dmd_wr_long(APB_BLOCK_ADDR_GDE_EQUAL, 0x34, 0x2d19e4);
+ /* enable filter */
atv_dmd_wr_long(APB_BLOCK_ADDR_GDE_EQUAL, 0x4c, 0x1);
- } else
+ } else {
+ /* default value */
+ atv_dmd_wr_long(APB_BLOCK_ADDR_GDE_EQUAL, 0x10, 0x8423F6);
+ atv_dmd_wr_long(APB_BLOCK_ADDR_GDE_EQUAL, 0x14, 0xFF86A967);
+ atv_dmd_wr_long(APB_BLOCK_ADDR_GDE_EQUAL, 0x18, 0x37FE45);
+ atv_dmd_wr_long(APB_BLOCK_ADDR_GDE_EQUAL, 0x1c, 0xFF86A967);
+ atv_dmd_wr_long(APB_BLOCK_ADDR_GDE_EQUAL, 0x20, 0x3C223B);
+ atv_dmd_wr_long(APB_BLOCK_ADDR_GDE_EQUAL, 0x24, 0x8423F6);
+ atv_dmd_wr_long(APB_BLOCK_ADDR_GDE_EQUAL, 0x28, 0xFF86A967);
+ atv_dmd_wr_long(APB_BLOCK_ADDR_GDE_EQUAL, 0x2c, 0x37FE45);
+ atv_dmd_wr_long(APB_BLOCK_ADDR_GDE_EQUAL, 0x30, 0xFF86A967);
+ atv_dmd_wr_long(APB_BLOCK_ADDR_GDE_EQUAL, 0x34, 0x3C223B);
+
+ /* disable filter */
atv_dmd_wr_long(APB_BLOCK_ADDR_GDE_EQUAL, 0x4c, 0x0);
+ }
pr_dbg("%s do atv_dmd_ring_filter %d ...\n", __func__, on);
}
!cvd2->hw_data[2].secam_detected)
cvd2->hw.secam_detected = false;
- if (cnt_dbg_en) {
-
- tvafe_pr_info("[%d]:cvd2->hw.acc3xx_cnt =%d,cvd2->hw.acc4xx_cnt=%d,acc425_cnt=%d\n",
- __LINE__,
- cvd2->hw.acc3xx_cnt, cvd2->hw.acc4xx_cnt, cvd2->hw.acc425_cnt);
- tvafe_pr_info("[%d]:cvd2->hw.fsc_358=%d,cvd2->hw.fsc_425=%d,cvd2->hw.fsc_443 =%d\n",
- __LINE__,
- cvd2->hw.fsc_358, cvd2->hw.fsc_425, cvd2->hw.fsc_443);
- }
+ if (cnt_dbg_en & 1)
+ tvafe_pr_info("acc4xx_cnt=%d,acc425_cnt=%d,acc3xx_cnt=%d,acc358_cnt=%d\n",
+ cvd2->hw.acc4xx_cnt, cvd2->hw.acc425_cnt,
+ cvd2->hw.acc3xx_cnt, cvd2->hw.acc358_cnt);
if (cvd2->hw.acc3xx_cnt > CNT_VLD_TH) {
if (cvd2->hw.acc358_cnt >
- (cvd2->hw.acc3xx_cnt - (cvd2->hw.acc3xx_cnt>>2))) {
+ (cvd2->hw.acc3xx_cnt - (cvd2->hw.acc3xx_cnt>>3))) {
cvd2->hw.fsc_358 = true;
cvd2->hw.fsc_425 = false;
}
if (++ cvd2->hw_data_cur >= 3)
cvd2->hw_data_cur = 0;
- if (cnt_dbg_en)
- tvafe_pr_info("[%d]:cvd2->hw.fsc_358=%d,cvd2->hw.fsc_425=%d,cvd2->hw.fsc_443 =%d\n",
+ if (cnt_dbg_en & 2)
+ tvafe_pr_info("[%d]:hw.fsc_358=%d,hw.fsc_425=%d,hw.fsc_443 =%d\n",
__LINE__, cvd2->hw.fsc_358,
cvd2->hw.fsc_425, cvd2->hw.fsc_443);