Skip to content

Commit

Permalink
[media] tda826x: use DVBv5 parameters on set_params()
Browse files Browse the repository at this point in the history
Instead of using DVBv3 parameters, rely on DVBv5 parameters to
set the tuner

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Mauro Carvalho Chehab committed Dec 31, 2011
1 parent 3608dbb commit 66e6cd5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/media/dvb/frontends/tda826x.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ static int tda826x_sleep(struct dvb_frontend *fe)

static int tda826x_set_params(struct dvb_frontend *fe, struct dvb_frontend_parameters *params)
{
struct dtv_frontend_properties *p = &fe->dtv_property_cache;
struct tda826x_priv *priv = fe->tuner_priv;
int ret;
u32 div;
Expand All @@ -83,11 +84,11 @@ static int tda826x_set_params(struct dvb_frontend *fe, struct dvb_frontend_param

dprintk("%s:\n", __func__);

div = (params->frequency + (1000-1)) / 1000;
div = (p->frequency + (1000-1)) / 1000;

/* BW = ((1 + RO) * SR/2 + 5) * 1.3 [SR in MSPS, BW in MHz] */
/* with R0 = 0.35 and some transformations: */
ksyms = params->u.qpsk.symbol_rate / 1000;
ksyms = p->symbol_rate / 1000;
bandwidth = (878 * ksyms + 6500000) / 1000000 + 1;
if (bandwidth < 5)
bandwidth = 5;
Expand Down

0 comments on commit 66e6cd5

Please sign in to comment.