Hauppauge WinTV-PVR-150 + FreeBSD 6.2 = Trouble

Toffi toffi at ramon-galiote.org
Wed Nov 29 23:50:43 UTC 2006

Hi there,

Trying to get an Hauppauge WinTV-PVR-150 card work on a FreeBSD 6.2 box 
(see dmesg.boot at the end). The card works fine (with WinTV2000) on the 
same machine, when booting Windows.

What I did:

1- Download ftp://www.hauppauge.co.uk/cd/cd-analogue-pvr-pci-26.zip

2- Unzip the three following files out of cd-analogue-pvr-pci-26.zip:

HcwMakoB.ROM (20 apr 2005 size 14264)
HcwMakoC.ROM (9 feb 2006 size 16382)
hcwPVRP2.sys (14 sep 2005 size 824512)

and rename HcwMakoC.ROM -> HcwMakoA.ROM

3- Move hcwPVRP2.sys and HcwMakoA.ROM in /usr/ports/distfiles

4- Update /usr/ports/multimedia/pvrxxx/distinfo to add the missing 
entries relative to pvrxxx_gpl.tgz and adjust md5 and sha256 when needed

5- Build & install a new kernel with iicbus and iicbb devices + reboot

6- make patch-iicbb in /usr/ports/multimedia/pvrxxx/

7- Change /usr/ports/multimedia/pvrxxx/Makefile to add a new patch 
target patch-HcwMakoC , needed to replace 14264 (HcwMakoA.ROM size) by 
16382  (HcwMakoC.ROM size) in the following file 

int request_firmware(void **fw, char *file, int dummy)
{       static struct firmware thef;
         *fw = &thef;
         #thef.size = 14264;
	thef.size = 16382;
         return 0; }

Why is the size hard coded like that ?

8- make patch-HcwMakoC in /usr/ports/multimedia/pvrxxx/

9- make install in /usr/ports/multimedia/pvrxxx/

10- kldload cxm_iic

11- kldload cxm (freeze the PC during about 20 seconds)

12- dmesg looks great:

cxm0: <Conexant iTVC16 MPEG Coder> mem 0xd0000000-0xd3ffffff irq 17 at 
device 5.0 on pci4
cxm_iic0: <Conexant iTVC15 / iTVC16 I2C controller> on cxm0
iicbb0: <I2C bit-banging driver> on cxm_iic0
iicbus0: <Philips I2C bus> on iicbb0 master-only
tuner code 105
tuner_type = 3
cxm0: Philips FQ1216ME MK3 tuner
<2>cxm 0-0000: loaded /lib/modules/v4l-cx25840.fw firmware (16382 bytes)
<2>cxm debug 0-0000: decoder set input (0)
<2>cxm debug 0-0000: now setting Tuner input
<2>cxm debug 0-0000: set audio input (0)
<2>cxm debug 0-0000: set audio input (0)
cxm0: Eeprom PAL
<2>tda 0-0000: switching to v4l2
<2>tda 0-0000: configure for: PAL-BG
<2>tda 0-0000: writing: b=0xd4 c=0x70 e=0x09
<2>tda 0-0000: read: 0xce
<2>tda 0-0000:   after power on : no
<2>tda 0-0000:   afc            : -187.5 kHz [min]
<2>tda 0-0000:   fmif level     : low
<2>tda 0-0000:   afc window     : in
<2>tda 0-0000:   vfi level      : high
<2>cxm 0-0000: Video signal:              not present
<2>cxm 0-0000: Detected format:           NTSC-M
<2>cxm 0-0000: Detected audio mode:       forced mode
<2>cxm 0-0000: Detected audio standard:   forced audio standard
<2>cxm 0-0000: Audio muted:               no
<2>cxm 0-0000: Audio microcontroller:     running
<2>cxm 0-0000: Configured audio standard: A2-BG
<2>cxm 0-0000: Configured audio mode:     undefined
<2>cxm 0-0000: Specified standard:        PAL-BDGHI
<2>cxm 0-0000: Specified input:           Tuner
<2>cxm 0-0000: Specified audio input:     Tuner
<2>cxm 0-0000: Specified audioclock freq: 48 kHz
<2>cxm 0-0000: Preferred audio mode:      stereo
<2>cxm 0-0000: Selected 65 MHz format:    system DK
<2>cxm 0-0000: Selected 45 MHz format:    chroma
cxm0: encoder firmware version 0x2050032

13- pvr250-setchannel -m 9 39
ioctl( tfd, BT848_GAUDIO ) failed.: Device not configured

Being in France I need SECAM (-m 9)

