Skip to content

Commit

Permalink
[media] cx88: 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 b09cf61 commit b738ae1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/media/video/cx88/cx88-dvb.c
Original file line number Diff line number Diff line change
Expand Up @@ -818,6 +818,7 @@ static const u8 samsung_smt_7020_inittab[] = {
static int samsung_smt_7020_tuner_set_params(struct dvb_frontend *fe,
struct dvb_frontend_parameters *params)
{
struct dtv_frontend_properties *c = &fe->dtv_property_cache;
struct cx8802_dev *dev = fe->dvb->priv;
u8 buf[4];
u32 div;
Expand All @@ -827,14 +828,14 @@ static int samsung_smt_7020_tuner_set_params(struct dvb_frontend *fe,
.buf = buf,
.len = sizeof(buf) };

div = params->frequency / 125;
div = c->frequency / 125;

buf[0] = (div >> 8) & 0x7f;
buf[1] = div & 0xff;
buf[2] = 0x84; /* 0xC4 */
buf[3] = 0x00;

if (params->frequency < 1500000)
if (c->frequency < 1500000)
buf[3] |= 0x10;

if (fe->ops.i2c_gate_ctrl)
Expand Down

0 comments on commit b738ae1

Please sign in to comment.