Search:  
Gentoo Wiki

Hauppauge_WinTV_HVR-950

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

Contents

Introduction

The WinTV HVR-950 is a cheap usb ATSC tuner. Apparently there are different versions of the hardware with different tuner chips, so your mileage may vary. In lsusb, it shows up as "WinTV HVR-980".

Currently this wiki page only focuses on getting ATSC DVB working, the hardware does have analog capabilities but for now they are ignored.

Configure your kernel

The kernel used for this guide was vanilla 2.6.24.4, and is confirmed working. Make sure to deselect the V4L and DVB options in the kernel.

Linux Kernel Configuration:
Device Drivers --->
     Multimedia Devices --->
          < > Video For Linux
              Digital Video Broadcasting Devices --->
                  [ ] DVB For Linux
          < > DABUSB Driver

Make and boot into your new kernel, this allows v4l-dvb-experimental to correctly auto-detect your kernel for its build.

Kernels 2.6.25 and higher appear to have built in drivers that supports HVR-950. However, as of 2.6.25, they do NOT work. See the talk page for information on getting the HVR-950 working under 2.6.25.

Linux Kernel Configuration: 2.6.25
Device Drivers --->
     Multimedia Devices --->
          < > Video For Linux
          [ ]   Video capture adapters  --->
                [ ]   Autoselect pertinent encoders/decoders and other helper chips 
                [ ]   V4L USB devices  ---> 
                     < >   Empia EM2800/2820/2840 USB video capture support 
                     < >     Empia EM28xx ALSA audio module

v4l-dvb-experimental from portage

 emerge -av v4l-dvb-hg

You may have to install the firmware for the xc3028 chip, see below to do that.

If it fails to build, you can manually create a .config file that has just the modules you need.

Edit the /usr/portage/media-tv/v4l-dvb-hg/v4l-dvb-hg-0.1-r2.ebuild and change the "make allmodconfig ${BUILD_PARAMS}" line to "make ${BUILD_PARAMS}".

 cd /var/tmp/portage/media-tv/v4l-dvb-hg-0.1-r2/work/v4l-dvb/
 make menuconfig

Select "Video For Linux", "DVB for Linux", "Autoselect pertinent encoders/decoders and other helper chips", the em28xx modules, and the v4l ABI 1 compatibly if you get symbols errors. The config options change from month to month, so read carefully and select what you need. Select "DVB/ATSC adapters" even though there are no modules selected under there. This ensures the DVB support modules are built. Exit and save the .config file.

 diff -uN .config.new .config > /usr/portage/local/v4l-dvb-experimental_config.patch
 DVB_LOCAL_PATCHES="/usr/portage/local/v4l-dvb-experimental_config.patch" emerge -av v4l-dvb-hg --digest

If you are upgrading/reinstalling/reemerging, make sure to remove outdated modules before emerging. Modules names have changed from month to month and can cause conflicts/symbols errors.

 rm -r /lib/modules/<kernel version>/v4l-dvb

Obtain v4l-dvb-experimental

emerge -av mercurial

Then checkout the dvb-experimental sources.

cd /usr/src
hg clone http://mcentral.de/hg/~mrec/v4l-dvb-experimental

Build DVB modules

If you want you can customize exactly what modules are built.

make menuconfig

For simplicity, we will just build them all.

make && make install

If you get the following error:

v4l-dvb-experimental # make
make -C /usr/src/v4l-dvb-experimental/v4l
make[1]: Entering directory `/usr/src/v4l-dvb-experimental/v4l'
scripts/make_makefile.pl
./scripts/make_myconfig.pl
make[1]: Leaving directory `/usr/src/v4l-dvb-experimental/v4l'
make[1]: Entering directory `/usr/src/v4l-dvb-experimental/v4l'
perl scripts/make_config_compat.pl /lib/modules/2.6.24.4/build ./.myconfig ./config-compat.h
creating symbolic links...
ln -sf . oss
make -C /lib/modules/2.6.24.4/build SUBDIRS=/usr/src/v4l-dvb-experimental/v4l  modules
make[2]: Entering directory `/usr/src/linux-2.6.24.4'
 CC [M]  /usr/src/v4l-dvb-experimental/v4l/flexcop-pci.o
