Hi,

On Thu, Jan 09, 2003 at 09:06:59AM +0100, Matthias Behr wrote:
> Hi,
> 
> the KNC1 card is currently not supported (the frontend get's detected as a
> bsru2 and not a su1278).
> 
> I'm working on a patch but sadly I am currently really short on time.

The original stv0299 driver from dvb-kernel checks for
the PLL chip at the I2C addresses 0x60 and 0x61. If a device
at 0x60 is found an SU1278/SH is detected (works with my
Lorenzen DVB-S (Technotrend Budget CI) board) if a device at
0x61 is found an Alps BSRU6 is detected.

Please get the stv0299 driver from the dvb-kernel CVS and apply the patch
attached to this mail. The frontend detection is now hardwired for
the SU1278/SH with PLL at 0x61.

We have to write a new auto probing routine because there are 
SU1278/SH frontends with the PLL at 0x60 and 0x61 out there.


Peter
--- stv0299.c.orig      Thu Jan  9 10:49:36 2003
+++ stv0299.c   Thu Jan  9 10:49:51 2003
@@ -237,7 +237,7 @@
        int ret;
        u8 rpt1 [] = { 0x05, 0xb5 };  /*  enable i2c repeater on stv0299  */
        /* TSA5059 i2c-bus address */
-       u8 addr = (ftype == PHILIPS_SU1278SH) ? 0x60 : 0x61;
+       u8 addr = (ftype == PHILIPS_SU1278SH) ? 0x61 : 0x61;
        struct i2c_msg msg [] = {{ addr: 0x68, flags: 0, buf: rpt1, len: 2 },
                                 { addr: addr, flags: 0, buf: data, len: 4 }};
 
@@ -741,26 +741,31 @@
 int probe_tuner (struct dvb_i2c_bus *i2c)
 {
        int type;
+       char* probe_msg = "probing for TSA5059 at I2C address 0x";
 
         /* read the status register of TSA5059 */
        u8 rpt[] = { 0x05, 0xb5 };
         u8 stat [] = { 0 };
        struct i2c_msg msg1 [] = {{ addr: 0x68, flags: 0, buf: rpt,  len: 2 },
-                           { addr: 0x60, flags: I2C_M_RD, buf: stat, len: 1 }};
+                           { addr: 0x61, flags: I2C_M_RD, buf: stat, len: 1 }};
        struct i2c_msg msg2 [] = {{ addr: 0x68, flags: 0, buf: rpt,  len: 2 },
                            { addr: 0x61, flags: I2C_M_RD, buf: stat, len: 1 }};
 
+       dprintk("%s%x\n", probe_msg, 0x61);
        if (i2c->xfer(i2c, msg1, 2) == 2) {
                type = PHILIPS_SU1278SH;
                printk ("%s: setup for tuner SU1278/SH\n", __FILE__);
-       } else if (i2c->xfer(i2c, msg2, 2) == 2) {
-               type = ALPS_BSRU6;
-               printk ("%s: setup for tuner BSRU6, TDQB-S00x\n", __FILE__);
        } else {
-               type = UNKNOWN_FRONTEND;
-               printk ("%s: unknown PLL synthesizer, "
-                       "please report to <[EMAIL PROTECTED]>!!\n",
-                       __FILE__);
+               dprintk("%s%x\n", probe_msg, 0x61);
+               if (i2c->xfer(i2c, msg2, 2) == 2) {
+                       type = ALPS_BSRU6;
+                       printk ("%s: setup for tuner BSRU6, TDQB-S00x\n", __FILE__);
+               } else {
+                       type = UNKNOWN_FRONTEND;
+                       printk ("%s: unknown PLL synthesizer, "
+                               "please report to <[EMAIL PROTECTED]>!!\n",
+                               __FILE__);
+               }
        }
        return type;
 }
@@ -775,7 +780,9 @@
 
        /* register 0x00 contains 0xa1 for STV0299 and STV0299B */
        /* register 0x00 might contain 0x80 when returning from standby */
-       if (id != 0xa1)
+       if (id == 0xa1)
+               printk ("%s: STV0299 QPSK link IC detected\n", __FILE__);
+       else
                return -ENODEV;
 
        if ((tuner_type = probe_tuner(i2c)) < 0)

Reply via email to