dtv_demod: txl: fix dvbc can't lock
authorJihong Sui <jihong.sui@amlogic.com>
Fri, 10 Aug 2018 01:48:27 +0000 (09:48 +0800)
committerJianxin Pan <jianxin.pan@amlogic.com>
Tue, 14 Aug 2018 06:44:13 +0000 (23:44 -0700)
PD#169985: txl: fix dvbc can't lock

Change-Id: I6094cfb546832cc4c54dae4a065147a05d20c251
Signed-off-by: Jihong Sui <jihong.sui@amlogic.com>
drivers/amlogic/media/dtv_demod/demod_func.c
drivers/amlogic/media/dtv_demod/dvbc_func.c

index 308bccd..42f38f0 100644 (file)
@@ -709,10 +709,17 @@ void demod_set_mode_ts(unsigned char dvb_mode)
                cfg0.b.adc_regout = 1;
                cfg0.b.adc_regadj = 2;
        } else if (dvb_mode == Gxtv_Dvbc) {
-               cfg0.b.ts_sel = 1<<3;
-               cfg0.b.mode = 1<<3;
-               cfg0.b.adc_format = 0;
-               cfg0.b.adc_regout = 0;
+               if (is_dvbc_ver(IC_DVBC_V2)) {
+                       cfg0.b.ts_sel = 2;
+                       cfg0.b.mode = 7;
+                       cfg0.b.adc_format = 1;
+                       cfg0.b.adc_regout = 0;
+               } else {
+                       cfg0.b.ts_sel = 1<<3;
+                       cfg0.b.mode = 1<<3;
+                       cfg0.b.adc_format = 0;
+                       cfg0.b.adc_regout = 0;
+               }
        }
 
        demod_write_reg(DEMOD_REG1, cfg0.d32);
index a31725f..e4775ca 100644 (file)
@@ -350,7 +350,9 @@ int dvbc_set_ch(struct aml_demod_sta *demod_sta,
        if (demod_sta->ch_if == 0)
                demod_sta->ch_if = 5000;
        demod_sta->symb_rate = symb_rate;
-       demod_sta->adc_freq = demod_dvbc->dat0;
+       if (is_dvbc_ver(IC_DVBC_V3))
+               demod_sta->adc_freq = demod_dvbc->dat0;
+
 #if 0
        if (is_meson_txlx_cpu() || is_meson_gxlx_cpu())
                dvbc_reg_initial(demod_sta);