summaryrefslogtreecommitdiff
path: root/linux/drivers/media/dvb/frontends/grundig_29504-401.c
diff options
context:
space:
mode:
authorJohannes Stezenbach <devnull@localhost>2004-03-03 14:34:58 +0000
committerJohannes Stezenbach <devnull@localhost>2004-03-03 14:34:58 +0000
commit20cad9877364e3950767473ce588456b16ba92f2 (patch)
tree8ad784e25f06166d11b48d4d667d37f0b26bef15 /linux/drivers/media/dvb/frontends/grundig_29504-401.c
parent9b5b0904389965947caf379b3848c9b5625da3a3 (diff)
downloadmediapointer-dvb-s2-20cad9877364e3950767473ce588456b16ba92f2.tar.gz
mediapointer-dvb-s2-20cad9877364e3950767473ce588456b16ba92f2.tar.bz2
add (#if'ed) old code for tsa5060_set_tv_freq() which works
better for someone, so it doesn't get lost
Diffstat (limited to 'linux/drivers/media/dvb/frontends/grundig_29504-401.c')
-rw-r--r--linux/drivers/media/dvb/frontends/grundig_29504-401.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/linux/drivers/media/dvb/frontends/grundig_29504-401.c b/linux/drivers/media/dvb/frontends/grundig_29504-401.c
index c043b9251..a50af41bd 100644
--- a/linux/drivers/media/dvb/frontends/grundig_29504-401.c
+++ b/linux/drivers/media/dvb/frontends/grundig_29504-401.c
@@ -102,6 +102,7 @@ static int tsa5060_write (struct dvb_i2c_bus *i2c, u8 data [4])
*/
static int tsa5060_set_tv_freq (struct dvb_i2c_bus *i2c, u32 freq)
{
+#if 1
u32 div;
u8 buf [4];
u8 cfg, cpump, band_select;
@@ -118,6 +119,20 @@ static int tsa5060_set_tv_freq (struct dvb_i2c_bus *i2c, u32 freq)
buf [1] = div & 0xff;
buf [2] = ((div >> 10) & 0x60) | cfg;
buf [3] = (cpump << 6) | band_select;
+#else
+ /* old code which seems to work better for at least one person */
+ u32 div;
+ u8 buf [4];
+ u8 cfg;
+
+ div = (36000000 + freq) / 166666;
+ cfg = 0x88;
+
+ buf [0] = (div >> 8) & 0x7f;
+ buf [1] = div & 0xff;
+ buf [2] = ((div >> 10) & 0x60) | cfg;
+ buf [3] = 0xc0;
+#endif
return tsa5060_write(i2c, buf);
}