Commit 27b7faf1 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab

[media] cx24113: use DVBv5 parameters on set_params()

Instead of using DVBv3 parameters, rely on DVBv5 parameters to
set the tuner
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 40d6f2b8
......@@ -479,18 +479,19 @@ static int cx24113_init(struct dvb_frontend *fe)
static int cx24113_set_params(struct dvb_frontend *fe,
struct dvb_frontend_parameters *p)
{
struct dtv_frontend_properties *c = &fe->dtv_property_cache;
struct cx24113_state *state = fe->tuner_priv;
/* for a ROLL-OFF factor of 0.35, 0.2: 600, 0.25: 625 */
u32 roll_off = 675;
u32 bw;
bw = ((p->u.qpsk.symbol_rate/100) * roll_off) / 1000;
bw = ((c->symbol_rate/100) * roll_off) / 1000;
bw += (10000000/100) + 5;
bw /= 10;
bw += 1000;
cx24113_set_bandwidth(state, bw);
cx24113_set_frequency(state, p->frequency);
cx24113_set_frequency(state, c->frequency);
msleep(5);
return cx24113_get_status(fe, &bw);
}
......
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