$Id: pvrusb2.html 1261 2006-07-02 22:36:46Z isely $
Mike Isely <isely at pobox dot com>
The home location for this page is here.
If you have any suggestions for improving either this web page or the driver itself, please drop me a message.
Contents
Contacting People / Discussion List
Overview
Download
Setup
Usage
FAQ
Utilities
Bugs
Change History
If you wish to contact me, my e-mail address is spelled out at the top of this page.
There is also a pvrusb2 e-mail discussion list, hosted here at this site. This is a mailman-operated list, so you can subscribe, unsubscribe, access your subscription, scan archives, etc via the web. (You can also initiate a subscription by sending a message to <pvrusb2-subscribe at isely dot net>.) Any pvrusb2 relevant topic there is fair game. Posting to the pvrusb2 list is limited to just subscribers, but I encourage you to subscribe to the list. The main web page for the discussion list can be found here.
Note also for those who use IRC, the channel #pvrusb2 has been set up on freenode. I tend to idle there (with a fairly obvious handle) when I can.
This driver is intended for the Hauppauge WinTV PVR USB2, which is a USB 2.0 hosted TV Tuner. Examples for sale can be found at pricegrabber. This device is an analog tuner, but it has a hardware mpeg encoder, which makes it ideal for use in PVR applications. Functionally, the "PVR USB2" device is very similar to Hauppauge's line of "PVR-nnn" PCI based tuner cards - except this device uses USB instead of PCI which makes it suitable for laptop, xbox, or embedded device applications where there would otherwise not be a PCI slot available.
Please note that this driver is only for the WinTV PVR USB2, and in particular this driver is not for the seemingly similar sounding Hauppauge WinTV USB2 which is in fact a completely different and less capable device from Hauppauge. (See here for a driver that should work with the WinTV USB2 hardware.)
This driver is very much a work in progress. Its history started with the reverse-engineering effort by Björn Danielsson whose web page can be found here. From there Aurelien Alleaume began an effort to create a video4linux compatible driver. His web page about this driver can be found here. However after October 2004, work there seemed to have stopped and repeated attempts to contact him over several months since then were not successful. The driver hosted here picks up from that point. I have been maintaining / improving this since February 2005.
There are three variations of this driver available. One is here on this site. Another is hosted within the official video4linux Mercurial source tree, and the third variation is available in the Linux kernel tree, as of version 2.6.18. I maintain them all and they are closely related. You can use any; the "master" version is currently the standalone version on this site; the others are derived from here. As for deciding which you might want to try: The version in the kernel is of course considered to be the most stable, so if you are using 2.6.18 or later then just stick with that. The version in V4L is more bleeding edge than the kernel and what's in V4L today is expected to always be what gets into the next kernel release. If want a more recent version of the driver and if you are already into building & running all of V4L then the V4L version is probably what you want. If on the other hand you want the absolute latest version available and just want to get this one driver working (damnit!) and don't want to learn about Mercurial (V4L's source code manager), and you don't like the idea of pulling in 50+ modules just to run one piece of hardware, then you may prefer to run the standalone version hosted here. It's up to you. Right now the way I do development is that the standalone version is the "primary" version. All others derive from this version. To update the V4L version I process the sources through a Perl script that reconfigures the driver for use inside of V4L (strips out source files and code that don't make sense there, and enables some bits for in-V4L-tree operation that might otherwise be shut off). The kernel version is processed out of V4L. I'm using Subversion to maintain the driver sources and do diff / patching as needed for any changes from that come back my way, regardless of variation.
Note: Even if you choose to run the in-kernel version or V4L hosted version of this driver, you will still need to extract and install the firmware - and the extraction script is not (yet) part of the V4L repository or the kernel tree (but that may change soon). If you need just the extraction script (something normally contained in the standalone driver snapshot), you can download a reasonably recent version from here: http://www.isely.net/downloads/fwextract.pl.
As of this writing, there are two major variants of the PVR USB2 hardware in circulation. They can be physically distinguished by the white sticker on the underside of the device - the retail boxes are identical, unfortunately. You can also distiguish the two variants through the USB ID reported to the host when the device is plugged in.
This driver (and including the other two variations) is intended to work with both old and new hardware. Right now things appear stable with both the old and new hardware. See the Bugs section for more details. Also, the firmware situation and chip-level modules are different in the two cases, which may impact how you set things up. The documentation on this site covers both model variants.
I've been trying to collect a census of the various model variants in circulation. You can find the current results in models.txt; please e-mail me if you would like to add your device to the tally.
If you have trouble getting the driver to work, please read through this site again - there are a lot of details here and it is easy to miss something. Also, I've written a short FAQ covering common situations that people have found themselves in. Try scanning the mailing list archives here. If none of that helps, send me a message or subscribe and post to the mailing list (information here) - it's entirely possible that you might have encountered something new and thus I want to hear about it so I can address the problem for everyone...
Downloads can be found here.
To operate your PVR USB2 device in Linux, there are several prerequisites and a number of things you must do first.
You must satisfy at least these prerequisites before the driver will work:
The Prerequisites / Compatibility section of setup.html has the details for the above.
There are 3 basic steps you must complete in order to operate your PVR USB2 device in Linux:
If you are trying the in-V4L or in-kernel driver version, then the compilation steps above are a part of the surrounding build and so you don't have to do anything special there. However even in that case you still have to deal with the firmware part of the puzzle.
The following sections of setup.html have the details for getting your PVR USB2 device working:
Driver compilation and installation
Firmware extraction and installation
Support Modules
The page usage.html has everything you ever wanted to know about using this driver, but contained below is a basic summary to get you going.
Plug in your WinTV-PVR-USB-2.0 device and after a few seconds the driver should be ready to go. Progress can be monitored through the kernel log.
If you have udev installed on your system, then within a few seconds after the driver initializes, you should see something like this appear in your system: /dev/video0 (if this is the only video device in your system). If you're not running udev, then you need to make sure that appropriate /dev entries have been configured into your system; details for that (e.g. correct major / minor numbers) are a V4L specific issue and outside the scope of documentation. Really, save yourself a headache and just use udev...
One you have a valid /dev entry, then you can start playing! Any V4L application which can handle mpeg stream data should be able to work. You can also just "cat" /dev/video and you'll get a video stream for whatever the device is currently configured to capture.
In addition to the V4L API, this driver also implements a sysfs-hosted interface, which can be found in /sys/class/pvrusb2/sn-xxxxxx (substitute xxxxxx for your device's serial number). Through that interface you can operate the device right from your shell prompt without need for any kind of utility program(s). The driver snapshot even includes some contributed shell scripts that do exactly this.
For more signficantly more information how to use this device, please don't forget to examine usage.html.
I've written up a short list of common mis-steps and solutions encountered by people trying the driver. If you have any suggestions for things to add here, please let me know. Hopefully you can find your situation described here.
The driver package now includes a few utilities related to operation of this device. This topic can be found in utils.html.
Stability appears to be pretty decent now for both old and new hardware. However there are other issues, mainly missing features. These include:
Change history can be found here: history.html
Note: If you are viewing a local sandbox copy of this page, the file history.html will not exist. This file is generated from change_history.txt which you can find in the same directory.
Feel free to e-mail me (address at the top of this page) if you have any questions or just want to say hello...
Mike Isely