summaryrefslogtreecommitdiff
path: root/linux/drivers/media/dvb
diff options
context:
space:
mode:
authorManu Abraham <manu@linuxtv.org>2007-10-30 16:16:17 +0400
committerManu Abraham <manu@linuxtv.org>2007-10-30 16:16:17 +0400
commit8453b4181ecfc258000c66c23a0877f8804e341a (patch)
treefafe8db4001b7f12c47e07c803e654d48fa7bce3 /linux/drivers/media/dvb
parent6f307e43f9fe703572115e4df14b1c82cc320b08 (diff)
downloadmediapointer-dvb-s2-8453b4181ecfc258000c66c23a0877f8804e341a.tar.gz
mediapointer-dvb-s2-8453b4181ecfc258000c66c23a0877f8804e341a.tar.bz2
BUG! Setting CRL parameter overwrote the CR Algorithm type,
eventually leading to wrong search algorithm to be employed in the DVB-S carrier loop optimization. Symptom: Once the CR optimization stage is passed either way, in a successful or failed manner, the very next carrier search will fail, due to no Carrier Search Algorithm specified. From: Arvo Jarve <arvo@softshark.ee> Signed-off-by: Arvo Jarve <arvo@softshark.ee> Signed-off-by: Manu Abraham <manu@linuxtv.org>
Diffstat (limited to 'linux/drivers/media/dvb')
-rw-r--r--linux/drivers/media/dvb/frontends/stb0899_algo.c25
1 files changed, 7 insertions, 18 deletions
diff --git a/linux/drivers/media/dvb/frontends/stb0899_algo.c b/linux/drivers/media/dvb/frontends/stb0899_algo.c
index f2599ad75..8c4550c02 100644
--- a/linux/drivers/media/dvb/frontends/stb0899_algo.c
+++ b/linux/drivers/media/dvb/frontends/stb0899_algo.c
@@ -675,7 +675,6 @@ enum stb0899_status stb0899_dvbs_algo(struct stb0899_state *state)
/* Set the timing loop to tracking */
stb0899_write_reg(state, STB0899_RTC, 0x33);
stb0899_write_reg(state, STB0899_CFD, 0xf7);
- reg = 0;
/* if locked and range ok, set Kdiv */
if (internal->status == RANGEOK) {
dprintk(state->verbose, FE_DEBUG, 1, "Locked & Range OK !");
@@ -686,45 +685,35 @@ enum stb0899_status stb0899_dvbs_algo(struct stb0899_state *state)
* Carrier loop optimization versus
* symbol Rate/Puncture Rate for Tracking
*/
+ reg = stb0899_read_reg(state, STB0899_BCLC);
switch (internal->fecrate) {
case STB0899_FEC_1_2: /* 13 */
- STB0899_SETFIELD_VAL(DEMAPVIT_KDIVIDER, reg, 0x1a);
- stb0899_write_reg(state, STB0899_DEMAPVIT, reg);
- reg = 0;
+ stb0899_write_reg(state, STB0899_DEMAPVIT, 0x1a);
STB0899_SETFIELD_VAL(BETA, reg, betaTab[0][clnI]);
stb0899_write_reg(state, STB0899_BCLC, reg);
break;
case STB0899_FEC_2_3: /* 18 */
- STB0899_SETFIELD_VAL(DEMAPVIT_KDIVIDER, reg, 44);
- stb0899_write_reg(state, STB0899_DEMAPVIT, reg);
- reg = 0;
+ stb0899_write_reg(state, STB0899_DEMAPVIT, 44);
STB0899_SETFIELD_VAL(BETA, reg, betaTab[1][clnI]);
stb0899_write_reg(state, STB0899_BCLC, reg);
break;
case STB0899_FEC_3_4: /* 21 */
- STB0899_SETFIELD_VAL(DEMAPVIT_KDIVIDER, reg, 60);
- stb0899_write_reg(state, STB0899_DEMAPVIT, reg);
- reg = 0;
+ stb0899_write_reg(state, STB0899_DEMAPVIT, 60);
STB0899_SETFIELD_VAL(BETA, reg, betaTab[2][clnI]);
stb0899_write_reg(state, STB0899_BCLC, reg);
break;
case STB0899_FEC_5_6: /* 24 */
- STB0899_SETFIELD_VAL(DEMAPVIT_KDIVIDER, reg, 75);
- stb0899_write_reg(state, STB0899_DEMAPVIT, reg);
- reg = 0;
+ stb0899_write_reg(state, STB0899_DEMAPVIT, 75);
STB0899_SETFIELD_VAL(BETA, reg, betaTab[3][clnI]);
stb0899_write_reg(state, STB0899_BCLC, reg);
break;
case STB0899_FEC_6_7: /* 25 */
- STB0899_SETFIELD_VAL(DEMAPVIT_KDIVIDER, reg, 88);
- stb0899_write_reg(state, STB0899_DEMAPVIT, reg);
+ stb0899_write_reg(state, STB0899_DEMAPVIT, 88);
stb0899_write_reg(state, STB0899_ACLC, 0x88);
stb0899_write_reg(state, STB0899_BCLC, 0x9a);
break;
case STB0899_FEC_7_8: /* 26 */
- STB0899_SETFIELD_VAL(DEMAPVIT_KDIVIDER, reg, 94);
- stb0899_write_reg(state, STB0899_DEMAPVIT, reg);
- reg = 0;
+ stb0899_write_reg(state, STB0899_DEMAPVIT, 94);
STB0899_SETFIELD_VAL(BETA, reg, betaTab[4][clnI]);
stb0899_write_reg(state, STB0899_BCLC, reg);
break;