[linux-dvb] notes and code for HVR-1800 S-Video

Jeff DeFouw jeffd at i2k.com
Sat Nov 22 20:52:52 CET 2008


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 at i2k.com>



More information about the linux-dvb mailing list