Re: Hauppauge HVR-2200 analog

2011-02-24 Thread Julian Scheel

Am 01.02.2011 14:22, schrieb Mauro Carvalho Chehab:

Em 08-01-2011 13:40, Julian Scheel escreveu:

Am 06.01.2011 23:31, schrieb Julian Scheel:

Attached is the diff I currently use.


Some more process. Attached is a new patch, which allows me to capture video 
and audio from a PAL tuner. Imho the video has wrong colours though (using 
PAL-B). Maybe someone would want to test that patch and give some feedback?

Ok some hours of debugging later, I figured out that only encoder 1 was not 
working properly. This was due to a wrong addressing when sending the dif setup 
commands. The attached new patch fixes this.


Is this patch already working properly?

If so, please:
1) Check its codingstyle with ./scripts/checkpatch.pl
(there are some issues there, like commenting with //)
2) Remove the dead code;
3) Provide a patch description and your Signed-off-by:



For my purpose it works well, but actually I guess some more 
modifications would be needed for other PAL regions. Actually Steven 
wanted to take a look at this patch and merge it. What do you think, Steven?



saa7164-card-pal.diff


Nur in linux-2.6.37/drivers/media/video/saa7164/: modules.order.
diff -x '*.o' -x '*.ko' -x '*.cmd' -x '*.mod.*' -ru 
linux-2.6.37.a/drivers/media/video/saa7164//saa7164-api.c 
linux-2.6.37/drivers/media/video/saa7164//saa7164-api.c
--- linux-2.6.37.a/drivers/media/video/saa7164//saa7164-api.c   2011-01-05 
01:50:19.0 +0100
+++ linux-2.6.37/drivers/media/video/saa7164//saa7164-api.c 2011-01-08 
16:10:32.0 +0100
@@ -548,7 +548,7 @@
tvaudio.std = TU_STANDARD_NTSC_M;
tvaudio.country = 1;
} else {
-   tvaudio.std = TU_STANDARD_PAL_I;
+   tvaudio.std = 0x04; //TU_STANDARD_PAL_I;

Probably, you need to add a define for 0x04 and use its symbol here.

As I have no specification for the card/firmware it's a bit hard to 
insert a define here, as I can not say for sure for which standards it 
would properly work. Again this is something Steven would have to take a 
look at, I think.



tvaudio.country = 44;
}

@@ -608,7 +608,7 @@
dprintk(DBGLVL_API, "%s(nr=%d type=%d val=%x)\n", __func__,
port->nr, port->type, val);

