--- mt312.c_ORIG	2004-06-16 07:18:57.000000000 +0200
+++ mt312.c	2004-08-01 17:47:40.368928527 +0200
@@ -598,6 +632,7 @@
 	u16 sym_rat_op;
 	u16 monitor;
 	u8 buf[2];
+	u8 config_val, pll;
 
 	if ((ret = mt312_readreg(i2c, SYM_RATE_H, &sym_rate_h)) < 0)
 		return ret;
@@ -611,8 +646,9 @@
 
 		monitor = (buf[0] << 8) | buf[1];
 
-		dprintk(KERN_DEBUG "sr(auto) = %u\n",
-		       mt312_div(monitor * 15625, 4));
+		*sr = mt312_div(monitor * 1000, 1024) * 1000;
+		dprintk(KERN_DEBUG "sr(auto) = %d\n",
+		       *sr);
 	} else {
 		if ((ret = mt312_writereg(i2c, MON_CTRL, 0x05)) < 0)
 			return ret;
@@ -629,9 +665,21 @@
 
 		dprintk(KERN_DEBUG "sym_rat_op=%d dec_ratio=%d\n",
 		       sym_rat_op, dec_ratio);
-		dprintk(KERN_DEBUG "*sr(manual) = %lu\n",
-		       (((MT312_PLL_CLK * 8192) / (sym_rat_op + 8192)) *
-			2) - dec_ratio);
+
+                // check the pll frequency
+		if ((ret = mt312_readreg(i2c, CONFIG, &config_val) < 0))
+			return ret;
+                if ((config_val & 0x0c) == 0x08) pll = 60; else pll = 90;
+		dprintk(KERN_DEBUG "pll=%d\n",
+		       pll);
+
+                // datasheet is apparently very wrong -- rora 2004/07/31
+		// it says PLL_CLK instead of SYS_CLK
+		// it says "...*2-dec_ratio" instead of "...*2^(-dec_ratio)"
+		*sr = mt312_div((pll * 1000 * 8192 / (sym_rat_op + 8192) * 1000), 1 << dec_ratio);
+
+		dprintk(KERN_DEBUG "*sr(manual) = %d\n",
+		       *sr);
 	}
 
 	return 0;
