From 9240c65d9dcf556c2458e338e8c7067d21b7f864 Mon Sep 17 00:00:00 2001 From: Jihong Sui Date: Fri, 15 Jun 2018 15:57:10 +0800 Subject: [PATCH] dtv_demod: fix atsc search bug and clear coverity warning PD#168297: fix atsc search bug 1. change j83/atsc search mechanism; 2. delet 'set_frontend' in dvb_fronten.c 3. clear coverity warning; Change-Id: I9f9905ce88dea435a9d7ac46617ea34786a0b176 Signed-off-by: Jihong Sui --- drivers/amlogic/media/dtv_demod/aml_demod.c | 9 +- drivers/amlogic/media/dtv_demod/amlfrontend.c | 167 ++++++++++++++++----- drivers/amlogic/media/dtv_demod/atsc_func.c | 28 ++-- drivers/amlogic/media/dtv_demod/demod_func.c | 9 +- drivers/amlogic/media/dtv_demod/dtmb_func.c | 2 +- drivers/amlogic/media/dtv_demod/dvbc_v2.c | 2 +- drivers/amlogic/media/dtv_demod/dvbc_v3.c | 9 +- drivers/amlogic/media/dtv_demod/dvbt_v2.c | 3 +- .../media/dtv_demod/include/addr_dtmb_che.h | 2 +- .../media/dtv_demod/include/addr_dtmb_front.h | 2 +- .../media/dtv_demod/include/addr_dtmb_sync.h | 2 +- .../amlogic/media/dtv_demod/include/atsc_func.h | 2 +- .../amlogic/media/dtv_demod/include/demod_func.h | 2 +- drivers/media/dvb-core/dvb_frontend.c | 4 +- 14 files changed, 173 insertions(+), 70 deletions(-) diff --git a/drivers/amlogic/media/dtv_demod/aml_demod.c b/drivers/amlogic/media/dtv_demod/aml_demod.c index 6f0e0e4..285f155 100644 --- a/drivers/amlogic/media/dtv_demod/aml_demod.c +++ b/drivers/amlogic/media/dtv_demod/aml_demod.c @@ -129,7 +129,7 @@ void wait_capture(int cap_cur_addr, int depth_MB, int start) read_start = readfirst + 0x40000000; pr_dbg("read_start is %x\n", read_start); } - +#if 0 /*no use*/ int cap_adc_data(struct aml_cap_data *cap) { int tmp; @@ -202,7 +202,7 @@ int cap_adc_data(struct aml_cap_data *cap) /* close tb; */ return 0; } - +#endif static DECLARE_WAIT_QUEUE_HEAD(lock_wq); static ssize_t aml_demod_info(struct class *cla, @@ -467,11 +467,16 @@ static ssize_t aml_demod_ui_read(struct file *file, char __user *buf, char *capture_buf = buf_all; int res = 0; +#if 0 if (count >= 4 * 1024 * 1024) count = 4 * 1024 * 1024; else if (count == 0) return 0; +#endif + if (count == 0) + return 0; + count = min_t(size_t, count, (sizeof(buf_all)-1)); res = copy_to_user((void *)buf, (char *)capture_buf, count); if (res < 0) { pr_dbg("[aml_demod_ui_read]res is %d", res); diff --git a/drivers/amlogic/media/dtv_demod/amlfrontend.c b/drivers/amlogic/media/dtv_demod/amlfrontend.c index 3566abd..803bc33 100644 --- a/drivers/amlogic/media/dtv_demod/amlfrontend.c +++ b/drivers/amlogic/media/dtv_demod/amlfrontend.c @@ -258,7 +258,7 @@ int convert_snr(int in_snr) 1592, 2005, 2524, 3177, 4000, 5036, 6340, 7981, 10048, 12649, 15924, 20047, 25238, 31773, 40000}; - for (out_snr = 1 ; out_snr <= 40; out_snr++) + for (out_snr = 1 ; out_snr < 40; out_snr++) if (in_snr <= calce_snr[out_snr]) break; @@ -422,7 +422,7 @@ static ssize_t demod_para_show(struct class *cls, static ssize_t dtmb_para_show(struct class *cls, struct class_attribute *attr, char *buf) { - int snr, lock_status, bch, agc_if_gain; + int snr, lock_status, bch, agc_if_gain[3]; struct dvb_frontend *dvbfe; int strength = 0; @@ -439,8 +439,8 @@ static ssize_t dtmb_para_show(struct class *cls, strength = tuner_get_ch_power2(); #endif if (strength <= -56) { - dtmb_read_agc(DTMB_D9_IF_GAIN, &agc_if_gain); - strength = dtmb_get_power_strength(agc_if_gain); + dtmb_read_agc(DTMB_D9_IF_GAIN, &agc_if_gain[0]); + strength = dtmb_get_power_strength(agc_if_gain[0]); } return sprintf(buf, "strength is %d\n", strength); } else if (dtmb_mode == DTMB_READ_SNR) { @@ -503,7 +503,7 @@ static ssize_t info_show(struct class *cls, int pos = 0; unsigned int size = PAGE_SIZE; - int snr, lock_status, bch, agc_if_gain, ser; + int snr, lock_status, bch, agc_if_gain[3], ser; struct dvb_frontend *dvbfe; int strength = 0; @@ -529,8 +529,8 @@ static ssize_t info_show(struct class *cls, strength = tuner_get_ch_power2(); #endif if (strength <= -56) { - dtmb_read_agc(DTMB_D9_IF_GAIN, &agc_if_gain); - strength = dtmb_get_power_strength(agc_if_gain); + dtmb_read_agc(DTMB_D9_IF_GAIN, &agc_if_gain[0]); + strength = dtmb_get_power_strength(agc_if_gain[0]); } pos += snprintf(buf+pos, size-pos, "strength: %d\n", strength); @@ -638,13 +638,14 @@ static void dtvdemod_version(struct amldtvdemod_device_s *dev) atsc_version = "1"; atsc_set_version(dev->atsc_version); - if (ic_v < IC_VER_NUB) { + if (ic_v < IC_VER_NUB && strlen(name_ic[ic_v]) < 10) { strcpy(soc_version, name_ic[ic_v]); strcat(soc_version, "-"); } else { strcpy(soc_version, "other-"); } - strcat(soc_version, demod_version); + if (strlen(demod_version) < 8) + strcat(soc_version, demod_version); strcat(soc_version, atsc_version); PR_INFO("[dtvdemod_version] [%s]\n", soc_version); } @@ -1407,11 +1408,13 @@ static int gxtv_demod_atsc_read_status } else { ilock = 0; - /* *status = FE_TIMEDOUT; */ + *status = FE_TIMEDOUT; + #if 0 if (ats_thread_flg) *status = FE_TIMEDOUT; else *status = 0; + #endif } #if 0 /*debug only*/ @@ -1465,11 +1468,15 @@ static int gxtv_demod_atsc_read_signal_strength *strength = tuner_get_ch_power3(); - + #if 0 if (*strength < 0) *strength = 0; else if (*strength > 100) *strength = 100; + #endif + if (*strength > 100) + *strength = 100; + return 0; } @@ -1636,7 +1643,8 @@ void atsc_detect_first(struct dvb_frontend *fe, enum fe_status *status) unsigned int atsc_status; enum fe_status s; int strenth; - + int cnt; + int check_ok; /*tuner strength*/ if (dvb_tuner_delay > 9) @@ -1648,20 +1656,33 @@ void atsc_detect_first(struct dvb_frontend *fe, enum fe_status *status) PR_ATSC("tuner:no signal!\n"); return; } + #define CNT_FIRST_ATSC (2) + check_ok = 0; - gxtv_demod_atsc_read_ucblocks(fe, &ucblocks); + for (cnt = 0; cnt < CNT_FIRST_ATSC; cnt++) { + gxtv_demod_atsc_read_ucblocks(fe, &ucblocks); - gxtv_demod_atsc_read_status(fe, &s); + gxtv_demod_atsc_read_status(fe, &s); - *status = s; + // *status = s; - if (s != 0x1f) { - gxtv_demod_atsc_read_ber(fe, &atsc_status); - if ((atsc_status < 0x60)) - *status = FE_TIMEDOUT; + if (s != 0x1f) { + gxtv_demod_atsc_read_ber(fe, &atsc_status); + if ((atsc_status < 0x60)) { + *status = FE_TIMEDOUT; + check_ok = 1; + } + } else { + check_ok = 1; + *status = s; + } + + if (check_ok) + break; } - PR_ATSC("%s, detect=0x%x\n", __func__, (unsigned int)*status); + PR_ATSC("%s,detect=0x%x,cnt=%d\n", __func__, + (unsigned int)*status, cnt); } @@ -1669,15 +1690,18 @@ static int dvb_j83b_count = 5; module_param(dvb_j83b_count, int, 0644); MODULE_PARM_DESC(dvb_atsc_count, "dvb_j83b_count"); /*come from j83b_speedup_func*/ + static int atsc_j83b_detect_first(struct dvb_frontend *fe, enum fe_status *s) { int j83b_status, i; /*struct dvb_frontend_private *fepriv = fe->frontend_priv;*/ struct dtv_frontend_properties *c = &fe->dtv_property_cache; int strenth; + enum fe_status cs; + int cnt; + int check_ok; - PR_DBG("+6+"); - + /*tuner:*/ if (dvb_tuner_delay > 9) msleep(dvb_tuner_delay); @@ -1687,6 +1711,69 @@ static int atsc_j83b_detect_first(struct dvb_frontend *fe, enum fe_status *s) PR_ATSC("tuner:no signal!j83\n"); return 0; } + check_ok = 0; + + /*first check signal max time*/ + #define CNT_FIRST (5) + + for (cnt = 0; cnt < CNT_FIRST; cnt++) { + gxtv_demod_atsc_read_status(fe, &cs); + + if (cs != 0x1f) { + /*msleep(200);*/ + PR_DBG("[j.83b] 1\n"); + for (i = 0; i < dvb_j83b_count; i++) { + msleep(25); + gxtv_demod_atsc_read_ber(fe, &j83b_status); + + /*J.83 status >=0x38,has signal*/ + if (j83b_status >= 0x3) + break; + } + PR_DBG("[rsj]j.83b_status is %x,modulation is %d\n", + j83b_status, + c->modulation); + + if (j83b_status < 0x3) { + *s = FE_TIMEDOUT; + check_ok = 1; + } + + } else { + /*have signal*/ + *s = cs; + check_ok = 1; + } + + if (check_ok) + break; + + msleep(50); + } + + + if (!check_ok) + *s = FE_TIMEDOUT; + + PR_ATSC("j83 first:cnt:%d,sgn:0x%x\n", cnt, *s); + return 0; +} +static int atsc_j83b_polling(struct dvb_frontend *fe, enum fe_status *s) +{ + int j83b_status, i; + /*struct dvb_frontend_private *fepriv = fe->frontend_priv;*/ + struct dtv_frontend_properties *c = &fe->dtv_property_cache; + int strenth; + + PR_DBG("+7+"); + + + strenth = tuner_get_ch_power(fe); + if (strenth < THRD_TUNER_STRENTH_J83) { + *s = FE_TIMEDOUT; + PR_DBGL("tuner:no signal!j83\n"); + return 0; + } gxtv_demod_atsc_read_status(fe, s); @@ -1704,16 +1791,18 @@ static int atsc_j83b_detect_first(struct dvb_frontend *fe, enum fe_status *s) PR_DBG("[rsj]j.83b_status is %x,modulation is %d\n", j83b_status, c->modulation); + + if (j83b_status < 0x3) + *s = FE_TIMEDOUT; } - if (j83b_status < 0x3) - *s = FE_TIMEDOUT; + return 0; } -void atsc_polling(struct dvb_frontend *fe) +void atsc_polling(struct dvb_frontend *fe, enum fe_status *status) { struct dtv_frontend_properties *c = &fe->dtv_property_cache; @@ -1721,11 +1810,14 @@ void atsc_polling(struct dvb_frontend *fe) PR_DBG("mode is qpsk, return;\n"); /*return;*/ } else if (c->modulation <= QAM_AUTO) { - PR_DBG("do nothing!\n"); + atsc_j83b_polling(fe, status); } else { atsc_thread(); + gxtv_demod_atsc_read_status(fe, status); } + + } @@ -1743,7 +1835,7 @@ static int gxtv_demod_atsc_tune(struct dvb_frontend *fe, bool re_tune, /*int ret = 0;*/ PR_ATSC("%s:\n", __func__); - *delay = HZ * 3; + *delay = HZ/2; if (re_tune) { dtvdd_devp->en_detect = 1; /*fist set*/ /*c->delivery_system = aml_demod_delivery_sys;*/ @@ -1767,9 +1859,9 @@ static int gxtv_demod_atsc_tune(struct dvb_frontend *fe, bool re_tune, return 0; } #endif - atsc_polling(fe); + atsc_polling(fe, status); - return gxtv_demod_atsc_read_status(fe, status); + return 0; } @@ -1787,7 +1879,7 @@ static int gxtv_demod_dvbt_tune(struct dvb_frontend *fe, bool re_tune, *delay = HZ/2; /*PR_ATSC("%s:\n", __func__);*/ -#if 0 +#if 1 if (re_tune) { timer_begain(D_TIMER_DETECT); @@ -2258,14 +2350,13 @@ static int gxtv_demod_dvbc_tune(struct dvb_frontend *fe, bool re_tune, *delay = HZ / 4; -#if 0 +#if 1 if (re_tune) { /*first*/ dtvdd_devp->en_detect = 1; - gxtv_demod_dvbc_set_frontend(fe); - timer_set_max(D_TIMER_DETECT, 4000); + /*timer_set_max(D_TIMER_DETECT, 4000);*/ timer_begain(D_TIMER_DETECT); gxtv_demod_dvbc_read_status_timer(fe, status); @@ -2327,7 +2418,7 @@ static int gxtv_demod_dtmb_tune(struct dvb_frontend *fe, bool re_tune, } else if (firstdetet == 0) { PR_DBG("use read_status\n"); gxtv_demod_dtmb_read_status_old(fe, status); - if (*status | (0x1f)) + if (*status == (0x1f)) dtmb_poll_start_tune(DTMBM_HV_SIGNEL_CHECK); else dtmb_poll_start_tune(DTMBM_NO_SIGNEL_CHECK); @@ -2996,6 +3087,8 @@ static int aml_dtvdemod_probe(struct platform_device *pdev) if (!dtvdd_devp) goto fail_alloc_region; + dtvdd_devp->state = DTVDEMOD_ST_NOT_INI; + /*class attr */ dtvdd_devp->clsp = class_create(THIS_MODULE, DEMOD_DEVICE_NAME); @@ -3084,8 +3177,6 @@ fail_create_class: fail_alloc_region: PR_ERR("dtvdemod alloc error.\n"); PR_ERR("dtvdemod_init fail.\n"); - dtvdd_devp->state = DTVDEMOD_ST_NOT_INI; - return ret; @@ -3628,7 +3719,7 @@ static int aml_dtvdm_read_status(struct dvb_frontend *fe, case AM_FE_DTMB_N: ret = gxtv_demod_dtmb_read_status(fe, status); break; - case AM_FE_UNKNOWN_N: + /*case AM_FE_UNKNOWN_N:*/ default: break; @@ -3874,7 +3965,7 @@ static int aml_dtvdm_tune(struct dvb_frontend *fe, bool re_tune, delay, status); break; - case AM_FE_UNKNOWN_N: + /*case AM_FE_UNKNOWN_N:*/ default: flg = 0; break; diff --git a/drivers/amlogic/media/dtv_demod/atsc_func.c b/drivers/amlogic/media/dtv_demod/atsc_func.c index e7d2762..f2dd86a 100644 --- a/drivers/amlogic/media/dtv_demod/atsc_func.c +++ b/drivers/amlogic/media/dtv_demod/atsc_func.c @@ -837,7 +837,7 @@ int cfo_run(void) int scan_range; int Offset; int detec_cfo_times = 3; - int ret = 0; + if (cfo_count == 1) max_count = 3; @@ -917,20 +917,20 @@ int cfo_run(void) /*atsc_reset();*/ PR_ATSC("fsm[%x][autoscan]atsc_reset\n", read_atsc_fsm()); - /*return Cfo_Ok;*/ - ret = Cfo_Ok; + return Cfo_Ok; + } else { if (table_count >= (max_count-1)) { PR_ATSC("cfo not lock,will try again\n"); - /*return Cfo_Fail;*/ - ret = Cfo_Fail; - } else { - table_count++; - Offset = freq_table[table_count]; + return Cfo_Fail; + } + table_count++; + Offset = freq_table[table_count]; + } } - return ret; + return 0; } int AR_run(void) @@ -1102,8 +1102,8 @@ void atsc_thread(void) /*step:check AR*/ if (ar_enable) AR_run(); - if (cci_enable && !field_test_version) - ret = cci_run(); +// if (cci_enable && !field_test_version) +// ret = cci_run(); atsc_reset(); time[1] = jiffies_to_msecs(jiffies); time_table[0] = (time[1]-time[0]); @@ -1125,6 +1125,8 @@ void atsc_thread(void) read_atsc_fsm(), time_table[1]); if (ret == Cfo_Fail) return; + if (cci_enable) + ret = cci_run(); for (i = 0; i < 80; i++) { fsm_status = read_atsc_fsm(); if (fsm_status >= Atsc_Lock) { @@ -1175,9 +1177,8 @@ void atsc_thread(void) atsc_set_performance_register (TASK8_R22, 0); PR_ATSC("snr(16,23)\n"); - } else { - awgn_flag = TASK8_R22; } + } register_set_flag = 1; msleep(200); @@ -1196,6 +1197,7 @@ void atsc_thread(void) } + #if 0 static dtmb_cfg_t list_dtmb_v1[99] = { {0x00000000, 0x01, 0}, diff --git a/drivers/amlogic/media/dtv_demod/demod_func.c b/drivers/amlogic/media/dtv_demod/demod_func.c index 0e6249f..6dc776d 100644 --- a/drivers/amlogic/media/dtv_demod/demod_func.c +++ b/drivers/amlogic/media/dtv_demod/demod_func.c @@ -985,7 +985,7 @@ void demod_set_reg(struct aml_demod_reg *demod_reg) case AMLOGIC_DEMOD_FPGA: break; case AMLOGIC_DEMOD_OTHERS: - demod_reg->addr = demod_reg->addr; + /*not change: demod_reg->addr = demod_reg->addr;*/ break; case AMLOGIC_DEMOD_COLLECT_DATA: break; @@ -1033,7 +1033,8 @@ void demod_get_reg(struct aml_demod_reg *demod_reg) else if (demod_reg->mode == AMLOGIC_DEMOD_FPGA) ; else if (demod_reg->mode == AMLOGIC_DEMOD_OTHERS) - demod_reg->addr = demod_reg->addr; + /*demod_reg->addr = demod_reg->addr;*/ + ; else if (demod_reg->mode == AMLOGIC_DEMOD_COLLECT_DATA) ; @@ -1100,7 +1101,7 @@ int app_apb_write_reg(int addr, int data) demod_set_demod_reg(data, addr); return 0; } - +#if 0 void monitor_isdbt(void) { int SNR; @@ -1187,7 +1188,7 @@ void monitor_isdbt(void) ); PR_DBG("\n"); } - +#endif /* new api */ unsigned int demod_reg_get_abs_ddr(unsigned int reg_mode, unsigned int reg_add) { diff --git a/drivers/amlogic/media/dtv_demod/dtmb_func.c b/drivers/amlogic/media/dtv_demod/dtmb_func.c index 024f3b7..5e1d96c 100644 --- a/drivers/amlogic/media/dtv_demod/dtmb_func.c +++ b/drivers/amlogic/media/dtv_demod/dtmb_func.c @@ -190,7 +190,7 @@ void dtmb_all_reset(void) void dtmb_initial(struct aml_demod_sta *demod_sta) { /* dtmb_write_reg(0x049, memstart); //only for init */ - dtmb_spectrum = 1; + /*dtmb_spectrum = 1; no use */ dtmb_spectrum = demod_sta->spectrum; dtmb_register_reset(); dtmb_all_reset(); diff --git a/drivers/amlogic/media/dtv_demod/dvbc_v2.c b/drivers/amlogic/media/dtv_demod/dvbc_v2.c index 60b2b7f..8cad10e 100644 --- a/drivers/amlogic/media/dtv_demod/dvbc_v2.c +++ b/drivers/amlogic/media/dtv_demod/dvbc_v2.c @@ -850,7 +850,7 @@ void dvbc_isr(struct aml_demod_sta *demod_sta) mask = dvbc_read_reg(0xd0); stat &= mask; - for (dvbc_irq = 0; dvbc_irq < 20; dvbc_irq++) { + for (dvbc_irq = 0; dvbc_irq < ARRAY_SIZE(dvbc_irq_name); dvbc_irq++) { if (stat >> dvbc_irq & 1) { if (demod_sta->debug) PR_DVBC("irq: dvbc %2d %s %8x\n", diff --git a/drivers/amlogic/media/dtv_demod/dvbc_v3.c b/drivers/amlogic/media/dtv_demod/dvbc_v3.c index 67b1cd5..a459920 100644 --- a/drivers/amlogic/media/dtv_demod/dvbc_v3.c +++ b/drivers/amlogic/media/dtv_demod/dvbc_v3.c @@ -174,7 +174,10 @@ void qam_auto_scan(int auto_qam_enable) qam_write_reg(0x4e, 0x12000012); } - +static unsigned int get_adc_freq(void) +{ + return 24000; +} void dvbc_reg_initial(struct aml_demod_sta *demod_sta) { @@ -192,8 +195,8 @@ void dvbc_reg_initial(struct aml_demod_sta *demod_sta) int max_frq_off, tmp, adc_format; clk_freq = demod_sta->clk_freq; /* kHz */ - adc_freq = demod_sta->adc_freq; /* kHz */ - adc_freq = 24000; + /*no use adc_freq = demod_sta->adc_freq;*/ /* kHz */ + adc_freq = get_adc_freq();/*24000*/; adc_format = 1; /*ary no use tuner = demod_sta->tuner;*/ ch_mode = demod_sta->ch_mode; diff --git a/drivers/amlogic/media/dtv_demod/dvbt_v2.c b/drivers/amlogic/media/dtv_demod/dvbt_v2.c index 4e88be1..db3aae0 100644 --- a/drivers/amlogic/media/dtv_demod/dvbt_v2.c +++ b/drivers/amlogic/media/dtv_demod/dvbt_v2.c @@ -67,7 +67,8 @@ int dvbt_set_ch(struct aml_demod_sta *demod_sta, ret = -1; } - if (demod_mode < 0 || demod_mode > 4) { + /*if (demod_mode < 0 || demod_mode > 4) {*/ + if (demod_mode > 4) { /* PR_DVBT("Error: Invalid demod mode option %d\n",*/ /* demod_mode); */ demod_mode = 1; diff --git a/drivers/amlogic/media/dtv_demod/include/addr_dtmb_che.h b/drivers/amlogic/media/dtv_demod/include/addr_dtmb_che.h index 8e4eb18..34c28cb 100644 --- a/drivers/amlogic/media/dtv_demod/include/addr_dtmb_che.h +++ b/drivers/amlogic/media/dtv_demod/include/addr_dtmb_che.h @@ -18,7 +18,7 @@ #ifndef __ADDR_DTMB_CHE_H__ #define __ADDR_DTMB_CHE_H__ -#include "addr_dtmb_top.h" +/*#include "addr_dtmb_top.h"*/ #define DTMB_CHE_ADDR(x) (DTMB_DEMOD_BASE + (x << 2)) diff --git a/drivers/amlogic/media/dtv_demod/include/addr_dtmb_front.h b/drivers/amlogic/media/dtv_demod/include/addr_dtmb_front.h index c8b9346..d8cd739 100644 --- a/drivers/amlogic/media/dtv_demod/include/addr_dtmb_front.h +++ b/drivers/amlogic/media/dtv_demod/include/addr_dtmb_front.h @@ -18,7 +18,7 @@ #ifndef __ADDR_DTMB_FRONT_H__ #define __ADDR_DTMB_FRONT_H__ -#include "addr_dtmb_top.h" +/*#include "addr_dtmb_top.h"*/ #define DTMB_FRONT_ADDR(x) (DTMB_DEMOD_BASE + (x << 2)) diff --git a/drivers/amlogic/media/dtv_demod/include/addr_dtmb_sync.h b/drivers/amlogic/media/dtv_demod/include/addr_dtmb_sync.h index 5d52b00..1240709 100644 --- a/drivers/amlogic/media/dtv_demod/include/addr_dtmb_sync.h +++ b/drivers/amlogic/media/dtv_demod/include/addr_dtmb_sync.h @@ -18,7 +18,7 @@ #ifndef __ADDR_DTMB_SYNC_H__ #define __ADDR_DTMB_SYNC_H__ -#include "addr_dtmb_top.h" +/*#include "addr_dtmb_top.h"*/ #define DTMB_SYNC_ADDR(x) (DTMB_DEMOD_BASE + (x << 2)) #define DTMB_SYNC_TS_CFO_PN_VALUE DTMB_SYNC_ADDR(0x57) diff --git a/drivers/amlogic/media/dtv_demod/include/atsc_func.h b/drivers/amlogic/media/dtv_demod/include/atsc_func.h index c3f3e75f..77b10c5 100644 --- a/drivers/amlogic/media/dtv_demod/include/atsc_func.h +++ b/drivers/amlogic/media/dtv_demod/include/atsc_func.h @@ -19,7 +19,7 @@ #else #define ATSC_FUNC_H -#include "demod_func.h" +/*#include "demod_func.h"*/ enum atsc_state_machine { Idle = 0x20, diff --git a/drivers/amlogic/media/dtv_demod/include/demod_func.h b/drivers/amlogic/media/dtv_demod/include/demod_func.h index 564afa9..9be8d2e 100644 --- a/drivers/amlogic/media/dtv_demod/include/demod_func.h +++ b/drivers/amlogic/media/dtv_demod/include/demod_func.h @@ -563,7 +563,7 @@ void ofdm_initial(int bandwidth, int tc_mode /* 0: Unsigned, 1:TC */); -void monitor_isdbt(void); +/*no use void monitor_isdbt(void);*/ void demod_set_reg(struct aml_demod_reg *demod_reg); void demod_get_reg(struct aml_demod_reg *demod_reg); diff --git a/drivers/media/dvb-core/dvb_frontend.c b/drivers/media/dvb-core/dvb_frontend.c index 8ac2240..aadff13 100644 --- a/drivers/media/dvb-core/dvb_frontend.c +++ b/drivers/media/dvb-core/dvb_frontend.c @@ -2201,8 +2201,8 @@ static int dtv_set_frontend(struct dvb_frontend *fe) /* Request the search algorithm to search */ fepriv->algo_status |= DVBFE_ALGO_SEARCH_AGAIN; - if (fe->ops.set_frontend) - fe->ops.set_frontend(fe); +// if (fe->ops.set_frontend) +// fe->ops.set_frontend(fe); dvb_frontend_clear_events(fe); dvb_frontend_add_event(fe, 0); dvb_frontend_wakeup(fe); -- 2.7.4