Commit b738ae16 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab

[media] cx88: 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 b09cf61d
...@@ -818,6 +818,7 @@ static const u8 samsung_smt_7020_inittab[] = { ...@@ -818,6 +818,7 @@ static const u8 samsung_smt_7020_inittab[] = {
static int samsung_smt_7020_tuner_set_params(struct dvb_frontend *fe, static int samsung_smt_7020_tuner_set_params(struct dvb_frontend *fe,
struct dvb_frontend_parameters *params) struct dvb_frontend_parameters *params)
{ {
struct dtv_frontend_properties *c = &fe->dtv_property_cache;
struct cx8802_dev *dev = fe->dvb->priv; struct cx8802_dev *dev = fe->dvb->priv;
u8 buf[4]; u8 buf[4];
u32 div; u32 div;
...@@ -827,14 +828,14 @@ static int samsung_smt_7020_tuner_set_params(struct dvb_frontend *fe, ...@@ -827,14 +828,14 @@ static int samsung_smt_7020_tuner_set_params(struct dvb_frontend *fe,
.buf = buf, .buf = buf,
.len = sizeof(buf) }; .len = sizeof(buf) };
div = params->frequency / 125; div = c->frequency / 125;
buf[0] = (div >> 8) & 0x7f; buf[0] = (div >> 8) & 0x7f;
buf[1] = div & 0xff; buf[1] = div & 0xff;
buf[2] = 0x84; /* 0xC4 */ buf[2] = 0x84; /* 0xC4 */
buf[3] = 0x00; buf[3] = 0x00;
if (params->frequency < 1500000) if (c->frequency < 1500000)
buf[3] |= 0x10; buf[3] |= 0x10;
if (fe->ops.i2c_gate_ctrl) if (fe->ops.i2c_gate_ctrl)
......
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