-   if (port->nr == 0)
+   if (port->nr<  3) //== 0)
mas = 0xd0;
else
mas = 0xe0;
diff -x '*.o' -x '*.ko' -x '*.cmd' -x '*.mod.*' -ru 
linux-2.6.37.a/drivers/media/video/saa7164//saa7164-cards.c 
linux-2.6.37/drivers/media/video/saa7164//saa7164-cards.c
--- linux-2.6.37.a/drivers/media/video/saa7164//saa7164-cards.c 2011-01-05 
01:50:19.0 +0100
+++ linux-2.6.37/drivers/media/video/saa7164//saa7164-cards.c   2011-01-06 
16:16:56.0 +0100
@@ -203,6 +203,66 @@
.i2c_reg_len= REGLEN_8bit,
} },
},
+   [SAA7164_BOARD_HAUPPAUGE_HVR2200_4] = {
+   .name   = "Hauppauge WinTV-HVR2200",
+   .porta  = SAA7164_MPEG_DVB,
+   .portb  = SAA7164_MPEG_DVB,
+.portc  = SAA7164_MPEG_ENCODER,
+.portd  = SAA7164_MPEG_ENCODER,
+.porte  = SAA7164_MPEG_VBI,
+.portf  = SAA7164_MPEG_VBI,
+   .chiprev= SAA7164_CHIP_REV3,
+   .unit   = {{
+   .id = 0x1d,
+   .type   = SAA7164_UNIT_EEPROM,
+   .name   = "4K EEPROM",
+   .i2c_bus_nr = SAA7164_I2C_BUS_0,
+   .i2c_bus_addr   = 0xa0>>  1,
+   .i2c_reg_len= REGLEN_8bit,
+   }, {
+   .id = 0x04,
+   .type   = SAA7164_UNIT_TUNER,
+   .name   = "TDA18271-1",
+   .i2c_bus_nr = SAA7164_I2C_BUS_1,
+   .i2c_bus_addr   = 0xc0>>  1,
+   .i2c_reg_len= REGLEN_8bit,
+   }, {
+   .id = 0x05,
+   .type   = SAA7164_UNIT_ANALOG_DEMODULATOR,
+   .name   = "TDA8290-1",
+   .i2c_bus_nr = SAA7164_I2C_BUS_1,
+   .i2c_bus_addr   = 0x84>>  1,
+   .i2c_reg_len= REGLEN_8bit,
+   }, {
+   .id = 0x1b,
+   .type   = SAA7164_UNIT_TUNER,
+   .name   = "TDA18271-2",
+   .i2c_bus_nr = SAA7164_I2C_BUS_2,
+   .i2c_bus_addr   = 0xc0>>  1,
+   .i2c_reg_len= REGLEN_8bit,
+   }, {
+   .id = 0x1c,
+   .type   = SAA7164_UNIT_ANALOG_DEMODULATOR,
+ 

Re: Hauppauge HVR-2200 analog

2011-02-01 Thread Mauro Carvalho Chehab
Em 08-01-2011 13:40, Julian Scheel escreveu:
> Am 06.01.2011 23:31, schrieb Julian Scheel:
>>
>>> Attached is the diff I currently use.
>>>
>> Some more process. Attached is a new patch, which allows me to capture video 
>> and audio from a PAL tuner. Imho the video has wrong colours though (using 
>> PAL-B). Maybe someone would want to test that patch and give some feedback?
> Ok some hours of debugging later, I figured out that only encoder 1 was not 
> working properly. This was due to a wrong addressing when sending the dif 
> setup commands. The attached new patch fixes this.
> 

Is this patch already working properly?

If so, please:
1) Check its codingstyle with ./scripts/checkpatch.pl
(there are some issues there, like commenting with //)
2) Remove the dead code;
3) Provide a patch description and your Signed-off-by:

> 
> saa7164-card-pal.diff
> 
> 
> Nur in linux-2.6.37/drivers/media/video/saa7164/: modules.order.
> diff -x '*.o' -x '*.ko' -x '*.cmd' -x '*.mod.*' -ru 
> linux-2.6.37.a/drivers/media/video/saa7164//saa7164-api.c 
> linux-2.6.37/drivers/media/video/saa7164//saa7164-api.c
> --- linux-2.6.37.a/drivers/media/video/saa7164//saa7164-api.c 2011-01-05 
> 01:50:19.0 +0100
> +++ linux-2.6.37/drivers/media/video/saa7164//saa7164-api.c   2011-01-08 
> 16:10:32.0 +0100
> @@ -548,7 +548,7 @@
>   tvaudio.std = TU_STANDARD_NTSC_M;
>   tvaudio.country = 1;
>   } else {
> - tvaudio.std = TU_STANDARD_PAL_I;
> + tvaudio.std = 0x04; //TU_STANDARD_PAL_I;

Probably, you need to add a define for 0x04 and use its symbol here.

>   tvaudio.country = 44;
>   }
>  
> @@ -608,7 +608,7 @@
>   dprintk(DBGLVL_API, "%s(nr=%d type=%d val=%x)\n", __func__,
>   port->nr, port->type, val);
>  
> - if (port->nr == 0)
> + if (port->nr < 3) //== 0)
>   mas = 0xd0;
>   else
>   mas = 0xe0;
> diff -x '*.o' -x '*.ko' -x '*.cmd' -x '*.mod.*' -ru 
> linux-2.6.37.a/drivers/media/video/saa7164//saa7164-cards.c 
> linux-2.6.37/drivers/media/video/saa7164//saa7164-cards.c
> --- linux-2.6.37.a/drivers/media/video/saa7164//saa7164-cards.c   
> 2011-01-05 01:50:19.0 +0100
> +++ linux-2.6.37/drivers/media/video/saa7164//saa7164-cards.c 2011-01-06 
> 16:16:56.0 +0100
> @@ -203,6 +203,66 @@
>   .i2c_reg_len= REGLEN_8bit,
>   } },
>   },
> + [SAA7164_BOARD_HAUPPAUGE_HVR2200_4] = {
> + .name   = "Hauppauge WinTV-HVR2200",
> + .porta  = SAA7164_MPEG_DVB,
> + .portb  = SAA7164_MPEG_DVB,
> +.portc  = SAA7164_MPEG_ENCODER,
> +.portd  = SAA7164_MPEG_ENCODER,
> +.porte  = SAA7164_MPEG_VBI,
> +.portf  = SAA7164_MPEG_VBI,
> + .chiprev= SAA7164_CHIP_REV3,
> + .unit   = {{
> + .id = 0x1d,
> + .type   = SAA7164_UNIT_EEPROM,
> + .name   = "4K EEPROM",
> + .i2c_bus_nr = SAA7164_I2C_BUS_0,
> + .i2c_bus_addr   = 0xa0 >> 1,
> + .i2c_reg_len= REGLEN_8bit,
> + }, {
> + .id = 0x04,
> + .type   = SAA7164_UNIT_TUNER,
> + .name   = "TDA18271-1",
> + .i2c_bus_nr = SAA7164_I2C_BUS_1,
> + .i2c_bus_addr   = 0xc0 >> 1,
> + .i2c_reg_len= REGLEN_8bit,
> + }, {
> + .id = 0x05,
> + .type   = SAA7164_UNIT_ANALOG_DEMODULATOR,
> + .name   = "TDA8290-1",
> + .i2c_bus_nr = SAA7164_I2C_BUS_1,
> + .i2c_bus_addr   = 0x84 >> 1,
> + .i2c_reg_len= REGLEN_8bit,
> + }, {
> + .id = 0x1b,
> + .type   = SAA7164_UNIT_TUNER,
> + .name   = "TDA18271-2",
> + .i2c_bus_nr = SAA7164_I2C_BUS_2,
> + .i2c_bus_addr   = 0xc0 >> 1,
> + .i2c_reg_len= REGLEN_8bit,
> + }, {
> + .id = 0x1c,
> + .type   = SAA7164_UNIT_ANALOG_DEMODULATOR,
> + .name   = "TDA8290-2",
> + .i2c_bus_nr = SAA7164_I2C_BUS_2,
> + .i2c_bus_addr   = 0x84 >> 1,
> + .i2c_reg_len= REGLEN_8bit,
> + }, {
> + .id = 0x1e,
> + .type   = SAA7164_UNIT_DIGITAL_DEMODULATOR,
> + .name   = "TDA10048-1",
>

Re: Hauppauge HVR-2200 analog

2011-01-08 Thread Julian Scheel

Am 06.01.2011 23:31, schrieb Julian Scheel:



Attached is the diff I currently use.

Some more process. Attached is a new patch, which allows me to capture 
video and audio from a PAL tuner. Imho the video has wrong colours 
though (using PAL-B). Maybe someone would want to test that patch and 
give some feedback?
Ok some hours of debugging later, I figured out that only encoder 1 was 
not working properly. This was due to a wrong addressing when sending 
the dif setup commands. The attached new patch fixes this.


Nur in linux-2.6.37/drivers/media/video/saa7164/: modules.order.
diff -x '*.o' -x '*.ko' -x '*.cmd' -x '*.mod.*' -ru linux-2.6.37.a/drivers/media/video/saa7164//saa7164-api.c linux-2.6.37/drivers/media/video/saa7164//saa7164-api.c
--- linux-2.6.37.a/drivers/media/video/saa7164//saa7164-api.c	2011-01-05 01:50:19.0 +0100
+++ linux-2.6.37/drivers/media/video/saa7164//saa7164-api.c	2011-01-08 16:10:32.0 +0100
@@ -548,7 +548,7 @@
 		tvaudio.std = TU_STANDARD_NTSC_M;
 		tvaudio.country = 1;
 	} else {
-		tvaudio.std = TU_STANDARD_PAL_I;
+		tvaudio.std = 0x04; //TU_STANDARD_PAL_I;
 		tvaudio.country = 44;
 	}
 
@@ -608,7 +608,7 @@
 	dprintk(DBGLVL_API, "%s(nr=%d type=%d val=%x)\n", __func__,
 		port->nr, port->type, val);
 
-	if (port->nr == 0)
+	if (port->nr < 3) //== 0)
 		mas = 0xd0;
 	else
 		mas = 0xe0;
diff -x '*.o' -x '*.ko' -x '*.cmd' -x '*.mod.*' -ru linux-2.6.37.a/drivers/media/video/saa7164//saa7164-cards.c linux-2.6.37/drivers/media/video/saa7164//saa7164-cards.c
--- linux-2.6.37.a/drivers/media/video/saa7164//saa7164-cards.c	2011-01-05 01:50:19.0 +0100
+++ linux-2.6.37/drivers/media/video/saa7164//saa7164-cards.c	2011-01-06 16:16:56.0 +0100
@@ -203,6 +203,66 @@
 			.i2c_reg_len	= REGLEN_8bit,
 		} },
 	},
