diff options
author | Yeasah Pell <yeasah@schwide.com> | 2006-09-26 11:30:14 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-09-26 11:30:14 -0400 |
commit | ef76856d26087f897e163b9fd8b2f7bd0cd54fc7 (patch) | |
tree | aac68db3ea0572961b11a95c7b1daeeb6f384ce9 | |
parent | 8d90ee5e0e57b67e6e5c01cb14495fb69edccbbf (diff) |
V4L/DVB (4479): LNB voltage control was inverted for the benefit of geniatech cards on Kworld
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)
Acked-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Yeasah Pell <yeasah@schwide.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
-rw-r--r-- | drivers/media/dvb/frontends/cx24123.c | 7 | ||||
-rw-r--r-- | drivers/media/dvb/frontends/cx24123.h | 3 | ||||
-rw-r--r-- | drivers/media/video/cx88/cx88-dvb.c | 1 |
3 files changed, 11 insertions, 0 deletions
diff --git a/drivers/media/dvb/frontends/cx24123.c b/drivers/media/dvb/frontends/cx24123.c index f77b2d59955c..62d69a6ea699 100644 --- a/drivers/media/dvb/frontends/cx24123.c +++ b/drivers/media/dvb/frontends/cx24123.c | |||
@@ -661,6 +661,10 @@ static int cx24123_initfe(struct dvb_frontend* fe) | |||
661 | for (i = 0; i < sizeof(cx24123_regdata) / sizeof(cx24123_regdata[0]); i++) | 661 | for (i = 0; i < sizeof(cx24123_regdata) / sizeof(cx24123_regdata[0]); i++) |
662 | cx24123_writereg(state, cx24123_regdata[i].reg, cx24123_regdata[i].data); | 662 | cx24123_writereg(state, cx24123_regdata[i].reg, cx24123_regdata[i].data); |
663 | 663 | ||
664 | /* Set the LNB polarity */ | ||
665 | if(state->config->lnb_polarity) | ||
666 | cx24123_writereg(state, 0x32, cx24123_readreg(state, 0x32) | 0x02); | ||
667 | |||
664 | return 0; | 668 | return 0; |
665 | } | 669 | } |
666 | 670 | ||
@@ -678,6 +682,9 @@ static int cx24123_set_voltage(struct dvb_frontend* fe, fe_sec_voltage_t voltage | |||
678 | case SEC_VOLTAGE_18: | 682 | case SEC_VOLTAGE_18: |
679 | dprintk("%s: setting voltage 18V\n", __FUNCTION__); | 683 | dprintk("%s: setting voltage 18V\n", __FUNCTION__); |
680 | return cx24123_writereg(state, 0x29, val | 0x80); | 684 | return cx24123_writereg(state, 0x29, val | 0x80); |
685 | case SEC_VOLTAGE_OFF: | ||
686 | /* already handled in cx88-dvb */ | ||
687 | return 0; | ||
681 | default: | 688 | default: |
682 | return -EINVAL; | 689 | return -EINVAL; |
683 | }; | 690 | }; |
diff --git a/drivers/media/dvb/frontends/cx24123.h b/drivers/media/dvb/frontends/cx24123.h index 6a8cb4c41adf..57a1dae1dc40 100644 --- a/drivers/media/dvb/frontends/cx24123.h +++ b/drivers/media/dvb/frontends/cx24123.h | |||
@@ -30,6 +30,9 @@ struct cx24123_config | |||
30 | 30 | ||
31 | /* Need to set device param for start_dma */ | 31 | /* Need to set device param for start_dma */ |
32 | int (*set_ts_params)(struct dvb_frontend* fe, int is_punctured); | 32 | int (*set_ts_params)(struct dvb_frontend* fe, int is_punctured); |
33 | |||
34 | /* 0 = LNB voltage normal, 1 = LNB voltage inverted */ | ||
35 | int lnb_polarity; | ||
33 | }; | 36 | }; |
34 | 37 | ||
35 | #if defined(CONFIG_DVB_CX24123) || defined(CONFIG_DVB_CX24123_MODULE) | 38 | #if defined(CONFIG_DVB_CX24123) || defined(CONFIG_DVB_CX24123_MODULE) |
diff --git a/drivers/media/video/cx88/cx88-dvb.c b/drivers/media/video/cx88/cx88-dvb.c index ebbf54077132..0771acbed74d 100644 --- a/drivers/media/video/cx88/cx88-dvb.c +++ b/drivers/media/video/cx88/cx88-dvb.c | |||
@@ -498,6 +498,7 @@ static struct cx24123_config hauppauge_novas_config = { | |||
498 | static struct cx24123_config kworld_dvbs_100_config = { | 498 | static struct cx24123_config kworld_dvbs_100_config = { |
499 | .demod_address = 0x15, | 499 | .demod_address = 0x15, |
500 | .set_ts_params = cx24123_set_ts_param, | 500 | .set_ts_params = cx24123_set_ts_param, |
501 | .lnb_polarity = 1, | ||
501 | }; | 502 | }; |
502 | 503 | ||
503 | static int dvb_register(struct cx8802_dev *dev) | 504 | static int dvb_register(struct cx8802_dev *dev) |