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

[media] mantis_vp1033: 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 93ce675c
...@@ -86,6 +86,7 @@ u8 lgtdqcs001f_inittab[] = { ...@@ -86,6 +86,7 @@ u8 lgtdqcs001f_inittab[] = {
int lgtdqcs001f_tuner_set(struct dvb_frontend *fe, int lgtdqcs001f_tuner_set(struct dvb_frontend *fe,
struct dvb_frontend_parameters *params) struct dvb_frontend_parameters *params)
{ {
struct dtv_frontend_properties *p = &fe->dtv_property_cache;
struct mantis_pci *mantis = fe->dvb->priv; struct mantis_pci *mantis = fe->dvb->priv;
struct i2c_adapter *adapter = &mantis->adapter; struct i2c_adapter *adapter = &mantis->adapter;
...@@ -95,14 +96,14 @@ int lgtdqcs001f_tuner_set(struct dvb_frontend *fe, ...@@ -95,14 +96,14 @@ int lgtdqcs001f_tuner_set(struct dvb_frontend *fe,
struct i2c_msg msg = {.addr = 0x61, .flags = 0, .buf = buf, .len = sizeof(buf)}; struct i2c_msg msg = {.addr = 0x61, .flags = 0, .buf = buf, .len = sizeof(buf)};
div = params->frequency / 250; div = p->frequency / 250;
buf[0] = (div >> 8) & 0x7f; buf[0] = (div >> 8) & 0x7f;
buf[1] = div & 0xff; buf[1] = div & 0xff;
buf[2] = 0x83; buf[2] = 0x83;
buf[3] = 0xc0; buf[3] = 0xc0;
if (params->frequency < 1531000) if (p->frequency < 1531000)
buf[3] |= 0x04; buf[3] |= 0x04;
else else
buf[3] &= ~0x04; buf[3] &= ~0x04;
......
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