14- Trouble comes here:

mplayer /dev/cxm0

  ... gives a messy screen looking as if the tuner was not tuned or if 
the signal (video + audio) was encrypted !

MPlayer 1.0rc1-3.4.6 (C) 2000-2006 MPlayer Team
CPU: Intel(R) Core(TM)2 CPU          6600  @ 2.40GHz (Family: 6, Model: 
15, Stepping: 6)
CPUflags:  MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled with runtime CPU detection.

Playing /dev/cxm0.
Win32 LoadLibrary failed to load: avisynth.dll, 
/usr/local/lib/win32/avisynth.dll, /usr/lib/win32/avisynth.dll
MPEG-PS file format detected.
VIDEO:  MPEG2  720x576  (aspect 2)  25.000 fps  9520.0 kbps (1190.0 kbyte/s)
Opening video decoder: [mpegpes] MPEG 1/2 Video passthrough
VDec: vo config request - 720 x 576 (preferred colorspace: Mpeg PES)
Could not find matching colorspace - retrying with -vf scale...
Opening video filter: [scale]
The selected video_out device is incompatible with this codec.
Try adding the scale filter, e.g. -vf spp,scale instead of -vf spp.
VDecoder init failed :(
Opening video decoder: [libmpeg2] MPEG 1/2 Video decoder libmpeg2-v0.4.0b
Selected video codec: [mpeg12] vfm: libmpeg2 (MPEG-1 or 2 (libmpeg2))
Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
AUDIO: 48000 Hz, 2 ch, s16le, 384.0 kbit/25.00% (ratio: 48000->192000)
Selected audio codec: [mp3] afm: mp3lib (mp3lib MPEG layer-2, layer-3)
AO: [oss] 48000Hz 2ch s16le (2 bytes per sample)
Starting playback...
VDec: vo config request - 720 x 576 (preferred colorspace: Planar YV12)
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1.33:1 - prescaling to correct movie aspect.
VO: [xv] 720x576 => 768x576 Planar YV12
New_Face failed. Maybe the font path is wrong. 2 ??% ??% ??,?% 1 0
Please supply the text font file (~/.mplayer/subfont.ttf).
subtitle font: load_sub_face failed.
A:   5.7 V:   1.5 A-V:  4.261 ct: -0.039  17/ 17  6%  0% 823.3% 16 0

Help would be appreciated !

Toffi Ramon

dmesg.boot :

FreeBSD 6.2-PRERELEASE #2: Fri Nov 24 01:51:18 CET 2006
     toffi at wolfy.ramon-galiote.org:/usr/obj/usr/src/sys/SMP
ACPI APIC Table: <DELL   B8K    >
Timecounter "i8254" frequency 1193182 Hz quality 0
CPU: Intel(R) Core(TM)2 CPU  6600 @ 2.40GHz (2394.04-MHz 686-class CPU)
   Origin = "GenuineIntel"  Id = 0x6f6  Stepping = 6
   AMD Features=0x20100000<NX,LM>
   AMD Features2=0x1<LAHF>
   Cores per package: 2
real memory  = 2145857536 (2046 MB)
avail memory = 2086326272 (1989 MB)
FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs
  cpu0 (BSP): APIC ID:  0
  cpu1 (AP): APIC ID:  1
ioapic0: Changing APIC ID to 8
ioapic0 <Version 2.0> irqs 0-23 on motherboard
lapic0: Forcing LINT1 to edge trigger
kbd1 at kbdmux0
ath_hal: (AR5210, AR5211, AR5212, RF5111, RF5112, RF2413, RF5413)
acpi0: <DELL B8K    > on motherboard
acpi0: Power Button (fixed)
Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000
acpi_timer0: <24-bit timer at 3.579545MHz> port 0x808-0x80b on acpi0
cpu0: <ACPI CPU> on acpi0
cpu1: <ACPI CPU> on acpi0
acpi_button0: <Power Button> on acpi0
pcib0: <ACPI Host-PCI bridge> port 0xcf8-0xcff on acpi0
pci0: <ACPI PCI bus> on pcib0
pcib1: <ACPI PCI-PCI bridge> irq 16 at device 1.0 on pci0
pci1: <ACPI PCI bus> on pcib1
nvidia0: <GeForce 7900 GS> port 0xdc80-0xdcff mem 
0xdd000000-0xddffffff,0xc0000000-0xcfffffff,0xde000000-0xdeffffff irq 16 
at device 0.0 on pci1
nvidia0: [GIANT-LOCKED]

More information about the freebsd-multimedia mailing list