summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/tda8290.c
diff options
context:
space:
mode:
authorNickolay V. Shmyrev <devnull@localhost>2005-06-26 14:03:48 +0000
committerNickolay V. Shmyrev <devnull@localhost>2005-06-26 14:03:48 +0000
commit95d1e3c6e7757312d8260bdf482dcce2e69afb35 (patch)
treef2b76e814001400f3f4b98b2ae3e274a3abc5b26 /linux/drivers/media/video/tda8290.c
parent6ad3feae8a0ea319f59f05d3d2e63046aa7f4c03 (diff)
downloadmediapointer-dvb-s2-95d1e3c6e7757312d8260bdf482dcce2e69afb35.tar.gz
mediapointer-dvb-s2-95d1e3c6e7757312d8260bdf482dcce2e69afb35.tar.bz2
* tda8290.c:
- Fix setting frequency on tda8290. Thanks to Fabien PERROT <perrot1983@yahoo.fr>
Diffstat (limited to 'linux/drivers/media/video/tda8290.c')
-rw-r--r--linux/drivers/media/video/tda8290.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/linux/drivers/media/video/tda8290.c b/linux/drivers/media/video/tda8290.c
index 6a25be565..2256baeab 100644
--- a/linux/drivers/media/video/tda8290.c
+++ b/linux/drivers/media/video/tda8290.c
@@ -1,5 +1,5 @@
/*
- * $Id: tda8290.c,v 1.11 2005/06/18 06:09:06 nsh Exp $
+ * $Id: tda8290.c,v 1.12 2005/06/26 14:03:48 nsh Exp $
*
* i2c tv tuner chip device driver
* controls the philips tda8290+75 tuner chip combo.
@@ -137,15 +137,12 @@ static int tda8290_tune(struct i2c_client *c)
return 0;
}
-static void set_frequency(struct tuner *t, u16 ifc)
+static void set_frequency(struct tuner *t, u16 ifc, unsigned int freq)
{
- u32 freq;
u32 N;
if (t->mode == V4L2_TUNER_RADIO)
- freq = t->freq / 1000;
- else
- freq = t->freq;
+ freq = freq / 1000;
N = (((freq<<3)+ifc)&0x3fffc);
@@ -188,14 +185,14 @@ static void set_tv_freq(struct i2c_client *c, unsigned int freq)
struct tuner *t = i2c_get_clientdata(c);
set_audio(t);
- set_frequency(t, 864);
+ set_frequency(t, 864, freq);
tda8290_tune(c);
}
static void set_radio_freq(struct i2c_client *c, unsigned int freq)
{
struct tuner *t = i2c_get_clientdata(c);
- set_frequency(t, 704);
+ set_frequency(t, 704, freq);
tda8290_tune(c);
}