diff options
author | Klaus Schmidinger <devnull@localhost> | 2004-09-12 14:50:42 +0000 |
---|---|---|
committer | Klaus Schmidinger <devnull@localhost> | 2004-09-12 14:50:42 +0000 |
commit | 5b954474ac80c8dfa27aada3353bd871d93226e6 (patch) | |
tree | 9cd1e8a42b422caad25818a9cdb0b0c77906d507 /linux | |
parent | ccedb9e0cb6b1e9e11c12d75d2cdbd530a5ce3af (diff) | |
download | mediapointer-dvb-s2-5b954474ac80c8dfa27aada3353bd871d93226e6.tar.gz mediapointer-dvb-s2-5b954474ac80c8dfa27aada3353bd871d93226e6.tar.bz2 |
Fixed dropouts on older DVB cards
Diffstat (limited to 'linux')
-rw-r--r-- | linux/drivers/media/dvb/frontends/ves1x93.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/linux/drivers/media/dvb/frontends/ves1x93.c b/linux/drivers/media/dvb/frontends/ves1x93.c index 35d0019b4..6e74b25c8 100644 --- a/linux/drivers/media/dvb/frontends/ves1x93.c +++ b/linux/drivers/media/dvb/frontends/ves1x93.c @@ -453,6 +453,21 @@ static int ves1x93_ioctl (struct dvb_frontend *fe, unsigned int cmd, void *arg) fe_status_t *status = arg; u8 sync = ves1x93_readreg (i2c, 0x0e); + /* + * The ves1893 sometimes returns sync values that make no sense, + * because, e.g., the SIGNAL bit is 0, while some of the higher + * bits are 1 (and how can there be a CARRIER w/o a SIGNAL?). + * Tests showed that the the VITERBI and SYNC bits are returned + * reliably, while the SIGNAL and CARRIER bits ar sometimes wrong. + * If such a case occurs, we read the value again, until we get a + * valid value. + */ + int maxtry = 10; /* just for safety - let's not get stuck here */ + while ((sync & 0x03) != 0x03 && (sync & 0x0c) && maxtry--) { + msleep(10); + sync = ves1x93_readreg (i2c, 0x0e); + } + *status = 0; if (sync & 1) |