Lines Matching refs:ter_state
97 struct stv0367ter_state *ter_state; member
980 struct stv0367ter_state *ter_state = state->ter_state; in stv0367ter_init() local
984 ter_state->pBER = 0; in stv0367ter_init()
999 ter_state->first_lock = 0; in stv0367ter_init()
1000 ter_state->unlock_counter = 2; in stv0367ter_init()
1009 struct stv0367ter_state *ter_state = state->ter_state; in stv0367ter_algo() local
1021 ter_state->frequency = p->frequency; in stv0367ter_algo()
1022 ter_state->force = FE_TER_FORCENONE in stv0367ter_algo()
1024 ter_state->if_iq_mode = state->config->if_iq_mode; in stv0367ter_algo()
1054 if (ter_state->if_iq_mode == FE_TER_IQ_TUNER) in stv0367ter_algo()
1056 ter_state->sense); in stv0367ter_algo()
1059 ter_state->sense); in stv0367ter_algo()
1064 if (ter_state->if_iq_mode == FE_TER_IQ_TUNER) in stv0367ter_algo()
1074 if ((ter_state->if_iq_mode != FE_TER_NORMAL_IF_TUNER) && in stv0367ter_algo()
1075 (ter_state->pBW != ter_state->bw)) { in stv0367ter_algo()
1089 if (!stv0367_iir_filt_init(state, ter_state->bw, in stv0367ter_algo()
1093 ter_state->pBW = ter_state->bw; in stv0367ter_algo()
1098 if (ter_state->hierarchy == FE_TER_HIER_LOW_PRIO) in stv0367ter_algo()
1105 ((((ter_state->bw * 64 * (1 << 15) * 100) in stv0367ter_algo()
1116 temp = (int)(((1 << 17) * ter_state->bw * 1000) / (7 * (InternalFreq))); in stv0367ter_algo()
1129 ter_state->echo_pos = 0; in stv0367ter_algo()
1130 ter_state->ucblocks = 0; /* liplianin */ in stv0367ter_algo()
1131 ter_state->pBER = 0; /* liplianin */ in stv0367ter_algo()
1132 stv0367_writebits(state, F367TER_LONG_ECHO, ter_state->echo_pos); in stv0367ter_algo()
1137 ter_state->state = FE_TER_LOCKOK; in stv0367ter_algo()
1139 ter_state->mode = stv0367_readbits(state, F367TER_SYR_MODE); in stv0367ter_algo()
1140 ter_state->guard = stv0367_readbits(state, F367TER_SYR_GUARD); in stv0367ter_algo()
1142 ter_state->first_lock = 1; /* we know sense now :) */ in stv0367ter_algo()
1144 ter_state->agc_val = in stv0367ter_algo()
1161 if (ter_state->mode == FE_TER_MODE_2K) in stv0367ter_algo()
1163 else if (ter_state->mode == FE_TER_MODE_4K) in stv0367ter_algo()
1165 else if (ter_state->mode == FE_TER_MODE_8K) in stv0367ter_algo()
1175 if (ter_state->bw == 6) in stv0367ter_algo()
1177 else if (ter_state->bw == 7) in stv0367ter_algo()
1180 ter_state->frequency += offset; in stv0367ter_algo()
1236 struct stv0367ter_state *ter_state = state->ter_state; in stv0367ter_set_frontend() local
1257 ter_state->mode = FE_TER_MODE_2K; in stv0367ter_set_frontend()
1263 ter_state->mode = FE_TER_MODE_8K; in stv0367ter_set_frontend()
1273 ter_state->guard = p->guard_interval; in stv0367ter_set_frontend()
1276 ter_state->guard = GUARD_INTERVAL_1_32; in stv0367ter_set_frontend()
1282 ter_state->bw = FE_TER_CHAN_BW_6M; in stv0367ter_set_frontend()
1285 ter_state->bw = FE_TER_CHAN_BW_7M; in stv0367ter_set_frontend()
1289 ter_state->bw = FE_TER_CHAN_BW_8M; in stv0367ter_set_frontend()
1292 ter_state->hierarchy = FE_TER_HIER_NONE; in stv0367ter_set_frontend()
1301 if (ter_state->first_lock) in stv0367ter_set_frontend()
1306 ter_state->state = FE_TER_NOLOCK; in stv0367ter_set_frontend()
1309 while (((index) < num_trials) && (ter_state->state != FE_TER_LOCKOK)) { in stv0367ter_set_frontend()
1310 if (!ter_state->first_lock) { in stv0367ter_set_frontend()
1312 ter_state->sense = SenseTrials[index]; in stv0367ter_set_frontend()
1317 if ((ter_state->state == FE_TER_LOCKOK) && in stv0367ter_set_frontend()
1334 struct stv0367ter_state *ter_state = state->ter_state; in stv0367ter_read_ucblocks() local
1345 ter_state->ucblocks = errs; in stv0367ter_read_ucblocks()
1348 (*ucblocks) = ter_state->ucblocks; in stv0367ter_read_ucblocks()
1357 struct stv0367ter_state *ter_state = state->ter_state; in stv0367ter_get_frontend() local
1397 if (ter_state->hierarchy == FE_TER_HIER_LOW_PRIO) in stv0367ter_get_frontend()
1479 struct stv0367ter_state *ter_state = state->ter_state;
1484 ter_state->unlock_counter += 1;
1486 ter_state->unlock_counter = 0;
1488 if (ter_state->unlock_counter > 2) {
1525 struct stv0367ter_state *ter_state = state->ter_state; in stv0367ter_read_ber() local
1540 tber = ter_state->pBER; in stv0367ter_read_ber()
1598 ter_state->pBER = tber; in stv0367ter_read_ber()
1607 struct stv0367ter_state *ter_state = state->ter_state;
1667 ter_state->pPER = Per;
1687 kfree(state->ter_state); in stv0367_release()
1726 struct stv0367ter_state *ter_state = NULL; in stv0367ter_attach() local
1732 ter_state = kzalloc(sizeof(struct stv0367ter_state), GFP_KERNEL); in stv0367ter_attach()
1733 if (ter_state == NULL) in stv0367ter_attach()
1739 state->ter_state = ter_state; in stv0367ter_attach()
1759 kfree(ter_state); in stv0367ter_attach()
3185 struct stv0367ter_state *ter_state = state->ter_state; in stv0367ddb_init() local
3257 ter_state->pBER = 0; in stv0367ddb_init()
3258 ter_state->first_lock = 0; in stv0367ddb_init()
3259 ter_state->unlock_counter = 2; in stv0367ddb_init()
3305 struct stv0367ter_state *ter_state = NULL; in stv0367ddb_attach() local
3312 ter_state = kzalloc(sizeof(struct stv0367ter_state), GFP_KERNEL); in stv0367ddb_attach()
3313 if (ter_state == NULL) in stv0367ddb_attach()
3322 state->ter_state = ter_state; in stv0367ddb_attach()
3353 kfree(ter_state); in stv0367ddb_attach()