Commit dcc8a122 authored by Igor M. Liplianin's avatar Igor M. Liplianin Committed by Mauro Carvalho Chehab

[media] ds3000: hardware tune algorithm

Signed-off-by: default avatarIgor M. Liplianin <liplianin@me.by>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent a5bf834b
...@@ -967,22 +967,21 @@ static int ds3000_set_carrier_offset(struct dvb_frontend *fe, ...@@ -967,22 +967,21 @@ static int ds3000_set_carrier_offset(struct dvb_frontend *fe,
return 0; return 0;
} }
static int ds3000_tune(struct dvb_frontend *fe, static int ds3000_set_frontend(struct dvb_frontend *fe,
struct dvb_frontend_parameters *p) struct dvb_frontend_parameters *p)
{ {
struct ds3000_state *state = fe->demodulator_priv; struct ds3000_state *state = fe->demodulator_priv;
struct dtv_frontend_properties *c = &fe->dtv_property_cache; struct dtv_frontend_properties *c = &fe->dtv_property_cache;
int i; int i;
u8 status, mlpf, mlpf_new, mlpf_max, mlpf_min, nlpf, div4; fe_status_t status;
u8 mlpf, mlpf_new, mlpf_max, mlpf_min, nlpf, div4;
s32 offset_khz; s32 offset_khz;
u16 value, ndiv; u16 value, ndiv;
u32 f3db; u32 f3db;
dprintk("%s() ", __func__); dprintk("%s() ", __func__);
/* Reset status register */
status = 0;
/* Tune */ /* Tune */
/* unknown */ /* unknown */
ds3000_tuner_writereg(state, 0x07, 0x02); ds3000_tuner_writereg(state, 0x07, 0x02);
...@@ -1218,10 +1217,16 @@ static int ds3000_tune(struct dvb_frontend *fe, ...@@ -1218,10 +1217,16 @@ static int ds3000_tune(struct dvb_frontend *fe,
return 0; return 0;
} }
static int ds3000_tune(struct dvb_frontend *fe,
struct dvb_frontend_parameters *p)
{
return ds3000_set_frontend(fe, p);
}
static enum dvbfe_algo ds3000_get_algo(struct dvb_frontend *fe) static enum dvbfe_algo ds3000_get_algo(struct dvb_frontend *fe)
{ {
dprintk("%s()\n", __func__); dprintk("%s()\n", __func__);
return DVBFE_ALGO_SW; return DVBFE_ALGO_HW;
} }
/* /*
...@@ -1296,7 +1301,8 @@ static struct dvb_frontend_ops ds3000_ops = { ...@@ -1296,7 +1301,8 @@ static struct dvb_frontend_ops ds3000_ops = {
.set_property = ds3000_set_property, .set_property = ds3000_set_property,
.get_property = ds3000_get_property, .get_property = ds3000_get_property,
.set_frontend = ds3000_tune, .set_frontend = ds3000_set_frontend,
.tune = ds3000_tune,
}; };
module_param(debug, int, 0644); module_param(debug, int, 0644);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment