# Hauppauge WinTV PCI-FM (CX88): No TV sound  [SOLVED]

## ipic

I have been working on this for two days now, following all the posts I can find, and I can't see the wood for the trees any more   :Sad:  . I'm hoping that someone here can just tell me the magic setting.

The problem:

    I have a new (three days) WinTV PCI-FM card (details at end of post). Using tvtime and xawtv I can get great TV pictures, and using 'radio' (from xawtv package) I can get sound, *but* all I get from the TV channels (tvtime and xawtv) is hissy noise (sounds like the noise you get on a TV when its not tuned to any channel). I can change the volume of the hissy noise using tvtime volume control (for example), but I can't find the setting that produces TV sound.

    The Card audio line out is connected to my sound card line in, and I can control the radio sound and TV noise hiss from the ALSA line in mixer control, so it would appear that all the connections are correct - just no proper TV sound. It feels to me like all it needs is the correct settings, or maybe a small patch, to turn the noise into sound!

    By the way, I am in the UK, so TV norm is PAL-I (I believe).

    I have tried the loading 'radio' while tvtime or xawtv is running trick - same result when tvtime selects another channel - noise is just a lot louder.

Here are the details:

```
% uname -a

Linux ian2 2.6.10-gentoo-r4 #1 Sat Jan 15 17:44:21 GMT 2005 i686 AMD Athlon(tm) XP 2800+ AuthenticAMD GNU/Linux
```

After building this kernel, I retrieved the v4l snapshot video4linux-20050114-164020.tar.gz (from http://dl.bytesex.org/cvs-snapshots ). I followed instructions, built and installed this, and then removed all the duplicate modules from /lib/modules (from the previous kernel build).

Following many posts here and elsewhere, I have the following set in /etc/modules.conf:

```
alias char-major-89    i2c-dev

alias char-major-81 videodev

alias char-major-81-0 cx8800

options cx88xx audio_debug=0 core_debug=0 ir_debug=0

options tda9887 qss=0 port1=1 port2=0 pal=i debug=2

options tuner pal=i
```

( Actually, it doesn't seem to matter what I put in as options to tda9887, I always get the same result. I've tried qss=1, port1=0, port2=1 and adjust=0x0c in all combinations. pal=i seems to have no effect as far as I can see. Also, the TV works without tda9887 loaded. )

I have set tda9887 to be loaded at boot time, the rest are loaded by hotplug during the boot process.

dmesg from the boot is as follows:

```
Linux video capture interface: v1.00

cx2388x v4l2 driver version 0.0.4 loaded

cx2388x: snapshot date 2005-01-14

ACPI: PCI Interrupt Link [LNK1] enabled at IRQ 11

ACPI: PCI interrupt 0000:01:0a.0[A] -> GSI 11 (level, low) -> IRQ 11

cx88[0]: subsystem: 0070:3401, board: Hauppauge WinTV 34xxx models [card=1,autodetected]

tda9885/6/7: chip found @ 0x86

tveeprom: Hauppauge: model = 34519, rev = J157, serial# = 2906136

tveeprom: tuner = Philips FM1216 ME MK3 (idx = 57, type = 38)

tveeprom: tuner fmt = PAL(D/K) (eeprom = 0x74, v4l2 = 0x00400e17)

tveeprom: audio_processor = MSP3425 (type = 15)

cx88[0]: registered IR remote control

cx88[0]/0: found at 0000:01:0a.0, rev: 5, irq: 11, latency: 32, mmio: 0xe8000000

tuner: chip found at addr 0xc2 i2c-bus cx88[0]

tuner: type set to 38 (Philips PAL/SECAM multi (FM1216ME MK3)) by cx88[0]

cx88[0]/0: registered device video0 [v4l2]

cx88[0]/0: registered device vbi0

cx88[0]/0: registered device radio0

tda9885/6/7: switching to v4l2

tda9885/6/7: configure for: NTSC-M

tda9885/6/7: writing: b=0x50 c=0x70 e=0x44

tda9885/6/7: write: byte B 0x50

  B0   video mode      : sound trap

  B1   auto mute fm    : no

  B2   carrier mode    : Intercarrier

  B3-4 tv sound/radio  : FM/TV

  B5   force mute audio: no

  B6   output port 1   : high

  B7   output port 2   : low

tda9885/6/7: write: byte C 0x70

  C0-4 top adjustment  : 0 dB

  C5-6 de-emphasis     : 50

  C7   audio gain      : 0

tda9885/6/7: write: byte E 0x44

  E0-1 sound carrier   : 4.5 MHz

  E6   l pll ganting   : 36

  E2-4 video if        : 45.75 MHz

  E5   tuner gain      : normal

  E7   vif agc output  : pin3+pin22 port

-- 

cx2388x alsa driver version 0.0.4 loaded

cx2388x: snapshot date 2005-01-14

ACPI: PCI interrupt 0000:01:0a.1[A] -> GSI 11 (level, low) -> IRQ 11

cx88[0]/1: found at 0000:01:0a.1, rev: 5, irq: 11, latency: 32, mmio: 0xe9000000

cx88[0]/1: no alsa support yet, this is just a dummy module
```

When I start xawtv, and select PAL-I for the tv norm, I get hissy noise and dmesg shows:

```
tda9885/6/7: configure for: PAL-I

tda9885/6/7: writing: b=0x50 c=0x70 e=0x0a

tda9885/6/7: write: byte B 0x50

  B0   video mode      : sound trap

  B1   auto mute fm    : no

  B2   carrier mode    : Intercarrier

  B3-4 tv sound/radio  : FM/TV

  B5   force mute audio: no

  B6   output port 1   : high

  B7   output port 2   : low

tda9885/6/7: write: byte C 0x70

  C0-4 top adjustment  : 0 dB

  C5-6 de-emphasis     : 50

  C7   audio gain      : 0

tda9885/6/7: write: byte E 0x0a

  E0-1 sound carrier   : 6.0 MHz

  E6   l pll ganting   : 13

  E2-4 video if        : 38.9 MHz

  E5   tuner gain      : normal

  E7   vif agc output  : pin3+pin22 port
```

When I use tvtime (set to PAL - no other choice) I get hissy noise and dmesg shows:

```
tda9885/6/7: configure for: PAL-BG

tda9885/6/7: writing: b=0x50 c=0x70 e=0x09

tda9885/6/7: write: byte B 0x50

  B0   video mode      : sound trap

  B1   auto mute fm    : no

  B2   carrier mode    : Intercarrier

  B3-4 tv sound/radio  : FM/TV

  B5   force mute audio: no

  B6   output port 1   : high

  B7   output port 2   : low

tda9885/6/7: write: byte C 0x70

  C0-4 top adjustment  : 0 dB

  C5-6 de-emphasis     : 50

  C7   audio gain      : 0

tda9885/6/7: write: byte E 0x09

  E0-1 sound carrier   : 5.5 MHz

  E6   l pll ganting   : 13

  E2-4 video if        : 38.9 MHz

  E5   tuner gain      : normal

  E7   vif agc output  : pin3+pin22 port
```

Just for completeness, when run 'radio -f 93.85' I get UK Radio 4 loud and clear, and dmesg shows:

```
tda9885/6/7: configure for: radio

tda9885/6/7: writing: b=0x48 c=0x70 e=0x1d

tda9885/6/7: write: byte B 0x48

  B0   video mode      : sound trap

  B1   auto mute fm    : no

  B2   carrier mode    : Intercarrier

  B3-4 tv sound/radio  : FM/radio

  B5   force mute audio: no

  B6   output port 1   : high

  B7   output port 2   : low

tda9885/6/7: write: byte C 0x70

  C0-4 top adjustment  : 0 dB

  C5-6 de-emphasis     : 50

  C7   audio gain      : 0

tda9885/6/7: write: byte E 0x1d

  E0-1 sound carrier   : 5.5 MHz

  E6   l pll ganting   : 13

  E2-4 video if        : 44 MHz

  E7   vif agc output  : fm radio carrier afc
```

For completeness, lsmod shows:

```
Module                  Size  Used by

cisco_ipsec           392012  0

eeprom                  6040  0

asb100                 21908  0

i2c_sensor              3072  2 eeprom,asb100

lp                      9000  0

usblp                  11136  1

parport_pc             30276  1

parport                31944  2 lp,parport_pc

cx8801                  2688  0

tuner                  20644  0

cx8800                 26124  0

cx88xx                 46364  2 cx8801,cx8800

video_buf              17028  2 cx8800,cx88xx

ir_common               4100  1 cx88xx

tveeprom               11160  1 cx88xx

v4l1_compat            13572  1 cx8800

v4l2_common             4736  1 cx8800

btcx_risc               3848  2 cx8800,cx88xx

videodev                7424  2 cx8800,cx88xx

i2c_nforce2             5632  0

snd_intel8x0           28064  3

snd_ac97_codec         72032  1 snd_intel8x0

snd_seq_oss            31360  0

snd_seq_midi_event      6144  1 snd_seq_oss

snd_seq                47376  4 snd_seq_oss,snd_seq_midi_event

snd_seq_device          7180  2 snd_seq_oss,snd_seq

snd_pcm_oss            48164  0

snd_pcm                81928  3 snd_intel8x0,snd_ac97_codec,snd_pcm_oss

snd_timer              20228  2 snd_seq,snd_pcm

snd_page_alloc          7684  2 snd_intel8x0,snd_pcm

snd_mixer_oss          17536  3 snd_pcm_oss

snd                    46436  11 snd_intel8x0,snd_ac97_codec,snd_seq_oss,snd_seq,snd_seq_device,snd_pcm_oss,snd_pcm,snd_timer,snd_mixer_oss

tda9887                12184  0

bsd_comp                5504  0

ppp_deflate             5120  0

ppp_async               9216  0

ppp_generic            19860  3 bsd_comp,ppp_deflate,ppp_async

slhc                    6912  1 ppp_generic

crc_ccitt               1920  1 ppp_async

forcedeth              14464  0

3c59x                  36008  0

nvidia               3460220  12

dm_mod                 53500  0

sbp2                   21384  0

ohci1394               31108  0

ieee1394               92596  2 sbp2,ohci1394

ohci_hcd               18824  0

uhci_hcd               29968  0

usb_storage            65600  0

usbhid                 39872  0

ehci_hcd               26884  0

usbcore               103544  8 usblp,ohci_hcd,uhci_hcd,usb_storage,usbhid,ehci_hcd
```

(i2c-core was not built as a module, so it doesn't show in the above list.)

The motherboard is ASUS A7N8X Deluxe.

Finally, the details printed on the card itself are:

```
On the Retail box it came in:

    WinTV-PCI-FM

    model 619

On the PCB:

    Hauppauge! Computer Works, Inc

    340000-09

    HannStar V-0

    94V-0

    0433

On the main chip:

    Conexant Broadcast Decoder

    CX23881-19

    42000 225 0429

    Korea

On the tuner white label:

    WIN-TV

    PAL-B/G-I-D/K-SECAM

    34519 Rev J157

    Assembled in Malaysia

I peeled away the while label (carefully!), and on the stickers underneath I found:

    Phillips

    FM1216ME/1 M-3

    3138 147 18201M
```

I'm keeping my fingers crossed that someone out there has this combination TV sound working, or can throw me some things to try.

Many thanks

Ian PickworthLast edited by ipic on Thu Feb 10, 2005 5:09 pm; edited 1 time in total

----------

## ipic

An update - since there is some progress  :Smile: .

I built the snapshot video4linux-20050120-125446.tar.gz from http://dl.bytesex.org/cvs-snapshots and this introduces a change that allows PAL-I MONO sound with the cx88 chip.

I was please to be able to help a very small bit with this, but transposing changes from the Windows dscaler product to the cx88_tvaudio.c code. My first contribution to a driver!

During the process I have found that the strength of the TV signal is very important for sound quality with these types of card.  Have a look at this part of the thread for a comprehensive explanation on how TV sound is encoded: 

https://www.redhat.com/mailman/private/video4linux-list/2005-January/msg00366.html

Knowing this, I experimented and found that, for example, amplifying the TV signal before it reaches the card will cause lots of noise in the sound produced. Also, the quality of the cable is important - double shielded is best (that's what a TV engineer told me anyway).

So, hope this helps someone.

Regards

Ian

----------

## ipic

And another update - PAL-I sound is now working - even in NICAM stereo  :Smile: .

The fix that enables PAL-I stereo sound has become available in the snapshot video4linux-20050210-124039.tar.gz from http://dl.bytesex.org/cvs-snapshots/

In addition there are some settings that you have to be aware of to make the sound work cleanly.

Since my last post, I have found that this card and tuner uses the tda9887 chip, and that there are some module parameters that have to be set correctly to get clean sound.

For me, to get PAL-I sound, the values needed in /etc/modules.conf are:

```
options tda9887 port1=1 port2=0 
```

The final piece in the jigsaw is to get the correct TV norm set. For PAL-I the norm has to be exactly PAL-I, the default for PAL in tvtime will get you PAL-BG, and no sound. So, I created a small bash script to start tvtime for me:

```
#!/bin/sh

nohup tvtime &

# Give it time to load

sleep 1

# Set the TV norm to exactly PAL-I

v4lctl setnorm PAL-I

# "Fix" the tvtime display - wrecked by previous command

tvtime-command CHANNEL_DOWN CHANNEL_UP

sleep 1

# Force the audio mode to stereo - optional

v4lctl setattr "audio mode" stereo

# Display a message in tvtime screen - also optional

tvtime-command DISPLAY_MESSAGE Setup
```

Hope this helps someone.

----------

## kudude

did you get the sound working with the patch hardware cable, or could you run it through the pci bus?  (i know this is old, but i'm working on some issues of my own)

----------

## ipic

 *kudude wrote:*   

> did you get the sound working with the patch hardware cable, 
> 
> or could you run it through the pci bus?  (i know this is old, but i'm working on some issues of my own)

 

The cx88 drivers have a ALSA audio stub, but its not completed yet. 

So the only way to get audio is through a hardware cable to another sound card.

Since my last post, the drivers in the kernel (2.6.13-r5) have all the latest cx88 sound stuff, 

and tvtime (v1.0.1)  has been changed to allow the selection of the exact PAL norm required. 

So, with a hardware cable this works out of the box now.

The v4l activity has moved from the previous URL to its own wiki at 

http://linuxtv.org/v4lwiki/index.php/Main_Page

should you want to get involved.

Regards

Ian

----------

## kudude

Thanks for the reply, the problem i have is that the particular cx88 card i have (the hauppauge roslyn model) doesn't have any hardware out cable capabilities.  so am i outta luck until someone writes the driver or i spend a month learning how to write it myself.

thanks

----------

