diff options
Diffstat (limited to 'drivers/media/dvb/frontends/or51211.c')
-rw-r--r-- | drivers/media/dvb/frontends/or51211.c | 31 |
1 files changed, 3 insertions, 28 deletions
diff --git a/drivers/media/dvb/frontends/or51211.c b/drivers/media/dvb/frontends/or51211.c index 048d7cfe12d3..f46d5a46683a 100644 --- a/drivers/media/dvb/frontends/or51211.c +++ b/drivers/media/dvb/frontends/or51211.c | |||
@@ -223,38 +223,13 @@ static int or51211_set_parameters(struct dvb_frontend* fe, | |||
223 | struct dvb_frontend_parameters *param) | 223 | struct dvb_frontend_parameters *param) |
224 | { | 224 | { |
225 | struct or51211_state* state = fe->demodulator_priv; | 225 | struct or51211_state* state = fe->demodulator_priv; |
226 | u32 freq = 0; | ||
227 | u16 tunerfreq = 0; | ||
228 | u8 buf[4]; | ||
229 | 226 | ||
230 | /* Change only if we are actually changing the channel */ | 227 | /* Change only if we are actually changing the channel */ |
231 | if (state->current_frequency != param->frequency) { | 228 | if (state->current_frequency != param->frequency) { |
232 | freq = 44000 + (param->frequency/1000); | 229 | if (fe->ops.tuner_ops.set_params) { |
233 | tunerfreq = freq * 16/1000; | 230 | fe->ops.tuner_ops.set_params(fe, param); |
234 | 231 | if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 0); | |
235 | dprintk("set_parameters frequency = %d (tunerfreq = %d)\n", | ||
236 | param->frequency,tunerfreq); | ||
237 | |||
238 | buf[0] = (tunerfreq >> 8) & 0x7F; | ||
239 | buf[1] = (tunerfreq & 0xFF); | ||
240 | buf[2] = 0x8E; | ||
241 | |||
242 | if (param->frequency < 157250000) { | ||
243 | buf[3] = 0xA0; | ||
244 | dprintk("set_parameters VHF low range\n"); | ||
245 | } else if (param->frequency < 454000000) { | ||
246 | buf[3] = 0x90; | ||
247 | dprintk("set_parameters VHF high range\n"); | ||
248 | } else { | ||
249 | buf[3] = 0x30; | ||
250 | dprintk("set_parameters UHF range\n"); | ||
251 | } | 232 | } |
252 | dprintk("set_parameters tuner bytes: 0x%02x 0x%02x " | ||
253 | "0x%02x 0x%02x\n",buf[0],buf[1],buf[2],buf[3]); | ||
254 | |||
255 | if (i2c_writebytes(state,0xC2>>1,buf,4)) | ||
256 | printk(KERN_WARNING "or51211:set_parameters error " | ||
257 | "writing to tuner\n"); | ||
258 | 233 | ||
259 | /* Set to ATSC mode */ | 234 | /* Set to ATSC mode */ |
260 | or51211_setmode(fe,0); | 235 | or51211_setmode(fe,0); |