[media] msi3101: init bits 23:20 on PLL register
authorAntti Palosaari <crope@iki.fi>
Tue, 6 Aug 2013 00:33:31 +0000 (21:33 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Tue, 20 Aug 2013 19:06:56 +0000 (16:06 -0300)
It is not sure what is meaning of that number, but it is better
to try do as Windows driver. It seems to have small effect for
signal when looking FM FFT.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
drivers/staging/media/msi3101/sdr-msi3101.c

index a937d00ed15347c7adb59056248733c1cf477b00..93168dbd183e15ff080691de0d09717ec607fd82 100644 (file)
@@ -1129,9 +1129,19 @@ static int msi3101_set_usb_adc(struct msi3101_state *s)
         *
         * VCO 202000000 - 720000000++
         */
-       reg3 = 0x01c00303;
+       reg3 = 0x01000303;
        reg4 = 0x00000004;
 
+       /* XXX: Filters? AGC? */
+       if (f_sr < 6000000)
+               reg3 |= 0x1 << 20;
+       else if (f_sr < 7000000)
+               reg3 |= 0x5 << 20;
+       else if (f_sr < 8500000)
+               reg3 |= 0x9 << 20;
+       else
+               reg3 |= 0xd << 20;
+
        for (div_r_out = 4; div_r_out < 16; div_r_out += 2) {
                f_vco = f_sr * div_r_out * 12;
                dev_dbg(&s->udev->dev, "%s: div_r_out=%d f_vco=%d\n",