forked from luck/tmp_suning_uos_patched
[media] friio-fe: 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
adcc8f0e19
commit
955c41c09c
@ -283,22 +283,23 @@ static int jdvbt90502_set_property(struct dvb_frontend *fe,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int jdvbt90502_get_frontend(struct dvb_frontend *fe,
|
static int jdvbt90502_get_frontend(struct dvb_frontend *fe,
|
||||||
struct dvb_frontend_parameters *p)
|
struct dtv_frontend_properties *p)
|
||||||
{
|
{
|
||||||
p->inversion = INVERSION_AUTO;
|
p->inversion = INVERSION_AUTO;
|
||||||
p->u.ofdm.bandwidth = BANDWIDTH_6_MHZ;
|
p->bandwidth_hz = 6000000;
|
||||||
p->u.ofdm.code_rate_HP = FEC_AUTO;
|
p->code_rate_HP = FEC_AUTO;
|
||||||
p->u.ofdm.code_rate_LP = FEC_AUTO;
|
p->code_rate_LP = FEC_AUTO;
|
||||||
p->u.ofdm.constellation = QAM_64;
|
p->modulation = QAM_64;
|
||||||
p->u.ofdm.transmission_mode = TRANSMISSION_MODE_AUTO;
|
p->transmission_mode = TRANSMISSION_MODE_AUTO;
|
||||||
p->u.ofdm.guard_interval = GUARD_INTERVAL_AUTO;
|
p->guard_interval = GUARD_INTERVAL_AUTO;
|
||||||
p->u.ofdm.hierarchy_information = HIERARCHY_AUTO;
|
p->hierarchy = HIERARCHY_AUTO;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int jdvbt90502_set_frontend(struct dvb_frontend *fe,
|
static int jdvbt90502_set_frontend(struct dvb_frontend *fe)
|
||||||
struct dvb_frontend_parameters *p)
|
|
||||||
{
|
{
|
||||||
|
struct dtv_frontend_properties *p = &fe->dtv_property_cache;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* NOTE: ignore all the parameters except frequency.
|
* NOTE: ignore all the parameters except frequency.
|
||||||
* others should be fixed to the proper value for ISDB-T,
|
* others should be fixed to the proper value for ISDB-T,
|
||||||
@ -438,14 +439,13 @@ struct dvb_frontend *jdvbt90502_attach(struct dvb_usb_device *d)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static struct dvb_frontend_ops jdvbt90502_ops = {
|
static struct dvb_frontend_ops jdvbt90502_ops = {
|
||||||
|
.delsys = { SYS_ISDBT },
|
||||||
.info = {
|
.info = {
|
||||||
.name = "Comtech JDVBT90502 ISDB-T",
|
.name = "Comtech JDVBT90502 ISDB-T",
|
||||||
.type = FE_OFDM,
|
.type = FE_OFDM,
|
||||||
.frequency_min = 473000000, /* UHF 13ch, center */
|
.frequency_min = 473000000, /* UHF 13ch, center */
|
||||||
.frequency_max = 767142857, /* UHF 62ch, center */
|
.frequency_max = 767142857, /* UHF 62ch, center */
|
||||||
.frequency_stepsize = JDVBT90502_PLL_CLK /
|
.frequency_stepsize = JDVBT90502_PLL_CLK / JDVBT90502_PLL_DIVIDER,
|
||||||
JDVBT90502_PLL_DIVIDER,
|
|
||||||
.frequency_tolerance = 0,
|
.frequency_tolerance = 0,
|
||||||
|
|
||||||
/* NOTE: this driver ignores all parameters but frequency. */
|
/* NOTE: this driver ignores all parameters but frequency. */
|
||||||
@ -466,8 +466,8 @@ static struct dvb_frontend_ops jdvbt90502_ops = {
|
|||||||
|
|
||||||
.set_property = jdvbt90502_set_property,
|
.set_property = jdvbt90502_set_property,
|
||||||
|
|
||||||
.set_frontend_legacy = jdvbt90502_set_frontend,
|
.set_frontend = jdvbt90502_set_frontend,
|
||||||
.get_frontend_legacy = jdvbt90502_get_frontend,
|
.get_frontend = jdvbt90502_get_frontend,
|
||||||
|
|
||||||
.read_status = jdvbt90502_read_status,
|
.read_status = jdvbt90502_read_status,
|
||||||
.read_signal_strength = jdvbt90502_read_signal_strength,
|
.read_signal_strength = jdvbt90502_read_signal_strength,
|
||||||
|
Loading…
Reference in New Issue
Block a user