[media] tda8083: 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: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
parent
102a820d36
commit
042e5eb79f
|
@ -315,8 +315,9 @@ static int tda8083_read_ucblocks(struct dvb_frontend* fe, u32* ucblocks)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int tda8083_set_frontend(struct dvb_frontend* fe, struct dvb_frontend_parameters *p)
|
static int tda8083_set_frontend(struct dvb_frontend *fe)
|
||||||
{
|
{
|
||||||
|
struct dtv_frontend_properties *p = &fe->dtv_property_cache;
|
||||||
struct tda8083_state* state = fe->demodulator_priv;
|
struct tda8083_state* state = fe->demodulator_priv;
|
||||||
|
|
||||||
if (fe->ops.tuner_ops.set_params) {
|
if (fe->ops.tuner_ops.set_params) {
|
||||||
|
@ -325,8 +326,8 @@ static int tda8083_set_frontend(struct dvb_frontend* fe, struct dvb_frontend_par
|
||||||
}
|
}
|
||||||
|
|
||||||
tda8083_set_inversion (state, p->inversion);
|
tda8083_set_inversion (state, p->inversion);
|
||||||
tda8083_set_fec (state, p->u.qpsk.fec_inner);
|
tda8083_set_fec(state, p->fec_inner);
|
||||||
tda8083_set_symbolrate (state, p->u.qpsk.symbol_rate);
|
tda8083_set_symbolrate(state, p->symbol_rate);
|
||||||
|
|
||||||
tda8083_writereg (state, 0x00, 0x3c);
|
tda8083_writereg (state, 0x00, 0x3c);
|
||||||
tda8083_writereg (state, 0x00, 0x04);
|
tda8083_writereg (state, 0x00, 0x04);
|
||||||
|
@ -334,7 +335,7 @@ static int tda8083_set_frontend(struct dvb_frontend* fe, struct dvb_frontend_par
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int tda8083_get_frontend(struct dvb_frontend* fe, struct dvb_frontend_parameters *p)
|
static int tda8083_get_frontend(struct dvb_frontend *fe, struct dtv_frontend_properties *p)
|
||||||
{
|
{
|
||||||
struct tda8083_state* state = fe->demodulator_priv;
|
struct tda8083_state* state = fe->demodulator_priv;
|
||||||
|
|
||||||
|
@ -342,8 +343,8 @@ static int tda8083_get_frontend(struct dvb_frontend* fe, struct dvb_frontend_par
|
||||||
/*p->frequency = ???;*/
|
/*p->frequency = ???;*/
|
||||||
p->inversion = (tda8083_readreg (state, 0x0e) & 0x80) ?
|
p->inversion = (tda8083_readreg (state, 0x0e) & 0x80) ?
|
||||||
INVERSION_ON : INVERSION_OFF;
|
INVERSION_ON : INVERSION_OFF;
|
||||||
p->u.qpsk.fec_inner = tda8083_get_fec (state);
|
p->fec_inner = tda8083_get_fec(state);
|
||||||
/*p->u.qpsk.symbol_rate = tda8083_get_symbolrate (state);*/
|
/*p->symbol_rate = tda8083_get_symbolrate (state);*/
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -438,7 +439,7 @@ error:
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct dvb_frontend_ops tda8083_ops = {
|
static struct dvb_frontend_ops tda8083_ops = {
|
||||||
|
.delsys = { SYS_DVBS },
|
||||||
.info = {
|
.info = {
|
||||||
.name = "Philips TDA8083 DVB-S",
|
.name = "Philips TDA8083 DVB-S",
|
||||||
.type = FE_QPSK,
|
.type = FE_QPSK,
|
||||||
|
@ -461,8 +462,8 @@ static struct dvb_frontend_ops tda8083_ops = {
|
||||||
.init = tda8083_init,
|
.init = tda8083_init,
|
||||||
.sleep = tda8083_sleep,
|
.sleep = tda8083_sleep,
|
||||||
|
|
||||||
.set_frontend_legacy = tda8083_set_frontend,
|
.set_frontend = tda8083_set_frontend,
|
||||||
.get_frontend_legacy = tda8083_get_frontend,
|
.get_frontend = tda8083_get_frontend,
|
||||||
|
|
||||||
.read_status = tda8083_read_status,
|
.read_status = tda8083_read_status,
|
||||||
.read_signal_strength = tda8083_read_signal_strength,
|
.read_signal_strength = tda8083_read_signal_strength,
|
||||||
|
|
Loading…
Reference in New Issue