In file included from /usr/src/v4l-dvb-experimental/v4l/flexcop-common.h:23,
                from /usr/src/v4l-dvb-experimental/v4l/flexcop-pci.c:10:
/usr/src/v4l-dvb-experimental/v4l/dvb_frontend.h:42:33: error: media/v4l_dvb_tuner.h: No such file or directory
In file included from /usr/src/v4l-dvb-experimental/v4l/flexcop-common.h:23,
                from /usr/src/v4l-dvb-experimental/v4l/flexcop-pci.c:10:
/usr/src/v4l-dvb-experimental/v4l/dvb_frontend.h:165: error: field 'tuner_ops' has incomplete type
make[3]: *** [/usr/src/v4l-dvb-experimental/v4l/flexcop-pci.o] Error 1
make[2]: *** [_module_/usr/src/v4l-dvb-experimental/v4l] Error 2
make[2]: Leaving directory `/usr/src/linux-2.6.24.4'
make[1]: *** [default] Error 2
make[1]: Leaving directory `/usr/src/v4l-dvb-experimental/v4l'
make: *** [all] Error 2

Then perform the following operation.

cd /usr/src/v4l-dvb-experimental/v4l
ln -s ../linux/include/linux
ln -s ../linux/include/media
ln -s ../linux/include/sound
cd /usr/src/v4l-dvb-experimental
make && make install

You'll get some fixdep (xxxxxx.o.d generation) warnings, but don't worry about those unless you are modifying the source.

Getting firmware for the xc3028 chip

cd /root
mkdir xc3028
cd xc3028
wget http://konstantin.filtschew.de/v4l-firmware/firmware_v4.tgz
md5sum firmware_v4.tgz

Assert that the md5sum is 15c5da09380a130381e65834337da49a. The firmware file has also been mirrored here http://deadlyninja.com/mirror/firmware_v4.tgz.

tar xzvf firmware_v4.tgz
mkdir /lib/firmware
mv xc3028_*.fw /lib/firmware

Loading the modules

You can test immediately by installing the new modules.

modprobe em28xx

em28xx pulls in em2880_dvb, which permits dvb operation.

To load the modules at boot add the following to your autoload.d.

File: /etc/modules.autoload.d/kernel-2.6
em28xx

Then run update-modules.

update-modules

Viewing TV

You can use mplayer to view TV.

For NTSC TV, pre-digital over the air broadcast:

mplayer tv:// -tv driver=v4l2:alsa:immediatemode=0:adevice=hw.1,0:norm=ntsc:chanlist=us-bcast

Use the "h" and "k" keys to tune through the channels.

For the new digital (ATSC/HD) broadcasts, you need to scan the channels first.

dvbscan is part of the linuxtv-dvb-apps package.

emerge -av linuxtv-dvb-apps
dvbscan /usr/share/dvb/atsc/us-ATSC-center-frequencies-8VSB

At the end of the scan, there should be some lines like this:

dumping lists (2 services)
WTHI-DT:533028615:8VSB:49:52:3
WTHI-DT:533028615:8VSB:33:36:4
Done.

Add those lines to ~/.mplayer/channels.conf

File: ~/.mplayer/channels.conf
WTHI-DT:533028615:8VSB:49:52:3
WTHI-DT:533028615:8VSB:33:36:4

Now you can view ATSC tv with:

mplayer dvb://

Use "h" and "k" keys to tune the channels.

If you have xvmc hardware accelation:

mplayer -vo xvmc -vc ffmpeg12mc dvb://

If you have some playback problems, try increasing the cache

mplayer -vo xvmc -vc ffmpeg12mc -cache 65536 dvb://

You may have to add -monitoraspect 16:10 for some wide screen, 1440x900, laptops to get the proper aspect ratio displayed.

mplayer -vo xvmc -vc ffmpeg12mc -monitoraspect 16:10 -cache 65536 dvb://

-monitoraspect tells mplayer what aspect ratio the laptop/monitor screen is, NOT the broadcast aspect ratio.

Retrieved from "http://www.gentoo-wiki.info/Hauppauge_WinTV_HVR-950"

Last modified: Sat, 30 Aug 2008 22:08:00 +0000 Hits: 2,978