aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUwe Bugla <uwe.bugla@gmx.de>2005-03-30 16:37:22 -0800
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-03-30 16:37:22 -0800
commit1a657b7f9dce92c3cc4ae316c4f3d3ed263700c9 (patch)
tree18fb691a156428808984db52526866bc9bac77c9
parent1cdac7692c722e09f65e223f152624eaced547c5 (diff)
downloadhistory-1a657b7f9dce92c3cc4ae316c4f3d3ed263700c9.tar.gz
[PATCH] cx24110 Conexant Frontend update
With Peter Hettkamp <peter.hettkamp@t-online.de> I transformed Peter's attempt into a kernel-compatible patch. The dvb frontend cx24110 is given back a send burst function which is needed by the dvbstream-engine of MPlayer 1.0pre6a, for example. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--drivers/media/dvb/frontends/cx24110.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/drivers/media/dvb/frontends/cx24110.c b/drivers/media/dvb/frontends/cx24110.c
index 6147e580a15364..ae16112a06535b 100644
--- a/drivers/media/dvb/frontends/cx24110.c
+++ b/drivers/media/dvb/frontends/cx24110.c
@@ -385,6 +385,30 @@ 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 = 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 +418,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));
@@ -616,6 +643,7 @@ static struct dvb_frontend_ops cx24110_ops = {
.diseqc_send_master_cmd = cx24110_send_diseqc_msg,
.set_tone = cx24110_set_tone,
.set_voltage = cx24110_set_voltage,
+ .diseqc_send_burst = cx24110_diseqc_send_burst,
};
module_param(debug, int, 0644);