Commit 4be325c9 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab

[media] cx24110: convert set_fontend to use DVBv5 parameters

Instead of using dvb_frontend_parameters struct, that were
designed for a subset of the supported standards, use the DVBv5
cache information.

Also, fill the supported delivery systems at dvb_frontend_ops
struct.
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 19289a24
...@@ -531,25 +531,26 @@ static int cx24110_read_ucblocks(struct dvb_frontend* fe, u32* ucblocks) ...@@ -531,25 +531,26 @@ static int cx24110_read_ucblocks(struct dvb_frontend* fe, u32* ucblocks)
return 0; return 0;
} }
static int cx24110_set_frontend(struct dvb_frontend* fe, struct dvb_frontend_parameters *p) static int cx24110_set_frontend(struct dvb_frontend *fe)
{ {
struct cx24110_state *state = fe->demodulator_priv; struct cx24110_state *state = fe->demodulator_priv;
struct dtv_frontend_properties *p = &fe->dtv_property_cache;
if (fe->ops.tuner_ops.set_params) { if (fe->ops.tuner_ops.set_params) {
fe->ops.tuner_ops.set_params(fe); fe->ops.tuner_ops.set_params(fe);
if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 0); if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 0);
} }
cx24110_set_inversion (state, p->inversion); cx24110_set_inversion(state, p->inversion);
cx24110_set_fec (state, p->u.qpsk.fec_inner); cx24110_set_fec(state, p->fec_inner);
cx24110_set_symbolrate (state, p->u.qpsk.symbol_rate); cx24110_set_symbolrate(state, p->symbol_rate);
cx24110_writereg(state,0x04,0x05); /* start acquisition */ cx24110_writereg(state,0x04,0x05); /* start acquisition */
return 0; return 0;
} }
static int cx24110_get_frontend(struct dvb_frontend* fe, struct dvb_frontend_parameters *p) static int cx24110_get_frontend(struct dvb_frontend *fe,
struct dtv_frontend_properties *p)
{ {
struct cx24110_state *state = fe->demodulator_priv; struct cx24110_state *state = fe->demodulator_priv;
s32 afc; unsigned sclk; s32 afc; unsigned sclk;
...@@ -571,7 +572,7 @@ static int cx24110_get_frontend(struct dvb_frontend* fe, struct dvb_frontend_par ...@@ -571,7 +572,7 @@ static int cx24110_get_frontend(struct dvb_frontend* fe, struct dvb_frontend_par
p->frequency += afc; p->frequency += afc;
p->inversion = (cx24110_readreg (state, 0x22) & 0x10) ? p->inversion = (cx24110_readreg (state, 0x22) & 0x10) ?
INVERSION_ON : INVERSION_OFF; INVERSION_ON : INVERSION_OFF;
p->u.qpsk.fec_inner = cx24110_get_fec (state); p->fec_inner = cx24110_get_fec(state);
return 0; return 0;
} }
...@@ -623,7 +624,7 @@ struct dvb_frontend* cx24110_attach(const struct cx24110_config* config, ...@@ -623,7 +624,7 @@ struct dvb_frontend* cx24110_attach(const struct cx24110_config* config,
} }
static struct dvb_frontend_ops cx24110_ops = { static struct dvb_frontend_ops cx24110_ops = {
.delsys = { SYS_DVBS },
.info = { .info = {
.name = "Conexant CX24110 DVB-S", .name = "Conexant CX24110 DVB-S",
.type = FE_QPSK, .type = FE_QPSK,
...@@ -643,8 +644,8 @@ static struct dvb_frontend_ops cx24110_ops = { ...@@ -643,8 +644,8 @@ static struct dvb_frontend_ops cx24110_ops = {
.init = cx24110_initfe, .init = cx24110_initfe,
.write = _cx24110_pll_write, .write = _cx24110_pll_write,
.set_frontend_legacy = cx24110_set_frontend, .set_frontend = cx24110_set_frontend,
.get_frontend_legacy = cx24110_get_frontend, .get_frontend = cx24110_get_frontend,
.read_status = cx24110_read_status, .read_status = cx24110_read_status,
.read_ber = cx24110_read_ber, .read_ber = cx24110_read_ber,
.read_signal_strength = cx24110_read_signal_strength, .read_signal_strength = cx24110_read_signal_strength,
......
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