Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 92801
b: refs/heads/master
c: b0166ab
h: refs/heads/master
i:
  92799: 50ff341
v: v3
  • Loading branch information
Mauro Carvalho Chehab committed Apr 24, 2008
1 parent c42398e commit 95bca3e
Show file tree
Hide file tree
Showing 2 changed files with 11 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: c21f1e2e39a1012f57c33d21af5c909cf2ae3b9a
refs/heads/master: b0166ab3a6ae6d7af8d9a21a7836154963c69a11
13 changes: 10 additions & 3 deletions trunk/drivers/media/video/tuner-xc2028.c
Original file line number Diff line number Diff line change
Expand Up @@ -844,21 +844,28 @@ static int xc2028_signal(struct dvb_frontend *fe, u16 *strength)

/* Sync Lock Indicator */
rc = xc2028_get_reg(priv, 0x0002, &frq_lock);
if (rc < 0 || frq_lock == 0)
if (rc < 0)
goto ret;

/* Frequency is locked. Return signal quality */
/* Frequency is locked */
if (frq_lock == 1)
signal = 32768;

/* Get SNR of the video signal */
rc = xc2028_get_reg(priv, 0x0040, &signal);
if (rc < 0)
signal = -frq_lock;
goto ret;

/* Use both frq_lock and signal to generate the result */
signal = signal || ((signal & 0x07) << 12);

ret:
mutex_unlock(&priv->lock);

*strength = signal;

tuner_dbg("signal strength is %d\n", signal);

return rc;
}

Expand Down

0 comments on commit 95bca3e

Please sign in to comment.