diff options
author | Manu Abraham <manu@linuxtv.org> | 2007-10-15 19:08:20 +0400 |
---|---|---|
committer | Manu Abraham <manu@linuxtv.org> | 2007-10-15 19:08:20 +0400 |
commit | 55b302897951d30131d3c3dc3c684f0b3487fe4b (patch) | |
tree | a50727871c85d9e6089e8bcd0a1d85dd3c21639c /linux/drivers/media/dvb/ttpci | |
parent | 71d6d17ac156761a41221d80254021e9508aaca5 (diff) | |
download | mediapointer-dvb-s2-55b302897951d30131d3c3dc3c684f0b3487fe4b.tar.gz mediapointer-dvb-s2-55b302897951d30131d3c3dc3c684f0b3487fe4b.tar.bz2 |
We must wait for the PLL to stabilize
Thanks to Peter for the in depth explanation
From: Manu Abraham <abraham.manu@gmail.com>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Diffstat (limited to 'linux/drivers/media/dvb/ttpci')
-rw-r--r-- | linux/drivers/media/dvb/ttpci/budget-ci.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/linux/drivers/media/dvb/ttpci/budget-ci.c b/linux/drivers/media/dvb/ttpci/budget-ci.c index b9f3cc198..13345948c 100644 --- a/linux/drivers/media/dvb/ttpci/budget-ci.c +++ b/linux/drivers/media/dvb/ttpci/budget-ci.c @@ -1776,6 +1776,29 @@ static void frontend_init(struct budget_ci *budget_ci) break; case 0x1019: // TT S2-3200 PCI + /* + * NOTE! on some STB0899 versions, the internal PLL takes a longer time + * to settle, aka LOCK. On the older revisions of the chip, we don't see + * this, as a result on the newer chips the entire clock tree, will not + * be stable after a freshly POWER 'ed up situation. + * In this case, we should RESET the STB0899 (Active LOW) and wait for + * PLL stabilization. + * + * On the TT S2 3200 and clones, the STB0899 demodulator's RESETB is + * connected to the SAA7146 GPIO, GPIO2, Pin 142 + */ + /* Reset Demodulator */ + saa7146_setgpio(budget->dev, 2, SAA7146_GPIO_OUTLO); + /* Wait for everything to die */ + msleep(50); + /* Pull it up out of Reset state */ + saa7146_setgpio(budget->dev, 2, SAA7146_GPIO_OUTHI); + /* Wait for PLL to stabilize */ + msleep(250); + /* + * PLL state should be stable now. Ideally, we should check + * for PLL LOCK status. But well, never mind! + */ budget_ci->budget.dvb_frontend = dvb_attach(stb0899_attach, &tt3200_config, &budget_ci->budget.i2c_adap); if (budget_ci->budget.dvb_frontend) { if (dvb_attach(stb6100_attach, budget_ci->budget.dvb_frontend, &tt3200_stb6100_config, &budget_ci->budget.i2c_adap)) { |