diff options
author | Adam Szalkowski <adamsz@gmx.net> | 2005-09-09 16:02:35 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-09-09 16:57:39 -0400 |
commit | 296c786a0d2122b1e47c80ca717d8a8ac36402c1 (patch) | |
tree | adc52c99f6059e8772d53c7d9c912db190bc8c92 /drivers/media/dvb/frontends/cx24110.c | |
parent | d897275500d8fac919a11073eb587ce0e3fcc36c (diff) |
[PATCH] dvb: frontend: cx24110: another DiSEqC fix
Fix DiSEqC problems.
Signed-off-by: Adam Szalkowski <adam@szalkowski.de>
Signed-off-by: Johannes Stezenbach <js@linuxtv.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/media/dvb/frontends/cx24110.c')
-rw-r--r-- | drivers/media/dvb/frontends/cx24110.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/media/dvb/frontends/cx24110.c b/drivers/media/dvb/frontends/cx24110.c index 71b54094bda8..eb4833ee72be 100644 --- a/drivers/media/dvb/frontends/cx24110.c +++ b/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 | |||
398 | return -EINVAL; | 398 | return -EINVAL; |
399 | 399 | ||
400 | rv = cx24110_readreg(state, 0x77); | 400 | rv = cx24110_readreg(state, 0x77); |
401 | cx24110_writereg(state, 0x77, rv | 0x04); | 401 | if (!(rv & 0x04)) |
402 | cx24110_writereg(state, 0x77, rv | 0x04); | ||
402 | 403 | ||
403 | rv = cx24110_readreg(state, 0x76); | 404 | rv = cx24110_readreg(state, 0x76); |
404 | cx24110_writereg(state, 0x76, ((rv & 0x90) | 0x40 | bit)); | 405 | cx24110_writereg(state, 0x76, ((rv & 0x90) | 0x40 | bit)); |
@@ -418,14 +419,16 @@ static int cx24110_send_diseqc_msg(struct dvb_frontend* fe, | |||
418 | cx24110_writereg(state, 0x79 + i, cmd->msg[i]); | 419 | cx24110_writereg(state, 0x79 + i, cmd->msg[i]); |
419 | 420 | ||
420 | rv = cx24110_readreg(state, 0x77); | 421 | rv = cx24110_readreg(state, 0x77); |
421 | cx24110_writereg(state, 0x77, rv & ~0x04); | 422 | if (rv & 0x04) { |
422 | msleep(30); /* reportedly fixes switching problems */ | 423 | cx24110_writereg(state, 0x77, rv & ~0x04); |
424 | msleep(30); /* reportedly fixes switching problems */ | ||
425 | } | ||
423 | 426 | ||
424 | rv = cx24110_readreg(state, 0x76); | 427 | rv = cx24110_readreg(state, 0x76); |
425 | 428 | ||
426 | cx24110_writereg(state, 0x76, ((rv & 0x90) | 0x40) | ((cmd->msg_len-3) & 3)); | 429 | cx24110_writereg(state, 0x76, ((rv & 0x90) | 0x40) | ((cmd->msg_len-3) & 3)); |
427 | for (i=500; i-- > 0 && !(cx24110_readreg(state,0x76)&0x40);) | 430 | for (i=100; i-- > 0 && !(cx24110_readreg(state,0x76)&0x40);) |
428 | ; /* wait for LNB ready */ | 431 | msleep(1); /* wait for LNB ready */ |
429 | 432 | ||
430 | return 0; | 433 | return 0; |
431 | } | 434 | } |