aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx88
diff options
context:
space:
mode:
authorAndrew de Quincey <adq_dvb@lidskialf.net>2006-05-12 19:31:51 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-06-25 01:00:21 -0400
commitcd20ca9f194323c74ecccf15a3f5ff6c44effe69 (patch)
tree36e8ad6eab353a34dec9713f9bfbfb7c5060a844 /drivers/media/video/cx88
parent9a10655ffa20b596fd162b1c96301f3bed752918 (diff)
V4L/DVB (4012): Fix cx24123 diseqc
Rework diseqc support to be more in line with the other demod drivers. Fix Nova-S-Plus/Nova-SE2 diseqc. Cleanup API. Signed-off-by: Andrew de Quincey <adq_dvb@lidskialf.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/cx88')
-rw-r--r--drivers/media/video/cx88/Kconfig2
-rw-r--r--drivers/media/video/cx88/cx88-dvb.c24
-rw-r--r--drivers/media/video/cx88/cx88.h1
3 files changed, 20 insertions, 7 deletions
diff --git a/drivers/media/video/cx88/Kconfig b/drivers/media/video/cx88/Kconfig
index 630273992a41..c092d2219f0b 100644
--- a/drivers/media/video/cx88/Kconfig
+++ b/drivers/media/video/cx88/Kconfig
@@ -61,6 +61,7 @@ config VIDEO_CX88_DVB_ALL_FRONTENDS
61 select DVB_LGDT330X 61 select DVB_LGDT330X
62 select DVB_NXT200X 62 select DVB_NXT200X
63 select DVB_CX24123 63 select DVB_CX24123
64 select DVB_ISL6421
64 ---help--- 65 ---help---
65 This builds cx88-dvb with all currently supported frontend 66 This builds cx88-dvb with all currently supported frontend
66 demodulators. If you wish to tweak your configuration, and 67 demodulators. If you wish to tweak your configuration, and
@@ -139,6 +140,7 @@ config VIDEO_CX88_DVB_CX24123
139 default y 140 default y
140 depends on VIDEO_CX88_DVB && !VIDEO_CX88_DVB_ALL_FRONTENDS 141 depends on VIDEO_CX88_DVB && !VIDEO_CX88_DVB_ALL_FRONTENDS
141 select DVB_CX24123 142 select DVB_CX24123
143 select DVB_ISL6421
142 ---help--- 144 ---help---
143 This adds DVB-S support for cards based on the 145 This adds DVB-S support for cards based on the
144 Connexant 2388x chip and the CX24123 demodulator. 146 Connexant 2388x chip and the CX24123 demodulator.
diff --git a/drivers/media/video/cx88/cx88-dvb.c b/drivers/media/video/cx88/cx88-dvb.c
index ce225202f327..4d369f8393d9 100644
--- a/drivers/media/video/cx88/cx88-dvb.c
+++ b/drivers/media/video/cx88/cx88-dvb.c
@@ -59,6 +59,7 @@
59#ifdef HAVE_CX24123 59#ifdef HAVE_CX24123
60# include "cx24123.h" 60# include "cx24123.h"
61#endif 61#endif
62#include "isl6421.h"
62 63
63MODULE_DESCRIPTION("driver for cx2388x based DVB cards"); 64MODULE_DESCRIPTION("driver for cx2388x based DVB cards");
64MODULE_AUTHOR("Chris Pascoe <c.pascoe@itee.uq.edu.au>"); 65MODULE_AUTHOR("Chris Pascoe <c.pascoe@itee.uq.edu.au>");
@@ -479,28 +480,30 @@ static int cx24123_set_ts_param(struct dvb_frontend* fe,
479 return 0; 480 return 0;
480} 481}
481 482
482static void cx24123_enable_lnb_voltage(struct dvb_frontend* fe, int on) 483static int kworld_dvbs_100_set_voltage(struct dvb_frontend* fe, fe_sec_voltage_t voltage)
483{ 484{
484 struct cx8802_dev *dev= fe->dvb->priv; 485 struct cx8802_dev *dev= fe->dvb->priv;
485 struct cx88_core *core = dev->core; 486 struct cx88_core *core = dev->core;
486 487
487 if (on) 488 if (voltage == SEC_VOLTAGE_OFF) {
488 cx_write(MO_GP0_IO, 0x000006f9);
489 else
490 cx_write(MO_GP0_IO, 0x000006fB); 489 cx_write(MO_GP0_IO, 0x000006fB);
490 } else {
491 cx_write(MO_GP0_IO, 0x000006f9);
492 }
493
494 if (core->prev_set_voltage)
495 return core->prev_set_voltage(fe, voltage);
496 return 0;
491} 497}
492 498
493static struct cx24123_config hauppauge_novas_config = { 499static struct cx24123_config hauppauge_novas_config = {
494 .demod_address = 0x55, 500 .demod_address = 0x55,
495 .use_isl6421 = 1,
496 .set_ts_params = cx24123_set_ts_param, 501 .set_ts_params = cx24123_set_ts_param,
497}; 502};
498 503
499static struct cx24123_config kworld_dvbs_100_config = { 504static struct cx24123_config kworld_dvbs_100_config = {
500 .demod_address = 0x15, 505 .demod_address = 0x15,
501 .use_isl6421 = 0,
502 .set_ts_params = cx24123_set_ts_param, 506 .set_ts_params = cx24123_set_ts_param,
503 .enable_lnb_voltage = cx24123_enable_lnb_voltage,
504}; 507};
505#endif 508#endif
506 509
@@ -710,10 +713,17 @@ static int dvb_register(struct cx8802_dev *dev)
710 case CX88_BOARD_HAUPPAUGE_NOVASE2_S1: 713 case CX88_BOARD_HAUPPAUGE_NOVASE2_S1:
711 dev->dvb.frontend = cx24123_attach(&hauppauge_novas_config, 714 dev->dvb.frontend = cx24123_attach(&hauppauge_novas_config,
712 &dev->core->i2c_adap); 715 &dev->core->i2c_adap);
716 if (dev->dvb.frontend) {
717 isl6421_attach(dev->dvb.frontend, &dev->core->i2c_adap, 0x08, 0x00, 0x00);
718 }
713 break; 719 break;
714 case CX88_BOARD_KWORLD_DVBS_100: 720 case CX88_BOARD_KWORLD_DVBS_100:
715 dev->dvb.frontend = cx24123_attach(&kworld_dvbs_100_config, 721 dev->dvb.frontend = cx24123_attach(&kworld_dvbs_100_config,
716 &dev->core->i2c_adap); 722 &dev->core->i2c_adap);
723 if (dev->dvb.frontend) {
724 dev->core->prev_set_voltage = dev->dvb.frontend->ops->set_voltage;
725 dev->dvb.frontend->ops->set_voltage = kworld_dvbs_100_set_voltage;
726 }
717 break; 727 break;
718#endif 728#endif
719 default: 729 default:
diff --git a/drivers/media/video/cx88/cx88.h b/drivers/media/video/cx88/cx88.h
index 8413e54ef4b8..411bb9f39c77 100644
--- a/drivers/media/video/cx88/cx88.h
+++ b/drivers/media/video/cx88/cx88.h
@@ -298,6 +298,7 @@ struct cx88_core {
298 /* config info -- dvb */ 298 /* config info -- dvb */
299 struct dvb_pll_desc *pll_desc; 299 struct dvb_pll_desc *pll_desc;
300 unsigned int pll_addr; 300 unsigned int pll_addr;
301 int (*prev_set_voltage)(struct dvb_frontend* fe, fe_sec_voltage_t voltage);
301 302
302 /* state info */ 303 /* state info */
303 struct task_struct *kthread; 304 struct task_struct *kthread;