summaryrefslogtreecommitdiff
path: root/linux/drivers/media/dvb/frontends/stv0299.c
diff options
context:
space:
mode:
authorHolger Waechtler <devnull@localhost>2004-06-24 10:43:54 +0000
committerHolger Waechtler <devnull@localhost>2004-06-24 10:43:54 +0000
commit307b9d61a148ab8bc832309a1ef199f2ad6f5255 (patch)
tree1566697df51fb9ab14573a0e0fe6e6dabb58a35c /linux/drivers/media/dvb/frontends/stv0299.c
parent4ddfa4bf1301496472dac0bcade593e968a7c665 (diff)
downloadmediapointer-dvb-s2-307b9d61a148ab8bc832309a1ef199f2ad6f5255.tar.gz
mediapointer-dvb-s2-307b9d61a148ab8bc832309a1ef199f2ad6f5255.tar.bz2
Uli Luckas' Cinergy1200 patchsets and SAA patches fixing the broken frontend drivers after the kernel-i2c changes
Diffstat (limited to 'linux/drivers/media/dvb/frontends/stv0299.c')
-rw-r--r--linux/drivers/media/dvb/frontends/stv0299.c25
1 files changed, 21 insertions, 4 deletions
diff --git a/linux/drivers/media/dvb/frontends/stv0299.c b/linux/drivers/media/dvb/frontends/stv0299.c
index 09f6f0119..3866ea2da 100644
--- a/linux/drivers/media/dvb/frontends/stv0299.c
+++ b/linux/drivers/media/dvb/frontends/stv0299.c
@@ -79,6 +79,7 @@ static int stv0299_status = 0;
#define SAMSUNG_TBMU24112IMB 4
#define PHILIPS_SU1278_TSA_TT 5 // SU1278 with TSA5059 synth and TechnoTrend settings
#define PHILIPS_SU1278_TSA_TY 6 // SU1278 with TUA5059 synth and Typhoon wiring
+#define PHILIPS_SU1278_TSA_CI 7 // SU1278 with TUA5059 synth and TerraTec Cinergy wiring
/* Master Clock = 88 MHz */
#define M_CLK (88000000UL)
@@ -393,7 +394,8 @@ static int tsa5059_set_tv_freq (struct i2c_adapter *i2c, u32 freq, int ftype, in
case PHILIPS_SU1278_TSA:
case PHILIPS_SU1278_TSA_TT:
case PHILIPS_SU1278_TSA_TY:
- if (ftype == PHILIPS_SU1278_TSA_TY)
+ case PHILIPS_SU1278_TSA_CI:
+ if (ftype == PHILIPS_SU1278_TSA_TY || ftype == PHILIPS_SU1278_TSA_CI)
addr = 0x61;
else
addr = 0x60;
@@ -620,7 +622,7 @@ static int stv0299_init (struct i2c_adapter *i2c, int ftype)
stv0299_writereg (i2c, init_tab[i], init_tab[i+1]);
/* AGC1 reference register setup */
- if (ftype == PHILIPS_SU1278_TSA || ftype == PHILIPS_SU1278_TSA_TY)
+ if (ftype == PHILIPS_SU1278_TSA || ftype == PHILIPS_SU1278_TSA_TY || ftype == PHILIPS_SU1278_TSA_CI)
stv0299_writereg (i2c, 0x0f, 0x92); /* Iagc = Inverse, m1 = 18 */
else if (ftype == PHILIPS_SU1278_TUA)
stv0299_writereg (i2c, 0x0f, 0x94); /* Iagc = Inverse, m1 = 20 */
@@ -855,11 +857,18 @@ static int stv0299_set_voltage (struct i2c_adapter *i2c, fe_sec_voltage_t voltag
return stv0299_writereg (i2c, 0x08, 0x00); /* LNB power off! */
}
- stv0299_writereg (i2c, 0x08, reg0x08 | 0x40);
+ if (tuner_type == PHILIPS_SU1278_TSA_CI)
+ {
+ stv0299_writereg (i2c, 0x08, reg0x08 & 0xBF); // switch LNB power on OP2/LOCK pin off
+ }
+ else
+ {
+ stv0299_writereg (i2c, 0x08, reg0x08 | 0x40);
+ }
switch (voltage) {
case SEC_VOLTAGE_13:
- if (tuner_type == PHILIPS_SU1278_TSA_TY)
+ if (tuner_type == PHILIPS_SU1278_TSA_TY || tuner_type == PHILIPS_SU1278_TSA_CI)
return stv0299_writereg (i2c, 0x0c, reg0x0c | 0x10);
else
return stv0299_writereg (i2c, 0x0c, reg0x0c | 0x40);
@@ -925,6 +934,7 @@ static int stv0299_set_symbolrate (struct i2c_adapter *i2c, u32 srate, int tuner
break;
case PHILIPS_SU1278_TSA_TY:
+ case PHILIPS_SU1278_TSA_CI:
case PHILIPS_SU1278_TSA:
aclk = 0xb5;
if (srate < 2000000) bclk = 0x86;
@@ -1300,6 +1310,13 @@ static long probe_tuner (struct i2c_adapter *adapter)
// Typhoon cards have unusual wiring.
printk ("stv0299: setup for tuner SU1278 (TSA5059 synth) on Typhoon hardware\n");
return PHILIPS_SU1278_TSA_TY;
+ }
+ else if ( strcmp(adapter->name, "TerraTec Cinergy 1200 DVB-S") == 0 )
+ {
+ // Cinergy cards have unusual wiring.
+ printk ("%s: setup for tuner SU1278 (TSA5059 synth) on"
+ " TerraTec hardware\n", __FILE__);
+ return PHILIPS_SU1278_TSA_CI;
}
//else if ((stat[0] & 0x3f) == 0) {
else if (0) {