+	[SAA7164_BOARD_HAUPPAUGE_HVR2200_4] = {
+		.name		= "Hauppauge WinTV-HVR2200",
+		.porta		= SAA7164_MPEG_DVB,
+		.portb		= SAA7164_MPEG_DVB,
+.portc  = SAA7164_MPEG_ENCODER,
+.portd  = SAA7164_MPEG_ENCODER,
+.porte  = SAA7164_MPEG_VBI,
+.portf  = SAA7164_MPEG_VBI,
+		.chiprev	= SAA7164_CHIP_REV3,
+		.unit		= {{
+			.id		= 0x1d,
+			.type		= SAA7164_UNIT_EEPROM,
+			.name		= "4K EEPROM",
+			.i2c_bus_nr	= SAA7164_I2C_BUS_0,
+			.i2c_bus_addr	= 0xa0 >> 1,
+			.i2c_reg_len	= REGLEN_8bit,
+		}, {
+			.id		= 0x04,
+			.type		= SAA7164_UNIT_TUNER,
+			.name		= "TDA18271-1",
+			.i2c_bus_nr	= SAA7164_I2C_BUS_1,
+			.i2c_bus_addr	= 0xc0 >> 1,
+			.i2c_reg_len	= REGLEN_8bit,
+		}, {
+			.id		= 0x05,
+			.type		= SAA7164_UNIT_ANALOG_DEMODULATOR,
+			.name		= "TDA8290-1",
+			.i2c_bus_nr	= SAA7164_I2C_BUS_1,
+			.i2c_bus_addr	= 0x84 >> 1,
+			.i2c_reg_len	= REGLEN_8bit,
+		}, {
+			.id		= 0x1b,
+			.type		= SAA7164_UNIT_TUNER,
+			.name		= "TDA18271-2",
+			.i2c_bus_nr	= SAA7164_I2C_BUS_2,
+			.i2c_bus_addr	= 0xc0 >> 1,
+			.i2c_reg_len	= REGLEN_8bit,
+		}, {
+			.id		= 0x1c,
+			.type		= SAA7164_UNIT_ANALOG_DEMODULATOR,
+			.name		= "TDA8290-2",
+			.i2c_bus_nr	= SAA7164_I2C_BUS_2,
+			.i2c_bus_addr	= 0x84 >> 1,
+			.i2c_reg_len	= REGLEN_8bit,
+		}, {
+			.id		= 0x1e,
+			.type		= SAA7164_UNIT_DIGITAL_DEMODULATOR,
+			.name		= "TDA10048-1",
+			.i2c_bus_nr	= SAA7164_I2C_BUS_1,
+			.i2c_bus_addr	= 0x10 >> 1,
+			.i2c_reg_len	= REGLEN_8bit,
+		}, {
+			.id		= 0x1f,
+			.type		= SAA7164_UNIT_DIGITAL_DEMODULATOR,
+			.name		= "TDA10048-2",
+			.i2c_bus_nr	= SAA7164_I2C_BUS_2,
+			.i2c_bus_addr	= 0x12 >> 1,
+			.i2c_reg_len	= REGLEN_8bit,
+		} },
+	},
 	[SAA7164_BOARD_HAUPPAUGE_HVR2250] = {
 		.name		= "Hauppauge WinTV-HVR2250",
 		.porta		= SAA7164_MPEG_DVB,
@@ -426,6 +486,10 @@
 		.subvendor = 0x0070,
 		.subdevice = 0x8851,
 		.card  = SAA7164_BOARD_HAUPPAUGE_HVR2250_2,
+	}, {
+		.subvendor = 0x0070,
+		.subdevice = 0x8940,
+		.card  = SAA7164_BOARD_HAUPPAUGE_HVR2200_4,
 	},
 };
 const unsigned int saa7164_idcount = ARRAY_SIZE(saa7164_subids);
