Mailing List archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[linux-dvb] cx24110 diseqc patch
- To: linux-dvb@linuxtv.org
- Subject: [linux-dvb] cx24110 diseqc patch
- From: Volker Cordes <MrLogic@gmx.de>
- Date: Mon, 12 May 2003 17:08:05 +0200
- Content-type: multipart/mixed;boundary="------------000806030902070705030703"
- Sender: linux-dvb-bounce@linuxtv.org
- User-agent: Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.3) Gecko/20030327 Debian/1.3-4
Hi,
here's my DiSEqC patch for the cx24110 frontend driver.
Volker
--- dvb-kernel/linux/drivers/media/dvb/frontends/cx24110.c 2003-05-12 17:03:08.000000000 +0200
+++ dvb-kernel.patched/linux/drivers/media/dvb/frontends/cx24110.c 2003-05-12 15:53:04.000000000 +0200
@@ -467,6 +467,17 @@
};
}
+static void sendDiSEqCMessage(struct dvb_i2c_bus *i2c, struct dvb_diseqc_master_cmd *pCmd) {
+ int i, rv;
+ for (i = 0; i < pCmd->msg_len; i++)
+ cx24110_writereg(i2c, 0x79 + i, pCmd->msg[i]);
+
+ rv = cx24110_readreg(i2c, 0x76);
+
+ cx24110_writereg(i2c, 0x76, ((rv & 0x90) | 0x40) | ((pCmd->msg_len-3) & 3));
+ for(i=500;i-->0&&!(cx24110_readreg(i2c,0x76)&0x40);); /* wait for LNB ready */
+}
+
static
int cx24110_ioctl (struct dvb_frontend *fe, unsigned int cmd, void *arg)
@@ -617,6 +628,12 @@
case FE_SET_VOLTAGE:
return cx24110_set_voltage (i2c, (fe_sec_voltage_t) arg);
+ case FE_DISEQC_SEND_MASTER_CMD:
+ {
+ sendDiSEqCMessage(i2c, (struct dvb_diseqc_master_cmd*) arg);
+ return 0;
+ }
+
default:
return -EOPNOTSUPP;
};
Home |
Main Index |
Thread Index