diff options
author | Andrew de Quincey <adq_dvb@lidskialf.net> | 2006-05-12 20:31:51 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-06-25 02:00:21 -0300 |
commit | cd20ca9f194323c74ecccf15a3f5ff6c44effe69 (patch) | |
tree | 36e8ad6eab353a34dec9713f9bfbfb7c5060a844 /drivers/media/video | |
parent | 9a10655ffa20b596fd162b1c96301f3bed752918 (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')
-rw-r--r-- | drivers/media/video/cx88/Kconfig | 2 | ||||
-rw-r--r-- | drivers/media/video/cx88/cx88-dvb.c | 24 | ||||
-rw-r--r-- | drivers/media/video/cx88/cx88.h | 1 |
3 files changed, 20 insertions, 7 deletions
diff --git a/drivers/media/video/cx88/Kconfig b/drivers/media/video/cx88/Kconfig index 630273992a4..c092d2219f0 100644 --- a/drivers/media/video/cx88/Kconfig +++ b/drivers/media/video/cx88/Kconfig @@ -61,6 +61,7 @@ config VIDEO_CX88_DVB_ALL_FRONTENDS select DVB_LGDT330X select DVB_NXT200X select DVB_CX24123 + select DVB_ISL6421 ---help--- This builds cx88-dvb with all currently supported frontend demodulators. If you wish to tweak your configuration, and @@ -139,6 +140,7 @@ config VIDEO_CX88_DVB_CX24123 default y depends on VIDEO_CX88_DVB && !VIDEO_CX88_DVB_ALL_FRONTENDS select DVB_CX24123 + select DVB_ISL6421 ---help--- This adds DVB-S support for cards based on the 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 ce225202f32..4d369f8393d 100644 --- a/drivers/media/video/cx88/cx88-dvb.c +++ b/drivers/media/video/cx88/cx88-dvb.c @@ -59,6 +59,7 @@ #ifdef HAVE_CX24123 # include "cx24123.h" #endif +#include "isl6421.h" MODULE_DESCRIPTION("driver for cx2388x based DVB cards"); MODULE_AUTHOR("Chris Pascoe <c.pascoe@itee.uq.edu.au>"); @@ -479,28 +480,30 @@ static int cx24123_set_ts_param(struct dvb_frontend* fe, return 0; } -static void cx24123_enable_lnb_voltage(struct dvb_frontend* fe, int on) +static int kworld_dvbs_100_set_voltage(struct dvb_frontend* fe, fe_sec_voltage_t voltage) { struct cx8802_dev *dev= fe->dvb->priv; struct cx88_core *core = dev->core; - if (on) - cx_write(MO_GP0_IO, 0x000006f9); - else + if (voltage == SEC_VOLTAGE_OFF) { cx_write(MO_GP0_IO, 0x000006fB); + } else { + cx_write(MO_GP0_IO, 0x000006f9); + } + + if (core->prev_set_voltage) + return core->prev_set_voltage(fe, voltage); + return 0; } static struct cx24123_config hauppauge_novas_config = { .demod_address = 0x55, - .use_isl6421 = 1, .set_ts_params = cx24123_set_ts_param, }; static struct cx24123_config kworld_dvbs_100_config = { .demod_address = 0x15, - .use_isl6421 = 0, .set_ts_params = cx24123_set_ts_param, - .enable_lnb_voltage = cx24123_enable_lnb_voltage, }; #endif @@ -710,10 +713,17 @@ static int dvb_register(struct cx8802_dev *dev) case CX88_BOARD_HAUPPAUGE_NOVASE2_S1: dev->dvb.frontend = cx24123_attach(&hauppauge_novas_config, &dev->core->i2c_adap); + if (dev->dvb.frontend) { + isl6421_attach(dev->dvb.frontend, &dev->core->i2c_adap, 0x08, 0x00, 0x00); + } break; case CX88_BOARD_KWORLD_DVBS_100: dev->dvb.frontend = cx24123_attach(&kworld_dvbs_100_config, &dev->core->i2c_adap); + if (dev->dvb.frontend) { + dev->core->prev_set_voltage = dev->dvb.frontend->ops->set_voltage; + dev->dvb.frontend->ops->set_voltage = kworld_dvbs_100_set_voltage; + } break; #endif default: diff --git a/drivers/media/video/cx88/cx88.h b/drivers/media/video/cx88/cx88.h index 8413e54ef4b..411bb9f39c7 100644 --- a/drivers/media/video/cx88/cx88.h +++ b/drivers/media/video/cx88/cx88.h @@ -298,6 +298,7 @@ struct cx88_core { /* config info -- dvb */ struct dvb_pll_desc *pll_desc; unsigned int pll_addr; + int (*prev_set_voltage)(struct dvb_frontend* fe, fe_sec_voltage_t voltage); /* state info */ struct task_struct *kthread; |