summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenneth Aafloy <devnull@localhost>2005-03-08 12:42:00 +0000
committerKenneth Aafloy <devnull@localhost>2005-03-08 12:42:00 +0000
commitebeaa60db551f821f75298799dab1a81729e423b (patch)
tree6dab0fd87a38b9e6ff0b9bbf8f3e609c5dc84fa1
parent220969854044a925ff643eb6123b5671b4505148 (diff)
downloadmediapointer-dvb-s2-ebeaa60db551f821f75298799dab1a81729e423b.tar.gz
mediapointer-dvb-s2-ebeaa60db551f821f75298799dab1a81729e423b.tar.bz2
- cx24110 diseqc_send_burst (Peter Hettkamp, Uwe Bugla)
-rw-r--r--linux/drivers/media/dvb/frontends/cx24110.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/linux/drivers/media/dvb/frontends/cx24110.c b/linux/drivers/media/dvb/frontends/cx24110.c
index 4bbffaae2..1dec5d74f 100644
--- a/linux/drivers/media/dvb/frontends/cx24110.c
+++ b/linux/drivers/media/dvb/frontends/cx24110.c
@@ -385,6 +385,29 @@ static int cx24110_set_voltage (struct dvb_frontend* fe, fe_sec_voltage_t voltag
};
}
+static int cx24110_diseqc_send_burst (struct dvb_frontend* fe, fe_sec_mini_cmd_t burst)
+{
+ int rv, bit, i;
+ struct cx24110_state *state = (struct cx24110_state*) fe->demodulator_priv;
+
+ if (burst == SEC_MINI_A)
+ bit=0x00;
+ else if(burst == SEC_MINI_B)
+ bit=0x08;
+ else
+ return -EINVAL;
+
+ rv = cx24110_readreg(state, 0x77);
+ cx24110_writereg(state, 0x77, rv|0x04);
+
+ rv = cx24110_readreg(state, 0x76);
+ cx24110_writereg(state, 0x76, ((rv & 0x90) | 0x40 | bit));
+ for (i=500; i-- > 0 && !(cx24110_readreg(state,0x76)&0x40);)
+ ; /* wait for LNB ready */
+
+ return 0;
+}
+
static int cx24110_send_diseqc_msg(struct dvb_frontend* fe,
struct dvb_diseqc_master_cmd *cmd)
{
@@ -394,6 +417,9 @@ static int cx24110_send_diseqc_msg(struct dvb_frontend* fe,
for (i = 0; i < cmd->msg_len; i++)
cx24110_writereg(state, 0x79 + i, cmd->msg[i]);
+ rv = cx24110_readreg(state, 0x77);
+ cx24110_writereg(state, 0x77, rv|0x04);
+
rv = cx24110_readreg(state, 0x76);
cx24110_writereg(state, 0x76, ((rv & 0x90) | 0x40) | ((cmd->msg_len-3) & 3));
@@ -614,6 +640,7 @@ static struct dvb_frontend_ops cx24110_ops = {
.read_ucblocks = cx24110_read_ucblocks,
.diseqc_send_master_cmd = cx24110_send_diseqc_msg,
+ .diseqc_send_burst = cx24110_diseqc_send_burst,
.set_tone = cx24110_set_tone,
.set_voltage = cx24110_set_voltage,
};