public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* Analog input for Hauppauge express-card HVR-1400
@ 2011-03-22 19:57 Emil Meier
  2011-03-26 19:40 ` Andy Walls
  0 siblings, 1 reply; 3+ messages in thread
From: Emil Meier @ 2011-03-22 19:57 UTC (permalink / raw)
  To: linux-media

[-- Attachment #1: Type: text/plain, Size: 613 bytes --]

In the attached files I have added some code for the analog part of a HVR-1400 
card. (The patch is taken from a patch for HVR1800..)
Until now only the composite video input is functional. 
The s-video input captures only the b&w part of the video.
The patch in cx25840-core.c was needed to get PAL support for the video input. 
If the line
cx25840_write(client, 0x2, 0x76);
is needed by other cards, the skipping should depend on the card-name... but I 
don't know how I can get the card-model in this module...

Maybe this helps someone else in using the analog part of this card.

Emil


      

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: patch-cx23885-cards.c.diff --]
[-- Type: text/x-patch; name="patch-cx23885-cards.c.diff", Size: 1521 bytes --]

*** ./drivers/media/video/cx23885/cx23885-cards.c~	2011-02-18 00:14:38.000000000 +0100
--- ./drivers/media/video/cx23885/cx23885-cards.c	2011-03-09 11:53:05.000000000 +0100
***************
*** 154,160 ****
--- 154,183 ----
  	},
  	[CX23885_BOARD_HAUPPAUGE_HVR1400] = {
  		.name		= "Hauppauge WinTV-HVR1400",
+ 		.porta          = CX23885_ANALOG_VIDEO,
  		.portc		= CX23885_MPEG_DVB,
+ 		.tuner_type     = TUNER_XC2028,
+ 		.tuner_addr     = 0x61, /* 0x84 >> 1 */
+ 		.input          = {{
+ 		     .type   = CX23885_VMUX_TELEVISION,
+ 		     .vmux   =       CX25840_VIN7_CH3 |
+ 		     CX25840_VIN5_CH2 |
+ 		     CX25840_VIN2_CH1,
+ 		     .gpio0  = 0,
+ 		   }, {
+ 		     .type   = CX23885_VMUX_COMPOSITE1,
+ 		     .vmux   =       CX25840_VIN7_CH3 |
+ 		     CX25840_VIN4_CH2 |
+ 		     CX25840_VIN6_CH1,
+ 		     .gpio0  = 0,
+ 		   }, {
+ 		     .type   = CX23885_VMUX_SVIDEO,
+ 		     .vmux   =       CX25840_VIN7_CH3 |
+ 		     CX25840_VIN4_CH2 |
+ 		     CX25840_VIN8_CH1 |
+ 		     CX25840_SVIDEO_ON,
+ 		     .gpio0  = 0,
+ 	       	   } },
  	},
  	[CX23885_BOARD_DVICO_FUSIONHDTV_7_DUAL_EXP] = {
  		.name		= "DViCO FusionHDTV7 Dual Express",
***************
*** 1245,1250 ****
--- 1268,1274 ----
  	case CX23885_BOARD_MAGICPRO_PROHDTVE2:
  	case CX23885_BOARD_HAUPPAUGE_HVR1290:
  	case CX23885_BOARD_LEADTEK_WINFAST_PXTV1200:
+ 	case CX23885_BOARD_HAUPPAUGE_HVR1400:
  		dev->sd_cx25840 = v4l2_i2c_new_subdev(&dev->v4l2_dev,
  				&dev->i2c_bus[2].i2c_adap,
  				"cx25840", "cx25840", 0x88 >> 1, NULL);

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: patch-cx25840-core.c.diff --]
[-- Type: text/x-patch; name="patch-cx25840-core.c.diff", Size: 691 bytes --]

*** ./drivers/media/video/cx25840/cx25840-core.c~	2011-02-18 00:14:38.000000000 +0100
--- ./drivers/media/video/cx25840/cx25840-core.c	2011-03-09 11:54:24.000000000 +0100
***************
*** 654,660 ****
  
  	/* Trust the default xtal, no division */
  	/* This changes for the cx23888 products */
! 	cx25840_write(client, 0x2, 0x76);
  
  	/* Bring down the regulator for AUX clk */
  	cx25840_write(client, 0x1, 0x40);
--- 654,661 ----
  
  	/* Trust the default xtal, no division */
  	/* This changes for the cx23888 products */
! 	// not for hvr1400 em 090818
! 	//cx25840_write(client, 0x2, 0x76);
  
  	/* Bring down the regulator for AUX clk */
  	cx25840_write(client, 0x1, 0x40);

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Analog input for Hauppauge express-card HVR-1400
  2011-03-22 19:57 Analog input for Hauppauge express-card HVR-1400 Emil Meier
@ 2011-03-26 19:40 ` Andy Walls
  2011-03-29 13:34   ` Emil Meier
  0 siblings, 1 reply; 3+ messages in thread
From: Andy Walls @ 2011-03-26 19:40 UTC (permalink / raw)
  To: Emil Meier; +Cc: linux-media

On Tue, 2011-03-22 at 19:57 +0000, Emil Meier wrote:
> In the attached files I have added some code for the analog part of a HVR-1400 
> card. (The patch is taken from a patch for HVR1800..)
> Until now only the composite video input is functional. 
> The s-video input captures only the b&w part of the video.
> The patch in cx25840-core.c was needed to get PAL support for the video input. 
> If the line
> cx25840_write(client, 0x2, 0x76);
> is needed by other cards,

You patches have a problem:

Your first patch modifies a card entry in the cx23885 driver, but your
second patch changes the cx231xx_initialize() function in
cx25840-core.c. 

http://git.linuxtv.org/media_tree.git?a=blob;f=drivers/media/video/cx25840/cx25840-core.c;h=35796e0352475b6536bfd47315107e418e6716fa;hb=refs/heads/staging/for_v2.6.39#l638

The second patch should have no effect on the operation of a CX2388[578]
based card.

Regards,
Andy



>  the skipping should depend on the card-name... but I 
> don't know how I can get the card-model in this module...
> 
> Maybe this helps someone else in using the analog part of this card.
> 
> Emil
> 
> 
>       



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Analog input for Hauppauge express-card HVR-1400
  2011-03-26 19:40 ` Andy Walls
