diff options
Diffstat (limited to 'drivers/media/dvb/frontends')
-rw-r--r-- | drivers/media/dvb/frontends/stb0899_drv.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/media/dvb/frontends/stb0899_drv.c b/drivers/media/dvb/frontends/stb0899_drv.c index 097e7067f208..dd08f4ac64a8 100644 --- a/drivers/media/dvb/frontends/stb0899_drv.c +++ b/drivers/media/dvb/frontends/stb0899_drv.c | |||
@@ -67,7 +67,7 @@ static const struct stb0899_tab stb0899_cn_tab[] = { | |||
67 | * Crude linear extrapolation below -84.8dBm and above -8.0dBm. | 67 | * Crude linear extrapolation below -84.8dBm and above -8.0dBm. |
68 | */ | 68 | */ |
69 | static const struct stb0899_tab stb0899_dvbsrf_tab[] = { | 69 | static const struct stb0899_tab stb0899_dvbsrf_tab[] = { |
70 | { -950, -128 }, | 70 | { -750, -128 }, |
71 | { -748, -94 }, | 71 | { -748, -94 }, |
72 | { -745, -92 }, | 72 | { -745, -92 }, |
73 | { -735, -90 }, | 73 | { -735, -90 }, |
@@ -131,7 +131,7 @@ static const struct stb0899_tab stb0899_dvbs2rf_tab[] = { | |||
131 | { -730, 13645 }, | 131 | { -730, 13645 }, |
132 | { -750, 13909 }, | 132 | { -750, 13909 }, |
133 | { -766, 14153 }, | 133 | { -766, 14153 }, |
134 | { -999, 16383 } | 134 | { -950, 16383 } |
135 | }; | 135 | }; |
136 | 136 | ||
137 | /* DVB-S2 Es/N0 quant in dB/100 vs read value * 100*/ | 137 | /* DVB-S2 Es/N0 quant in dB/100 vs read value * 100*/ |
@@ -964,6 +964,7 @@ static int stb0899_read_signal_strength(struct dvb_frontend *fe, u16 *strength) | |||
964 | 964 | ||
965 | int val; | 965 | int val; |
966 | u32 reg; | 966 | u32 reg; |
967 | *strength = 0; | ||
967 | switch (state->delsys) { | 968 | switch (state->delsys) { |
968 | case SYS_DVBS: | 969 | case SYS_DVBS: |
969 | case SYS_DSS: | 970 | case SYS_DSS: |
@@ -987,7 +988,7 @@ static int stb0899_read_signal_strength(struct dvb_frontend *fe, u16 *strength) | |||
987 | val = STB0899_GETFIELD(IF_AGC_GAIN, reg); | 988 | val = STB0899_GETFIELD(IF_AGC_GAIN, reg); |
988 | 989 | ||
989 | *strength = stb0899_table_lookup(stb0899_dvbs2rf_tab, ARRAY_SIZE(stb0899_dvbs2rf_tab) - 1, val); | 990 | *strength = stb0899_table_lookup(stb0899_dvbs2rf_tab, ARRAY_SIZE(stb0899_dvbs2rf_tab) - 1, val); |
990 | *strength += 750; | 991 | *strength += 950; |
991 | dprintk(state->verbose, FE_DEBUG, 1, "IF_AGC_GAIN = 0x%04x, C = %d * 0.1 dBm", | 992 | dprintk(state->verbose, FE_DEBUG, 1, "IF_AGC_GAIN = 0x%04x, C = %d * 0.1 dBm", |
992 | val & 0x3fff, *strength); | 993 | val & 0x3fff, *strength); |
993 | } | 994 | } |
@@ -1009,6 +1010,7 @@ static int stb0899_read_snr(struct dvb_frontend *fe, u16 *snr) | |||
1009 | u8 buf[2]; | 1010 | u8 buf[2]; |
1010 | u32 reg; | 1011 | u32 reg; |
1011 | 1012 | ||
1013 | *snr = 0; | ||
1012 | reg = stb0899_read_reg(state, STB0899_VSTATUS); | 1014 | reg = stb0899_read_reg(state, STB0899_VSTATUS); |
1013 | switch (state->delsys) { | 1015 | switch (state->delsys) { |
1014 | case SYS_DVBS: | 1016 | case SYS_DVBS: |