Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 124116
b: refs/heads/master
c: 20dafb3
h: refs/heads/master
v: v3
  • Loading branch information
Ales Jurik authored and Mauro Carvalho Chehab committed Dec 29, 2008
1 parent e316e35 commit 40a7331
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3f4009255bbcfcf55cf8ca40d70e4cf75e4dc68c
refs/heads/master: 20dafb3b0696471cfaa3e2fc2769516ebda3daf9
12 changes: 11 additions & 1 deletion trunk/drivers/media/dvb/frontends/stb6100.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand All @@ -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);
Expand Down

0 comments on commit 40a7331

Please sign in to comment.