diff options
author | Arvo Jarve <arvo@softshark.ee> | 2007-10-30 08:16:17 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-12-29 14:53:19 -0500 |
commit | b655b6cbc9238aa34e90aa6763088f6d4e830347 (patch) | |
tree | 0acfcf97e2d5377c946c3645b1e0076a0e78840f /drivers/media/dvb/frontends | |
parent | 5dc1611cb24f5124ef97de279f04ea91b5a4c2e6 (diff) |
V4L/DVB (9430): stb0899: avoid parameter overwriting
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.
Signed-off-by: Arvo Jarve <arvo@softshark.ee>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb/frontends')
-rw-r--r-- | drivers/media/dvb/frontends/stb0899_algo.c | 25 |
1 files changed, 7 insertions, 18 deletions
diff --git a/drivers/media/dvb/frontends/stb0899_algo.c b/drivers/media/dvb/frontends/stb0899_algo.c index 17f0311ead67..37717a4397a3 100644 --- a/drivers/media/dvb/frontends/stb0899_algo.c +++ b/drivers/media/dvb/frontends/stb0899_algo.c | |||
@@ -675,7 +675,6 @@ enum stb0899_status stb0899_dvbs_algo(struct stb0899_state *state) | |||
675 | /* Set the timing loop to tracking */ | 675 | /* Set the timing loop to tracking */ |
676 | stb0899_write_reg(state, STB0899_RTC, 0x33); | 676 | stb0899_write_reg(state, STB0899_RTC, 0x33); |
677 | stb0899_write_reg(state, STB0899_CFD, 0xf7); | 677 | stb0899_write_reg(state, STB0899_CFD, 0xf7); |
678 | reg = 0; | ||
679 | /* if locked and range ok, set Kdiv */ | 678 | /* if locked and range ok, set Kdiv */ |
680 | if (internal->status == RANGEOK) { | 679 | if (internal->status == RANGEOK) { |
681 | dprintk(state->verbose, FE_DEBUG, 1, "Locked & Range OK !"); | 680 | dprintk(state->verbose, FE_DEBUG, 1, "Locked & Range OK !"); |
@@ -686,45 +685,35 @@ enum stb0899_status stb0899_dvbs_algo(struct stb0899_state *state) | |||
686 | * Carrier loop optimization versus | 685 | * Carrier loop optimization versus |
687 | * symbol Rate/Puncture Rate for Tracking | 686 | * symbol Rate/Puncture Rate for Tracking |
688 | */ | 687 | */ |
688 | reg = stb0899_read_reg(state, STB0899_BCLC); | ||
689 | switch (internal->fecrate) { | 689 | switch (internal->fecrate) { |
690 | case STB0899_FEC_1_2: /* 13 */ | 690 | case STB0899_FEC_1_2: /* 13 */ |
691 | STB0899_SETFIELD_VAL(DEMAPVIT_KDIVIDER, reg, 0x1a); | 691 | stb0899_write_reg(state, STB0899_DEMAPVIT, 0x1a); |
692 | stb0899_write_reg(state, STB0899_DEMAPVIT, reg); | ||
693 | reg = 0; | ||
694 | STB0899_SETFIELD_VAL(BETA, reg, betaTab[0][clnI]); | 692 | STB0899_SETFIELD_VAL(BETA, reg, betaTab[0][clnI]); |
695 | stb0899_write_reg(state, STB0899_BCLC, reg); | 693 | stb0899_write_reg(state, STB0899_BCLC, reg); |
696 | break; | 694 | break; |
697 | case STB0899_FEC_2_3: /* 18 */ | 695 | case STB0899_FEC_2_3: /* 18 */ |
698 | STB0899_SETFIELD_VAL(DEMAPVIT_KDIVIDER, reg, 44); | 696 | stb0899_write_reg(state, STB0899_DEMAPVIT, 44); |
699 | stb0899_write_reg(state, STB0899_DEMAPVIT, reg); | ||
700 | reg = 0; | ||
701 | STB0899_SETFIELD_VAL(BETA, reg, betaTab[1][clnI]); | 697 | STB0899_SETFIELD_VAL(BETA, reg, betaTab[1][clnI]); |
702 | stb0899_write_reg(state, STB0899_BCLC, reg); | 698 | stb0899_write_reg(state, STB0899_BCLC, reg); |
703 | break; | 699 | break; |
704 | case STB0899_FEC_3_4: /* 21 */ | 700 | case STB0899_FEC_3_4: /* 21 */ |
705 | STB0899_SETFIELD_VAL(DEMAPVIT_KDIVIDER, reg, 60); | 701 | stb0899_write_reg(state, STB0899_DEMAPVIT, 60); |
706 | stb0899_write_reg(state, STB0899_DEMAPVIT, reg); | ||
707 | reg = 0; | ||
708 | STB0899_SETFIELD_VAL(BETA, reg, betaTab[2][clnI]); | 702 | STB0899_SETFIELD_VAL(BETA, reg, betaTab[2][clnI]); |
709 | stb0899_write_reg(state, STB0899_BCLC, reg); | 703 | stb0899_write_reg(state, STB0899_BCLC, reg); |
710 | break; | 704 | break; |
711 | case STB0899_FEC_5_6: /* 24 */ | 705 | case STB0899_FEC_5_6: /* 24 */ |
712 | STB0899_SETFIELD_VAL(DEMAPVIT_KDIVIDER, reg, 75); | 706 | stb0899_write_reg(state, STB0899_DEMAPVIT, 75); |
713 | stb0899_write_reg(state, STB0899_DEMAPVIT, reg); | ||
714 | reg = 0; | ||
715 | STB0899_SETFIELD_VAL(BETA, reg, betaTab[3][clnI]); | 707 | STB0899_SETFIELD_VAL(BETA, reg, betaTab[3][clnI]); |
716 | stb0899_write_reg(state, STB0899_BCLC, reg); | 708 | stb0899_write_reg(state, STB0899_BCLC, reg); |
717 | break; | 709 | break; |
718 | case STB0899_FEC_6_7: /* 25 */ | 710 | case STB0899_FEC_6_7: /* 25 */ |
719 | STB0899_SETFIELD_VAL(DEMAPVIT_KDIVIDER, reg, 88); | 711 | stb0899_write_reg(state, STB0899_DEMAPVIT, 88); |
720 | stb0899_write_reg(state, STB0899_DEMAPVIT, reg); | ||
721 | stb0899_write_reg(state, STB0899_ACLC, 0x88); | 712 | stb0899_write_reg(state, STB0899_ACLC, 0x88); |
722 | stb0899_write_reg(state, STB0899_BCLC, 0x9a); | 713 | stb0899_write_reg(state, STB0899_BCLC, 0x9a); |
723 | break; | 714 | break; |
724 | case STB0899_FEC_7_8: /* 26 */ | 715 | case STB0899_FEC_7_8: /* 26 */ |
725 | STB0899_SETFIELD_VAL(DEMAPVIT_KDIVIDER, reg, 94); | 716 | stb0899_write_reg(state, STB0899_DEMAPVIT, 94); |
726 | stb0899_write_reg(state, STB0899_DEMAPVIT, reg); | ||
727 | reg = 0; | ||
728 | STB0899_SETFIELD_VAL(BETA, reg, betaTab[4][clnI]); | 717 | STB0899_SETFIELD_VAL(BETA, reg, betaTab[4][clnI]); |
729 | stb0899_write_reg(state, STB0899_BCLC, reg); | 718 | stb0899_write_reg(state, STB0899_BCLC, reg); |
730 | break; | 719 | break; |