Re: [PATCH] hvr1110, please apply it ! next try

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

 



tomlohave@xxxxxxxxx a écrit :
Michael Krufky a écrit :
tomlohave wrote:
Hello,

Here is new patch to support hvr1110.
Can someone apply it and / or give me feedback about it if something is
wrong.

Tom, Please see some comments inline below:

Thanks for feedback and comments
signed-off-by : Thomas Genty <tomlohave@xxxxxxxxx>


------------------------------------------------------------------------

diff -uprN v4l-dvb/linux/drivers/media/video/saa7134/saa7134-cards.c v4l-dvb-hvr1110/linux/drivers/media/video/saa7134/saa7134-cards.c --- v4l-dvb/linux/drivers/media/video/saa7134/saa7134-cards.c 2006-11-03 14:49:23.000000000 +0100 +++ v4l-dvb-hvr1110/linux/drivers/media/video/saa7134/saa7134-cards.c 2006-11-03 15:25:10.000000000 +0100 @@ -3098,6 +3098,40 @@ struct saa7134_board saa7134_boards[] = .gpio = 0x0200000,
         },
     },
+    [SAA7134_BOARD_HAUPPAUGE_HVR1110] = {
+        /* Thomas Genty <tomlohave@xxxxxxxxx> */
+        .name           = "Hauppauge WinTV-HVR1110 DVB-T/Hybrid",
+        .audio_clock    = 0x00187de7,
+        .tuner_type     = TUNER_PHILIPS_TDA8290,
+        .radio_type     = UNSET,
+        .tuner_addr     = ADDR_UNSET,
+        .radio_addr     = ADDR_UNSET,
+        .mpeg           = SAA7134_MPEG_DVB,
+        .gpiomask       = 0x000200000,
+        .inputs         = {{
+            .name = name_tv,
+            .vmux = 1,
+            .amux = TV,
+            .tv   = 1,
+        }/*,{                // need test

dont use /* comments */ to disable those inputs, instead, enclose inside an #if 0 block #endif
i remove them
+            .name = name_comp1,
+            .vmux = 2,
+            .amux = LINE2,
+        },{
+            .name = name_comp2,
+            .vmux = 0,
+            .amux = LINE2,
+        },{
+            .name = name_svideo,
+            .vmux = 8,
+            .amux = LINE2,
+        }*/},

...can't you just test those inputs as well yourself and make it complete?
Nothing to test, no svideo output. i will try
+        .radio = {
+            .name = name_radio,
+            .amux   = TV,
+            .gpio   = 0x0200000,
+        },
+    },

Is radio tested?
yes and all is good.
     [SAA7134_BOARD_AVERMEDIA_STUDIO_507] = {

Please add new cards to the END of the array -- not the middle of it.

Done.
         /* Mikhail Fedotov <mo_fedotov@xxxxxxx> */
         .name           = "Avermedia AVerTV Studio 507",
@@ -3783,6 +3817,12 @@ struct pci_device_id saa7134_pci_tbl[] =
     },{
         .vendor       = PCI_VENDOR_ID_PHILIPS,
         .device       = PCI_DEVICE_ID_PHILIPS_SAA7133,
+        .subvendor    = 0x0070,
+        .subdevice    = 0x6701,
+        .driver_data  = SAA7134_BOARD_HAUPPAUGE_HVR1110,
+    },{
+        .vendor       = PCI_VENDOR_ID_PHILIPS,
+        .device       = PCI_DEVICE_ID_PHILIPS_SAA7133,

Please move this to the END of the pci ids array -- not the middle.

Done.
         .subvendor    = 0x1461, /* Avermedia Technologies Inc */
         .subdevice    = 0x9715,
         .driver_data  = SAA7134_BOARD_AVERMEDIA_STUDIO_507,
@@ -3935,6 +3975,7 @@ int saa7134_board_init1(struct saa7134_d
     case SAA7134_BOARD_FLYDVBT_LR301:
     case SAA7134_BOARD_FLYDVBTDUO:
     case SAA7134_BOARD_PROTEUS_2309:
+    /*case SAA7134_BOARD_HAUPPAUGE_HVR1110:*/ //Todo

^^^^^ Please either remove this, or enclose it inside an #if 0 block, like so:

     case SAA7134_BOARD_PROTEUS_2309:
+#if 0
+    case SAA7134_BOARD_HAUPPAUGE_HVR1110:
+#endif
         dev->has_remote = SAA7134_REMOTE_GPIO;

...in this case, just remove it -- add it later when ready.

done.
         dev->has_remote = SAA7134_REMOTE_GPIO;
         break;
     case SAA7134_BOARD_FLYDVBS_LR300:
@@ -4129,6 +4170,7 @@ int saa7134_board_init2(struct saa7134_d
     case SAA7134_BOARD_TEVION_DVBT_220RF:
     case SAA7134_BOARD_ASUSTeK_P7131_DUAL:
     case SAA7134_BOARD_MEDION_MD8800_QUADRO:
+    case SAA7134_BOARD_HAUPPAUGE_HVR1110:
         /* this is a hybrid board, initialize to analog mode
          * and configure firmware eeprom address
          */
diff -uprN v4l-dvb/linux/drivers/media/video/saa7134/saa7134-dvb.c v4l-dvb-hvr1110/linux/drivers/media/video/saa7134/saa7134-dvb.c --- v4l-dvb/linux/drivers/media/video/saa7134/saa7134-dvb.c 2006-11-03 14:49:23.000000000 +0100 +++ v4l-dvb-hvr1110/linux/drivers/media/video/saa7134/saa7134-dvb.c 2006-11-03 15:28:50.000000000 +0100
@@ -900,6 +900,17 @@ static struct tda1004x_config pinnacle_p
 };
/* ------------------------------------------------------------------ */
+static struct tda1004x_config hauppauge_hvr_1110_config = {
+    .demod_address = 0x08,
+    .invert        = 1,
+    .invert_oclk   = 0,
+    .xtal_freq     = TDA10046_XTAL_16M,
+    .agc_config    = TDA10046_AGC_TDA827X,
+    .if_freq       = TDA10046_FREQ_045,
+    .request_firmware = philips_tda1004x_request_firmware,
+};
+
+/* ------------------------------------------------------------------ */ static struct tda1004x_config asus_p7131_dual_config = {
     .demod_address = 0x08,
@@ -1222,6 +1233,17 @@ static int dvb_init(struct saa7134_dev *
dev->dvb.frontend->ops.tuner_ops.set_params = philips_tiger_tuner_set_params;
         }
         break;
+    case SAA7134_BOARD_HAUPPAUGE_HVR1110:
+        dev->dvb.frontend = dvb_attach(tda10046_attach,
+                           &hauppauge_hvr_1110_config,
+                           &dev->i2c_adap);
+        if (dev->dvb.frontend) {
+ dev->dvb.frontend->ops.i2c_gate_ctrl = tda8290_i2c_gate_ctrl; + dev->dvb.frontend->ops.tuner_ops.init = philips_tiger_tuner_init; + dev->dvb.frontend->ops.tuner_ops.sleep = philips_tiger_tuner_sleep; + dev->dvb.frontend->ops.tuner_ops.set_params = philips_tiger_tuner_set_params;
+        }
+        break;
     case SAA7134_BOARD_ASUSTeK_P7131_DUAL:
         dev->dvb.frontend = dvb_attach(tda10046_attach,
                            &asus_p7131_dual_config,
diff -uprN v4l-dvb/linux/drivers/media/video/saa7134/saa7134.h v4l-dvb-hvr1110/linux/drivers/media/video/saa7134/saa7134.h --- v4l-dvb/linux/drivers/media/video/saa7134/saa7134.h 2006-11-03 14:49:23.000000000 +0100 +++ v4l-dvb-hvr1110/linux/drivers/media/video/saa7134/saa7134.h 2006-11-03 15:31:48.000000000 +0100
@@ -239,6 +239,7 @@ struct saa7134_format {
 #define SAA7134_BOARD_PINNACLE_PCTV_310i  101
 #define SAA7134_BOARD_AVERMEDIA_STUDIO_507 102
 #define SAA7134_BOARD_VIDEOMATE_DVBT_200A  103
+#define SAA7134_BOARD_HAUPPAUGE_HVR1110 104
#define SAA7134_MAXBOARDS 8
 #define SAA7134_INPUT_MAX 8
diff -uprN v4l-dvb/linux/drivers/media/video/saa7134/saa7134-input.c v4l-dvb-hvr1110/linux/drivers/media/video/saa7134/saa7134-input.c --- v4l-dvb/linux/drivers/media/video/saa7134/saa7134-input.c 2006-11-03 14:49:23.000000000 +0100 +++ v4l-dvb-hvr1110/linux/drivers/media/video/saa7134/saa7134-input.c 2006-11-03 15:30:39.000000000 +0100
@@ -223,6 +223,8 @@ int saa7134_input_init1(struct saa7134_d
         mask_keydown = 0x000010;
         polling         = 50; // ms
         break;
+    /*case SAA7134_BOARD_HAUPPAUGE_HVR1110:
+        break;*/ // Todo

^^^^^^^^^ Please remove this

done.
     case SAA7134_BOARD_VIDEOMATE_TV_PVR:
     case SAA7134_BOARD_VIDEOMATE_GOLD_PLUS:
     case SAA7134_BOARD_VIDEOMATE_TV_GOLD_PLUSII:



I hope this patch is good

Thanks for all.

Tom

signed-off-by Thomas Genty <tomlohave@xxxxxxxxx>

I forgot the patch

here is it.
diff -ur v4l-dvb/linux/drivers/media/video/saa7134/saa7134-cards.c v4l-dvb-hvr1110/linux/drivers/media/video/saa7134/saa7134-cards.c
--- v4l-dvb/linux/drivers/media/video/saa7134/saa7134-cards.c	2006-11-03 14:49:23.000000000 +0100
+++ v4l-dvb-hvr1110/linux/drivers/media/video/saa7134/saa7134-cards.c	2006-11-03 17:10:36.000000000 +0100
@@ -3166,6 +3166,28 @@
 			.amux   = LINE2,
 		}},
 	},
+	[SAA7134_BOARD_HAUPPAUGE_HVR1110] = {
+		/* Thomas Genty <tomlohave@xxxxxxxxx> */
+		.name           = "Hauppauge WinTV-HVR1110 DVB-T/Hybrid",
+		.audio_clock    = 0x00187de7,
+		.tuner_type     = TUNER_PHILIPS_TDA8290,
+		.radio_type     = UNSET,
+		.tuner_addr     = ADDR_UNSET,
+		.radio_addr     = ADDR_UNSET,
+		.mpeg           = SAA7134_MPEG_DVB,
+		.gpiomask       = 0x000200000,
+		.inputs         = {{
+			.name = name_tv,
+			.vmux = 1,
+			.amux = TV,
+			.tv   = 1,
+		}},
+		.radio = {
+			.name = name_radio,
+			.amux   = TV,
+			.gpio   = 0x0200000,
+		},
+	},
 };
 
 const unsigned int saa7134_bcount = ARRAY_SIZE(saa7134_boards);
@@ -3793,6 +3815,13 @@
 		.subdevice    = 0x4876,
 		.driver_data  = SAA7134_BOARD_ASUSTeK_P7131_DUAL,
 	},{
+		.vendor       = PCI_VENDOR_ID_PHILIPS,
+		.device       = PCI_DEVICE_ID_PHILIPS_SAA7133,
+		.subvendor    = 0x0070,
+		.subdevice    = 0x6701,
+		.driver_data  = SAA7134_BOARD_HAUPPAUGE_HVR1110,
+	},{
+
 		/* --- boards without eeprom + subsystem ID --- */
 		.vendor       = PCI_VENDOR_ID_PHILIPS,
 		.device       = PCI_DEVICE_ID_PHILIPS_SAA7134,
@@ -3832,6 +3861,7 @@
 		.subdevice    = PCI_ANY_ID,
 		.driver_data  = SAA7134_BOARD_UNKNOWN,
 	},{
+
 		/* --- end of list --- */
 	}
 };