@@ -469,6 +533,7 @@
 	case SAA7164_BOARD_HAUPPAUGE_HVR2200:
 	case SAA7164_BOARD_HAUPPAUGE_HVR2200_2:
 	case SAA7164_BOARD_HAUPPAUGE_HVR2200_3:
+	case SAA7164_BOARD_HAUPPAUGE_HVR2200_4:
 	case SAA7164_BOARD_HAUPPAUGE_HVR2250:
 	case SAA7164_BOARD_HAUPPAUGE_HVR2250_2:
 	case SAA7164_BOARD_HAUPPAUGE_HVR2250_3:
@@ -549,6 +614,7 @@
 	case SAA7164_BOARD_HAUPPAUGE_HVR2200:
 	case SAA7164_BOARD_HAUPPAUGE_HVR2200_2:
 	case SAA7164_BOARD_HAUPPAUGE_HVR2200_3:
+	case SAA7164_BOARD_HAUPPAUGE_HVR2200_4:
 	case SAA7164_BOARD_HAUPPAUGE_HVR2250:
 	case SAA7164_BOARD_HAUPPAUGE_HVR2250_2:
 	case SAA7164_BOARD_HAUPPAUGE_HVR2250_3:
diff -x '*.o' -x '*.ko' -x '*.cmd' -x '*.mod.*' -ru linux-2.6.37.a/drivers/media/video/saa7164//saa7164-dvb.c linux-2.6.37/drivers/media/video/saa7164//saa7164-dvb.c
--- linux-2.6.37.a/drivers/media/video/saa7164//saa7164-dvb.c	2011-01-05 01:50:19.0 +0100
+++ linux-2.6.37/drivers/media/video/saa7164//saa7164-dvb.c	2011-01-06 16:16:56.0 +0100
@@ -475,6 +475,7 @@
 	case SAA7164_BOARD_HAUPPAUGE_HVR2200:

Re: Hauppauge HVR-2200 analog

2011-01-06 Thread Julian Scheel



Attached is the diff I currently use.

Some more process. Attached is a new patch, which allows me to capture 
video and audio from a PAL tuner. Imho the video has wrong colours 
though (using PAL-B). Maybe someone would want to test that patch and 
give some feedback?


Regards,
Julian

Nur in linux-2.6.37/drivers/media/video/saa7164/: modules.order.
diff -x '*.o' -x '*.ko' -x '*.cmd' -x '*.mod.*' -ru linux-2.6.37-rc8.a/drivers/media/video/saa7164//saa7164-api.c linux-2.6.37/drivers/media/video/saa7164//saa7164-api.c
--- linux-2.6.37-rc8.a/drivers/media/video/saa7164//saa7164-api.c	2010-12-29 02:05:48.0 +0100
+++ linux-2.6.37/drivers/media/video/saa7164//saa7164-api.c	2011-01-06 23:22:17.0 +0100
@@ -548,7 +548,7 @@
 		tvaudio.std = TU_STANDARD_NTSC_M;
 		tvaudio.country = 1;
 	} else {
-		tvaudio.std = TU_STANDARD_PAL_I;
+		tvaudio.std = 0x04; //TU_STANDARD_PAL_I;
 		tvaudio.country = 44;
 	}
 
diff -x '*.o' -x '*.ko' -x '*.cmd' -x '*.mod.*' -ru linux-2.6.37-rc8.a/drivers/media/video/saa7164//saa7164-cards.c linux-2.6.37/drivers/media/video/saa7164//saa7164-cards.c
--- linux-2.6.37-rc8.a/drivers/media/video/saa7164//saa7164-cards.c	2010-12-29 02:05:48.0 +0100
+++ linux-2.6.37/drivers/media/video/saa7164//saa7164-cards.c	2011-01-06 16:16:56.0 +0100
@@ -203,6 +203,66 @@
 			.i2c_reg_len	= REGLEN_8bit,
 		} },
 	},
