Yeasah Pell wrote:
So we'll have to set LNBDCPol differently depending on the card type.
No big deal, just a register initialization change.
Here's the patch -- this does two things.
1) It sets LNBDCPol differently based on the card type. Now it should
work properly for both the kworld and geniatech cards.
2) It stops returning an error for the SEC_VOLTAGE_OFF voltage command
(the cx88-dvb level handles the actual voltage on/off, but it still
passes the ioctl down to the cx24123 level, which previously rejected
the OFF as invalid so the ioctl would report failure)
Signed-off-by: Yeasah Pell <yeasah at schwide.net>
diff -r 265f2c767b45 linux/drivers/media/dvb/frontends/cx24123.c
--- a/linux/drivers/media/dvb/frontends/cx24123.c Mon Jul 24 15:19:37 2006 -0300
+++ b/linux/drivers/media/dvb/frontends/cx24123.c Tue Jul 25 23:01:25 2006 -0400
@@ -668,6 +668,10 @@ static int cx24123_initfe(struct dvb_fro
for (i = 0; i < sizeof(cx24123_regdata) / sizeof(cx24123_regdata[0]); i++)
cx24123_writereg(state, cx24123_regdata[i].reg, cx24123_regdata[i].data);
+ /* Set the LNB polarity */
+ if(state->config->lnb_polarity)
+ cx24123_writereg(state, 0x32, cx24123_readreg(state, 0x32) | 0x02);
+
return 0;
}
@@ -685,6 +689,9 @@ static int cx24123_set_voltage(struct dv
case SEC_VOLTAGE_18:
dprintk("%s: setting voltage 18V\n", __FUNCTION__);
return cx24123_writereg(state, 0x29, val | 0x80);
+ case SEC_VOLTAGE_OFF:
+ /* already handled in cx88-dvb */
+ return 0;
default:
return -EINVAL;
};
diff -r 265f2c767b45 linux/drivers/media/dvb/frontends/cx24123.h
--- a/linux/drivers/media/dvb/frontends/cx24123.h Mon Jul 24 15:19:37 2006 -0300
+++ b/linux/drivers/media/dvb/frontends/cx24123.h Tue Jul 25 23:01:25 2006 -0400
@@ -30,6 +30,9 @@ struct cx24123_config
/* Need to set device param for start_dma */
int (*set_ts_params)(struct dvb_frontend* fe, int is_punctured);
+
+ /* 0 = LNB voltage normal, 1 = LNB voltage inverted */
+ int lnb_polarity;
};
extern struct dvb_frontend* cx24123_attach(const struct cx24123_config* config,
diff -r 265f2c767b45 linux/drivers/media/video/cx88/cx88-dvb.c
--- a/linux/drivers/media/video/cx88/cx88-dvb.c Mon Jul 24 15:19:37 2006 -0300
+++ b/linux/drivers/media/video/cx88/cx88-dvb.c Tue Jul 25 23:01:25 2006 -0400
@@ -515,16 +515,19 @@ static struct cx24123_config geniatech_d
static struct cx24123_config geniatech_dvbs_config = {
.demod_address = 0x55,
.set_ts_params = cx24123_set_ts_param,
+ .lnb_polarity = 0,
};
static struct cx24123_config hauppauge_novas_config = {
.demod_address = 0x55,
.set_ts_params = cx24123_set_ts_param,
+ .lnb_polarity = 0,
};
static struct cx24123_config kworld_dvbs_100_config = {
.demod_address = 0x15,
.set_ts_params = cx24123_set_ts_param,
+ .lnb_polarity = 1,
};
#endif
_______________________________________________
linux-dvb@xxxxxxxxxxx
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb