aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx88/cx88-dvb.c
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/cx88-dvb.c
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/cx88-dvb.c')
-rw-r--r--drivers/media/video/cx88/cx88-dvb.c24
1 files changed, 17 insertions, 7 deletions
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: