summaryrefslogtreecommitdiff
path: root/linux/drivers/media/dvb/frontends/or51211.c
diff options
context:
space:
mode:
authorMichael Krufky <mkrufky@linuxtv.org>2007-06-28 11:15:08 -0400
committerMichael Krufky <mkrufky@linuxtv.org>2007-06-28 11:15:08 -0400
commitf33cb5c3b1d3afac1c96992adcd223848aebdc7b (patch)
tree5dc7481c432c20a40c449103e456d2c1961e53a9 /linux/drivers/media/dvb/frontends/or51211.c
parent6f4c9295c839f64a2773c38d243c5d81b15967be (diff)
parent185208d63cd4a30f46c3379e9de694ea93508306 (diff)
downloadmediapointer-dvb-s2-f33cb5c3b1d3afac1c96992adcd223848aebdc7b.tar.gz
mediapointer-dvb-s2-f33cb5c3b1d3afac1c96992adcd223848aebdc7b.tar.bz2
merge: ~mkrufky/fcv1236d
From: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Diffstat (limited to 'linux/drivers/media/dvb/frontends/or51211.c')
-rw-r--r--linux/drivers/media/dvb/frontends/or51211.c31
1 files changed, 3 insertions, 28 deletions
diff --git a/linux/drivers/media/dvb/frontends/or51211.c b/linux/drivers/media/dvb/frontends/or51211.c
index 048d7cfe1..f46d5a466 100644
--- a/linux/drivers/media/dvb/frontends/or51211.c
+++ b/linux/drivers/media/dvb/frontends/or51211.c
@@ -223,38 +223,13 @@ static int or51211_set_parameters(struct dvb_frontend* fe,
struct dvb_frontend_parameters *param)
{
struct or51211_state* state = fe->demodulator_priv;
- u32 freq = 0;
- u16 tunerfreq = 0;
- u8 buf[4];
/* Change only if we are actually changing the channel */
if (state->current_frequency != param->frequency) {
- freq = 44000 + (param->frequency/1000);
- tunerfreq = freq * 16/1000;
-
- dprintk("set_parameters frequency = %d (tunerfreq = %d)\n",
- param->frequency,tunerfreq);
-
- buf[0] = (tunerfreq >> 8) & 0x7F;
- buf[1] = (tunerfreq & 0xFF);
- buf[2] = 0x8E;
-
- if (param->frequency < 157250000) {
- buf[3] = 0xA0;
- dprintk("set_parameters VHF low range\n");
- } else if (param->frequency < 454000000) {
- buf[3] = 0x90;
- dprintk("set_parameters VHF high range\n");
- } else {
- buf[3] = 0x30;
- dprintk("set_parameters UHF range\n");
+ if (fe->ops.tuner_ops.set_params) {
+ fe->ops.tuner_ops.set_params(fe, param);
+ if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 0);
}
- dprintk("set_parameters tuner bytes: 0x%02x 0x%02x "
- "0x%02x 0x%02x\n",buf[0],buf[1],buf[2],buf[3]);
-
- if (i2c_writebytes(state,0xC2>>1,buf,4))
- printk(KERN_WARNING "or51211:set_parameters error "
- "writing to tuner\n");
/* Set to ATSC mode */
or51211_setmode(fe,0);