+	[SAA7164_BOARD_HAUPPAUGE_HVR2200_4] = {
+		.name		= "Hauppauge WinTV-HVR2200",
+		.porta		= SAA7164_MPEG_DVB,
+		.portb		= SAA7164_MPEG_DVB,
+.portc  = SAA7164_MPEG_ENCODER,
+.portd  = SAA7164_MPEG_ENCODER,
+.porte  = SAA7164_MPEG_VBI,
+.portf  = SAA7164_MPEG_VBI,
+		.chiprev	= SAA7164_CHIP_REV3,
+		.unit		= {{
+			.id		= 0x1d,
+			.type		= SAA7164_UNIT_EEPROM,
+			.name		= "4K EEPROM",
+			.i2c_bus_nr	= SAA7164_I2C_BUS_0,
+			.i2c_bus_addr	= 0xa0 >> 1,
+			.i2c_reg_len	= REGLEN_8bit,
+		}, {
+			.id		= 0x04,
+			.type		= SAA7164_UNIT_TUNER,
+			.name		= "TDA18271-1",
+			.i2c_bus_nr	= SAA7164_I2C_BUS_1,
+			.i2c_bus_addr	= 0xc0 >> 1,
+			.i2c_reg_len	= REGLEN_8bit,
+		}, {
+			.id		= 0x05,
+			.type		= SAA7164_UNIT_ANALOG_DEMODULATOR,
+			.name		= "TDA8290-1",
+			.i2c_bus_nr	= SAA7164_I2C_BUS_1,
+			.i2c_bus_addr	= 0x84 >> 1,
+			.i2c_reg_len	= REGLEN_8bit,
+		}, {
+			.id		= 0x1b,
+			.type		= SAA7164_UNIT_TUNER,
+			.name		= "TDA18271-2",
+			.i2c_bus_nr	= SAA7164_I2C_BUS_2,
+			.i2c_bus_addr	= 0xc0 >> 1,
+			.i2c_reg_len	= REGLEN_8bit,
+		}, {
+			.id		= 0x1c,
+			.type		= SAA7164_UNIT_ANALOG_DEMODULATOR,
+			.name		= "TDA8290-2",
+			.i2c_bus_nr	= SAA7164_I2C_BUS_2,
+			.i2c_bus_addr	= 0x84 >> 1,
+			.i2c_reg_len	= REGLEN_8bit,
+		}, {
+			.id		= 0x1e,
+			.type		= SAA7164_UNIT_DIGITAL_DEMODULATOR,
+			.name		= "TDA10048-1",
+			.i2c_bus_nr	= SAA7164_I2C_BUS_1,
+			.i2c_bus_addr	= 0x10 >> 1,
+			.i2c_reg_len	= REGLEN_8bit,
+		}, {
+			.id		= 0x1f,
+			.type		= SAA7164_UNIT_DIGITAL_DEMODULATOR,
+			.name		= "TDA10048-2",
+			.i2c_bus_nr	= SAA7164_I2C_BUS_2,
+			.i2c_bus_addr	= 0x12 >> 1,
+			.i2c_reg_len	= REGLEN_8bit,
+		} },
+	},
 	[SAA7164_BOARD_HAUPPAUGE_HVR2250] = {
 		.name		= "Hauppauge WinTV-HVR2250",
 		.porta		= SAA7164_MPEG_DVB,
@@ -426,6 +486,10 @@
 		.subvendor = 0x0070,
 		.subdevice = 0x8851,
 		.card  = SAA7164_BOARD_HAUPPAUGE_HVR2250_2,
+	}, {
+		.subvendor = 0x0070,
+		.subdevice = 0x8940,
+		.card  = SAA7164_BOARD_HAUPPAUGE_HVR2200_4,
 	},
 };
 const unsigned int saa7164_idcount = ARRAY_SIZE(saa7164_subids);
@@ -469,6 +533,7 @@
 	case SAA7164_BOARD_HAUPPAUGE_HVR2200:
 	case SAA7164_BOARD_HAUPPAUGE_HVR2200_2:
 	case SAA7164_BOARD_HAUPPAUGE_HVR2200_3:
+	case SAA7164_BOARD_HAUPPAUGE_HVR2200_4:
 	case SAA7164_BOARD_HAUPPAUGE_HVR2250:
 	case SAA7164_BOARD_HAUPPAUGE_HVR2250_2:
 	case SAA7164_BOARD_HAUPPAUGE_HVR2250_3:
@@ -549,6 +614,7 @@
 	case SAA7164_BOARD_HAUPPAUGE_HVR2200:
 	case SAA7164_BOARD_HAUPPAUGE_HVR2200_2:
 	case SAA7164_BOARD_HAUPPAUGE_HVR2200_3:
+	case SAA7164_BOARD_HAUPPAUGE_HVR2200_4:
 	case SAA7164_BOARD_HAUPPAUGE_HVR2250:
 	case SAA7164_BOARD_HAUPPAUGE_HVR2250_2:
 	case SAA7164_BOARD_HAUPPAUGE_HVR2250_3:
diff -x '*.o' -x '*.ko' -x '*.cmd' -x '*.mod.*' -ru linux-2.6.37-rc8.a/drivers/media/video/saa7164//saa7164-dvb.c linux-2.6.37/drivers/media/video/saa7164//saa7164-dvb.c
--- linux-2.6.37-rc8.a/drivers/media/video/saa7164//saa7164-dvb.c	2010-12-29 02:05:48.0 +0100
+++ linux-2.6.37/drivers/media/video/saa7164//saa7164-dvb.c	2011-01-06 16:16:56.0 +0100
@@ -475,6 +475,7 @@
 	case SAA7164_BOARD_HAUPPAUGE_HVR2200:
 	case SAA7164_BOARD_HAUPPAUGE_HVR2200_2:
 	case SAA7164_BOARD_HAUPPAUGE_HVR2200_3:
+	case SAA7164_BOARD_HAUPPAUGE_HVR2200_4:
 		i2c_bus = &dev->i2c_bus[port->nr + 1];
 		switch (port->nr) {
 		case 0:
diff -x '*.o' -x '*.ko' -x '*.cmd' -x '*.mod.*' -ru linux-2.6.37-rc8.a/drivers/media/video/saa7164//saa7164-encoder.c linux-2.6.37/drivers/media/video/saa7164//saa7164-encoder.c
--- linux-2.6.37-rc8.a/driv

Re: Hauppauge HVR-2200 analog

2011-01-03 Thread Julian Scheel

Am 15.12.2010 08:04, schrieb Julian Scheel:

Am 14.12.2010 um 20:51 schrieb Steven Toth:


On 12/14/10 12:23 PM, Julian Scheel wrote:

Is there any reason, why the additional card-information found here:
http://www.kernellabs.com/hg/~stoth/saa7164-dev/
is not yet in the kernel tree?

On my todo list.

Ok, fine.


I validate each board before I add its profile to the core tree. If certain
boards are missing then its because that board is considered experimental or is
pending testing and merge.

PAL encoder support is broken in the current tree and it currently getting my
love and attention. Point me at the specific boards you think are missing and
I'll also add these to my todo list, they'll likely get merged at the same time.

Actually this is the board I am testing with:
http://www.kernellabs.com/hg/~stoth/saa7164-dev/rev/cf2d7530d676

Should it work with your testing tree or is the encoder part broken there as 
well?
I was able to get the encoder working now. The diff I referenced did not 
contain the encoder port settings. I added them manually and now get 
/dev/video0,1 and /dev/vbi0,1. A simple cat /dev/video0 > test.mpg 
reveals that the encoder seems to be running - it shows a nice 
mpeg-encoded bluescreen.
Anyway running scantv did not show any results although I have a proper 
input signal connected. I guess there is something broken still? Any ideas?
Also it seems so far only NTSC is supported. dmesg shows that the 
firmware is capable of PAL - just the question is what needs to be 
changed in the drivers to switch between the modes?


Attached is the diff I currently use.

-Julian

diff -ru -x '*.o*' -x '*.ko*' -x '*.cmd' -x '*.orig' linux-2.6.37-rc8.a/drivers/media/video/saa7164//saa7164-cards.c linux-2.6.37-rc8/drivers/media/video/saa7164//saa7164-cards.c
--- linux-2.6.37-rc8.a/drivers/media/video/saa7164//saa7164-cards.c	2010-12-29 02:05:48.0 +0100
+++ linux-2.6.37-rc8/drivers/media/video/saa7164//saa7164-cards.c	2011-01-04 02:26:56.0 +0100
@@ -203,6 +203,66 @@
 			.i2c_reg_len	= REGLEN_8bit,
 		} },
 	},
+	[SAA7164_BOARD_HAUPPAUGE_HVR2200_4] = {
+		.name		= "Hauppauge WinTV-HVR2200",
+		.porta		= SAA7164_MPEG_DVB,
+		.portb		= SAA7164_MPEG_DVB,
+.portc  = SAA7164_MPEG_ENCODER,
+.portd  = SAA7164_MPEG_ENCODER,
+.porte  = SAA7164_MPEG_VBI,
+.portf  = SAA7164_MPEG_VBI,
+		.chiprev	= SAA7164_CHIP_REV3,
+		.unit		= {{
+			.id		= 0x1d,
+			.type		= SAA7164_UNIT_EEPROM,
+			.name		= "4K EEPROM",
+			.i2c_bus_nr	= SAA7164_I2C_BUS_0,
+			.i2c_bus_addr	= 0xa0 >> 1,
+			.i2c_reg_len	= REGLEN_8bit,
+		}, {
+			.id		= 0x04,
+			.type		= SAA7164_UNIT_TUNER,
+			.name		= "TDA18271-1",
+			.i2c_bus_nr	= SAA7164_I2C_BUS_1,
+			.i2c_bus_addr	= 0xc0 >> 1,
+			.i2c_reg_len	= REGLEN_8bit,
+		}, {
+			.id		= 0x05,
+			.type		= SAA7164_UNIT_ANALOG_DEMODULATOR,
+			.name		= "TDA8290-1",
+			.i2c_bus_nr	= SAA7164_I2C_BUS_1,
+			.i2c_bus_addr	= 0x84 >> 1,
+			.i2c_reg_len	= REGLEN_8bit,
+		}, {
+			.id		= 0x1b,
+			.type		= SAA7164_UNIT_TUNER,
+			.name		= "TDA18271-2",
+			.i2c_bus_nr	= SAA7164_I2C_BUS_2,
+			.i2c_bus_addr	= 0xc0 >> 1,
+			.i2c_reg_len	= REGLEN_8bit,
+		}, {
+			.id		= 0x1c,
+			.type		= SAA7164_UNIT_ANALOG_DEMODULATOR,
+			.name		= "TDA8290-2",
+			.i2c_bus_nr	= SAA7164_I2C_BUS_2,
+			.i2c_bus_addr	= 0x84 >> 1,
+			.i2c_reg_len	= REGLEN_8bit,
+		}, {
+			.id		= 0x1e,
+			.type		= SAA7164_UNIT_DIGITAL_DEMODULATOR,
+			.name		= "TDA10048-1",
+			.i2c_bus_nr	= SAA7164_I2C_BUS_1,
+			.i2c_bus_addr	= 0x10 >> 1,
+			.i2c_reg_len	= REGLEN_8bit,
+		}, {
+			.id		= 0x1f,
+			.type		= SAA7164_UNIT_DIGITAL_DEMODULATOR,
+			.name		= "TDA10048-2",
+			.i2c_bus_nr	= SAA7164_I2C_BUS_2,
+			.i2c_bus_addr	= 0x12 >> 1,
+			.i2c_reg_len	= REGLEN_8bit,
+		} },
+	},
 	[SAA7164_BOARD_HAUPPAUGE_HVR2250] = {
 		.name		= "Hauppauge WinTV-HVR2250",
 		.porta		= SAA7164_MPEG_DVB,
@@ -426,6 +486,10 @@
 		.subvendor = 0x0070,
 		.subdevice = 0x8851,
 		.card  = SAA7164_BOARD_HAUPPAUGE_HVR2250_2,
+	}, {
+		.subvendor = 0x0070,
+		.subdevice = 0x8940,
+		.card  = SAA7164_BOARD_HAUPPAUGE_HVR2200_4,
 	},
 };
 const unsigned int saa7164_idcount = ARRAY_SIZE(saa7164_subids);
