Lines Matching refs:fe
50 static void tda827x_set_std(struct dvb_frontend *fe, in tda827x_set_std() argument
53 struct tda827x_priv *priv = fe->tuner_priv; in tda827x_set_std()
136 static int tuner_transfer(struct dvb_frontend *fe, in tuner_transfer() argument
141 struct tda827x_priv *priv = fe->tuner_priv; in tuner_transfer()
143 if (fe->ops.i2c_gate_ctrl) in tuner_transfer()
144 fe->ops.i2c_gate_ctrl(fe, 1); in tuner_transfer()
146 if (fe->ops.i2c_gate_ctrl) in tuner_transfer()
147 fe->ops.i2c_gate_ctrl(fe, 0); in tuner_transfer()
155 static int tda827xo_set_params(struct dvb_frontend *fe) in tda827xo_set_params() argument
157 struct dtv_frontend_properties *c = &fe->dtv_property_cache; in tda827xo_set_params()
158 struct tda827x_priv *priv = fe->tuner_priv; in tda827xo_set_params()
207 rc = tuner_transfer(fe, &msg, 1); in tda827xo_set_params()
217 rc = tuner_transfer(fe, &msg, 1); in tda827xo_set_params()
232 static int tda827xo_sleep(struct dvb_frontend *fe) in tda827xo_sleep() argument
234 struct tda827x_priv *priv = fe->tuner_priv; in tda827xo_sleep()
240 tuner_transfer(fe, &msg, 1); in tda827xo_sleep()
243 priv->cfg->sleep(fe); in tda827xo_sleep()
250 static int tda827xo_set_analog_params(struct dvb_frontend *fe, in tda827xo_set_analog_params() argument
257 struct tda827x_priv *priv = fe->tuner_priv; in tda827xo_set_analog_params()
261 tda827x_set_std(fe, params); in tda827xo_set_analog_params()
290 tuner_transfer(fe, &msg, 1); in tda827xo_set_analog_params()
296 tuner_transfer(fe, &msg, 1); in tda827xo_set_analog_params()
300 tuner_transfer(fe, &msg, 1); in tda827xo_set_analog_params()
304 tuner_transfer(fe, &msg, 1); in tda827xo_set_analog_params()
309 tuner_transfer(fe, &msg, 1); in tda827xo_set_analog_params()
314 tuner_transfer(fe, &msg, 1); in tda827xo_set_analog_params()
319 tuner_transfer(fe, &msg, 1); in tda827xo_set_analog_params()
323 tuner_transfer(fe, &msg, 1); in tda827xo_set_analog_params()
327 tuner_transfer(fe, &msg, 1); in tda827xo_set_analog_params()
334 static void tda827xo_agcf(struct dvb_frontend *fe) in tda827xo_agcf() argument
336 struct tda827x_priv *priv = fe->tuner_priv; in tda827xo_agcf()
341 tuner_transfer(fe, &msg, 1); in tda827xo_agcf()
444 static int tda827xa_sleep(struct dvb_frontend *fe) in tda827xa_sleep() argument
446 struct tda827x_priv *priv = fe->tuner_priv; in tda827xa_sleep()
453 tuner_transfer(fe, &msg, 1); in tda827xa_sleep()
456 priv->cfg->sleep(fe); in tda827xa_sleep()
461 static void tda827xa_lna_gain(struct dvb_frontend *fe, int high, in tda827xa_lna_gain() argument
464 struct tda827x_priv *priv = fe->tuner_priv; in tda827xa_lna_gain()
497 if (fe->callback) in tda827xa_lna_gain()
498 fe->callback(priv->i2c_adap->algo_data, in tda827xa_lna_gain()
504 tuner_transfer(fe, &msg, 1); in tda827xa_lna_gain()
507 if (fe->callback) in tda827xa_lna_gain()
508 fe->callback(priv->i2c_adap->algo_data, in tda827xa_lna_gain()
514 static int tda827xa_set_params(struct dvb_frontend *fe) in tda827xa_set_params() argument
516 struct dtv_frontend_properties *c = &fe->dtv_property_cache; in tda827xa_set_params()
517 struct tda827x_priv *priv = fe->tuner_priv; in tda827xa_set_params()
529 tda827xa_lna_gain(fe, 1, NULL); in tda827xa_set_params()
576 rc = tuner_transfer(fe, &msg, 1); in tda827xa_set_params()
586 rc = tuner_transfer(fe, &msg, 1); in tda827xa_set_params()
593 rc = tuner_transfer(fe, &msg, 1); in tda827xa_set_params()
599 rc = tuner_transfer(fe, &msg, 1); in tda827xa_set_params()
607 tda827xa_lna_gain(fe, 0, NULL); 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()
623 rc = tuner_transfer(fe, &msg, 1); in tda827xa_set_params()
630 rc = tuner_transfer(fe, &msg, 1); in tda827xa_set_params()
637 rc = tuner_transfer(fe, &msg, 1); in tda827xa_set_params()
645 rc = tuner_transfer(fe, &msg, 1); in tda827xa_set_params()
661 static int tda827xa_set_analog_params(struct dvb_frontend *fe, in tda827xa_set_analog_params() argument
667 struct tda827x_priv *priv = fe->tuner_priv; in tda827xa_set_analog_params()
672 tda827x_set_std(fe, params); in tda827xa_set_analog_params()
674 tda827xa_lna_gain(fe, 1, params); in tda827xa_set_analog_params()
705 tuner_transfer(fe, &msg, 1); in tda827xa_set_analog_params()
713 tuner_transfer(fe, &msg, 1); in tda827xa_set_analog_params()
718 tuner_transfer(fe, &msg, 1); in tda827xa_set_analog_params()
722 tuner_transfer(fe, &msg, 1); in tda827xa_set_analog_params()
725 tuner_transfer(fe, &msg, 1); in tda827xa_set_analog_params()
730 tda827xa_lna_gain(fe, 0, params); in tda827xa_set_analog_params()
735 tuner_transfer(fe, &msg, 1); in tda827xa_set_analog_params()
740 tuner_transfer(fe, &msg, 1); in tda827xa_set_analog_params()
744 tuner_transfer(fe, &msg, 1); in tda827xa_set_analog_params()
748 tuner_transfer(fe, &msg, 1); in tda827xa_set_analog_params()
752 tuner_transfer(fe, &msg, 1); in tda827xa_set_analog_params()
759 static void tda827xa_agcf(struct dvb_frontend *fe) in tda827xa_agcf() argument
761 struct tda827x_priv *priv = fe->tuner_priv; in tda827xa_agcf()
765 tuner_transfer(fe, &msg, 1); in tda827xa_agcf()
770 static int tda827x_release(struct dvb_frontend *fe) in tda827x_release() argument
772 kfree(fe->tuner_priv); in tda827x_release()
773 fe->tuner_priv = NULL; in tda827x_release()
777 static int tda827x_get_frequency(struct dvb_frontend *fe, u32 *frequency) in tda827x_get_frequency() argument
779 struct tda827x_priv *priv = fe->tuner_priv; in tda827x_get_frequency()
784 static int tda827x_get_bandwidth(struct dvb_frontend *fe, u32 *bandwidth) in tda827x_get_bandwidth() argument
786 struct tda827x_priv *priv = fe->tuner_priv; in tda827x_get_bandwidth()
791 static int tda827x_init(struct dvb_frontend *fe) in tda827x_init() argument
793 struct tda827x_priv *priv = fe->tuner_priv; in tda827x_init()
796 priv->cfg->init(fe); in tda827x_init()
801 static int tda827x_probe_version(struct dvb_frontend *fe);
803 static int tda827x_initial_init(struct dvb_frontend *fe) in tda827x_initial_init() argument
806 ret = tda827x_probe_version(fe); in tda827x_initial_init()
809 return fe->ops.tuner_ops.init(fe); in tda827x_initial_init()
812 static int tda827x_initial_sleep(struct dvb_frontend *fe) in tda827x_initial_sleep() argument
815 ret = tda827x_probe_version(fe); in tda827x_initial_sleep()
818 return fe->ops.tuner_ops.sleep(fe); in tda827x_initial_sleep()
853 static int tda827x_probe_version(struct dvb_frontend *fe) in tda827x_probe_version() argument
857 struct tda827x_priv *priv = fe->tuner_priv; in tda827x_probe_version()
861 rc = tuner_transfer(fe, &msg, 1); in tda827x_probe_version()
870 fe->ops.tuner_ops.init = tda827x_init; in tda827x_probe_version()
871 fe->ops.tuner_ops.sleep = tda827xo_sleep; in tda827x_probe_version()
876 memcpy(&fe->ops.tuner_ops, &tda827xa_tuner_ops, sizeof(struct dvb_tuner_ops)); in tda827x_probe_version()
883 struct dvb_frontend *tda827x_attach(struct dvb_frontend *fe, int addr, in tda827x_attach() argument
897 memcpy(&fe->ops.tuner_ops, &tda827xo_tuner_ops, sizeof(struct dvb_tuner_ops)); in tda827x_attach()
898 fe->tuner_priv = priv; in tda827x_attach()
900 dprintk("type set to %s\n", fe->ops.tuner_ops.info.name); in tda827x_attach()
902 return fe; in tda827x_attach()