@@ -3995,6 +4025,9 @@
 	case SAA7134_BOARD_PINNACLE_PCTV_110i:
 	case SAA7134_BOARD_PINNACLE_PCTV_310i:
 	case SAA7134_BOARD_UPMOST_PURPLE_TV:
+# if 0
+	case SAA7134_BOARD_HAUPPAUGE_HVR1110:
+# endif
 		dev->has_remote = SAA7134_REMOTE_I2C;
 		break;
 	case SAA7134_BOARD_AVERMEDIA_A169_B:
@@ -4129,6 +4162,7 @@
 	case SAA7134_BOARD_TEVION_DVBT_220RF:
 	case SAA7134_BOARD_ASUSTeK_P7131_DUAL:
 	case SAA7134_BOARD_MEDION_MD8800_QUADRO:
+	case SAA7134_BOARD_HAUPPAUGE_HVR1110:
 		/* this is a hybrid board, initialize to analog mode
 		 * and configure firmware eeprom address
 		 */
diff -ur v4l-dvb/linux/drivers/media/video/saa7134/saa7134-dvb.c v4l-dvb-hvr1110/linux/drivers/media/video/saa7134/saa7134-dvb.c
--- v4l-dvb/linux/drivers/media/video/saa7134/saa7134-dvb.c	2006-11-03 14:49:23.000000000 +0100
+++ v4l-dvb-hvr1110/linux/drivers/media/video/saa7134/saa7134-dvb.c	2006-11-03 15:28:50.000000000 +0100
@@ -900,6 +900,17 @@
 };
 
 /* ------------------------------------------------------------------ */
+static struct tda1004x_config hauppauge_hvr_1110_config = {
+	.demod_address = 0x08,
+	.invert        = 1,
+	.invert_oclk   = 0,
+	.xtal_freq     = TDA10046_XTAL_16M,
+	.agc_config    = TDA10046_AGC_TDA827X,
+	.if_freq       = TDA10046_FREQ_045,
+	.request_firmware = philips_tda1004x_request_firmware,
+};
+
+/* ------------------------------------------------------------------ */
 
 static struct tda1004x_config asus_p7131_dual_config = {
 	.demod_address = 0x08,
@@ -1222,6 +1233,17 @@
 			dev->dvb.frontend->ops.tuner_ops.set_params = philips_tiger_tuner_set_params;
 		}
 		break;
+	case SAA7134_BOARD_HAUPPAUGE_HVR1110:
+		dev->dvb.frontend = dvb_attach(tda10046_attach,
+					       &hauppauge_hvr_1110_config,
+					       &dev->i2c_adap);
+		if (dev->dvb.frontend) {
+			dev->dvb.frontend->ops.i2c_gate_ctrl = tda8290_i2c_gate_ctrl;
+			dev->dvb.frontend->ops.tuner_ops.init = philips_tiger_tuner_init;
+			dev->dvb.frontend->ops.tuner_ops.sleep = philips_tiger_tuner_sleep;
+			dev->dvb.frontend->ops.tuner_ops.set_params = philips_tiger_tuner_set_params;
+		}
+		break;
 	case SAA7134_BOARD_ASUSTeK_P7131_DUAL:
 		dev->dvb.frontend = dvb_attach(tda10046_attach,
 					       &asus_p7131_dual_config,
diff -ur v4l-dvb/linux/drivers/media/video/saa7134/saa7134.h v4l-dvb-hvr1110/linux/drivers/media/video/saa7134/saa7134.h
--- v4l-dvb/linux/drivers/media/video/saa7134/saa7134.h	2006-11-03 14:49:23.000000000 +0100
+++ v4l-dvb-hvr1110/linux/drivers/media/video/saa7134/saa7134.h	2006-11-03 15:31:48.000000000 +0100
@@ -239,6 +239,7 @@
 #define SAA7134_BOARD_PINNACLE_PCTV_310i  101
 #define SAA7134_BOARD_AVERMEDIA_STUDIO_507 102
 #define SAA7134_BOARD_VIDEOMATE_DVBT_200A  103
+#define SAA7134_BOARD_HAUPPAUGE_HVR1110 104
 
 #define SAA7134_MAXBOARDS 8
 #define SAA7134_INPUT_MAX 8
diff -ur v4l-dvb/linux/drivers/media/video/saa7134/saa7134-input.c v4l-dvb-hvr1110/linux/drivers/media/video/saa7134/saa7134-input.c
--- v4l-dvb/linux/drivers/media/video/saa7134/saa7134-input.c	2006-11-03 14:49:23.000000000 +0100
+++ v4l-dvb-hvr1110/linux/drivers/media/video/saa7134/saa7134-input.c	2006-11-03 16:53:51.000000000 +0100
@@ -223,6 +223,8 @@
 		mask_keydown = 0x000010;
 		polling	     = 50; // ms
 		break;
+	/*case SAA7134_BOARD_HAUPPAUGE_HVR1110:
+		break;*/ // Todo
 	case SAA7134_BOARD_VIDEOMATE_TV_PVR:
 	case SAA7134_BOARD_VIDEOMATE_GOLD_PLUS:
 	case SAA7134_BOARD_VIDEOMATE_TV_GOLD_PLUSII:
@@ -349,6 +351,13 @@
 		ir->get_key   = get_key_purpletv;
 		ir->ir_codes  = ir_codes_purpletv;
 		break;
+# if 0	
+	case SAA7134_BOARD_HAUPPAUGE_HVR1110:
+		snprintf(ir->c.name, sizeof(ir->c.name), "HVR 1110");
+		ir->get_key   = get_key_purpletv;
+		ir->ir_codes  = ir_codes_purpletv;
+		break;
+# endif
 	default:
 		dprintk("Shouldn't get here: Unknown board %x for I2C IR?\n",dev->board);
 		break;
_______________________________________________
linux-dvb mailing list
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