]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
[media] dvb-frontends/stv0367: fix symbol rate conditions in cab_SetQamSize()
authorDaniel Scheller <d.scheller@gmx.net>
Wed, 29 Mar 2017 16:43:09 +0000 (13:43 -0300)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Tue, 20 Jun 2017 12:24:57 +0000 (09:24 -0300)
The values used for comparing symbol rates and the resulting conditional
reg writes seem wrong (rates multiplied by ten), so fix those values.
While this doesn't seem to influence operation, it should be fixed anyway.

Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/dvb-frontends/stv0367.c

index fb41c7b1b89b1ae275e410bb7b1d6564f001ec34..ffc046a4faec88dbd1fcb4a62b1085d80d8a80f8 100644 (file)
@@ -1838,11 +1838,11 @@ static enum stv0367cab_mod stv0367cab_SetQamSize(struct stv0367_state *state,
        case FE_CAB_MOD_QAM64:
                stv0367_writereg(state, R367CAB_IQDEM_ADJ_AGC_REF, 0x82);
                stv0367_writereg(state, R367CAB_AGC_PWR_REF_L, 0x5a);
-               if (SymbolRate > 45000000) {
+               if (SymbolRate > 4500000) {
                        stv0367_writereg(state, R367CAB_FSM_STATE, 0xb0);
                        stv0367_writereg(state, R367CAB_EQU_CTR_LPF_GAIN, 0xc1);
                        stv0367_writereg(state, R367CAB_EQU_CRL_LPF_GAIN, 0xa5);
-               } else if (SymbolRate > 25000000) {
+               } else if (SymbolRate > 2500000) {
                        stv0367_writereg(state, R367CAB_FSM_STATE, 0xa0);
                        stv0367_writereg(state, R367CAB_EQU_CTR_LPF_GAIN, 0xc1);
                        stv0367_writereg(state, R367CAB_EQU_CRL_LPF_GAIN, 0xa6);
@@ -1860,9 +1860,9 @@ static enum stv0367cab_mod stv0367cab_SetQamSize(struct stv0367_state *state,
                stv0367_writereg(state, R367CAB_AGC_PWR_REF_L, 0x76);
                stv0367_writereg(state, R367CAB_FSM_STATE, 0x90);
                stv0367_writereg(state, R367CAB_EQU_CTR_LPF_GAIN, 0xb1);
-               if (SymbolRate > 45000000)
+               if (SymbolRate > 4500000)
                        stv0367_writereg(state, R367CAB_EQU_CRL_LPF_GAIN, 0xa7);
-               else if (SymbolRate > 25000000)
+               else if (SymbolRate > 2500000)
                        stv0367_writereg(state, R367CAB_EQU_CRL_LPF_GAIN, 0xa6);
                else
                        stv0367_writereg(state, R367CAB_EQU_CRL_LPF_GAIN, 0x97);
@@ -1875,9 +1875,9 @@ static enum stv0367cab_mod stv0367cab_SetQamSize(struct stv0367_state *state,
                stv0367_writereg(state, R367CAB_IQDEM_ADJ_AGC_REF, 0x94);
                stv0367_writereg(state, R367CAB_AGC_PWR_REF_L, 0x5a);
                stv0367_writereg(state, R367CAB_FSM_STATE, 0xa0);
-               if (SymbolRate > 45000000)
+               if (SymbolRate > 4500000)
                        stv0367_writereg(state, R367CAB_EQU_CTR_LPF_GAIN, 0xc1);
-               else if (SymbolRate > 25000000)
+               else if (SymbolRate > 2500000)
                        stv0367_writereg(state, R367CAB_EQU_CTR_LPF_GAIN, 0xc1);
                else
                        stv0367_writereg(state, R367CAB_EQU_CTR_LPF_GAIN, 0xd1);