aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/frontends/or51132.c
diff options
context:
space:
mode:
authorMac Michaels <wmichaels1@earthlink.net>2005-09-09 16:02:40 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-09-09 16:57:40 -0400
commit80e27e20619902b11aa255081fd83eab10fc0839 (patch)
treef7607a5f38434b58bf7984d454dece57d6299fac /drivers/media/dvb/frontends/or51132.c
parent593cbf3dcbffc852cf91a30951eb518b59bf7322 (diff)
[PATCH] dvb: frontend: or51132: remove bogus optimization attempt
This fix has also been applied to lgdt330x. There is an optimization that keeps track of the frequency tuned by the digital decoder. The digital driver does not set the frequency if it has not changed since it was tuned. The analog tuner driver knows nothing about the frequency saved by the digital driver. When the frequency is set using the video4linux code with tvtime, the hardware get changed but the digital driver's state does not get updated. Switch back to the same digital channel and the driver finds no change in frequency so the tuner is not reset to the digital frequency. The work around is to remove the check and always set the tuner to the specified frequency. Signed-off-by: Mac Michaels <wmichaels1@earthlink.net> Signed-off-by: Michael Krufky <mkrufky@m1k.net> Signed-off-by: Johannes Stezenbach <js@linuxtv.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/media/dvb/frontends/or51132.c')
-rw-r--r--drivers/media/dvb/frontends/or51132.c29
1 files changed, 13 insertions, 16 deletions
diff --git a/drivers/media/dvb/frontends/or51132.c b/drivers/media/dvb/frontends/or51132.c
index cc0a77c790f1..b6d0eecc59eb 100644
--- a/drivers/media/dvb/frontends/or51132.c
+++ b/drivers/media/dvb/frontends/or51132.c
@@ -370,22 +370,19 @@ static int or51132_set_parameters(struct dvb_frontend* fe,
370 or51132_setmode(fe); 370 or51132_setmode(fe);
371 } 371 }
372 372
373 /* Change only if we are actually changing the channel */ 373 dvb_pll_configure(state->config->pll_desc, buf,
374 if (state->current_frequency != param->frequency) { 374 param->frequency, 0);
375 dvb_pll_configure(state->config->pll_desc, buf, 375 dprintk("set_parameters tuner bytes: 0x%02x 0x%02x "
376 param->frequency, 0); 376 "0x%02x 0x%02x\n",buf[0],buf[1],buf[2],buf[3]);
377 dprintk("set_parameters tuner bytes: 0x%02x 0x%02x " 377 if (i2c_writebytes(state, state->config->pll_address ,buf, 4))
378 "0x%02x 0x%02x\n",buf[0],buf[1],buf[2],buf[3]); 378 printk(KERN_WARNING "or51132: set_parameters error "
379 if (i2c_writebytes(state, state->config->pll_address ,buf, 4)) 379 "writing to tuner\n");
380 printk(KERN_WARNING "or51132: set_parameters error " 380
381 "writing to tuner\n"); 381 /* Set to current mode */
382 382 or51132_setmode(fe);
383 /* Set to current mode */ 383
384 or51132_setmode(fe); 384 /* Update current frequency */
385 385 state->current_frequency = param->frequency;
386 /* Update current frequency */
387 state->current_frequency = param->frequency;
388 }
389 return 0; 386 return 0;
390} 387}
391 388