From: Antti Palosaari Date: Tue, 6 Aug 2013 00:33:31 +0000 (-0300) Subject: [media] msi3101: init bits 23:20 on PLL register X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c5a431d02cdcafaf12edff770c294c5fbadcdf54;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [media] msi3101: init bits 23:20 on PLL register 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 Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/staging/media/msi3101/sdr-msi3101.c b/drivers/staging/media/msi3101/sdr-msi3101.c index a937d00ed153..93168dbd183e 100644 --- a/drivers/staging/media/msi3101/sdr-msi3101.c +++ b/drivers/staging/media/msi3101/sdr-msi3101.c @@ -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",