public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* [linux-dvb] notes and code for HVR-1800 S-Video
@ 2008-11-22 19:52 Jeff DeFouw
  2008-12-02  6:29 ` djamil
  0 siblings, 1 reply; 3+ messages in thread
From: Jeff DeFouw @ 2008-11-22 19:52 UTC (permalink / raw)
  To: linux-dvb

I compared the registers in different modes with the Windows driver for 
my WinTV-HVR-1800 (CX23887 based, PCI-E).  Setting the AFE control 
registers fixes bad and flickering colors in S-Video mode.  The same 
register values are used for Composite.

/* Set AFE control for Composite/S-Video input */
cx25840_write4(client, 0x104, 0x071cdc00);

In analog tuner mode, the values are the chip defaults (0x0704dd80), but 
I've left the regs set for S-Video and didn't notice anything.

To get the external audio input working (for Composite and S-Video 
modes), the input needs to be set to AC97, unmuted, and the 
microcontroller must be disabled (so it doesn't mute it).  The 
microcontroller was always being enabled for some reason no matter the 
audio source.

/* Set Path1 to AC97 and unmute */
cx25840_write4(client, 0x8d0, 0x00063073);

With those two changes I am able to record S-Video and external audio 
through the MPEG encoder.  I managed to hack the code up enough to get 
all modes working based on the input setting.  It's not clear in the 
existing cx23885-cx25840 framework how the audio input is supposed to be 
configured.

Other issues:

The MPEG encoder video device randomly fails to start streaming, times 
out, and returns an I/O error.  It's like something isn't being reset or 
waited on properly during the setup.  The next attempt usually works, 
but I can try 5 times and not succeed.

The MPEG encoder video device rejects attempts to set the input and 
other settings as the raw video device does.  The raw video device must 
be used for configuration, so any application would have to do something 
special with both devices to be fully functional.  Is there a reason for 
that?

Viewing the analog tuner over the raw video device and then using the 
MPEG video device often causes the tuner video on both devices to be 
scrambled.  Reloading the modules fixes it.  This only happens the first 
time after boot.

The cx23885-audio branch screws up the operation of my card.  
Specifically the patch to cx23885_initialize that disables the write to 
register 0x2 affects my board and scrambles the video and audio rate.  
It even screws up the MCU firmware download.

-- 
Jeff DeFouw <jeffd@i2k.com>

_______________________________________________
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

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

* Re: [linux-dvb] notes and code for HVR-1800 S-Video
  2008-11-22 19:52 [linux-dvb] notes and code for HVR-1800 S-Video Jeff DeFouw
@ 2008-12-02  6:29 ` djamil
  2008-12-02 16:42   ` Jeff DeFouw
  0 siblings, 1 reply; 3+ messages in thread
From: djamil @ 2008-12-02  6:29 UTC (permalink / raw)
  To: Jeff DeFouw; +Cc: linux-dvb


[-- Attachment #1.1: Type: text/plain, Size: 2643 bytes --]

Hi 
I am trying to do the same thing on my HVR 1400, can you give me clues
on how i can hack it up

I want to get analog working for svideo/composite inputs ...

Any tools under windows to spy on it ...


best regards

Le samedi 22 novembre 2008 à 14:52 -0500, Jeff DeFouw a écrit :

> I compared the registers in different modes with the Windows driver for 
> my WinTV-HVR-1800 (CX23887 based, PCI-E).  Setting the AFE control 
> registers fixes bad and flickering colors in S-Video mode.  The same 
> register values are used for Composite.
> 
> /* Set AFE control for Composite/S-Video input */
> cx25840_write4(client, 0x104, 0x071cdc00);
> 
> In analog tuner mode, the values are the chip defaults (0x0704dd80), but 
> I've left the regs set for S-Video and didn't notice anything.
> 
> To get the external audio input working (for Composite and S-Video 
> modes), the input needs to be set to AC97, unmuted, and the 
> microcontroller must be disabled (so it doesn't mute it).  The 
> microcontroller was always being enabled for some reason no matter the 
> audio source.
> 
> /* Set Path1 to AC97 and unmute */
> cx25840_write4(client, 0x8d0, 0x00063073);
> 
> With those two changes I am able to record S-Video and external audio 
> through the MPEG encoder.  I managed to hack the code up enough to get 
> all modes working based on the input setting.  It's not clear in the 
> existing cx23885-cx25840 framework how the audio input is supposed to be 
> configured.
> 
> Other issues:
> 
> The MPEG encoder video device randomly fails to start streaming, times 
> out, and returns an I/O error.  It's like something isn't being reset or 
> waited on properly during the setup.  The next attempt usually works, 
> but I can try 5 times and not succeed.
> 
> The MPEG encoder video device rejects attempts to set the input and 
> other settings as the raw video device does.  The raw video device must 
> be used for configuration, so any application would have to do something 
> special with both devices to be fully functional.  Is there a reason for 
> that?
> 
> Viewing the analog tuner over the raw video device and then using the 
> MPEG video device often causes the tuner video on both devices to be 
> scrambled.  Reloading the modules fixes it.  This only happens the first 
> time after boot.
> 
> The cx23885-audio branch screws up the operation of my card.  
> Specifically the patch to cx23885_initialize that disables the write to 
> register 0x2 affects my board and scrambles the video and audio rate.  
> It even screws up the MCU firmware download.
> 

[-- Attachment #1.2: Type: text/html, Size: 2813 bytes --]

[-- Attachment #2: Type: text/plain, Size: 150 bytes --]

_______________________________________________
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

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

* Re: [linux-dvb] notes and code for HVR-1800 S-Video
  2008-12-02  6:29 ` djamil
@ 2008-12-02 16:42   ` Jeff DeFouw
  0 siblings, 0 replies; 3+ messages in thread
From: Jeff DeFouw @ 2008-12-02 16:42 UTC (permalink / raw)
  To: djamil; +Cc: linux-dvb

On Tue, Dec 02, 2008 at 07:29:34AM +0100, djamil wrote:
> I am trying to do the same thing on my HVR 1400, can you give me clues
> on how i can hack it up
> 
> I want to get analog working for svideo/composite inputs ...
> 
> Any tools under windows to spy on it ...

I used the RegSpy tool from DScaler:
http://www.dscaler.org/

It reads the PCI registers and tracks the changes.  You have to program 
the registers in and make it recognize your card.  I modified my copy to 
control one of the I2C units and read the I2C registers at the cx25840 
address.

-- 
Jeff DeFouw <jeffd@i2k.com>

_______________________________________________
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

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

end of thread, other threads:[~2008-12-02 16:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-22 19:52 [linux-dvb] notes and code for HVR-1800 S-Video Jeff DeFouw
2008-12-02  6:29 ` djamil
2008-12-02 16:42   ` Jeff DeFouw

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