diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-12-23 18:27:35 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-12-31 08:37:29 -0200 |
commit | e7e10deb582ace0a4eb39965e898f5147ae81e79 (patch) | |
tree | 79a79c52686e1f703db1c576095cce11b4a29274 /drivers/media/dvb/frontends/tdhd1.h | |
parent | ab3eee078f450cab698d49563fa67ed83325b3c0 (diff) |
[media] bsbe1, bsru6, tdh1: use DVBv5 parameters on set_params()
Instead of using DVBv3 parameters, rely on DVBv5 parameters to
set the tuner
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb/frontends/tdhd1.h')
-rw-r--r-- | drivers/media/dvb/frontends/tdhd1.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/media/dvb/frontends/tdhd1.h b/drivers/media/dvb/frontends/tdhd1.h index 51f170678650..9db221bf35ad 100644 --- a/drivers/media/dvb/frontends/tdhd1.h +++ b/drivers/media/dvb/frontends/tdhd1.h @@ -42,22 +42,23 @@ static struct tda1004x_config alps_tdhd1_204a_config = { static int alps_tdhd1_204a_tuner_set_params(struct dvb_frontend *fe, struct dvb_frontend_parameters *params) { + struct dtv_frontend_properties *p = &fe->dtv_property_cache; struct i2c_adapter *i2c = fe->tuner_priv; u8 data[4]; struct i2c_msg msg = { .addr = 0x61, .flags = 0, .buf = data, .len = sizeof(data) }; u32 div; - div = (params->frequency + 36166666) / 166666; + div = (p->frequency + 36166666) / 166666; data[0] = (div >> 8) & 0x7f; data[1] = div & 0xff; data[2] = 0x85; - if (params->frequency >= 174000000 && params->frequency <= 230000000) + if (p->frequency >= 174000000 && p->frequency <= 230000000) data[3] = 0x02; - else if (params->frequency >= 470000000 && params->frequency <= 823000000) + else if (p->frequency >= 470000000 && p->frequency <= 823000000) data[3] = 0x0C; - else if (params->frequency > 823000000 && params->frequency <= 862000000) + else if (p->frequency > 823000000 && p->frequency <= 862000000) data[3] = 0x8C; else return -EINVAL; |