Hauppauge WinTV-HVR-950Q: Difference between revisions
m (missing ">" in the echo command) |
|||
(37 intermediate revisions by 13 users not shown) | |||
Line 1: | Line 1: | ||
[[Image:package.jpg]] |
[[Image:package.jpg|right|240px]] |
||
A hybrid [[ATSC]] [[ATSC USB Devices|USB 2.0 device]] by [[Hauppauge]]. |
|||
== Overal Impression == |
|||
The digital side of the device is supported under Linux since kernel 2.6.26. Analog support was merged into the mainline v4l-dvb tree on March 18, 2009. |
|||
This is my first video capture device and I really like it. It currently works great/excellent for ATSC (digital broadcast) but, at the time of writting, it doesn't work at all for NTSC (analog TV/cable). There is a patch[http://lists-archives.org/video4linux/20859-xc5000-tuner-analog-support.html] already available that fixes this problem, but I haven't tried it. I use WinTV-HVR-950Q on very modest hardware: an old Dell Latitude D600 laptop with 2GHz/500MB connected to a 1080p LCD TV through a VGA cable. Both my TV and the WinTV are connected to an internal amplified antenna (TERK HDTVa). |
|||
This WinTV tuner is as good as my TV tuner: both found the same channels and have about the same video quality (even for 1080i broadcasts). |
|||
{{Note|This device, the HVR-950'''Q''', is significantly different from the older HVR-950 model, so please be sure to differentiate between the two. For information on the older model, see the [[Hauppauge WinTV-HVR-950|WinTV-HVR-950]] article.}} |
|||
Note that it's critical to have a fast video card. My card, ATI Radeon 9000 32Mb, is not supported by ATI anymore, so I had to use the open source radeon driver instead of ATI's fglrx. If you use the default settings for the radeon driver, you will get a pitiful 170FPS in glxgears, which is ''NOT'' sufficient for watching digital TV. But after I used this xorg.conf file[http://lambda.uta.edu/d600/xorg2.conf], I got about 1100FPS, which was sufficient. Of course, I had to do the following to get the best resolution on my TV (and a blank screen on my laptop): |
|||
<pre> |
|||
xrandr --output LVDS --off --output VGA-0 --mode 1920x1080 |
|||
</pre> |
|||
{{Note|As of August 2014, The newer [[Hauppauge WinTV-HVR-955Q|HVR-955Q]] may be shipped instead of this model, the HVR-95'''0'''Q. The HVR-955Q driver is not currently as mature as the HVR-950Q driver is.}} |
|||
== Basic Installation == |
|||
{{Note|As of 2014-08-18, Hauppauge USA officials claim that if the HVR-950Q is ordered from their website then a HVR-950Q and not a HVR-955Q will be delivered, but obviously they won't vouch for other resellers.}} |
|||
The xc5000 driver needed for this WinTV-HVR-950Q is already part of the latest Linux kernel (part of v4l-dvb drivers). |
|||
You should upgrade to Linux kernel 2.6.27. |
|||
First you need to download and install the xc5000 firmware: |
|||
==Overview/Features== |
|||
The device supports NTSC, 8-VSB and QAM. |
|||
===Components Used=== |
|||
* [[Xceive]] [[Xceive XC5000|XC5000]] (tuner and analog demodulator) |
|||
* [[Auvitek International Ltd.|Auvitek]] AU8522 (A/V decoder analog demodulator [not used], and digital demodulator) |
|||
* [[Auvitek International Ltd.|Auvitek]] AU0828 (USB bridge) |
|||
===Identification=== |
|||
This descriptor is from a unit packaged as a "WinTV HVR 950Q, model 1176", which is shipped with the A/V cables and toy-sized antenna and a remote: |
|||
<pre> |
<pre> |
||
lsusb -v |
|||
wget http://www.steventoth.net/linux/xc5000/HVR-12x0-14x0-17x0_1_25_25271_WHQL.zip |
|||
wget http://www.steventoth.net/linux/xc5000/extract.sh |
|||
Bus 001 Device 022: ID 2040:7200 Hauppauge |
|||
sh extract.sh |
|||
Device Descriptor: |
|||
cp dvb-fe-xc5000-1.1.fw /lib/firmware |
|||
bLength 18 |
|||
modprobe xc5000 |
|||
bDescriptorType 1 |
|||
bcdUSB 2.00 |
|||
bDeviceClass 0 (Defined at Interface level) |
|||
bDeviceSubClass 0 |
|||
bDeviceProtocol 0 |
|||
bMaxPacketSize0 64 |
|||
idVendor 0x2040 Hauppauge |
|||
idProduct 0x7200 |
|||
bcdDevice 0.05 |
|||
iManufacturer 1 |
|||
iProduct 2 |
|||
iSerial 10 |
|||
bNumConfigurations 1 |
|||
Configuration Descriptor: |
|||
bLength 9 |
|||
bDescriptorType 2 |
|||
wTotalLength 267 |
|||
bNumInterfaces 4 |
|||
bConfigurationValue 1 |
|||
iConfiguration 0 |
|||
bmAttributes 0x80 |
|||
(Bus Powered) |
|||
MaxPower 500mA |
|||
Interface Descriptor: |
|||
bLength 9 |
|||
bDescriptorType 4 |
|||
bInterfaceNumber 0 |
|||
bAlternateSetting 0 |
|||
bNumEndpoints 2 |
|||
bInterfaceClass 255 Vendor Specific Class |
|||
bInterfaceSubClass 255 Vendor Specific Subclass |
|||
bInterfaceProtocol 255 Vendor Specific Protocol |
|||
iInterface 0 |
|||
Endpoint Descriptor: |
|||
bLength 7 |
|||
bDescriptorType 5 |
|||
bEndpointAddress 0x81 EP 1 IN |
|||
bmAttributes 3 |
|||
Transfer Type Interrupt |
|||
Synch Type None |
|||
Usage Type Data |
|||
wMaxPacketSize 0x0000 1x 0 bytes |
|||
bInterval 5 |
|||
Endpoint Descriptor: |
|||
bLength 7 |
|||
bDescriptorType 5 |
|||
bEndpointAddress 0x82 EP 2 IN |
|||
bmAttributes 1 |
|||
Transfer Type Isochronous |
|||
Synch Type None |
|||
Usage Type Data |
|||
wMaxPacketSize 0x0000 1x 0 bytes |
|||
bInterval 1 |
|||
Interface Descriptor: |
|||
bLength 9 |
|||
bDescriptorType 4 |
|||
bInterfaceNumber 0 |
|||
bAlternateSetting 1 |
|||
bNumEndpoints 2 |
|||
bInterfaceClass 255 Vendor Specific Class |
|||
bInterfaceSubClass 255 Vendor Specific Subclass |
|||
bInterfaceProtocol 255 Vendor Specific Protocol |
|||
iInterface 0 |
|||
Endpoint Descriptor: |
|||
bLength 7 |
|||
bDescriptorType 5 |
|||
bEndpointAddress 0x81 EP 1 IN |
|||
bmAttributes 3 |
|||
Transfer Type Interrupt |
|||
Synch Type None |
|||
Usage Type Data |
|||
wMaxPacketSize 0x0002 1x 2 bytes |
|||
bInterval 5 |
|||
Endpoint Descriptor: |
|||
bLength 7 |
|||
bDescriptorType 5 |
|||
bEndpointAddress 0x82 EP 2 IN |
|||
bmAttributes 1 |
|||
Transfer Type Isochronous |
|||
Synch Type None |
|||
Usage Type Data |
|||
wMaxPacketSize 0x0300 1x 768 bytes |
|||
bInterval 1 |
|||
Interface Descriptor: |
|||
bLength 9 |
|||
bDescriptorType 4 |
|||
bInterfaceNumber 0 |
|||
bAlternateSetting 2 |
|||
bNumEndpoints 2 |
|||
bInterfaceClass 255 Vendor Specific Class |
|||
bInterfaceSubClass 255 Vendor Specific Subclass |
|||
bInterfaceProtocol 255 Vendor Specific Protocol |
|||
iInterface 0 |
|||
Endpoint Descriptor: |
|||
bLength 7 |
|||
bDescriptorType 5 |
|||
bEndpointAddress 0x81 EP 1 IN |
|||
bmAttributes 3 |
|||
Transfer Type Interrupt |
|||
Synch Type None |
|||
Usage Type Data |
|||
wMaxPacketSize 0x0002 1x 2 bytes |
|||
bInterval 5 |
|||
Endpoint Descriptor: |
|||
bLength 7 |
|||
bDescriptorType 5 |
|||
bEndpointAddress 0x82 EP 2 IN |
|||
bmAttributes 1 |
|||
Transfer Type Isochronous |
|||
Synch Type None |
|||
Usage Type Data |
|||
wMaxPacketSize 0x03fc 1x 1020 bytes |
|||
bInterval 1 |
|||
Interface Descriptor: |
|||
bLength 9 |
|||
bDescriptorType 4 |
|||
bInterfaceNumber 0 |
|||
bAlternateSetting 3 |
|||
bNumEndpoints 2 |
|||
bInterfaceClass 255 Vendor Specific Class |
|||
bInterfaceSubClass 255 Vendor Specific Subclass |
|||
bInterfaceProtocol 255 Vendor Specific Protocol |
|||
iInterface 0 |
|||
Endpoint Descriptor: |
|||
bLength 7 |
|||
bDescriptorType 5 |
|||
bEndpointAddress 0x81 EP 1 IN |
|||
bmAttributes 3 |
|||
Transfer Type Interrupt |
|||
Synch Type None |
|||
Usage Type Data |
|||
wMaxPacketSize 0x0002 1x 2 bytes |
|||
bInterval 5 |
|||
Endpoint Descriptor: |
|||
bLength 7 |
|||
bDescriptorType 5 |
|||
bEndpointAddress 0x82 EP 2 IN |
|||
bmAttributes 1 |
|||
Transfer Type Isochronous |
|||
Synch Type None |
|||
Usage Type Data |
|||
wMaxPacketSize 0x0400 1x 1024 bytes |
|||
bInterval 1 |
|||
Interface Descriptor: |
|||
bLength 9 |
|||
bDescriptorType 4 |
|||
bInterfaceNumber 0 |
|||
bAlternateSetting 4 |
|||
bNumEndpoints 2 |
|||
bInterfaceClass 255 Vendor Specific Class |
|||
bInterfaceSubClass 255 Vendor Specific Subclass |
|||
bInterfaceProtocol 255 Vendor Specific Protocol |
|||
iInterface 0 |
|||
Endpoint Descriptor: |
|||
bLength 7 |
|||
bDescriptorType 5 |
|||
bEndpointAddress 0x81 EP 1 IN |
|||
bmAttributes 3 |
|||
Transfer Type Interrupt |
|||
Synch Type None |
|||
Usage Type Data |
|||
wMaxPacketSize 0x0002 1x 2 bytes |
|||
bInterval 5 |
|||
Endpoint Descriptor: |
|||
bLength 7 |
|||
bDescriptorType 5 |
|||
bEndpointAddress 0x82 EP 2 IN |
|||
bmAttributes 1 |
|||
Transfer Type Isochronous |
|||
Synch Type None |
|||
Usage Type Data |
|||
wMaxPacketSize 0x0c00 2x 1024 bytes |
|||
bInterval 1 |
|||
Interface Descriptor: |
|||
bLength 9 |
|||
bDescriptorType 4 |
|||
bInterfaceNumber 0 |
|||
bAlternateSetting 5 |
|||
bNumEndpoints 2 |
|||
bInterfaceClass 255 Vendor Specific Class |
|||
bInterfaceSubClass 255 Vendor Specific Subclass |
|||
bInterfaceProtocol 255 Vendor Specific Protocol |
|||
iInterface 0 |
|||
Endpoint Descriptor: |
|||
bLength 7 |
|||
bDescriptorType 5 |
|||
bEndpointAddress 0x81 EP 1 IN |
|||
bmAttributes 3 |
|||
Transfer Type Interrupt |
|||
Synch Type None |
|||
Usage Type Data |
|||
wMaxPacketSize 0x0002 1x 2 bytes |
|||
bInterval 5 |
|||
Endpoint Descriptor: |
|||
bLength 7 |
|||
bDescriptorType 5 |
|||
bEndpointAddress 0x82 EP 2 IN |
|||
bmAttributes 1 |
|||
Transfer Type Isochronous |
|||
Synch Type None |
|||
Usage Type Data |
|||
wMaxPacketSize 0x1400 3x 1024 bytes |
|||
bInterval 1 |
|||
Interface Descriptor: |
|||
bLength 9 |
|||
bDescriptorType 4 |
|||
bInterfaceNumber 1 |
|||
bAlternateSetting 0 |
|||
bNumEndpoints 0 |
|||
bInterfaceClass 1 Audio |
|||
bInterfaceSubClass 1 Control Device |
|||
bInterfaceProtocol 0 |
|||
iInterface 11 |
|||
AudioControl Interface Descriptor: |
|||
bLength 9 |
|||
bDescriptorType 36 |
|||
bDescriptorSubtype 1 (HEADER) |
|||
bcdADC 1.00 |
|||
wTotalLength 38 |
|||
bInCollection 1 |
|||
baInterfaceNr( 0) 2 |
|||
AudioControl Interface Descriptor: |
|||
bLength 12 |
|||
bDescriptorType 36 |
|||
bDescriptorSubtype 2 (INPUT_TERMINAL) |
|||
bTerminalID 1 |
|||
wTerminalType 0x0602 Digital Audio Interface |
|||
bAssocTerminal 0 |
|||
bNrChannels 2 |
|||
wChannelConfig 0x0003 |
|||
Left Front (L) |
|||
Right Front (R) |
|||
iChannelNames 0 |
|||
iTerminal 0 |
|||
AudioControl Interface Descriptor: |
|||
bLength 9 |
|||
bDescriptorType 36 |
|||
bDescriptorSubtype 3 (OUTPUT_TERMINAL) |
|||
bTerminalID 2 |
|||
wTerminalType 0x0101 USB Streaming |
|||
bAssocTerminal 0 |
|||
bSourceID 3 |
|||
iTerminal 0 |
|||
AudioControl Interface Descriptor: |
|||
bLength 8 |
|||
bDescriptorType 36 |
|||
bDescriptorSubtype 6 (FEATURE_UNIT) |
|||
bUnitID 3 |
|||
bSourceID 1 |
|||
bControlSize 1 |
|||
bmaControls( 0) 0x01 |
|||
Mute |
|||
iFeature 0 |
|||
Interface Descriptor: |
|||
bLength 9 |
|||
bDescriptorType 4 |
|||
bInterfaceNumber 2 |
|||
bAlternateSetting 0 |
|||
bNumEndpoints 1 |
|||
bInterfaceClass 1 Audio |
|||
bInterfaceSubClass 2 Streaming |
|||
bInterfaceProtocol 0 |
|||
iInterface 11 |
|||
Endpoint Descriptor: |
|||
bLength 7 |
|||
bDescriptorType 5 |
|||
bEndpointAddress 0x84 EP 4 IN |
|||
bmAttributes 5 |
|||
Transfer Type Isochronous |
|||
Synch Type Asynchronous |
|||
Usage Type Data |
|||
wMaxPacketSize 0x0000 1x 0 bytes |
|||
bInterval 1 |
|||
Interface Descriptor: |
|||
bLength 9 |
|||
bDescriptorType 4 |
|||
bInterfaceNumber 2 |
|||
bAlternateSetting 1 |
|||
bNumEndpoints 1 |
|||
bInterfaceClass 1 Audio |
|||
bInterfaceSubClass 2 Streaming |
|||
bInterfaceProtocol 0 |
|||
iInterface 11 |
|||
AudioStreaming Interface Descriptor: |
|||
bLength 7 |
|||
bDescriptorType 36 |
|||
bDescriptorSubtype 1 (AS_GENERAL) |
|||
bTerminalLink 2 |
|||
bDelay 1 frames |
|||
wFormatTag 1 PCM |
|||
AudioStreaming Interface Descriptor: |
|||
bLength 11 |
|||
bDescriptorType 36 |
|||
bDescriptorSubtype 2 (FORMAT_TYPE) |
|||
bFormatType 1 (FORMAT_TYPE_I) |
|||
bNrChannels 2 |
|||
bSubframeSize 2 |
|||
bBitResolution 16 |
|||
bSamFreqType 1 Discrete |
|||
tSamFreq[ 0] 48000 |
|||
Endpoint Descriptor: |
|||
bLength 7 |
|||
bDescriptorType 5 |
|||
bEndpointAddress 0x84 EP 4 IN |
|||
bmAttributes 5 |
|||
Transfer Type Isochronous |
|||
Synch Type Asynchronous |
|||
Usage Type Data |
|||
wMaxPacketSize 0x0100 1x 256 bytes |
|||
bInterval 4 |
|||
AudioControl Endpoint Descriptor: |
|||
bLength 7 |
|||
bDescriptorType 37 |
|||
bDescriptorSubtype 1 (EP_GENERAL) |
|||
bmAttributes 0x00 |
|||
bLockDelayUnits 0 Undefined |
|||
wLockDelay 0 Undefined |
|||
Interface Descriptor: |
|||
bLength 9 |
|||
bDescriptorType 4 |
|||
bInterfaceNumber 3 |
|||
bAlternateSetting 0 |
|||
bNumEndpoints 1 |
|||
bInterfaceClass 255 Vendor Specific Class |
|||
bInterfaceSubClass 255 Vendor Specific Subclass |
|||
bInterfaceProtocol 255 Vendor Specific Protocol |
|||
iInterface 0 |
|||
Endpoint Descriptor: |
|||
bLength 7 |
|||
bDescriptorType 5 |
|||
bEndpointAddress 0x83 EP 3 IN |
|||
bmAttributes 2 |
|||
Transfer Type Bulk |
|||
Synch Type None |
|||
Usage Type Data |
|||
wMaxPacketSize 0x0200 1x 512 bytes |
|||
bInterval 0 |
|||
Device Qualifier (for other device speed): |
|||
bLength 10 |
|||
bDescriptorType 6 |
|||
bcdUSB 2.00 |
|||
bDeviceClass 0 (Defined at Interface level) |
|||
bDeviceSubClass 0 |
|||
bDeviceProtocol 0 |
|||
bMaxPacketSize0 64 |
|||
bNumConfigurations 1 |
|||
Device Status: 0x0000 |
|||
(Bus Powered) |
|||
</pre> |
</pre> |
||
==Making it Work== |
|||
===Firmware=== |
|||
In order to use the LinuxTV driver, you need to download and install the firmware for the xc5000. Some distributions already bundle the firmware in the official repositories. Ubuntu 9.10 (Karmic) includes it by default, Fedora 16+ includes it in the default linux-firmware package, and Debian Testing (Squeeze) includes it in the firmware-linux-nonfree package. |
|||
Kernel 2.6.30 and earlier: |
|||
wget http://www.steventoth.net/linux/xc5000/HVR-12x0-14x0-17x0_1_25_25271_WHQL.zip |
|||
wget http://www.steventoth.net/linux/xc5000/extract.sh |
|||
sh extract.sh |
|||
cp dvb-fe-xc5000-1.1.fw /lib/firmware |
|||
Kernel 2.6.31 and later: |
|||
wget http://www.kernellabs.com/firmware/xc5000/dvb-fe-xc5000-1.6.114.fw |
|||
mv dvb-fe-xc5000-1.6.114.fw /lib/firmware/ |
|||
{{Note|Though the usual directory location in which the firmware file is placed is /lib/firmware, this may differ in the case of some distros; consult your distro's documentation for the appropriate location.}} |
|||
The firmware will be added lazily (on-demand) when you first use the driver. |
The firmware will be added lazily (on-demand) when you first use the driver. |
||
====Kernel 2.6.31 firmware issues==== |
|||
When running this kernel version, loading of the firmware takes very long, and prevents MythTV from working properly. To deal with this problem you can use xc5000's no_poweroff=1 module option, to prevent the device from sleeping (after which firmware has to be reloaded) |
|||
You can set no_poweroff this way: |
|||
cat /sys/module/xc5000/parameters/no_poweroff |
|||
0 # <--- default is automatic poweroff enabled |
|||
echo -n 1 > /sys/module/xc5000/parameters/no_poweroff |
|||
cat /sys/module/xc5000/parameters/no_poweroff |
|||
1 # <--- poweroff is now disabled |
|||
This will take effect when the module is reloaded. |
|||
===Drivers=== |
|||
The xc5000 driver needed for this WinTV-HVR-950Q is already part of the latest Linux kernel (part of v4l-dvb drivers). |
|||
Analog support was merged into the mainline v4l-dvb tree on March 18, 2009. |
|||
{{Note|In the past, the HVR-950Q has had known issues with MythTV that prevent it from working. These should be fixed with the latest version. They were worked by the 950q maintainer (Devin Heitmueller). For more details, take a look at the KernelLabs blog for status updates: [http://www.kernellabs.com/blog KernelLabs Blog]}} |
|||
===Sample Kernel Output=== |
|||
After you plug-in the device on a USB 2.0 port (it won't work with a USB 1.1) and use the driver for the first time (eg, by scanning channels), you may see something like this on dmesg: |
After you plug-in the device on a USB 2.0 port (it won't work with a USB 1.1) and use the driver for the first time (eg, by scanning channels), you may see something like this on dmesg: |
||
<pre> |
<pre> |
||
Line 48: | Line 444: | ||
usb 1-3: Manufacturer: Hauppauge |
usb 1-3: Manufacturer: Hauppauge |
||
usb 1-3: SerialNumber: 000000000 |
usb 1-3: SerialNumber: 000000000 |
||
</pre> |
|||
After an application open the device the first time, the module will load the firmware. You will see: |
|||
<pre> |
|||
xc5000: waiting for firmware upload (dvb-fe-xc5000-1.1.fw)... |
xc5000: waiting for firmware upload (dvb-fe-xc5000-1.1.fw)... |
||
firmware: requesting dvb-fe-xc5000-1.1.fw |
i2c-adapter i2c-2: firmware: requesting dvb-fe-xc5000-1.1.fw |
||
xc5000: firmware read 12332 bytes. |
xc5000: firmware read 12332 bytes. |
||
xc5000: firmware upload |
xc5000: firmware upload |
||
</pre> |
</pre> |
||
Connect the WinTV to a good antenna. |
|||
Then download some tools (using your distribution installer: yum, apt-get, etc): |
|||
<pre> |
|||
yum install dvb-apps mplayer |
|||
</pre> |
|||
Then scan your ATSC channels. For example, to scan ATSC channels in US do |
|||
<pre> |
|||
scandvb /usr/share/dvb-apps/atsc/us-ATSC-center-frequencies-8VSB > channels.conf |
|||
</pre> |
|||
Then copy the file <tt>channels.conf</tt> to the directory <tt>.mplayer/</tt> and test it on of one of the channels listed in <tt>channels.conf</tt>. For example, if you have a channel called KERA-HD, you do: |
|||
<pre> |
|||
mplayer dvb://'KERA-HD' |
|||
</pre> |
|||
In my case, for a 1080i broadcast, I had to use the following parameters: |
|||
<pre> |
|||
mplayer dvb://'KERA-HD' -vo x11 -framedrop 1 |
|||
</pre> |
|||
because of my slow video and audio cards. |
|||
===Analog Audio=== |
|||
== Useful Scripts == |
|||
To have analog audio in tvtime I am using following bash script to start the tvtime |
|||
(There are two versions of SOX command - for OSS and for Alsa. Also, this version disables screen saver in KDE4, |
|||
instead of using dbus interface, this could be some other command): |
|||
Instead of using special software for TIVO-like recording (such as MythTV), I use simple scripts. I first created a file in my bin directory, called favorites.txt, with mnemonics for my favorite channels listed in channels.conf (these are actual their channel numbers). Example: |
|||
<pre> |
|||
4 KDFW DT |
|||
5 KXAS-HD |
|||
11 KTVT-DT |
|||
13 KERA-HD |
|||
</pre> |
|||
and use the following script, called tape, in my bin directory: |
|||
<pre> |
<pre> |
||
#!/bin/sh |
#!/bin/sh |
||
tvtime &>/dev/null & |
|||
ext=`date +'%m-%d-%H-%M-%S'` |
|||
tPID=$! |
|||
tapeit='/tmp/tapeit-'${ext} |
|||
echo "Started TVTime, PID: $tPID" |
|||
stopit='/tmp/stopit' |
|||
sleep 1 |
|||
file='~/Videos/'${ext}'-'$1 |
|||
# OSS version: |
|||
pat='s/^'$1' //p;d' |
|||
#sox -r 48000 -b 16 -c 2 -t ossdsp /dev/dsp1 -t ossdsp /dev/dsp &>/dev/null & |
|||
chan=`sed "${pat}" ~/bin/favorites.txt` |
|||
# Alsa version: |
|||
if [ "${chan}" == "" ]; then echo "Valid channels:"; cat ~/bin/channels.txt; exit; fi |
|||
sox -t alsa hw:1,0 -t alsa default &>/dev/null & |
|||
echo "azap -r -c ~/channels.conf '${chan}' > /dev/null & cat /dev/dvb/adapter0/dvr0 > ${file}" > ${tapeit} |
|||
sPID=$! |
|||
echo 'killall -q azap cat' > ${stopit} |
|||
echo "Started SOX, PID: $sPID" |
|||
if [ "$2" = "now" ]; then sh ${tapeit}; else at -f ${tapeit} $2; fi |
|||
# Simulator Activity (to disable Screen Saver): |
|||
if [ -z "$3" ]; then at -f ${stopit} now + 1 hour; else at -f ${stopit} $3; fi |
|||
( while true; do sleep 10; /usr/bin/qdbus org.freedesktop.ScreenSaver /ScreenSaver SimulateUserActivity; done ) &>/dev/null & |
|||
aPID=$! |
|||
echo "Started activity simulator (to disable Screen Saver), PID: $aPID" |
|||
while true; do |
|||
sleep 2 |
|||
tRUN=$( ps -p $tPID -o pid --no-headers ) |
|||
sRUN=$( ps -p $sPID -o pid --no-headers ) |
|||
if [ "$tRUN" = "" ]; then |
|||
echo "TVTime exited. Closing SOX + activity simulator and exiting." |
|||
kill $sPID |
|||
kill $aPID |
|||
exit |
|||
fi |
|||
if [ "$sRUN" = "" ]; then |
|||
echo "SOX exited. Closing TVTime + activity simulator and exiting." |
|||
kill $tPID |
|||
kill $aPID |
|||
exit |
|||
fi |
|||
done |
|||
</pre> |
</pre> |
||
For example, to tape something on KDFW-DT (channel 5) between 5pm and 6pm you execute: |
|||
==External Links== |
|||
<pre> |
|||
[http://www.hauppauge.com/site/products/data_hvr950q.html Hauppauge 950Q product page] |
|||
tape 4 5pm 6pm |
|||
[[Category:ATSC USB Devices]] |
|||
</pre> |
|||
(note that for 1080i, you will need 6GB/hour). The result will be written in the directory Video under a name that contains date/time/channel. |
|||
Then you can use mplayer to watch this file. |
Latest revision as of 18:12, 19 February 2017
A hybrid ATSC USB 2.0 device by Hauppauge.
The digital side of the device is supported under Linux since kernel 2.6.26. Analog support was merged into the mainline v4l-dvb tree on March 18, 2009.
Overview/Features
The device supports NTSC, 8-VSB and QAM.
Components Used
- Xceive XC5000 (tuner and analog demodulator)
- Auvitek AU8522 (A/V decoder analog demodulator [not used], and digital demodulator)
- Auvitek AU0828 (USB bridge)
Identification
This descriptor is from a unit packaged as a "WinTV HVR 950Q, model 1176", which is shipped with the A/V cables and toy-sized antenna and a remote:
lsusb -v Bus 001 Device 022: ID 2040:7200 Hauppauge Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 2.00 bDeviceClass 0 (Defined at Interface level) bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 64 idVendor 0x2040 Hauppauge idProduct 0x7200 bcdDevice 0.05 iManufacturer 1 iProduct 2 iSerial 10 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 267 bNumInterfaces 4 bConfigurationValue 1 iConfiguration 0 bmAttributes 0x80 (Bus Powered) MaxPower 500mA Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 2 bInterfaceClass 255 Vendor Specific Class bInterfaceSubClass 255 Vendor Specific Subclass bInterfaceProtocol 255 Vendor Specific Protocol iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0000 1x 0 bytes bInterval 5 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x82 EP 2 IN bmAttributes 1 Transfer Type Isochronous Synch Type None Usage Type Data wMaxPacketSize 0x0000 1x 0 bytes bInterval 1 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 1 bNumEndpoints 2 bInterfaceClass 255 Vendor Specific Class bInterfaceSubClass 255 Vendor Specific Subclass bInterfaceProtocol 255 Vendor Specific Protocol iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0002 1x 2 bytes bInterval 5 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x82 EP 2 IN bmAttributes 1 Transfer Type Isochronous Synch Type None Usage Type Data wMaxPacketSize 0x0300 1x 768 bytes bInterval 1 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 2 bNumEndpoints 2 bInterfaceClass 255 Vendor Specific Class bInterfaceSubClass 255 Vendor Specific Subclass bInterfaceProtocol 255 Vendor Specific Protocol iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0002 1x 2 bytes bInterval 5 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x82 EP 2 IN bmAttributes 1 Transfer Type Isochronous Synch Type None Usage Type Data wMaxPacketSize 0x03fc 1x 1020 bytes bInterval 1 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 3 bNumEndpoints 2 bInterfaceClass 255 Vendor Specific Class bInterfaceSubClass 255 Vendor Specific Subclass bInterfaceProtocol 255 Vendor Specific Protocol iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0002 1x 2 bytes bInterval 5 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x82 EP 2 IN bmAttributes 1 Transfer Type Isochronous Synch Type None Usage Type Data wMaxPacketSize 0x0400 1x 1024 bytes bInterval 1 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 4 bNumEndpoints 2 bInterfaceClass 255 Vendor Specific Class bInterfaceSubClass 255 Vendor Specific Subclass bInterfaceProtocol 255 Vendor Specific Protocol iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0002 1x 2 bytes bInterval 5 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x82 EP 2 IN bmAttributes 1 Transfer Type Isochronous Synch Type None Usage Type Data wMaxPacketSize 0x0c00 2x 1024 bytes bInterval 1 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 5 bNumEndpoints 2 bInterfaceClass 255 Vendor Specific Class bInterfaceSubClass 255 Vendor Specific Subclass bInterfaceProtocol 255 Vendor Specific Protocol iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0002 1x 2 bytes bInterval 5 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x82 EP 2 IN bmAttributes 1 Transfer Type Isochronous Synch Type None Usage Type Data wMaxPacketSize 0x1400 3x 1024 bytes bInterval 1 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 1 bAlternateSetting 0 bNumEndpoints 0 bInterfaceClass 1 Audio bInterfaceSubClass 1 Control Device bInterfaceProtocol 0 iInterface 11 AudioControl Interface Descriptor: bLength 9 bDescriptorType 36 bDescriptorSubtype 1 (HEADER) bcdADC 1.00 wTotalLength 38 bInCollection 1 baInterfaceNr( 0) 2 AudioControl Interface Descriptor: bLength 12 bDescriptorType 36 bDescriptorSubtype 2 (INPUT_TERMINAL) bTerminalID 1 wTerminalType 0x0602 Digital Audio Interface bAssocTerminal 0 bNrChannels 2 wChannelConfig 0x0003 Left Front (L) Right Front (R) iChannelNames 0 iTerminal 0 AudioControl Interface Descriptor: bLength 9 bDescriptorType 36 bDescriptorSubtype 3 (OUTPUT_TERMINAL) bTerminalID 2 wTerminalType 0x0101 USB Streaming bAssocTerminal 0 bSourceID 3 iTerminal 0 AudioControl Interface Descriptor: bLength 8 bDescriptorType 36 bDescriptorSubtype 6 (FEATURE_UNIT) bUnitID 3 bSourceID 1 bControlSize 1 bmaControls( 0) 0x01 Mute iFeature 0 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 2 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 1 Audio bInterfaceSubClass 2 Streaming bInterfaceProtocol 0 iInterface 11 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x84 EP 4 IN bmAttributes 5 Transfer Type Isochronous Synch Type Asynchronous Usage Type Data wMaxPacketSize 0x0000 1x 0 bytes bInterval 1 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 2 bAlternateSetting 1 bNumEndpoints 1 bInterfaceClass 1 Audio bInterfaceSubClass 2 Streaming bInterfaceProtocol 0 iInterface 11 AudioStreaming Interface Descriptor: bLength 7 bDescriptorType 36 bDescriptorSubtype 1 (AS_GENERAL) bTerminalLink 2 bDelay 1 frames wFormatTag 1 PCM AudioStreaming Interface Descriptor: bLength 11 bDescriptorType 36 bDescriptorSubtype 2 (FORMAT_TYPE) bFormatType 1 (FORMAT_TYPE_I) bNrChannels 2 bSubframeSize 2 bBitResolution 16 bSamFreqType 1 Discrete tSamFreq[ 0] 48000 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x84 EP 4 IN bmAttributes 5 Transfer Type Isochronous Synch Type Asynchronous Usage Type Data wMaxPacketSize 0x0100 1x 256 bytes bInterval 4 AudioControl Endpoint Descriptor: bLength 7 bDescriptorType 37 bDescriptorSubtype 1 (EP_GENERAL) bmAttributes 0x00 bLockDelayUnits 0 Undefined wLockDelay 0 Undefined Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 3 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 255 Vendor Specific Class bInterfaceSubClass 255 Vendor Specific Subclass bInterfaceProtocol 255 Vendor Specific Protocol iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x83 EP 3 IN bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 Device Qualifier (for other device speed): bLength 10 bDescriptorType 6 bcdUSB 2.00 bDeviceClass 0 (Defined at Interface level) bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 64 bNumConfigurations 1 Device Status: 0x0000 (Bus Powered)
Making it Work
Firmware
In order to use the LinuxTV driver, you need to download and install the firmware for the xc5000. Some distributions already bundle the firmware in the official repositories. Ubuntu 9.10 (Karmic) includes it by default, Fedora 16+ includes it in the default linux-firmware package, and Debian Testing (Squeeze) includes it in the firmware-linux-nonfree package.
Kernel 2.6.30 and earlier:
wget http://www.steventoth.net/linux/xc5000/HVR-12x0-14x0-17x0_1_25_25271_WHQL.zip wget http://www.steventoth.net/linux/xc5000/extract.sh sh extract.sh cp dvb-fe-xc5000-1.1.fw /lib/firmware
Kernel 2.6.31 and later:
wget http://www.kernellabs.com/firmware/xc5000/dvb-fe-xc5000-1.6.114.fw mv dvb-fe-xc5000-1.6.114.fw /lib/firmware/
The firmware will be added lazily (on-demand) when you first use the driver.
Kernel 2.6.31 firmware issues
When running this kernel version, loading of the firmware takes very long, and prevents MythTV from working properly. To deal with this problem you can use xc5000's no_poweroff=1 module option, to prevent the device from sleeping (after which firmware has to be reloaded)
You can set no_poweroff this way:
cat /sys/module/xc5000/parameters/no_poweroff 0 # <--- default is automatic poweroff enabled echo -n 1 > /sys/module/xc5000/parameters/no_poweroff cat /sys/module/xc5000/parameters/no_poweroff 1 # <--- poweroff is now disabled
This will take effect when the module is reloaded.
Drivers
The xc5000 driver needed for this WinTV-HVR-950Q is already part of the latest Linux kernel (part of v4l-dvb drivers).
Analog support was merged into the mainline v4l-dvb tree on March 18, 2009.
Sample Kernel Output
After you plug-in the device on a USB 2.0 port (it won't work with a USB 1.1) and use the driver for the first time (eg, by scanning channels), you may see something like this on dmesg:
usb 1-3: new high speed USB device using ehci_hcd and address 3 usb 1-3: configuration #1 chosen from 1 choice au0828: i2c bus registered tveeprom 0-0050: Hauppauge model 72001, rev B3F0, serial# 5280879 tveeprom 0-0050: MAC address is 00-0D-FE-XX-XX-XX tveeprom 0-0050: tuner model is Xceive XC5000 (idx 150, type 4) tveeprom 0-0050: TV standards NTSC(M) ATSC/DVB Digital (eeprom 0x88) tveeprom 0-0050: audio processor is AU8522 (idx 44) tveeprom 0-0050: decoder processor is AU8522 (idx 42) tveeprom 0-0050: has no radio, has IR receiver, has no IR transmitter hauppauge_eeprom: hauppauge eeprom: model=72001 xc5000 0-0061: creating new instance xc5000: Successfully identified at address 0x61 xc5000: Firmware has not been loaded previously DVB: registering new adapter (au0828) DVB: registering adapter 0 frontend 0 (Auvitek AU8522 QAM/8VSB Frontend)... Registered device AU0828 [Hauppauge HVR950Q] usb 1-3: New USB device found, idVendor=2040, idProduct=7200 usb 1-3: New USB device strings: Mfr=1, Product=2, SerialNumber=10 usb 1-3: Product: WinTV HVR-950 usb 1-3: Manufacturer: Hauppauge usb 1-3: SerialNumber: 000000000
After an application open the device the first time, the module will load the firmware. You will see:
xc5000: waiting for firmware upload (dvb-fe-xc5000-1.1.fw)... i2c-adapter i2c-2: firmware: requesting dvb-fe-xc5000-1.1.fw xc5000: firmware read 12332 bytes. xc5000: firmware upload
Analog Audio
To have analog audio in tvtime I am using following bash script to start the tvtime (There are two versions of SOX command - for OSS and for Alsa. Also, this version disables screen saver in KDE4, instead of using dbus interface, this could be some other command):
#!/bin/sh tvtime &>/dev/null & tPID=$! echo "Started TVTime, PID: $tPID" sleep 1 # OSS version: #sox -r 48000 -b 16 -c 2 -t ossdsp /dev/dsp1 -t ossdsp /dev/dsp &>/dev/null & # Alsa version: sox -t alsa hw:1,0 -t alsa default &>/dev/null & sPID=$! echo "Started SOX, PID: $sPID" # Simulator Activity (to disable Screen Saver): ( while true; do sleep 10; /usr/bin/qdbus org.freedesktop.ScreenSaver /ScreenSaver SimulateUserActivity; done ) &>/dev/null & aPID=$! echo "Started activity simulator (to disable Screen Saver), PID: $aPID" while true; do sleep 2 tRUN=$( ps -p $tPID -o pid --no-headers ) sRUN=$( ps -p $sPID -o pid --no-headers ) if [ "$tRUN" = "" ]; then echo "TVTime exited. Closing SOX + activity simulator and exiting." kill $sPID kill $aPID exit fi if [ "$sRUN" = "" ]; then echo "SOX exited. Closing TVTime + activity simulator and exiting." kill $tPID kill $aPID exit fi done