@ 2011-03-29 13:34   ` Emil Meier
  0 siblings, 0 replies; 3+ messages in thread
From: Emil Meier @ 2011-03-29 13:34 UTC (permalink / raw)
  To: Andy Walls; +Cc: linux-media

[-- Attachment #1: Type: text/plain, Size: 2890 bytes --]

>----- Original Message ----

>On Tue, 2011-03-22 at 19:57 +0000, Emil Meier wrote:
>> The patch in cx25840-core.c was needed to get PAL support for the video input. 
>
>> If the line
>> cx25840_write(client, 0x2, 0x76);
>> is needed by other cards,

> You patches have a problem:

> Your first patch modifies a card entry in the cx23885 driver, but your
> second patch changes the cx231xx_initialize() function in
> cx25840-core.c. 

>http://git.linuxtv.org/media_tree.git?a=blob;f=drivers/media/video/cx25840/cx25840-core.c;h=35796e0352475b6536bfd47315107e418e6716fa;hb=refs/heads/staging/for_v2.6.39#l638
>8

> The second patch should have no effect on the operation of a CX2388[578]
> based card.


Thanks Andy,
your are right, the patch is applied in the wrong function. In earlyer kernels, 
I have placed the patch in cx23885_initialize()...
Checking this again I found the patch not working in 2.6.36.4 vanilla...The 
patches are working in 2.6.35.11 vanilla. But there are a lot af changes between 
2.6.35.11 and 2.6.36.4  in the code.
I have attached the patches against 2.6.35.11 vanilla. The last time I have 
tried the dvb-drivers, they don't compile against older kenrels...
With 2.6.36.4 and the last patch I get the following error:

2.6.36.4:
cx23885[1]: hauppauge eeprom: model=80019
cx25840 2-0044: cx23885 A/V decoder found @ 0x88 (cx23885[1])
cx25840: probe of 2-0044 failed with error -34
tuner 1-0061: chip found @ 0xc2 (cx23885[1])
xc2028 1-0061: creating new instance
xc2028 1-0061: type set to XCeive xc2028/xc3028 tuner
....
while grabbing:
xc2028 1-0061: xc2028/3028 firmware name not set!
cx23885[1]: VID A - dma channel status dump
cx23885[1]:   cmds: init risc lo   : 0x37c70000
cx23885[1]:   cmds: init risc hi   : 0x00000000
cx23885[1]:   cmds: cdt base       : 0x000104c0
cx23885[1]:   cmds: cdt size       : 0x0000000c
cx23885[1]:   cmds: iq base        : 0x00010380
cx23885[1]:   cmds: iq size        : 0x00000010
cx23885[1]:   cmds: risc pc lo     : 0x37c70034
cx23885[1]:   cmds: risc pc hi     : 0x00000000
cx23885[1]:   cmds: iq wr ptr      : 0x000040ed
cx23885[1]:   cmds: iq rd ptr      : 0x000040e1
cx23885[1]:   cmds: cdt current    : 0x000104c8
cx23885[1]:   cmds: pci target lo  : 0x00000000
cx23885[1]:   cmds: pci target hi  : 0x00000000
cx23885[1]:   cmds: line / byte    : 0x00000000
cx23885[1]:   risc0: 0x80008000 [ sync resync count=0 ]
cx23885[1]:   risc1: 0x1c000500 [ write sol eol count=1280 ]
cx23885[1]:   risc2: 0x37cb7500 [ INVALID eol irq2 irq1 23 22 19 cnt1 cnt0 14 13
 


instead of: 2.6.35.11:
cx23885[2]: hauppauge eeprom: model=80019
cx25840 2-0044: cx23885 A/V decoder found @ 0x88 (cx23885[2])
cx25840 2-0044: loaded v4l-cx23885-avcore-01.fw firmware (16382 bytes)
tuner 1-0061: chip found @ 0xc2 (cx23885[2])
xc2028 1-0061: creating new instance

Emil

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: patch-cx23885-cards.c.diff --]
[-- Type: text/x-patch; name="patch-cx23885-cards.c.diff", Size: 1543 bytes --]

*** linux-2.6.35.11/drivers/media/video/cx23885/cx23885-cards.c	2011-02-06 20:04:07.000000000 +0100
--- /usr/src/linux-2.6.35.11/drivers/media/video/cx23885/cx23885-cards.c	2011-03-29 14:29:24.000000000 +0200
***************
*** 144,150 ****
--- 144,173 ----
  	},
  	[CX23885_BOARD_HAUPPAUGE_HVR1400] = {
  		.name		= "Hauppauge WinTV-HVR1400",
+ 		.porta          = CX23885_ANALOG_VIDEO,
  		.portc		= CX23885_MPEG_DVB,
+ 		.tuner_type	= TUNER_XC2028,
+ 		.tuner_addr	= 0x61, /* 0x84 >> 1 */
+ 		.input          = {{
+ 		     .type   = CX23885_VMUX_TELEVISION,
+ 		     .vmux   =       CX25840_VIN7_CH3 |
+ 		     CX25840_VIN5_CH2 |
+ 		     CX25840_VIN2_CH1,
+ 		     .gpio0  = 0,
+ 		   }, {
+ 		     .type   = CX23885_VMUX_COMPOSITE1,
+ 		     .vmux   =       CX25840_VIN7_CH3 |
+ 		     CX25840_VIN4_CH2 |
+ 		     CX25840_VIN6_CH1,
+ 		     .gpio0  = 0,
+ 		   }, {
+ 		     .type   = CX23885_VMUX_SVIDEO,
+ 		     .vmux   =       CX25840_VIN7_CH3 |
+ 		     CX25840_VIN4_CH2 |
+ 		     CX25840_VIN8_CH1 |
+ 		     CX25840_SVIDEO_ON,
+ 		     .gpio0  = 0,
+ 	       	   } },
  	},
  	[CX23885_BOARD_DVICO_FUSIONHDTV_7_DUAL_EXP] = {
  		.name		= "DViCO FusionHDTV7 Dual Express",
***************
*** 1102,1107 ****
--- 1125,1131 ----
  	case CX23885_BOARD_LEADTEK_WINFAST_PXDVR3200_H:
  	case CX23885_BOARD_COMPRO_VIDEOMATE_E650F:
  	case CX23885_BOARD_NETUP_DUAL_DVBS2_CI:
+ 	case CX23885_BOARD_HAUPPAUGE_HVR1400:
  	case CX23885_BOARD_COMPRO_VIDEOMATE_E800:
  	case CX23885_BOARD_HAUPPAUGE_HVR1850:
  	case CX23885_BOARD_MYGICA_X8506:

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: patch-cx25840-core.c.diff --]
[-- Type: text/x-patch; name="patch-cx25840-core.c.diff", Size: 690 bytes --]

*** linux-2.6.35.11/drivers/media/video/cx25840/cx25840-core.c	2011-02-06 20:04:07.000000000 +0100
--- /usr/src/linux-2.6.35.11/drivers/media/video/cx25840/cx25840-core.c	2011-03-29 14:50:01.000000000 +0200
***************
*** 282,288 ****
  	 * '887: 25.000000 MHz
  	 * '888: 50.000000 MHz
  	 */
! 	cx25840_write(client, 0x2, 0x76);
  
  	/* Power up all the PLL's and DLL */
  	cx25840_write(client, 0x1, 0x40);
--- 282,290 ----
  	 * '887: 25.000000 MHz
  	 * '888: 50.000000 MHz
  	 */
! 	/* This changes for the cx23888 products */
! 	// not for hvr1400 em 090818
! 	//cx25840_write(client, 0x2, 0x76);
  
  	/* Power up all the PLL's and DLL */
  	cx25840_write(client, 0x1, 0x40);

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-03-29 13:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-22 19:57 Analog input for Hauppauge express-card HVR-1400 Emil Meier
2011-03-26 19:40 ` Andy Walls
2011-03-29 13:34   ` Emil Meier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox