Lines Matching refs:fe
37 static void tda827x_set_std(struct dvb_frontend *fe, in tda827x_set_std() argument
40 struct tda827x_priv *priv = fe->tuner_priv; in tda827x_set_std()
123 static int tuner_transfer(struct dvb_frontend *fe, in tuner_transfer() argument
128 struct tda827x_priv *priv = fe->tuner_priv; in tuner_transfer()
130 if (fe->ops.i2c_gate_ctrl) in tuner_transfer()
131 fe->ops.i2c_gate_ctrl(fe, 1); in tuner_transfer()
133 if (fe->ops.i2c_gate_ctrl) in tuner_transfer()
134 fe->ops.i2c_gate_ctrl(fe, 0); in tuner_transfer()
142 static int tda827xo_set_params(struct dvb_frontend *fe) in tda827xo_set_params() argument
144 struct dtv_frontend_properties *c = &fe->dtv_property_cache; in tda827xo_set_params()
145 struct tda827x_priv *priv = fe->tuner_priv; in tda827xo_set_params()
194 rc = tuner_transfer(fe, &msg, 1); in tda827xo_set_params()
204 rc = tuner_transfer(fe, &msg, 1); in tda827xo_set_params()
219 static int tda827xo_sleep(struct dvb_frontend *fe) in tda827xo_sleep() argument
221 struct tda827x_priv *priv = fe->tuner_priv; in tda827xo_sleep()
227 tuner_transfer(fe, &msg, 1); in tda827xo_sleep()
230 priv->cfg->sleep(fe); in tda827xo_sleep()
237 static int tda827xo_set_analog_params(struct dvb_frontend *fe, in tda827xo_set_analog_params() argument
244 struct tda827x_priv *priv = fe->tuner_priv; in tda827xo_set_analog_params()
248 tda827x_set_std(fe, params); in tda827xo_set_analog_params()
277 tuner_transfer(fe, &msg, 1); in tda827xo_set_analog_params()
283 tuner_transfer(fe, &msg, 1); in tda827xo_set_analog_params()
287 tuner_transfer(fe, &msg, 1); in tda827xo_set_analog_params()
291 tuner_transfer(fe, &msg, 1); in tda827xo_set_analog_params()
296 tuner_transfer(fe, &msg, 1); in tda827xo_set_analog_params()
301 tuner_transfer(fe, &msg, 1); in tda827xo_set_analog_params()
306 tuner_transfer(fe, &msg, 1); in tda827xo_set_analog_params()
310 tuner_transfer(fe, &msg, 1); in tda827xo_set_analog_params()
314 tuner_transfer(fe, &msg, 1); in tda827xo_set_analog_params()
321 static void tda827xo_agcf(struct dvb_frontend *fe) in tda827xo_agcf() argument
323 struct tda827x_priv *priv = fe->tuner_priv; in tda827xo_agcf()
328 tuner_transfer(fe, &msg, 1); in tda827xo_agcf()
431 static int tda827xa_sleep(struct dvb_frontend *fe) in tda827xa_sleep() argument
433 struct tda827x_priv *priv = fe->tuner_priv; in tda827xa_sleep()
440 tuner_transfer(fe, &msg, 1); in tda827xa_sleep()
443 priv->cfg->sleep(fe); in tda827xa_sleep()
448 static void tda827xa_lna_gain(struct dvb_frontend *fe, int high, in tda827xa_lna_gain() argument
451 struct tda827x_priv *priv = fe->tuner_priv; in tda827xa_lna_gain()
484 if (fe->callback) in tda827xa_lna_gain()
485 fe->callback(priv->i2c_adap->algo_data, in tda827xa_lna_gain()
491 tuner_transfer(fe, &msg, 1); in tda827xa_lna_gain()
494 if (fe->callback) in tda827xa_lna_gain()
495 fe->callback(priv->i2c_adap->algo_data, in tda827xa_lna_gain()
501 static int tda827xa_set_params(struct dvb_frontend *fe) in tda827xa_set_params() argument
503 struct dtv_frontend_properties *c = &fe->dtv_property_cache; in tda827xa_set_params()
504 struct tda827x_priv *priv = fe->tuner_priv; in tda827xa_set_params()
516 tda827xa_lna_gain(fe, 1, NULL); in tda827xa_set_params()
563 rc = tuner_transfer(fe, &msg, 1); in tda827xa_set_params()
573 rc = tuner_transfer(fe, &msg, 1); in tda827xa_set_params()
580 rc = tuner_transfer(fe, &msg, 1); in tda827xa_set_params()
586 rc = tuner_transfer(fe, &msg, 1); in tda827xa_set_params()
594 tda827xa_lna_gain(fe, 0, NULL); in tda827xa_set_params()
597 rc = tuner_transfer(fe, &msg, 1); in tda827xa_set_params()
604 rc = tuner_transfer(fe, &msg, 1); in tda827xa_set_params()
610 rc = tuner_transfer(fe, &msg, 1); in tda827xa_set_params()
617 rc = tuner_transfer(fe, &msg, 1); in tda827xa_set_params()
624 rc = tuner_transfer(fe, &msg, 1); in tda827xa_set_params()
632 rc = tuner_transfer(fe, &msg, 1); in tda827xa_set_params()
648 static int tda827xa_set_analog_params(struct dvb_frontend *fe, in tda827xa_set_analog_params() argument
654 struct tda827x_priv *priv = fe->tuner_priv; in tda827xa_set_analog_params()
659 tda827x_set_std(fe, params); in tda827xa_set_analog_params()
661 tda827xa_lna_gain(fe, 1, params); in tda827xa_set_analog_params()
692 tuner_transfer(fe, &msg, 1); in tda827xa_set_analog_params()
700 tuner_transfer(fe, &msg, 1); in tda827xa_set_analog_params()
705 tuner_transfer(fe, &msg, 1); in tda827xa_set_analog_params()
709 tuner_transfer(fe, &msg, 1); in tda827xa_set_analog_params()
712 tuner_transfer(fe, &msg, 1); in tda827xa_set_analog_params()
717 tda827xa_lna_gain(fe, 0, params); in tda827xa_set_analog_params()
722 tuner_transfer(fe, &msg, 1); in tda827xa_set_analog_params()
727 tuner_transfer(fe, &msg, 1); in tda827xa_set_analog_params()
731 tuner_transfer(fe, &msg, 1); in tda827xa_set_analog_params()
735 tuner_transfer(fe, &msg, 1); in tda827xa_set_analog_params()
739 tuner_transfer(fe, &msg, 1); in tda827xa_set_analog_params()
746 static void tda827xa_agcf(struct dvb_frontend *fe) in tda827xa_agcf() argument
748 struct tda827x_priv *priv = fe->tuner_priv; in tda827xa_agcf()
752 tuner_transfer(fe, &msg, 1); in tda827xa_agcf()
757 static void tda827x_release(struct dvb_frontend *fe) in tda827x_release() argument
759 kfree(fe->tuner_priv); in tda827x_release()
760 fe->tuner_priv = NULL; in tda827x_release()
763 static int tda827x_get_frequency(struct dvb_frontend *fe, u32 *frequency) in tda827x_get_frequency() argument
765 struct tda827x_priv *priv = fe->tuner_priv; in tda827x_get_frequency()
770 static int tda827x_get_bandwidth(struct dvb_frontend *fe, u32 *bandwidth) in tda827x_get_bandwidth() argument
772 struct tda827x_priv *priv = fe->tuner_priv; in tda827x_get_bandwidth()
777 static int tda827x_init(struct dvb_frontend *fe) in tda827x_init() argument
779 struct tda827x_priv *priv = fe->tuner_priv; in tda827x_init()
782 priv->cfg->init(fe); in tda827x_init()
787 static int tda827x_probe_version(struct dvb_frontend *fe);
789 static int tda827x_initial_init(struct dvb_frontend *fe) in tda827x_initial_init() argument
792 ret = tda827x_probe_version(fe); in tda827x_initial_init()
795 return fe->ops.tuner_ops.init(fe); in tda827x_initial_init()
798 static int tda827x_initial_sleep(struct dvb_frontend *fe) in tda827x_initial_sleep() argument
801 ret = tda827x_probe_version(fe); in tda827x_initial_sleep()
804 return fe->ops.tuner_ops.sleep(fe); in tda827x_initial_sleep()
839 static int tda827x_probe_version(struct dvb_frontend *fe) in tda827x_probe_version() argument
843 struct tda827x_priv *priv = fe->tuner_priv; in tda827x_probe_version()
847 rc = tuner_transfer(fe, &msg, 1); in tda827x_probe_version()
856 fe->ops.tuner_ops.init = tda827x_init; in tda827x_probe_version()
857 fe->ops.tuner_ops.sleep = tda827xo_sleep; in tda827x_probe_version()
862 memcpy(&fe->ops.tuner_ops, &tda827xa_tuner_ops, sizeof(struct dvb_tuner_ops)); in tda827x_probe_version()
869 struct dvb_frontend *tda827x_attach(struct dvb_frontend *fe, int addr, in tda827x_attach() argument
883 memcpy(&fe->ops.tuner_ops, &tda827xo_tuner_ops, sizeof(struct dvb_tuner_ops)); in tda827x_attach()
884 fe->tuner_priv = priv; in tda827x_attach()
886 dprintk("type set to %s\n", fe->ops.tuner_ops.info.name); in tda827x_attach()
888 return fe; in tda827x_attach()