Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 295136
b: refs/heads/master
c: 0e37781
h: refs/heads/master
v: v3
  • Loading branch information
Klaus Schmidinger authored and Mauro Carvalho Chehab committed Mar 20, 2012
1 parent bf09ff0 commit 1ee8744
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fa5527cd3f428845d7950e6b2bab6babcbcd907b
refs/heads/master: 0e377819b99bf2290c94a0eec2be4443b4630ccd
8 changes: 5 additions & 3 deletions trunk/drivers/media/dvb/frontends/stb0899_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ static const struct stb0899_tab stb0899_cn_tab[] = {
* Crude linear extrapolation below -84.8dBm and above -8.0dBm.
*/
static const struct stb0899_tab stb0899_dvbsrf_tab[] = {
{ -950, -128 },
{ -750, -128 },
{ -748, -94 },
{ -745, -92 },
{ -735, -90 },
Expand Down Expand Up @@ -131,7 +131,7 @@ static const struct stb0899_tab stb0899_dvbs2rf_tab[] = {
{ -730, 13645 },
{ -750, 13909 },
{ -766, 14153 },
{ -999, 16383 }
{ -950, 16383 }
};

/* DVB-S2 Es/N0 quant in dB/100 vs read value * 100*/
Expand Down Expand Up @@ -964,6 +964,7 @@ static int stb0899_read_signal_strength(struct dvb_frontend *fe, u16 *strength)

int val;
u32 reg;
*strength = 0;
switch (state->delsys) {
case SYS_DVBS:
case SYS_DSS:
Expand All @@ -987,7 +988,7 @@ static int stb0899_read_signal_strength(struct dvb_frontend *fe, u16 *strength)
val = STB0899_GETFIELD(IF_AGC_GAIN, reg);

*strength = stb0899_table_lookup(stb0899_dvbs2rf_tab, ARRAY_SIZE(stb0899_dvbs2rf_tab) - 1, val);
*strength += 750;
*strength += 950;
dprintk(state->verbose, FE_DEBUG, 1, "IF_AGC_GAIN = 0x%04x, C = %d * 0.1 dBm",
val & 0x3fff, *strength);
}
Expand All @@ -1009,6 +1010,7 @@ static int stb0899_read_snr(struct dvb_frontend *fe, u16 *snr)
u8 buf[2];
u32 reg;

*snr = 0;
reg = stb0899_read_reg(state, STB0899_VSTATUS);
switch (state->delsys) {
case SYS_DVBS:
Expand Down

0 comments on commit 1ee8744

Please sign in to comment.