diff options
author | Igor M. Liplianin <liplianin@me.by> | 2011-02-25 16:41:24 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-03-21 19:32:27 -0400 |
commit | dcc8a122230b1c65ee8ba83536fd53fcaf27884d (patch) | |
tree | c3c12b63dac7c2f163a025980809c3605b1ea850 /drivers/media/dvb/frontends/ds3000.c | |
parent | a5bf834b4a29b0c7f813ce1c456563c470d4181f (diff) |
[media] ds3000: hardware tune algorithm
Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb/frontends/ds3000.c')
-rw-r--r-- | drivers/media/dvb/frontends/ds3000.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/drivers/media/dvb/frontends/ds3000.c b/drivers/media/dvb/frontends/ds3000.c index a0bf70f0d044..2ae569989655 100644 --- a/drivers/media/dvb/frontends/ds3000.c +++ b/drivers/media/dvb/frontends/ds3000.c | |||
@@ -967,22 +967,21 @@ static int ds3000_set_carrier_offset(struct dvb_frontend *fe, | |||
967 | return 0; | 967 | return 0; |
968 | } | 968 | } |
969 | 969 | ||
970 | static int ds3000_tune(struct dvb_frontend *fe, | 970 | static int ds3000_set_frontend(struct dvb_frontend *fe, |
971 | struct dvb_frontend_parameters *p) | 971 | struct dvb_frontend_parameters *p) |
972 | { | 972 | { |
973 | struct ds3000_state *state = fe->demodulator_priv; | 973 | struct ds3000_state *state = fe->demodulator_priv; |
974 | struct dtv_frontend_properties *c = &fe->dtv_property_cache; | 974 | struct dtv_frontend_properties *c = &fe->dtv_property_cache; |
975 | 975 | ||
976 | int i; | 976 | int i; |
977 | u8 status, mlpf, mlpf_new, mlpf_max, mlpf_min, nlpf, div4; | 977 | fe_status_t status; |
978 | u8 mlpf, mlpf_new, mlpf_max, mlpf_min, nlpf, div4; | ||
978 | s32 offset_khz; | 979 | s32 offset_khz; |
979 | u16 value, ndiv; | 980 | u16 value, ndiv; |
980 | u32 f3db; | 981 | u32 f3db; |
981 | 982 | ||
982 | dprintk("%s() ", __func__); | 983 | dprintk("%s() ", __func__); |
983 | 984 | ||
984 | /* Reset status register */ | ||
985 | status = 0; | ||
986 | /* Tune */ | 985 | /* Tune */ |
987 | /* unknown */ | 986 | /* unknown */ |
988 | ds3000_tuner_writereg(state, 0x07, 0x02); | 987 | ds3000_tuner_writereg(state, 0x07, 0x02); |
@@ -1218,10 +1217,16 @@ static int ds3000_tune(struct dvb_frontend *fe, | |||
1218 | return 0; | 1217 | return 0; |
1219 | } | 1218 | } |
1220 | 1219 | ||
1220 | static int ds3000_tune(struct dvb_frontend *fe, | ||
1221 | struct dvb_frontend_parameters *p) | ||
1222 | { | ||
1223 | return ds3000_set_frontend(fe, p); | ||
1224 | } | ||
1225 | |||
1221 | static enum dvbfe_algo ds3000_get_algo(struct dvb_frontend *fe) | 1226 | static enum dvbfe_algo ds3000_get_algo(struct dvb_frontend *fe) |
1222 | { | 1227 | { |
1223 | dprintk("%s()\n", __func__); | 1228 | dprintk("%s()\n", __func__); |
1224 | return DVBFE_ALGO_SW; | 1229 | return DVBFE_ALGO_HW; |
1225 | } | 1230 | } |
1226 | 1231 | ||
1227 | /* | 1232 | /* |
@@ -1296,7 +1301,8 @@ static struct dvb_frontend_ops ds3000_ops = { | |||
1296 | 1301 | ||
1297 | .set_property = ds3000_set_property, | 1302 | .set_property = ds3000_set_property, |
1298 | .get_property = ds3000_get_property, | 1303 | .get_property = ds3000_get_property, |
1299 | .set_frontend = ds3000_tune, | 1304 | .set_frontend = ds3000_set_frontend, |
1305 | .tune = ds3000_tune, | ||
1300 | }; | 1306 | }; |
1301 | 1307 | ||
1302 | module_param(debug, int, 0644); | 1308 | module_param(debug, int, 0644); |