[linux-dvb] [PATCH] DST patch for disqec positioner control

Yeasah Pell yeasah at schwide.com
Sat Apr 29 21:43:38 CEST 2006


This patch conditionally enables 5-byte diseqc commands for those card 
types which have the DST_TYPE_HAS_DISEQC5 capability. It allows my 
Chaintech DST-1000 card to properly control my positioner.

Signed-off-by: Yeasah Pell <yeasah at schwide.net>

--- a/linux/drivers/media/dvb/bt8xx/dst.c       Fri Apr 28 10:14:45 2006 
-0300
+++ b/linux/drivers/media/dvb/bt8xx/dst.c       Sat Apr 29 15:40:16 2006 
-0400
@@ -1189,9 +1189,14 @@ static int dst_set_diseqc(struct dvb_fro
 
        if (state->dst_type != DST_TYPE_IS_SAT)
                return 0;
-       if (cmd->msg_len == 0 || cmd->msg_len > 4)
+
+       if (cmd->msg_len > 0 && cmd->msg_len < 5)
+               memcpy(&paket[3], cmd->msg, cmd->msg_len);
+       else if(cmd->msg_len == 5 && state->dst_hw_cap & 
DST_TYPE_HAS_DISEQC5)
+               memcpy(&paket[2], cmd->msg, cmd->msg_len);
+       else
                return -EINVAL;
-       memcpy(&paket[3], cmd->msg, cmd->msg_len);
+
        paket[7] = dst_check_sum(&paket[0], 7);
        dst_command(state, paket, 8);
        return 0;




More information about the linux-dvb mailing list