@@ -469,6 +533,7 @@
 	case SAA7164_BOARD_HAUPPAUGE_HVR2200:
 	case SAA7164_BOARD_HAUPPAUGE_HVR2200_2:
 	case SAA7164_BOARD_HAUPPAUGE_HVR2200_3:
+	case SAA7164_BOARD_HAUPPAUGE_HVR2200_4:
 	case SAA7164_BOARD_HAUPPAUGE_HVR2250:
 	case SAA7164_BOARD_HAUPPAUGE_HVR2250_2:
 	case SAA7164_BOARD_HAUPPAUGE_HVR2250_3:
@@ -549,6 +614,7 @@
 	case SAA7164_BOARD_HAUPPAUGE_HVR2200:
 	case SAA7164_BOARD_HAUPPAUGE_HVR2200_2:
 	case SAA7164_BOARD_HAUPPAUGE_HVR2200_3:
+	case SAA7164_BOARD_HAUPPAUGE_HVR2200_4:
 	case SAA7164_BOARD_HAUPPAUGE_HVR2250:
 	case SAA7164_BOARD_HAUPPAUGE_HVR2250_2:
 	case SAA7164_BOARD_HAUPPAUGE_HVR2250_3:
Nur in linux-2.6.37-rc8/drivers/media/video/saa7164/: saa7164-cards.c.rej.
diff -ru -x '*.o*' -x '*.ko*' -x '*.cmd' -x '*.orig' linux

Re: Hauppauge HVR-2200 analog

2010-12-27 Thread Julian Scheel

Hi Steve,

Am 14.12.2010 20:51, schrieb Steven Toth:

On 12/14/10 12:23 PM, Julian Scheel wrote:

Is there any reason, why the additional card-information found here:
http://www.kernellabs.com/hg/~stoth/saa7164-dev/
is not yet in the kernel tree?

PAL encoder support is broken in the current tree and it currently getting my
love and attention. Point me at the specific boards you think are missing and
I'll also add these to my todo list, they'll likely get merged at the same time


Any progress on this? If you need any assistance please let me know.

Regards,
Julian
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Hauppauge HVR-2200 analog

2010-12-14 Thread Julian Scheel
Am 14.12.2010 um 20:51 schrieb Steven Toth:

> On 12/14/10 12:23 PM, Julian Scheel wrote:
>> Is there any reason, why the additional card-information found here:
>> http://www.kernellabs.com/hg/~stoth/saa7164-dev/
>> is not yet in the kernel tree?
> 
> On my todo list.

Ok, fine.

> I validate each board before I add its profile to the core tree. If certain
> boards are missing then its because that board is considered experimental or 
> is
> pending testing and merge.
> 
> PAL encoder support is broken in the current tree and it currently getting my
> love and attention. Point me at the specific boards you think are missing and
> I'll also add these to my todo list, they'll likely get merged at the same 
> time.

Actually this is the board I am testing with:
http://www.kernellabs.com/hg/~stoth/saa7164-dev/rev/cf2d7530d676

Should it work with your testing tree or is the encoder part broken there as 
well?

Julian--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Hauppauge HVR-2200 analog

2010-12-14 Thread Steven Toth
On 12/14/10 12:23 PM, Julian Scheel wrote:
> Is there any reason, why the additional card-information found here:
> http://www.kernellabs.com/hg/~stoth/saa7164-dev/
> is not yet in the kernel tree?

On my todo list.

I validate each board before I add its profile to the core tree. If certain
boards are missing then its because that board is considered experimental or is
pending testing and merge.

PAL encoder support is broken in the current tree and it currently getting my
love and attention. Point me at the specific boards you think are missing and
I'll also add these to my todo list, they'll likely get merged at the same time.

- Steve

-- 
Steven Toth - Kernel Labs
http://www.kernellabs.com


--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Hauppauge HVR-2200 analog

2010-12-14 Thread Julian Scheel

Am 14.12.2010 18:23, schrieb Julian Scheel:

Am 07.12.2010 14:01, schrieb Andy Walls:

It appears to be in the media_tree.git repository on the
staging/for_v2.6.37-rc1 branch:

http://git.linuxtv.org/media_tree.git?a=tree;f=drivers/media/video/saa7164;h=0acaa4ada45ae6881bfbb19447ae9db43f06ef9b;hb=staging/for_v2.6.37-rc1 



saa7164-cards.c appears to have analog entries added for HVR-2200's and
saa7164-encoder.c has a number of V4L ioctl()'s for MPEG streams.

