Lines Matching full:fe
50 static int tda8290_i2c_bridge(struct dvb_frontend *fe, int close) in tda8290_i2c_bridge() argument
52 struct tda8290_priv *priv = fe->analog_demod_priv; in tda8290_i2c_bridge()
71 static int tda8295_i2c_bridge(struct dvb_frontend *fe, int close) in tda8295_i2c_bridge() argument
73 struct tda8290_priv *priv = fe->analog_demod_priv; in tda8295_i2c_bridge()
103 static void set_audio(struct dvb_frontend *fe, in set_audio() argument
106 struct tda8290_priv *priv = fe->analog_demod_priv; in set_audio()
164 static void tda8290_set_params(struct dvb_frontend *fe, in tda8290_set_params() argument
167 struct tda8290_priv *priv = fe->analog_demod_priv; in tda8290_set_params()
191 set_audio(fe, params); in tda8290_set_params()
225 if (fe->ops.analog_ops.i2c_gate_ctrl) in tda8290_set_params()
226 fe->ops.analog_ops.i2c_gate_ctrl(fe, 1); in tda8290_set_params()
228 if (fe->ops.tuner_ops.set_analog_params) in tda8290_set_params()
229 fe->ops.tuner_ops.set_analog_params(fe, params); in tda8290_set_params()
262 priv->cfg.agcf(fe); in tda8290_set_params()
295 if (fe->ops.analog_ops.i2c_gate_ctrl) in tda8290_set_params()
296 fe->ops.analog_ops.i2c_gate_ctrl(fe, 0); in tda8290_set_params()
302 static void tda8295_power(struct dvb_frontend *fe, int enable) in tda8295_power() argument
304 struct tda8290_priv *priv = fe->analog_demod_priv; in tda8295_power()
317 static void tda8295_set_easy_mode(struct dvb_frontend *fe, int enable) in tda8295_set_easy_mode() argument
319 struct tda8290_priv *priv = fe->analog_demod_priv; in tda8295_set_easy_mode()
332 static void tda8295_set_video_std(struct dvb_frontend *fe) in tda8295_set_video_std() argument
334 struct tda8290_priv *priv = fe->analog_demod_priv; in tda8295_set_video_std()
339 tda8295_set_easy_mode(fe, 1); in tda8295_set_video_std()
341 tda8295_set_easy_mode(fe, 0); in tda8295_set_video_std()
346 static void tda8295_agc1_out(struct dvb_frontend *fe, int enable) in tda8295_agc1_out() argument
348 struct tda8290_priv *priv = fe->analog_demod_priv; in tda8295_agc1_out()
361 static void tda8295_agc2_out(struct dvb_frontend *fe, int enable) in tda8295_agc2_out() argument
363 struct tda8290_priv *priv = fe->analog_demod_priv; in tda8295_agc2_out()
382 static int tda8295_has_signal(struct dvb_frontend *fe, u16 *signal) in tda8295_has_signal() argument
384 struct tda8290_priv *priv = fe->analog_demod_priv; in tda8295_has_signal()
396 static void tda8295_set_params(struct dvb_frontend *fe, in tda8295_set_params() argument
399 struct tda8290_priv *priv = fe->analog_demod_priv; in tda8295_set_params()
403 set_audio(fe, params); in tda8295_set_params()
407 tda8295_power(fe, 1); in tda8295_set_params()
408 tda8295_agc1_out(fe, 1); in tda8295_set_params()
413 tda8295_set_video_std(fe); in tda8295_set_params()
419 if (fe->ops.analog_ops.i2c_gate_ctrl) in tda8295_set_params()
420 fe->ops.analog_ops.i2c_gate_ctrl(fe, 1); in tda8295_set_params()
422 if (fe->ops.tuner_ops.set_analog_params) in tda8295_set_params()
423 fe->ops.tuner_ops.set_analog_params(fe, params); in tda8295_set_params()
426 priv->cfg.agcf(fe); in tda8295_set_params()
428 tda8295_has_signal(fe, &signal); in tda8295_set_params()
434 if (fe->ops.analog_ops.i2c_gate_ctrl) in tda8295_set_params()
435 fe->ops.analog_ops.i2c_gate_ctrl(fe, 0); in tda8295_set_params()
440 static int tda8290_has_signal(struct dvb_frontend *fe, u16 *signal) in tda8290_has_signal() argument
442 struct tda8290_priv *priv = fe->analog_demod_priv; in tda8290_has_signal()
455 static void tda8290_standby(struct dvb_frontend *fe) in tda8290_standby() argument
457 struct tda8290_priv *priv = fe->analog_demod_priv; in tda8290_standby()
464 if (fe->ops.analog_ops.i2c_gate_ctrl) in tda8290_standby()
465 fe->ops.analog_ops.i2c_gate_ctrl(fe, 1); in tda8290_standby()
469 if (fe->ops.analog_ops.i2c_gate_ctrl) in tda8290_standby()
470 fe->ops.analog_ops.i2c_gate_ctrl(fe, 0); in tda8290_standby()
475 static void tda8295_standby(struct dvb_frontend *fe) in tda8295_standby() argument
477 tda8295_agc1_out(fe, 0); /* Put AGC in tri-state */ in tda8295_standby()
479 tda8295_power(fe, 0); in tda8295_standby()
482 static void tda8290_init_if(struct dvb_frontend *fe) in tda8290_init_if() argument
484 struct tda8290_priv *priv = fe->analog_demod_priv; in tda8290_init_if()
498 static void tda8295_init_if(struct dvb_frontend *fe) in tda8295_init_if() argument
500 struct tda8290_priv *priv = fe->analog_demod_priv; in tda8295_init_if()
510 tda8295_power(fe, 1); in tda8295_init_if()
512 tda8295_set_easy_mode(fe, 0); in tda8295_init_if()
513 tda8295_set_video_std(fe); in tda8295_init_if()
523 tda8295_agc1_out(fe, 0); in tda8295_init_if()
524 tda8295_agc2_out(fe, 0); in tda8295_init_if()
527 static void tda8290_init_tuner(struct dvb_frontend *fe) in tda8290_init_tuner() argument
529 struct tda8290_priv *priv = fe->analog_demod_priv; in tda8290_init_tuner()
541 if (fe->ops.analog_ops.i2c_gate_ctrl) in tda8290_init_tuner()
542 fe->ops.analog_ops.i2c_gate_ctrl(fe, 1); in tda8290_init_tuner()
544 if (fe->ops.analog_ops.i2c_gate_ctrl) in tda8290_init_tuner()
545 fe->ops.analog_ops.i2c_gate_ctrl(fe, 0); in tda8290_init_tuner()
550 static void tda829x_release(struct dvb_frontend *fe) in tda829x_release() argument
552 struct tda8290_priv *priv = fe->analog_demod_priv; in tda829x_release()
557 if (fe->ops.tuner_ops.release) in tda829x_release()
558 fe->ops.tuner_ops.release(fe); in tda829x_release()
560 kfree(fe->analog_demod_priv); in tda829x_release()
561 fe->analog_demod_priv = NULL; in tda829x_release()
568 static int tda829x_find_tuner(struct dvb_frontend *fe) in tda829x_find_tuner() argument
570 struct tda8290_priv *priv = fe->analog_demod_priv; in tda829x_find_tuner()
576 if (fe->ops.analog_ops.i2c_gate_ctrl) in tda829x_find_tuner()
577 fe->ops.analog_ops.i2c_gate_ctrl(fe, 1); in tda829x_find_tuner()
595 if (fe->ops.analog_ops.i2c_gate_ctrl) in tda829x_find_tuner()
596 fe->ops.analog_ops.i2c_gate_ctrl(fe, 0); in tda829x_find_tuner()
619 if (fe->ops.analog_ops.i2c_gate_ctrl) in tda829x_find_tuner()
620 fe->ops.analog_ops.i2c_gate_ctrl(fe, 1); in tda829x_find_tuner()
625 if (fe->ops.analog_ops.i2c_gate_ctrl) in tda829x_find_tuner()
626 fe->ops.analog_ops.i2c_gate_ctrl(fe, 0); in tda829x_find_tuner()
634 dvb_attach(tda18271_attach, fe, priv->tda827x_addr, in tda829x_find_tuner()
642 dvb_attach(tda827x_attach, fe, priv->tda827x_addr, in tda829x_find_tuner()
646 if (fe->ops.tuner_ops.init) in tda829x_find_tuner()
647 fe->ops.tuner_ops.init(fe); in tda829x_find_tuner()
649 if (fe->ops.tuner_ops.sleep) in tda829x_find_tuner()
650 fe->ops.tuner_ops.sleep(fe); in tda829x_find_tuner()
652 if (fe->ops.analog_ops.i2c_gate_ctrl) in tda829x_find_tuner()
653 fe->ops.analog_ops.i2c_gate_ctrl(fe, 0); in tda829x_find_tuner()
730 struct dvb_frontend *tda829x_attach(struct dvb_frontend *fe, in tda829x_attach() argument
740 fe->analog_demod_priv = priv; in tda829x_attach()
752 memcpy(&fe->ops.analog_ops, &tda8290_ops, in tda829x_attach()
758 memcpy(&fe->ops.analog_ops, &tda8295_ops, in tda829x_attach()
763 fe->ops.analog_ops.i2c_gate_ctrl = NULL; in tda829x_attach()
766 tda8295_power(fe, 1); in tda829x_attach()
767 if (tda829x_find_tuner(fe) < 0) in tda829x_attach()
801 fe->ops.analog_ops.info.name = name; in tda829x_attach()
805 tda8290_init_tuner(fe); in tda829x_attach()
806 tda8290_init_if(fe); in tda829x_attach()
808 tda8295_init_if(fe); in tda829x_attach()
810 return fe; in tda829x_attach()
813 memset(&fe->ops.analog_ops, 0, sizeof(struct analog_demod_ops)); in tda829x_attach()
815 tda829x_release(fe); in tda829x_attach()