diff options
author | Johannes Stezenbach <devnull@localhost> | 2003-05-12 16:15:08 +0000 |
---|---|---|
committer | Johannes Stezenbach <devnull@localhost> | 2003-05-12 16:15:08 +0000 |
commit | db00788c842e8f2eb3363799da479ecb0ab985eb (patch) | |
tree | a70a7d282846ce4a6882916484c00ae84564920a /linux/drivers/media/dvb/frontends/cx24110.c | |
parent | 0fe2955602ff8432806f5f7efafcb73f089b8070 (diff) | |
download | mediapointer-dvb-s2-db00788c842e8f2eb3363799da479ecb0ab985eb.tar.gz mediapointer-dvb-s2-db00788c842e8f2eb3363799da479ecb0ab985eb.tar.bz2 |
added support for FE_DISEQC_SEND_MASTER_CMD
(patch supplied by Volker Cordes)
Diffstat (limited to 'linux/drivers/media/dvb/frontends/cx24110.c')
-rw-r--r-- | linux/drivers/media/dvb/frontends/cx24110.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/linux/drivers/media/dvb/frontends/cx24110.c b/linux/drivers/media/dvb/frontends/cx24110.c index ed2441cdd..87d26398b 100644 --- a/linux/drivers/media/dvb/frontends/cx24110.c +++ b/linux/drivers/media/dvb/frontends/cx24110.c @@ -467,6 +467,17 @@ int cx24110_set_voltage (struct dvb_i2c_bus *i2c, fe_sec_voltage_t voltage) }; } +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 @@ int cx24110_ioctl (struct dvb_frontend *fe, unsigned int cmd, void *arg) 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; }; |