summaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/frontends/stb6100.c
diff options
context:
space:
mode:
authorAles Jurik <ajurik@quick.cz>2008-10-26 22:45:59 +0100
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-12-29 20:53:24 +0100
commit20dafb3b0696471cfaa3e2fc2769516ebda3daf9 (patch)
tree4b9ad57008c6e8227b427e601cac718e91e39fe7 /drivers/media/dvb/frontends/stb6100.c
parentV4L/DVB (9469): Port STB0899 and STB6100 (diff)
downloadlinux-20dafb3b0696471cfaa3e2fc2769516ebda3daf9.tar.xz
linux-20dafb3b0696471cfaa3e2fc2769516ebda3daf9.zip
V4L/DVB (9470): Disable PLL Loop while tuning
Signed-off-by: Ales Jurik <ajurik@quick.cz> Signed-off-by: Manu Abraham <manu@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb/frontends/stb6100.c')
-rw-r--r--drivers/media/dvb/frontends/stb6100.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/media/dvb/frontends/stb6100.c b/drivers/media/dvb/frontends/stb6100.c
index 19a9e5fb9705..56e3ef1e6523 100644
--- a/drivers/media/dvb/frontends/stb6100.c
+++ b/drivers/media/dvb/frontends/stb6100.c
@@ -320,6 +320,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
@@ -376,9 +383,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;
@@ -393,7 +402,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);