Commit 296c786a authored by Adam Szalkowski's avatar Adam Szalkowski Committed by Linus Torvalds

[PATCH] dvb: frontend: cx24110: another DiSEqC fix

Fix DiSEqC problems.
Signed-off-by: default avatarAdam Szalkowski <adam@szalkowski.de>
Signed-off-by: default avatarJohannes Stezenbach <js@linuxtv.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent d8972755
......@@ -398,6 +398,7 @@ static int cx24110_diseqc_send_burst(struct dvb_frontend* fe, fe_sec_mini_cmd_t
return -EINVAL;
rv = cx24110_readreg(state, 0x77);
if (!(rv & 0x04))
cx24110_writereg(state, 0x77, rv | 0x04);
rv = cx24110_readreg(state, 0x76);
......@@ -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);
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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment