diff options
-rw-r--r-- | drivers/media/dvb/frontends/stb6100.c | 12 |
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) | |||
320 | } | 320 | } |
321 | srate = p.u.qpsk.symbol_rate; | 321 | srate = p.u.qpsk.symbol_rate; |
322 | 322 | ||
323 | regs[STB6100_DLB] = 0xdc; | ||
324 | /* Disable LPEN */ | ||
325 | regs[STB6100_LPEN] &= ~STB6100_LPEN_LPEN; /* PLL Loop disabled */ | ||
326 | |||
327 | if ((rc = stb6100_write_regs(state, regs)) < 0) | ||
328 | return rc; | ||
329 | |||
323 | /* Baseband gain. */ | 330 | /* Baseband gain. */ |
324 | if (srate >= 15000000) | 331 | if (srate >= 15000000) |
325 | g = 9; // +4 dB | 332 | g = 9; // +4 dB |
@@ -376,9 +383,11 @@ static int stb6100_set_frequency(struct dvb_frontend *fe, u32 frequency) | |||
376 | /* Power up. */ | 383 | /* Power up. */ |
377 | regs[STB6100_LPEN] |= STB6100_LPEN_SYNP | STB6100_LPEN_OSCP | STB6100_LPEN_BEN; | 384 | regs[STB6100_LPEN] |= STB6100_LPEN_SYNP | STB6100_LPEN_OSCP | STB6100_LPEN_BEN; |
378 | 385 | ||
386 | msleep(2); | ||
379 | if ((rc = stb6100_write_regs(state, regs)) < 0) | 387 | if ((rc = stb6100_write_regs(state, regs)) < 0) |
380 | return rc; | 388 | return rc; |
381 | 389 | ||
390 | msleep(2); | ||
382 | regs[STB6100_LPEN] |= STB6100_LPEN_LPEN; /* PLL loop enabled */ | 391 | regs[STB6100_LPEN] |= STB6100_LPEN_LPEN; /* PLL loop enabled */ |
383 | if ((rc = stb6100_write_reg(state, STB6100_LPEN, regs[STB6100_LPEN])) < 0) | 392 | if ((rc = stb6100_write_reg(state, STB6100_LPEN, regs[STB6100_LPEN])) < 0) |
384 | return rc; | 393 | return rc; |
@@ -393,7 +402,8 @@ static int stb6100_set_frequency(struct dvb_frontend *fe, u32 frequency) | |||
393 | if ((rc = stb6100_write_reg(state, STB6100_VCO, regs[STB6100_VCO])) < 0) | 402 | if ((rc = stb6100_write_reg(state, STB6100_VCO, regs[STB6100_VCO])) < 0) |
394 | return rc; | 403 | return rc; |
395 | regs[STB6100_FCCK] &= ~STB6100_FCCK_FCCK; /* LPF BW clock disabled */ | 404 | regs[STB6100_FCCK] &= ~STB6100_FCCK_FCCK; /* LPF BW clock disabled */ |
396 | if ((rc = stb6100_write_reg(state, STB6100_FCCK, regs[STB6100_FCCK])) < 0) | 405 | stb6100_normalise_regs(regs); |
406 | if ((rc = stb6100_write_reg_range(state, ®s[1], 1, STB6100_NUMREGS - 3)) < 0) | ||
397 | return rc; | 407 | return rc; |
398 | 408 | ||
399 | msleep(30); | 409 | msleep(30); |