From: Daniel Scheller Date: Wed, 29 Mar 2017 16:43:09 +0000 (-0300) Subject: [media] dvb-frontends/stv0367: fix symbol rate conditions in cab_SetQamSize() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=8b39f076211664400cd3f182752cfc72b17605ed;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [media] dvb-frontends/stv0367: fix symbol rate conditions in cab_SetQamSize() 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 Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/dvb-frontends/stv0367.c b/drivers/media/dvb-frontends/stv0367.c index fb41c7b1b89b..ffc046a4faec 100644 --- a/drivers/media/dvb-frontends/stv0367.c +++ b/drivers/media/dvb-frontends/stv0367.c @@ -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);