• Home
  • Raw
  • Download

Lines Matching +full:decimation +full:- +full:ratio

2     cx24110 - Single Chip Satellite Channel Receiver driver module
4 Copyright (C) 2002 Peter Hettkamp <peter.hettkamp@htp-tel.de> based on
87 /* leave front-end AGC parameters at default values */
88 /* leave decimation AGC parameters at default values */
95 {0x41,0x00}, /* @ MSB of front-end derotator frequency */
103 {0x61,0x95}, /* GPIO pins 1-4 have special function */
119 struct i2c_msg msg = { .addr = state->config->demod_address, .flags = 0, .buf = buf, .len = 2 }; in cx24110_writereg()
122 if ((err = i2c_transfer(state->i2c, &msg, 1)) != 1) { in cx24110_writereg()
125 return -EREMOTEIO; in cx24110_writereg()
136 …struct i2c_msg msg [] = { { .addr = state->config->demod_address, .flags = 0, .buf = b0, .len = 1 … in cx24110_readreg()
137 { .addr = state->config->demod_address, .flags = I2C_M_RD, .buf = b1, .len = 1 } }; in cx24110_readreg()
139 ret = i2c_transfer(state->i2c, msg, 2); in cx24110_readreg()
159 /* The cx24110 manual tells us this reg is read-only. in cx24110_set_inversion()
175 return -EINVAL; in cx24110_set_inversion()
183 static const int rate[FEC_AUTO] = {-1, 1, 2, 3, 5, 7, -1}; in cx24110_set_fec()
184 static const int g1[FEC_AUTO] = {-1, 0x01, 0x02, 0x05, 0x15, 0x45, -1}; in cx24110_set_fec()
185 static const int g2[FEC_AUTO] = {-1, 0x01, 0x03, 0x06, 0x1a, 0x7a, -1}; in cx24110_set_fec()
188 searches all enabled viterbi rates, and can handle non-standard in cx24110_set_fec()
194 if (fec == FEC_AUTO) { /* (re-)establish AutoAcq behaviour */ in cx24110_set_fec()
211 return -EINVAL; in cx24110_set_fec()
230 return FEC_1_2 + i - 1; in cx24110_get_fec()
243 u32 ratio; in cx24110_set_symbolrate() local
289 ratio=(tmp/BDRI); in cx24110_set_symbolrate()
292 ratio=(ratio<<8)+(tmp/BDRI); in cx24110_set_symbolrate()
295 ratio=(ratio<<8)+(tmp/BDRI); in cx24110_set_symbolrate()
298 ratio=(ratio<<1)+(tmp/BDRI); in cx24110_set_symbolrate()
302 dprintk("ratio= %08x\n", ratio); in cx24110_set_symbolrate()
304 cx24110_writereg(state, 0x1, (ratio>>16)&0xff); in cx24110_set_symbolrate()
305 cx24110_writereg(state, 0x2, (ratio>>8)&0xff); in cx24110_set_symbolrate()
306 cx24110_writereg(state, 0x3, (ratio)&0xff); in cx24110_set_symbolrate()
314 struct cx24110_state *state = fe->demodulator_priv; in _cx24110_pll_write()
317 return -EINVAL; in _cx24110_pll_write()
319 /* tuner data is 21 bits long, must be left-aligned in data */ in _cx24110_pll_write()
356 struct cx24110_state *state = fe->demodulator_priv; in cx24110_initfe()
372 struct cx24110_state *state = fe->demodulator_priv; in cx24110_set_voltage()
380 return -EINVAL; in cx24110_set_voltage()
388 struct cx24110_state *state = fe->demodulator_priv; in cx24110_diseqc_send_burst()
396 return -EINVAL; in cx24110_diseqc_send_burst()
415 struct cx24110_state *state = fe->demodulator_priv; in cx24110_send_diseqc_msg()
418 if (cmd->msg_len < 3 || cmd->msg_len > 6) in cx24110_send_diseqc_msg()
419 return -EINVAL; /* not implemented */ in cx24110_send_diseqc_msg()
421 for (i = 0; i < cmd->msg_len; i++) in cx24110_send_diseqc_msg()
422 cx24110_writereg(state, 0x79 + i, cmd->msg[i]); in cx24110_send_diseqc_msg()
432 cx24110_writereg(state, 0x76, ((rv & 0x90) | 0x40) | ((cmd->msg_len-3) & 3)); in cx24110_send_diseqc_msg()
443 struct cx24110_state *state = fe->demodulator_priv; in cx24110_read_status()
471 struct cx24110_state *state = fe->demodulator_priv; in cx24110_read_ber()
477 state->lastber=cx24110_readreg(state,0x25)| in cx24110_read_ber()
482 *ber = state->lastber; in cx24110_read_ber()
489 struct cx24110_state *state = fe->demodulator_priv; in cx24110_read_signal_strength()
500 struct cx24110_state *state = fe->demodulator_priv; in cx24110_read_snr()
505 state->lastesn0=cx24110_readreg(state,0x69)| in cx24110_read_snr()
509 *snr = state->lastesn0; in cx24110_read_snr()
516 struct cx24110_state *state = fe->demodulator_priv; in cx24110_read_ucblocks()
525 state->lastbler=cx24110_readreg(state,0x12)| in cx24110_read_ucblocks()
530 *ucblocks = state->lastbler; in cx24110_read_ucblocks()
537 struct cx24110_state *state = fe->demodulator_priv; in cx24110_set_frontend()
538 struct dtv_frontend_properties *p = &fe->dtv_property_cache; in cx24110_set_frontend()
540 if (fe->ops.tuner_ops.set_params) { in cx24110_set_frontend()
541 fe->ops.tuner_ops.set_params(fe); in cx24110_set_frontend()
542 if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 0); in cx24110_set_frontend()
545 cx24110_set_inversion(state, p->inversion); in cx24110_set_frontend()
546 cx24110_set_fec(state, p->fec_inner); in cx24110_set_frontend()
547 cx24110_set_symbolrate(state, p->symbol_rate); in cx24110_set_frontend()
556 struct cx24110_state *state = fe->demodulator_priv; in cx24110_get_frontend()
573 p->frequency += afc; in cx24110_get_frontend()
574 p->inversion = (cx24110_readreg (state, 0x22) & 0x10) ? in cx24110_get_frontend()
576 p->fec_inner = cx24110_get_fec(state); in cx24110_get_frontend()
584 struct cx24110_state *state = fe->demodulator_priv; in cx24110_set_tone()
591 struct cx24110_state* state = fe->demodulator_priv; in cx24110_release()
608 state->config = config; in cx24110_attach()
609 state->i2c = i2c; in cx24110_attach()
610 state->lastber = 0; in cx24110_attach()
611 state->lastbler = 0; in cx24110_attach()
612 state->lastesn0 = 0; in cx24110_attach()
619 memcpy(&state->frontend.ops, &cx24110_ops, sizeof(struct dvb_frontend_ops)); in cx24110_attach()
620 state->frontend.demodulator_priv = state; in cx24110_attach()
621 return &state->frontend; in cx24110_attach()
631 .name = "Conexant CX24110 DVB-S",
665 MODULE_DESCRIPTION("Conexant CX24110 DVB-S Demodulator driver");