summaryrefslogtreecommitdiff
path: root/linux/drivers/media/dvb/frontends/stb6100.c
diff options
context:
space:
mode:
authorManu Abraham <manu@linuxtv.org>2008-10-27 01:45:59 +0400
committerManu Abraham <manu@linuxtv.org>2008-10-27 01:45:59 +0400
commit20fb47094020b409938d349c2f3b9719175858d7 (patch)
tree30b3bb99e141c60dee21e82f84e135e78b6f62ec /linux/drivers/media/dvb/frontends/stb6100.c
parentc553edd5135a293a84f9fd98ed49c51e33bf3787 (diff)
downloadmediapointer-dvb-s2-20fb47094020b409938d349c2f3b9719175858d7.tar.gz
mediapointer-dvb-s2-20fb47094020b409938d349c2f3b9719175858d7.tar.bz2
Disable PLL Loop while tuning
From: Ales Jurik <ajurik@quick.cz> Signed-off-by: Ales Jurik <ajurik@quick.cz> Signed-off-by: Manu Abraham <manu@linuxtv.org>
Diffstat (limited to 'linux/drivers/media/dvb/frontends/stb6100.c')
-rw-r--r--linux/drivers/media/dvb/frontends/stb6100.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/linux/drivers/media/dvb/frontends/stb6100.c b/linux/drivers/media/dvb/frontends/stb6100.c
index c148de77f..7948d753d 100644
--- a/linux/drivers/media/dvb/frontends/stb6100.c
+++ b/linux/drivers/media/dvb/frontends/stb6100.c
@@ -327,6 +327,13 @@ static int stb6100_set_frequency(struct dvb_frontend *fe, u32 frequency)
}
srate = p.u.qpsk.symbol_rate;
+ regs[STB6100_DLB] = 0xdc;
+ /* Disable LPEN */
+ regs[STB6100_LPEN] &= ~STB6100_LPEN_LPEN; /* PLL Loop disabled */
+
+ if ((rc = stb6100_write_regs(state, regs)) < 0)
+ return rc;
+
/* Baseband gain. */
if (srate >= 15000000)
g = 9; // +4 dB
@@ -383,9 +390,11 @@ static int stb6100_set_frequency(struct dvb_frontend *fe, u32 frequency)
/* Power up. */
regs[STB6100_LPEN] |= STB6100_LPEN_SYNP | STB6100_LPEN_OSCP | STB6100_LPEN_BEN;
+ msleep(2);
if ((rc = stb6100_write_regs(state, regs)) < 0)
return rc;
+ msleep(2);
regs[STB6100_LPEN] |= STB6100_LPEN_LPEN; /* PLL loop enabled */
if ((rc = stb6100_write_reg(state, STB6100_LPEN, regs[STB6100_LPEN])) < 0)
return rc;
@@ -400,7 +409,8 @@ static int stb6100_set_frequency(struct dvb_frontend *fe, u32 frequency)
if ((rc = stb6100_write_reg(state, STB6100_VCO, regs[STB6100_VCO])) < 0)
return rc;
regs[STB6100_FCCK] &= ~STB6100_FCCK_FCCK; /* LPF BW clock disabled */
- if ((rc = stb6100_write_reg(state, STB6100_FCCK, regs[STB6100_FCCK])) < 0)
+ stb6100_normalise_regs(regs);
+ if ((rc = stb6100_write_reg_range(state, &regs[1], 1, STB6100_NUMREGS - 3)) < 0)
return rc;
msleep(30);