Linux Driver for the Hauppauge WinTV USB2
First of all, this device does work fine in Linux. But unfortunately, this USB device won't be recognized by the Linux kernel and so you won't be able to watch all your Family Guy, Simpsons, or Aqua Teen Hunger Force episodes on your PC without adding one line of code to the kernel module driver (perhaps new kernels will eventually recognize it).
There are more than just one type of WinTV USB2 device: the one I have has "Model 42014 Rev D197 Lot # 4405" on the back of it. If you do a 'lsusb', you should see this somewhere in the output:
-
Bus 001 Device 005: ID 2040:4201 Hauppauge
The device ID is the problem : the driver for this particular model is looking for "2040:4200", not "2040:4201". So, you simply need to edit the driver code and add the right number. To do this, you need to have your kernel source installed and you'll have to know how to configure your kernel for your other hardware. If you're up to the task, then take your favorite editor and open the file '/usr/src/linux/drivers/media/video/em28xx/em28xx-cards.c '. At about line 249 you'll see this:
-
/* table of devices that work with this driver */
-
struct usb_device_id em28xx_id_table [] = {
-
{ USB_DEVICE(0xeb1a, 0x2800), .driver_info = EM2800_BOARD_UNKNOWN },
-
{ USB_DEVICE(0xeb1a, 0x2820), .driver_info = EM2820_BOARD_MSI_VOX_USB_2 },
-
{ USB_DEVICE(0x0ccd, 0x0036), .driver_info = EM2820_BOARD_TERRATEC_CINERGY_250 },
-
{ USB_DEVICE(0x2304, 0x0208), .driver_info = EM2820_BOARD_PINNACLE_USB_2 },
-
{ USB_DEVICE(0x2040, 0x4200), .driver_info = EM2820_BOARD_HAUPPAUGE_WINTV_USB_2 },
-
{ USB_DEVICE(0x2304, 0x0207), .driver_info = EM2820_BOARD_PINNACLE_DVC_90 },
-
{ },
-
};
You'll want to change it to look like this:
-
/* table of devices that work with this driver */
-
struct usb_device_id em28xx_id_table [] = {
-
{ USB_DEVICE(0xeb1a, 0x2800), .driver_info = EM2800_BOARD_UNKNOWN },
-
{ USB_DEVICE(0xeb1a, 0x2820), .driver_info = EM2820_BOARD_MSI_VOX_USB_2 },
-
{ USB_DEVICE(0x0ccd, 0x0036), .driver_info = EM2820_BOARD_TERRATEC_CINERGY_250 },
-
{ USB_DEVICE(0x2304, 0x0208), .driver_info = EM2820_BOARD_PINNACLE_USB_2 },
-
{ USB_DEVICE(0x2040, 0x4200), .driver_info = EM2820_BOARD_HAUPPAUGE_WINTV_USB_2 },
-
{ USB_DEVICE(0x2040, 0x4201), .driver_info = EM2820_BOARD_HAUPPAUGE_WINTV_USB_2 },
-
{ USB_DEVICE(0x2304, 0x0207), .driver_info = EM2820_BOARD_PINNACLE_DVC_90 },
-
{ },
-
};
You're simply inserting this line:
-
{ USB_DEVICE(0x2040, 0x4201), .driver_info = EM2820_BOARD_HAUPPAUGE_WINTV_USB_2 },
Save the changes, then go back to your '/usr/src/linux' directory, and do a normal 'make' and make 'modules_install'. As long as you're running the same kernel as the one you are compiling the modules for, you can now do a "modprobe em28xx" and you should be in business! Of course, there are other modules you'll have to load (or compile into the kernel) to get video working in general (look at the 'Video For Linux' section); but this will at least get your hardware talking.
thank you very much.
why don't you submit a patch for inclusion in the kernel?
That's a good idea, I guess I could; I've never submitted a patch to the kernel maintainers before. I'm glad at least someone found this useful, though!
Hello!
There is a driver that already has this change included:
http://mcentral.de/wiki/index.php/Em2880
However I have the following problem when trying to play the audio via usb. The gain is much to high, so clipping occurs and it sounds terrible. Do you grab the sound via your soundcard or via the snd_usb_audio driver?
I was grabbing the sound via snd_usb_audio. I don't remember having gain issues, though, so I don't think I can help you. I don't use this adapter much since I got a PCI capture card - I couldn't get the WinTV USB2 to work in MythTV at all, so I had to try something else. Sorry I couldn't be of help!
Do you perhaps remember which kernel version you used for your description above? With my current 2.6.19.2 kernel it doesn't work. All video apps simply crash after patching the new USB id.
I think I was using Suse 10.1 at the time, which has a default kernel of 2.6.16.13-4. I can't be sure, but that was probably the kernel version I was using. I probably should have noted the kernel version when I wrote this, I guess.