[PATCH] Geniatech Digistar support/Digiwave 103g

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





--
Saqeb Akhter
# HG changeset patch
# User johoja@localhost
# Node ID ce921c4dce88667e32623b6281d48b8d63bedb36
# Parent  8feabb5c0eae057ee8db899977174f0e35e5162c


From: Saqeb Akhter <johoja@xxxxxxxxx>



Signed-off-by: Saqeb Akhter <johoja@xxxxxxxxx>

diff -r 8feabb5c0eae -r ce921c4dce88 linux/Documentation/video4linux/CARDLIST.cx88
--- a/linux/Documentation/video4linux/CARDLIST.cx88	Tue Jun 27 03:57:46 2006
+++ b/linux/Documentation/video4linux/CARDLIST.cx88	Wed Jun 28 16:56:42 2006
@@ -50,3 +50,4 @@
  49 -> PixelView PlayTV P7000                              [1554:4813]
  50 -> NPG Tech Real TV FM Top 10                          [14f1:0842]
  51 -> WinFast DTV2000 H                                   [107d:665e]
+ 52 -> Geniatech DVB-S                                     [14f1:0084]
diff -r 8feabb5c0eae -r ce921c4dce88 linux/drivers/media/dvb/frontends/cx24123.c
--- a/linux/drivers/media/dvb/frontends/cx24123.c	Tue Jun 27 03:57:46 2006
+++ b/linux/drivers/media/dvb/frontends/cx24123.c	Wed Jun 28 16:56:42 2006
@@ -681,10 +681,10 @@
 	switch (voltage) {
 	case SEC_VOLTAGE_13:
 		dprintk("%s: setting voltage 13V\n", __FUNCTION__);
-		return cx24123_writereg(state, 0x29, val | 0x80);
+		return cx24123_writereg(state, 0x29, val & 0x7f);
 	case SEC_VOLTAGE_18:
 		dprintk("%s: setting voltage 18V\n", __FUNCTION__);
-		return cx24123_writereg(state, 0x29, val & 0x7f);
+		return cx24123_writereg(state, 0x29, val | 0x80);
 	default:
 		return -EINVAL;
 	};
diff -r 8feabb5c0eae -r ce921c4dce88 linux/drivers/media/video/cx88/cx88-cards.c
--- a/linux/drivers/media/video/cx88/cx88-cards.c	Tue Jun 27 03:57:46 2006
+++ b/linux/drivers/media/video/cx88/cx88-cards.c	Wed Jun 28 16:56:42 2006
@@ -1227,6 +1227,24 @@
 		}},
 		.dvb            = 1,
 	},
+
+[CX88_BOARD_GENIATECH_DVBS] = {
+	      .name    = "Geniatech DVB-S",
+	      .tuner_type    = TUNER_ABSENT,
+	      .radio_type    = UNSET,
+	      .tuner_addr    = ADDR_UNSET,
+	      .radio_addr    = ADDR_UNSET,
+	      .input  = {{
+		     .type  = CX88_VMUX_DVB,
+		     .vmux  = 0,
+	      },{
+		     .type  = CX88_VMUX_COMPOSITE1,
+		     .vmux  = 1,
+	      }},
+	     .dvb      = 1,
+       },
+
+
 };
 const unsigned int cx88_bcount = ARRAY_SIZE(cx88_boards);
 
@@ -1472,6 +1490,12 @@
 		.subvendor = 0x18ac,
 		.subdevice = 0xd800, /* FusionHDTV 3 Gold (original revision) */
 		.card      = CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_Q,
+	},{
+
+		 .subvendor = 0x14f1,
+		 .subdevice = 0x0084,
+		 .card      = CX88_BOARD_GENIATECH_DVBS,
+
 	},
 };
 const unsigned int cx88_idcount = ARRAY_SIZE(cx88_subids);
diff -r 8feabb5c0eae -r ce921c4dce88 linux/drivers/media/video/cx88/cx88-dvb.c
--- a/linux/drivers/media/video/cx88/cx88-dvb.c	Tue Jun 27 03:57:46 2006
+++ b/linux/drivers/media/video/cx88/cx88-dvb.c	Wed Jun 28 16:56:42 2006
@@ -497,6 +497,29 @@
 	return 0;
 }
 
+static int geniatech_dvbs_set_voltage(struct dvb_frontend *fe, fe_sec_voltage_t voltage)
+{
+       struct cx8802_dev *dev= fe->dvb->priv;
+       struct cx88_core *core = dev->core;
+	    switch (voltage) {
+      case SEC_VOLTAGE_OFF:
+	      printk("%s: LNB Voltage OFF\n", __func__);
+	      cx_write(MO_GP0_IO, 0x0000efff);
+	      break;
+       default:
+	      break;
+       }
+	if (core->prev_set_voltage)
+		return core->prev_set_voltage(fe, voltage);
+return 0;
+}
+
+static struct cx24123_config geniatech_dvbs_config = {
+       .demod_address  = 0x55,
+       .set_ts_params  = cx24123_set_ts_param,
+};
+
+
 static struct cx24123_config hauppauge_novas_config = {
 	.demod_address		= 0x55,
 	.set_ts_params		= cx24123_set_ts_param,
@@ -761,6 +784,16 @@
 			dev->dvb.frontend->ops.set_voltage = kworld_dvbs_100_set_voltage;
 		}
 		break;
+
+
+	case CX88_BOARD_GENIATECH_DVBS:
+	      dev->dvb.frontend = cx24123_attach(&geniatech_dvbs_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 = geniatech_dvbs_set_voltage;
+	     }
+	      break;
 #endif
 	default:
 		printk("%s: The frontend of your DVB/ATSC card isn't supported yet\n",
diff -r 8feabb5c0eae -r ce921c4dce88 linux/drivers/media/video/cx88/cx88.h
--- a/linux/drivers/media/video/cx88/cx88.h	Tue Jun 27 03:57:46 2006
+++ b/linux/drivers/media/video/cx88/cx88.h	Wed Jun 28 16:56:42 2006
@@ -204,6 +204,7 @@
 #define CX88_BOARD_PIXELVIEW_PLAYTV_P7000  49
 #define CX88_BOARD_NPGTECH_REALTV_TOP10FM  50
 #define CX88_BOARD_WINFAST_DTV2000H        51
+#define CX88_BOARD_GENIATECH_DVBS         52
 
 enum cx88_itype {
 	CX88_VMUX_COMPOSITE1 = 1,
_______________________________________________

linux-dvb@xxxxxxxxxxx
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

[Index of Archives]     [Linux Media]     [Video 4 Linux]     [Asterisk]     [Samba]     [Xorg]     [Xfree86]     [Linux USB]

  Powered by Linux