[linux-dvb] Re: [PATCH] Geniatech Digistar support/Digiwave 103g

Michael Krufky mkrufky at linuxtv.org
Thu Jun 29 06:58:32 CEST 2006


Saqeb,

>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;
> 	};
>  
>
^^^ How do you know this change is correct?  (I don't doubt it -- I 
wouldn't know)  What problem does this change solve for you?  I think 
you should ask some other users of cards with a cx24123 to confirm that 
this doesnt break anything, and achieves the desired results.

>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,
> 	},
>+
>  
>
^^ extra newline

>+[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,
>+       },
>+
>+
>  
>
^^ two more unneeded newlines

> };
> 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,
>+	},{
>+
>  
>
^^ another

>+		 .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:
>  
>
^^ more broken whitespace

>+	      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,
>+};
>+
>+
>  
>
^^ skip one line is enough here.

> 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;
>+
>+
>  
>
^^ remove these newlines

>+	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,
>  
>
The patch itself is fine, I would just like some sort of a description 
explaining what is being done to the cx24123, and having another user 
test that change would also help.

Cheers,

Mike



More information about the linux-dvb mailing list