Is there any reason, why the additional card-information found here:
http://www.kernellabs.com/hg/~stoth/saa7164-dev/
is not yet in the kernel tree?


Actually after manually adding this changeset into linux-26.37-rc5 tree 
the card is detected and dmesg says:


[3.653289] saa7164 driver loaded
[3.653340] saa7164 :02:00.0: PCI INT A -> GSI 16 (level, low) -> 
IRQ 16
[3.654909] CORE saa7164[0]: subsystem: 0070:8940, board: Hauppauge 
WinTV-HVR2200 [card=9,autodetected]
[3.654914] saa7164[0]/0: found at :02:00.0, rev: 129, irq: 16, 
latency: 0, mmio: 0xfb00

[3.654919] saa7164 :02:00.0: setting latency timer to 64
[3.813647] saa7164_downloadfirmware() no first image
[3.814781] saa7164_downloadfirmware() Waiting for firmware upload 
(NXP7164-2010-03-10.1.fw)

[3.839841] saa7164_downloadfirmware() firmware read 4019072 bytes.
[3.839843] saa7164_downloadfirmware() firmware loaded.
[3.839844] Firmware file header part 1:
[3.839846]  .FirmwareSize = 0x0
[3.839847]  .BSLSize = 0x0
[3.839848]  .Reserved = 0x3d538
[3.839849]  .Version = 0x3
[3.839850] saa7164_downloadfirmware() SecBootLoader.FileSize = 4019072
[3.839856] saa7164_downloadfirmware() FirmwareSize = 0x1fd6
[3.839857] saa7164_downloadfirmware() BSLSize = 0x0
[3.839858] saa7164_downloadfirmware() Reserved = 0x0
[3.839860] saa7164_downloadfirmware() Version = 0x1661c00
[   10.693325] saa7164_downloadimage() Image downloaded, booting...
[   10.797316] saa7164_downloadimage() Image booted successfully.
[   10.797332] starting firmware download(2)
[   13.425188] saa7164_downloadimage() Image downloaded, booting...
[   15.089109] saa7164_downloadimage() Image booted successfully.
[   15.089128] firmware download complete.
[   15.129700] tveeprom 1-: Hauppauge model 89619, rev D3F2, serial# 
7259796

[   15.129703] tveeprom 1-: MAC address is 00:0d:fe:6e:c6:94
[   15.129704] tveeprom 1-: tuner model is NXP 18271C2_716x (idx 
152, type 4)
[   15.129707] tveeprom 1-: TV standards PAL(B/G) NTSC(M) PAL(I) 
SECAM(L/L') PAL(D/D1/K) ATSC/DVB Digital (eeprom 0xfc)

[   15.129709] tveeprom 1-: audio processor is SAA7164 (idx 43)
[   15.129710] tveeprom 1-: decoder processor is SAA7164 (idx 40)
[   15.129711] tveeprom 1-: has radio
[   15.129712] saa7164[0]: Hauppauge eeprom: model=89619
[   15.189491] tda18271 2-0060: creating new instance
[   15.194156] TDA18271HD/C2 detected @ 2-0060
[   15.446842] DVB: registering new adapter (saa7164)
[   15.446845] DVB: registering adapter 0 frontend 0 (NXP TDA10048HN 
DVB-T)...

[   15.477568] tda18271 3-0060: creating new instance
[   15.482514] TDA18271HD/C2 detected @ 3-0060
[   15.733973] tda18271: performing RF tracking filter calibration
[   18.082962] tda18271: RF tracking filter calibration complete
[   18.083552] DVB: registering new adapter (saa7164)
[   18.083554] DVB: registering adapter 1 frontend 0 (NXP TDA10048HN 
DVB-T)...


dvb-devices are registered, but no video-devices. Any thoughts?
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Hauppauge HVR-2200 analog

2010-12-14 Thread Julian Scheel

Am 07.12.2010 14:01, schrieb Andy Walls:

On Tue, 2010-12-07 at 12:04 +0100, Julian Scheel wrote:

Hi,

is there any progress on adding analog support to the HVR-2200?
It seems support for the used chipsets in general is already in the kernel?

It appears to be in the media_tree.git repository on the
staging/for_v2.6.37-rc1 branch:

http://git.linuxtv.org/media_tree.git?a=tree;f=drivers/media/video/saa7164;h=0acaa4ada45ae6881bfbb19447ae9db43f06ef9b;hb=staging/for_v2.6.37-rc1

saa7164-cards.c appears to have analog entries added for HVR-2200's and
saa7164-encoder.c has a number of V4L ioctl()'s for MPEG streams.

Is there any reason, why the additional card-information found here:
http://www.kernellabs.com/hg/~stoth/saa7164-dev/
is not yet in the kernel tree?

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Hauppauge HVR-2200 analog

2010-12-07 Thread Andy Walls
On Tue, 2010-12-07 at 12:04 +0100, Julian Scheel wrote:
> Hi,
> 
> is there any progress on adding analog support to the HVR-2200?
> It seems support for the used chipsets in general is already in the kernel?

It appears to be in the media_tree.git repository on the
staging/for_v2.6.37-rc1 branch:

http://git.linuxtv.org/media_tree.git?a=tree;f=drivers/media/video/saa7164;h=0acaa4ada45ae6881bfbb19447ae9db43f06ef9b;hb=staging/for_v2.6.37-rc1

saa7164-cards.c appears to have analog entries added for HVR-2200's and
saa7164-encoder.c has a number of V4L ioctl()'s for MPEG streams.

Regards,
Andy

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html