diff options
-rw-r--r-- | drivers/media/dvb/ttpci/budget-av.c | 26 |
1 files changed, 3 insertions, 23 deletions
diff --git a/drivers/media/dvb/ttpci/budget-av.c b/drivers/media/dvb/ttpci/budget-av.c index 8de19cefb24d..1b590b2f8a5a 100644 --- a/drivers/media/dvb/ttpci/budget-av.c +++ b/drivers/media/dvb/ttpci/budget-av.c | |||
@@ -828,28 +828,6 @@ static u8 philips_sd1878_inittab[] = { | |||
828 | 0xff, 0xff | 828 | 0xff, 0xff |
829 | }; | 829 | }; |
830 | 830 | ||
831 | static int philips_sd1878_tda8261_tuner_set_params(struct dvb_frontend *fe, | ||
832 | struct dvb_frontend_parameters *params) | ||
833 | { | ||
834 | u8 buf[4]; | ||
835 | int rc; | ||
836 | struct i2c_msg tuner_msg = {.addr=0x60,.flags=0,.buf=buf,.len=sizeof(buf)}; | ||
837 | struct budget *budget = (struct budget *) fe->dvb->priv; | ||
838 | |||
839 | if((params->frequency < 950000) || (params->frequency > 2150000)) | ||
840 | return -EINVAL; | ||
841 | |||
842 | rc=dvb_pll_configure(&dvb_pll_philips_sd1878_tda8261, buf, params); | ||
843 | if(rc < 0) return rc; | ||
844 | |||
845 | if (fe->ops.i2c_gate_ctrl) | ||
846 | fe->ops.i2c_gate_ctrl(fe, 1); | ||
847 | if(i2c_transfer(&budget->i2c_adap, &tuner_msg, 1) != 1) | ||
848 | return -EIO; | ||
849 | |||
850 | return 0; | ||
851 | } | ||
852 | |||
853 | static int philips_sd1878_ci_set_symbol_rate(struct dvb_frontend *fe, | 831 | static int philips_sd1878_ci_set_symbol_rate(struct dvb_frontend *fe, |
854 | u32 srate, u32 ratio) | 832 | u32 srate, u32 ratio) |
855 | { | 833 | { |
@@ -984,7 +962,9 @@ static void frontend_init(struct budget_av *budget_av) | |||
984 | fe = dvb_attach(stv0299_attach, &philips_sd1878_config, | 962 | fe = dvb_attach(stv0299_attach, &philips_sd1878_config, |
985 | &budget_av->budget.i2c_adap); | 963 | &budget_av->budget.i2c_adap); |
986 | if (fe) { | 964 | if (fe) { |
987 | fe->ops.tuner_ops.set_params = philips_sd1878_tda8261_tuner_set_params; | 965 | dvb_attach(dvb_pll_attach, fe, 0x60, |
966 | &budget_av->budget.i2c_adap, | ||
967 | &dvb_pll_philips_sd1878_tda8261); | ||
988 | } | 968 | } |
989 | break; | 969 | break; |
990 | 970 | ||