Search:  
Gentoo Wiki

Hauppauge_WinTV_PVR-500

This article is part of the Hardware series.
Laptops TV Tuner Cards Wireless Servers Storage Other Hardware Motherboards Related

Contents

Status of this page

Although this page is very informational and pretty accurate it does not cover recent versions of the Linux kernel and the ivtv package. This is relevant because the ivtv package originally used its own versions of some general video related kernel modules. During 2006 ivtv has gone mainstream and merged its sources with related kernel modules. On a system running a recent kernel (e.g. >=gentoo-sources-2.6.18) the install procedure for >=ivtv-0.8.0 has become straightforward. This clean procedure is not covered in this page, but can be found at the ivdriver.org website (see: http://ivtvdriver.org/index.php/Howto:Gentoo). While you are there, please recognise how smooth the Gentoo procedure is compared to the description of other listed Linux distributions (yet another argument for switching to Gentoo running a recent kernel). [This section was added on november 22th, 2006]

Introduction

Basically, the Hauppague PVR 500MCE is a nice dual TV tuner available in the USA. This guide assumes NTSC US-Cable and the 500MCE. This guide should also be compatible with the PVR-150, although it only has one TV tuner.

In the past few days (about 1 year ago now), I've had many problems and learned how to fix them. This should explain a lot!

First Steps

You should first check to see if your tuner will even work.

 user@localhost $ dmesg | grep -i irq | grep -i disabl

This should give no results. If it lists something, it may mean that there are IRQ conflicts. on one of my systems, the tv card and sound card required some specific PCI slots.

Kernel Requirements

There are a couple of kernel related things that need to be set before you can use the card.

Linux Kernel Configuration: Gentoo 2.6
Device Drivers --->
 Generic Driver Options --->
  [ ] Prevent firmware from being built
  <M> Hotplug firmware loading support (Not sure how)
 I2C support  --->
  <M> I2C support
  <M> I2C device interface
  <M> I2C Bit Banging (without, on kernel 2.6.12.x the ivtv-modul won't be built)
 Multimedia devices --->
  <M> Video For Linux
   Video For Linux  --->
    <*> BT848 Video For Linux (VIDEO_BT848)
    <*> Add support for additional audio chipsets (VIDEO_AUDIO_DECODER)
    <*> Add support for additional video chipsets (VIDEO_DECODER)

Verification

No sure how to verify this.

I would have thought lspci would show the card, but it doesn't.

# dmesg | grep btt

shows a two line blurp.

Getting and Installing IVTV

The recommended kernel and ivtv versions are:

# kernel <= 2.6.15
# ivtv version >= 0.4.5

From ivtv 0.6 and onward large parts of ivtv are being merged into mainline kernel or mainline modules are being used in favor of ivtv's. So unles you are willing to fix broken systems do not use ivtv 0.6/0.7 and kernels verions >2.6.15.

edit -- the ivtv package comes in two versions the 0.4.x range and the 0.6.x range. My PVR-500 failed on both tuners with 0.4.x but detected them easily with ivtv 0.6.x (for me 0.6.2 works 0.4.2 doesn't). There is no 0.6.x ebuild but you can modify the 0.4.x version with no problems. As with sound i have not got that far. // THis is fixed in IVTV 0.4.5

Step 0 - Start with the Ebuild

You should now be able to emerge ivtv. You may need to unmask the newest version for some reason or another. this is another matter though.

It seems that the stable 0.4.0-rc3 wont work on 2.6.15, see: http://bugs.gentoo.org/show_bug.cgi?id=117915 So you might try:

# echo "media-tv/ivtv ~x86" >> /etc/portage/package.keywords

Thus as root, try:

emerge ivtv

You will need to delete the extra modules from the kernel because they conflict with the ones from ivtv! This will be displayed when you emerge the package.

You should probably skip to step 4 now.

Steps 1-3 will be left as reference as they explain common problems overall.

Step 1 - Get Module

Therefore, get a kernel module from the 0.4.x series from ivtv's release site.

Step 2 - untar the module as root

You will need to untar the module and install it. i suggest doing this:

 user@localhost $ su
 Password:
 root@localhost # tar -zxf path-to-ivtv-0.4.x -C /root/

path-to-ivtv-0.4.x should be replaced with the correct path to the correct version of the file you just downloaded. yes, this has been a problem for some people.

Step 3 - Install the Module

You should still be logged in as root. Do this:

 root@localhost # cd /root/ivtv-0.4*/driver
 root@localhost # make && make install

COMMON PROBLEM #1

It is likely that you did not compile in support for tv tuners. See the mythtv guide here for the kernl config changes required to even try to compile ivtv.

COMMON PROBLEM #2

It is also likely that you have more then one tveeprom, msp3400, and tuner modules. the compile will tell you what you have extras of and how to fix it. READ THE COMPILE OUTPUT FOR INSTRUCTIONS TELLING YOU TO MOVE MODULES FROM VARIOUS PLACES IN /lib/modules.

Step 4 - edit /etc/modprobe.d/ivtv

Put the following lines into a file called /etc/modprobe.d/ivtv

 alias char-major-81 videodev
 alias char-major-81-0 ivtv
 alias char-major-81-1 ivtv
 #  Use the yuv_fixup option to convert Hauppauge Macroblock NV12 to NV12
 options ivtv yuv_fixup=1

Note: For some PVR-150s (NTSC), add options ivtv tuner=50 to receive channels above 60 For newer PVR-500s with a Samsung tuner, add options ivtv tuner=68,68 (or tuner=70,70) to receive channels above 60. this tuner is supported in ivtv versions 4.2 and above.


Now run as root:

 root@localhost # update-modules

COMMON PROBLEM

With the latest "stable" version 0.4.5 the below should not be neccesary anymore. For me both cards got recognized without problems.

If you do not live in the USA, then tuner=57,57 may be incorrect!

Also, ivtv_std may need to be changed:

It seems that autodetect for cardtype might not be reliable in 0.4 at this time. thus you may need to specify cardtype=6.

Step 5 - Install Firmware

If you used the ivtv from portage, you should skip this step.


Obtain the files online at Hauppauge's Website

Extract the file:

 root@localhost # mkdir ~/pvrfirmware
 root@localhost # unzip mce_cd_v27a.zip -d ~/pvrfirmware
 

Copy the files and link them:

 root@localhost # cp ~/pvrfirmware/WinTV-PVR-150500MCE_2_0_30_23074_WHQL/HcwMakoA.ROM /lib/modules
 root@localhost # cp ~/pvrfirmware/WinTV-PVR-150500MCE_2_0_30_23074_WHQL/HcwFalcn.rom /lib/modules
 root@localhost # ln -sf /lib/modules/HcwFalcn.rom /lib/modules/ivtv-fw-enc.bin

Note -- these files are also on the driver cd that came with the card These files might be installed by the ebuild. It may be possible to skip this step if you used the ebuild. Note that I suggest we leave this section in for the event that someone needs a version not in portage.

Step 6 - Load ivtv

still as root run:

 root@localhost # update-modules
 root@localhost # modprobe ivtv
 root@localhost # dmesg | grep tuner

COMMON PROBLEM

Make sure BOTH tuners are detected! it is typical for one tuner to come up as type 4 - NoTuner. This will prevent you from using both tuners (though you will still have 1 tuner) The result of using "NoTuner" will be static or no signal! PVR150 users need only specify tuner=57 as the card only has one tuner.

To fix this:

 root@localhost # rmmod ivtv
 root@localhost # modprobe ivtv tuner=57,57
 root@localhost # echo ivtv tuner=57,57 >> /etc/modules.autoload.d/kernel-2.6

side note, setting up /etc/modprobe.d/ivtv should mean that the tuner=57,57 part happens automatically; however, on my system this is not true as dmesg shows. In the end, the point remains that you need to check to make sure BOTH tuners get loaded correctly.


COMMON PROBLEM

If you receive the message tuner: tuner type not set for BOTH tuners and receive static:

 Check your kernel configuration.  
 Under the Multimedia devices section you must make sure Video For Linux is enabled, 
   then disable ALL tuners from the Video For Linux and Radio Adapters submenus.  
 The tuners from these sections will directly interfere with the ivtv drivers.
 Note that this really means ALL, including Additional Audio and Video.  This is especially true
 for newer 150 and 500 cards and <= 2.6.15 kernels.

NEWER Hauppauge PVR 500 cards utilize a Samsung tuner that is only supported in the NEWEST release of the IVTV drivers. (starting in version 0.4.2) if you have >=0.4.2, use tuner=68,68 to recieve channels 55 and above. If that doesn't work for you, try tuner=70,70 as you nay have an even newer tuner. Compare the output of dmesg with /usr/src/linux/Documentation/video4linux/CARDLIST.tuner

AMD64 ISSUES

Be sure to get the latest ivtv version (takes care of class_*_*_* not found errors). If the driver won't load correctly on modprobe ivtv, load the drivers (for a hauppage pvr500)in this order: tveeprom, tuner, cx25840, wm8775, tda9887, ivtv autoload=0. This solves a problem where ivtv won't load the modules when ivtv is loaded, and when ivtv gives warnings such as:

console1:

 ivtv0 warning: i2c client addr: 0x21 not found for command 0x40046403! 

Also, be sure to set the cardtype=6 in /etc/modprobe.d/ivtv. 21:14, 19 December 2005 (GMT)Brandon Gavino

Step 7 - Get ptune.pl for some testing

EVERYTHING BELOW THIS IS OPTIONAL!

ptune.pl is a great perl script that can be used to test your tv tuner. At time of writing it is marked "testing" or ~x86. I would not worry about this too much -- it doens't get any unstable libraries or such, at worst ptune.pl will just not work!

as root, edit /etc/portage/package.keywords and add to it:

 media-tv/ivtv-ptune ~x86
 dev-perl/Video-ivtv ~x86
 dev-perl/Video-Frequencies ~x86

as root:

 root@localhost # emerge ivtv-ptune

OK, this should work just fine.

Now for testing open up two consoles. (xterms maybe, or login to a second VC). and issue the commands. NOTE, press ctrl+C to exit the cat command

console1:

 root@localhost # ptune.pl --input /dev/video0 -c 2
 root@localhost # cat /dev/video0 > ~/vid0.mpg

console2:

 root@localhost # ptune.pl --input /dev/video1 -c 3
 root@localhost # cat /dev/video1 > ~/vid1.mpg

Ok, this will run indefinately. after about 30 seconds after issuing both commands, stop cat by pressing ctrl+C at each console.

This should give you two videos, one of channel 2, one of channel 3. If this works, then IVTV has been successfully install.

MythTV Issues

This guide is not intended to Replace the mythtv guide, but it will supplement it a fair bit.


Proper Capture Card Settings

The proper capture card settings in mythsetup will be:

Both devices should be set to tuner0, as it is refers to tuner0 on that video device. (video0 has a tuner0 and video1 has its own tuner0.)

Recording Only Static?

Recording a still image?

Permission Issues?

check with

 user@localhost $ ls -l /dev/v4l/

devices should show -rw-rw--- instead of -rw------. -rw-rw-rw is also acceptable.

To fix this, change either /etc/secuity/console.perms or /etc/udev/rules.d/50-udev.rules

Channel Changing Issues

You probably reloaded ivtv without restarting mythbackend. You will need to restart mythbackend

 root@localhost # /etc/init.d/mythbackend restart


Current Issues

please post new oddball issues below. make sure to include a date so people know if the issue is new or years old!

12 June 2006 -- ivtv-0.6.2 currently has issues with gcc-4.1 . refer to http://www.gossamer-threads.com/lists/ivtv/devel/30123 for information. This bug appears to be an issue with how gcc-4.1 optimizes the 2.6.16 kernel. It is hoped that kernel-2.6.17 will fix these issues. This is probably why ivtv-0.6.2 is hardmasked atm. I couldn't get ivtv-0.4.5 to compile...

It seems kernel-2.6.16 requires ivtv-0.6.2. even with the below modifications, things may not work correctly. Likewise ivtv-0.6.2 probably won't work for kernel-2.6.15 or lower. You might need to switch to a 2.6.15 kernel and ivtv-0.4.5 until this is all fixed, or until 0.7 and kernel-2.6.17 come out and hopefully work.

To fix, you will need to emerge -C ivtv . Then get ivtv 0.6.2 from http://dl.ivtvdriver.org/ivtv/archive/0.6.x/ivtv-0.6.2.tar.gz and the patch from http://www.gossamer-threads.com/lists/engine?do=post_attachment;postatt_id=1420;list=ivtv . follow the instruction about the manual compile -- untar the files as above. copy the ivtv-newi2c.diff to the ivtv-0.6.2/ dir. cd to this dir. now do a patch -p0 < ivtv-newi2c.diff . continue on with the install. note that there is new firmware which you need to download from http://ivtvdriver.org/index.php/Firmware . you will probably need to mkdir /lib/firmware . Then tar -zxf <firmware-file-name> -C /lib/firmware .

when you load ivtv, you will need to do so using: modprobe ivtv newi2c=0 or modprobe ivtv newi2c=0 tuner=57,57 . the autodetect picked my card up as a PAL card, so make sure to double check the messages in dmesg to make sure your card is correctly detected!

After these steps, i was able to get video, but not able to change channels. i eventually recompiled my system, and kernel, ect... with gcc3.4 and got things somewhat working.

It has been reccomended to me that you remove the cards from mythsetup and re-add them whenever you mess with ivtv. so if things aren't working for you, try re-adding the cards. it may just fix things for you!


If you have problems with ivtv (errors ir2c in dmesg). Switch off your computer a few minutes then switch it on again. The firmware is loaded on boot so it might correct things. It did work for me when switching back from ivtv 0.6.2 to 0.4.2 (which is working better).

20 Jan 2007 -- Recent PVR 500 cards with Samsung tuners require newer ivtv drivers to detect tuner correctly. Recommend 0.8.2 with kernel 2.6.18 or newer. The driver defaults to 1/2 resolution capture format. This causes (at least with PAL) strong banding and ghosting, yielding an unusable picture. The current fix is to set capture format to full resolution via the command v4l2-ctl -v width=720,height=576.

Retrieved from "http://www.gentoo-wiki.info/Hauppauge_WinTV_PVR-500"

Last modified: Sat, 30 Aug 2008 22:12:00 +0000 Hits: 31,021