summaryrefslogtreecommitdiff
path: root/linux
diff options
context:
space:
mode:
authorJohannes Stezenbach <devnull@localhost>2005-08-02 22:55:12 +0000
committerJohannes Stezenbach <devnull@localhost>2005-08-02 22:55:12 +0000
commit64e13b9d7e8e0d2606b85ff04e464de0a5104d3f (patch)
treeedd7f21bf31543e271132c04bc5661860c01122c /linux
parentbae40438ad428bc7d0305110c1598834d4316c92 (diff)
downloadmediapointer-dvb-s2-64e13b9d7e8e0d2606b85ff04e464de0a5104d3f.tar.gz
mediapointer-dvb-s2-64e13b9d7e8e0d2606b85ff04e464de0a5104d3f.tar.bz2
From: Adam Szalkowski <adamsz@gmx.net>
Fix DiSEqC problems. Signed-off-by: Adam M. Szalkowski <adam@szalkowski.de>
Diffstat (limited to 'linux')
-rw-r--r--linux/drivers/media/dvb/frontends/cx24110.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/linux/drivers/media/dvb/frontends/cx24110.c b/linux/drivers/media/dvb/frontends/cx24110.c
index 71b54094b..eb4833ee7 100644
--- a/linux/drivers/media/dvb/frontends/cx24110.c
+++ b/linux/drivers/media/dvb/frontends/cx24110.c
@@ -398,7 +398,8 @@ static int cx24110_diseqc_send_burst(struct dvb_frontend* fe, fe_sec_mini_cmd_t
return -EINVAL;
rv = cx24110_readreg(state, 0x77);
- cx24110_writereg(state, 0x77, rv | 0x04);
+ if (!(rv & 0x04))
+ cx24110_writereg(state, 0x77, rv | 0x04);
rv = cx24110_readreg(state, 0x76);
cx24110_writereg(state, 0x76, ((rv & 0x90) | 0x40 | bit));
@@ -418,14 +419,16 @@ static int cx24110_send_diseqc_msg(struct dvb_frontend* fe,
cx24110_writereg(state, 0x79 + i, cmd->msg[i]);
rv = cx24110_readreg(state, 0x77);
- cx24110_writereg(state, 0x77, rv & ~0x04);
- msleep(30); /* reportedly fixes switching problems */
+ if (rv & 0x04) {
+ cx24110_writereg(state, 0x77, rv & ~0x04);
+ msleep(30); /* reportedly fixes switching problems */
+ }
rv = cx24110_readreg(state, 0x76);
cx24110_writereg(state, 0x76, ((rv & 0x90) | 0x40) | ((cmd->msg_len-3) & 3));
- for (i=500; i-- > 0 && !(cx24110_readreg(state,0x76)&0x40);)
- ; /* wait for LNB ready */
+ for (i=100; i-- > 0 && !(cx24110_readreg(state,0x76)&0x40);)
+ msleep(1); /* wait for LNB ready */
return 0;
}