Difference between revisions of "Hauppauge HVR-1600"

From MythTV Official Wiki
Jump to: navigation, search
(Backend Setup)
m (Description: remove links)
 
(44 intermediate revisions by 15 users not shown)
Line 1: Line 1:
 +
{{Archived_Tuner|date=September 27, 2010|page=Hauppauge_WinTV-HVR-1600}}
 +
 
[[Image:Hvr1600_board.jpg|thumb|300px|right|The Hauppauge HVR-1600 dual tuner capture card]]
 
[[Image:Hvr1600_board.jpg|thumb|300px|right|The Hauppauge HVR-1600 dual tuner capture card]]
  
Line 4: Line 6:
 
|name=WinTV-HVR-1600  
 
|name=WinTV-HVR-1600  
 
|vendorsite=http://www.hauppauge.com/site/products/data_hvr1600.html
 
|vendorsite=http://www.hauppauge.com/site/products/data_hvr1600.html
|supportstatus=Works with MythTV 0.21, but not explicitly supported
+
|supportstatus=Works with MythTV 0.21, but not explicitly supported<br>Works with MythTV 0.22 and greater
 
|driver=Linux cx18 driver
 
|driver=Linux cx18 driver
 
|sounddriver=Not needed, the hardware encoder will multiplex the audio with the video stream.
 
|sounddriver=Not needed, the hardware encoder will multiplex the audio with the video stream.
Line 10: Line 12:
 
}}
 
}}
  
The '''Hauppauge WinTV-HVR-1600''' is a dual tuner ATSC/NTSC capture board by Hauppauge Computer Works. The card is PCI based, and is designed for use in North America where [[NTSC]] and [[ATSC]] signals are used for television broadcast.  Non-NTSC analog baseband video can be captured using the basedband video input (CVBS or S-Video).
+
The '''Hauppauge WinTV-HVR-1600''' has two tuners (1 digital / 1 analog) ATSC/NTSC capture board by Hauppauge Computer Works. The card is PCI based, and is designed for use in North America where [[NTSC]] and [[ATSC]] signals are used for television broadcast.  Non-NTSC analog baseband video can be captured using the basedband video input (CVBS or S-Video).
  
 
== Description ==
 
== Description ==
The HVR-1600 is a capture card from Hauppauge (pronounced /hɔphɔg/ like the Hamlet on Long Island, New York where the company originated and still resides) Computer Works. The design is made entirely of Conexant chips. The Conexant [http://www.conexant.com/products/entry.jsp?id=150 CX23418] is the TV broadcast decoder, MPEG2 encoder, and host bus interface chip. The CX23418 is the next generation of the [http://www.conexant.com/products/entry.jsp?id=120 CX23416] that was used on the very well supported [[PVR-150]] and [[PVR-500]] series cards, it combines the hardware encoding engine of the CX23416 with a CX25843 broadcast decoder/digitizer core on one chip. The only other chip worth mentioning is the new Conexent CX24227 ATSC demodulator used for digital TV reception. The retail version of the card supports and comes with an IR Blaster and Receiver, as well as a Remote. The over-the-air tuner supports all ATSC formats, up to the high definition 1080i format. Some of the HVR-1600's (product code 74021 and 74041 found on the tuner label) also support Clear QAM, which is most likely the stuff your cable company uses for your local HD channels. Again, the analog tuner supports encoding NTSC into MPEG-2 at 720x480 resolution with a data rate of up to 12Mbits/sec.
+
The HVR-1600 is a capture card from Hauppauge (pronounced /hɔphɔg/ like the Hamlet on Long Island, New York where the company originated and still resides) Computer Works. The design is made entirely of Conexant chips. The Conexant [http://www.conexant.com/products/entry.jsp?id=150 CX23418] is the TV broadcast decoder, MPEG2 encoder, and host bus interface chip. The CX23418 is the next generation of the [http://www.conexant.com/products/entry.jsp?id=120 CX23416] that was used on the very well supported PVR-150 and PVR-500 series cards, it combines the hardware encoding engine of the CX23416 with a CX25843 broadcast decoder/digitizer core on one chip. The only other chip worth mentioning is the new Conexent CX24227 ATSC demodulator used for digital TV reception. The retail version of the card supports and comes with an IR Blaster and Receiver, as well as a Remote. The over-the-air tuner supports all ATSC formats, up to the high definition 1080i format. Some of the HVR-1600's (product code 74021 and 74041 found on the tuner label) also support Clear QAM, which is most likely the stuff your cable company uses for your local HD channels. Again, the analog tuner supports encoding NTSC into MPEG-2 at 720x480 resolution with a data rate of up to 12Mbits/sec.
  
 
== IVTV Heritage ==
 
== IVTV Heritage ==
Line 46: Line 48:
  
 
== Installation Guide ==
 
== Installation Guide ==
Recent improvements in the Digital tuner affecting Clear QAM have been made by developers @ KernelLabs.  
+
Improvements in the Digital tuner affecting Clear QAM have been made by [http://www.kernellabs.com/blog/?cat=42 developers @ KernelLabs.com.] These improvements are now available in the main v4l-dvb tree @ linuxtv.org and should result in improved experience compared to drivers compiled before 11/15/2009.
These improvements are now available in the main v4l-dvb tree @ linuxtv.org and should result in improved recpetion
 
  
  
A serious error can occur if the user has a cx18 card and an NVIDIA Graphics card using the restricted drivers. The NVIDIA driver will not load and the user will instead be launched into low graphics mode.
+
A serious error can occur if the user has a cx18 card and an NVIDIA Graphics card(with/without using the restricted drivers.)This error has been confirmed [https://bugs.launchpad.net/ubuntu/+source/linux/+bug/306664 here] with a work around [http://ubuntuforums.org/showthread.php?t=1004660 here]. See [[Hauppauge_HVR-1600#Common_Problems]] for more info.
 
 
This error has been confirmed [https://bugs.launchpad.net/ubuntu/+source/linux/+bug/306664 here] with a work around [http://ubuntuforums.org/showthread.php?t=1004660 here]. See below for copy of work around [[Hauppauge_HVR-1600#Workaround_for_NVIDIA_restricted_driver_users]].
 
  
 
{{Note box|
 
{{Note box|
 
The drivers released and included in recent kernels contain a bug which may cause stuttering while watching TV, so it will be necessary to build them yourself.  
 
The drivers released and included in recent kernels contain a bug which may cause stuttering while watching TV, so it will be necessary to build them yourself.  
 
}}
 
}}
 +
 +
  
 
===Drivers===
 
===Drivers===
Line 66: Line 67:
 
   sudo /etc/init.d/mythtv-backend stop
 
   sudo /etc/init.d/mythtv-backend stop
 
*Download the latest.
 
*Download the latest.
   sudo apt-get install mercurial linux-headers-`uname -r` build-essential
+
   sudo apt-get install mercurial linux-headers-`uname -r` build-essential qt3-dev-tools libncurses5-dev
 
   for Fedora: yum install mercurial linux-headers-`uname -r` build-essential
 
   for Fedora: yum install mercurial linux-headers-`uname -r` build-essential
 
   hg clone <nowiki>http://linuxtv.org/hg/v4l-dvb</nowiki>
 
   hg clone <nowiki>http://linuxtv.org/hg/v4l-dvb</nowiki>
Line 76: Line 77:
  
 
*Pre-Compilation Steps
 
*Pre-Compilation Steps
   cd v4l-dvb (if you are not already in that directory)
+
   cd v4l-dvb #(if you are not already in that directory)
 
   sudo make rminstall
 
   sudo make rminstall
 
   sudo make distclean  
 
   sudo make distclean  
   sudo make menuconfig  (default selections are probably appropriate so this step should be unecessary)
+
   sudo make menuconfig  #(default selections are probably appropriate so this step should be unecessary)
 
+
note: While in menuconfig, unless you have downloaded the entire kernel source, you will need to disable Multimedia support-->DVB/ATSC adapters  --->FireDTV and FloppyDTV or build will fail
 
*Compile and add the module to the kernel:
 
*Compile and add the module to the kernel:
 
   make
 
   make
 
   sudo make install
 
   sudo make install
 +
 +
 +
*Getting remote to work with newer kernels.
 +
[http://www.uluga.ubuntuforums.org/showpost.php?p=8257616&postcount=27 How To]
  
 
===Firmware===
 
===Firmware===
Line 97: Line 102:
 
wget http://linuxtv.org/downloads/firmware/v4l-cx23418-apu.fw
 
wget http://linuxtv.org/downloads/firmware/v4l-cx23418-apu.fw
 
wget http://linuxtv.org/downloads/firmware/v4l-cx23418-dig.fw
 
wget http://linuxtv.org/downloads/firmware/v4l-cx23418-dig.fw
sudo cp cx18-firmware/*.fw /lib/firmware              # Preferred.
+
sudo cp *.fw /lib/firmware              # Preferred.
 
...or...
 
...or...
sudo cp cx18-firmware/*.fw /lib/firmware/`uname -r`  # Repeat after kernel updates.
+
sudo cp *.fw /lib/firmware/`uname -r`  # Repeat after kernel updates.
 
</pre>
 
</pre>
  
Line 161: Line 166:
 
# When it's done scanning, select Finish
 
# When it's done scanning, select Finish
  
 
*To scan for analog channels:
 
# Go back to the main menu and select Input connections, then select the correct DVB input for the card just configured (probably 'Tuner 1').
 
# Set the video source to 'Analog', created in step 4.
 
# Select Scan for channels.
 
# A DVB device should be selected under Input.
 
# Scan Type should be 'Full Scan'.
 
# For cable, change Frequency Table to 'us-cable' or whatever is correct for your country.
 
# Select Next and then wait for the scan to complete. This may take a while.
 
# When it's done scanning, select Finish
 
 
 
MythTV has been known to have some issues scanning for all ATSC channels, see [[Adding Digital Cable Channels (For ATSC/QAM Tuner Cards -- USA/Canada)]] for more information.
 
  
 
===Startup Script for Analog Tuner===
 
===Startup Script for Analog Tuner===
Line 184: Line 176:
 
*Save this script as tune.sh (probably in /usr/share/mythtv).
 
*Save this script as tune.sh (probably in /usr/share/mythtv).
 
<pre>
 
<pre>
  #!/bin/bash
+
#!/bin/bash
  function tune {
+
for dev in /dev/video[0-9] ; do
    # Make sure an argument was passed.
+
        if v4l2-ctl -D -d $dev | grep -q 'Hauppauge HVR-1600' &>/dev/null ; then
    if [ -z "$1" ]; then echo "Use: $0 /dev/<device>" ; return ; fi
+
                dd if=$dev bs=1024k count=2 > /dev/null
    # Try to make sure we're working with a /dev/xxx item.
+
        fi
    if [ -c "$1" ]; then
+
done
      dd if=$1 bs=1024k count=2 &>/dev/null
 
    else
 
      echo "Error: $1 is not a device."
 
      return
 
    fi
 
  }
 
 
 
  tune "/dev/video0"
 
 
</pre>
 
</pre>
*Repeat the last line for each of the analog tuners installed, (tune /dev/video0, tune /dev/video1, etc.)
 
  
 
*In MythSetup under General > Shutdown/Wakeup Options, under Startup Command put "bash /usr/share/mythtv/tune.sh" (or whatever the path to the script is). Or call this from an existing script.
 
*In MythSetup under General > Shutdown/Wakeup Options, under Startup Command put "bash /usr/share/mythtv/tune.sh" (or whatever the path to the script is). Or call this from an existing script.
 +
 
===IR Transmitter===
 
===IR Transmitter===
 
A cable set top box, for example, can be controlled by this card's IR transmitter.
 
A cable set top box, for example, can be controlled by this card's IR transmitter.
 +
The following was known to work in ubuntu 9.04.
 
{{Tip box|Type in the next line. Then configure as needed.}}
 
{{Tip box|Type in the next line. Then configure as needed.}}
 
<pre>
 
<pre>
Line 217: Line 202:
 
*And/Or start at step 8 for setting up a specific device.
 
*And/Or start at step 8 for setting up a specific device.
  
==Workaround for NVIDIA restricted driver users==
+
===IR Remote===
Reprinted from [http://ubuntuforums.org/showthread.php?t=1004660 How To: If Your Nvidia Driver Won't Install (8.10) by 76GTA]
+
The HVR-1600 comes with an IR remote control that is well supported.
  
{{Note box|This involves modifying sensitive parts of your system. Do so only if you understand the risks}}
+
Due to some kernel and lirc_i2c module changes >= 2.6.28 some users have found that their remote no longer worked out-of-the box.
 +
Switching to the ir-kbd-i2c module should get it working again.
  
1.) If you plan on using your tuner/radio card, then this is the solution:
+
The directions below were taken from: https://bugs.launchpad.net/ubuntu/+source/lirc/+bug/454371/comments/21
  
Reallocate the virtual memory so both the cx18 and nvidia modules will coexist. Open a terminal and run
+
My current kernel:
 +
<pre>
 +
# uname -r
 +
2.6.32-21-generic
 +
</pre>
  
<pre>sudo gedit /boot/grub/menu.lst</pre>
+
My old config (that no longer works):
 +
<pre>
 +
# /etc/lirc/hardware.conf
 +
#
 +
#Chosen Remote Control
 +
REMOTE="PVR"
 +
REMOTE_MODULES="lirc_dev lirc_i2c"
 +
REMOTE_DRIVER=""
 +
REMOTE_DEVICE="/dev/lirc0"
 +
REMOTE_LIRCD_CONF="hauppauge/lircd.conf.hauppauge"
 +
REMOTE_LIRCD_ARGS=""
 +
</pre>
  
Then you need to find the "kernel" line for your current kernel(IE-the one your machine uses by default) and add
+
My new config (that works now):
 +
<pre>
 +
# /etc/lirc/hardware.conf
 +
#
 +
#Chosen Remote Control
 +
REMOTE="Hauppauge TV card"
 +
REMOTE_MODULES="ir_kbd_i2c lirc_dev lirc_i2c"
 +
REMOTE_DRIVER="dev/input"
 +
REMOTE_DEVICE="/dev/input/event4"
 +
REMOTE_LIRCD_CONF="hauppauge/lircd.conf.hauppauge"
 +
REMOTE_LIRCD_ARGS=""
 +
</pre>
  
<pre>vmalloc=256M</pre>
+
dmesg output that let me know ir_kbd_i2c was looking good:
 
+
<pre>
at the end and save. An example would be like this:
+
dmesg | grep " IR "
 +
[ 1257.753138] input: i2c IR (CX23418 Z8F0811 Hauppau as /devices/virtual/input/input6
 +
[ 1257.753306] ir-kbd-i2c: i2c IR (CX23418 Z8F0811 Hauppau detected at i2c-0/0-0071/ir0 [cx18 i2c driver #0-0]
 +
</pre>
  
 +
Found which /dev/intput/event* device it was by looking at /proc/bus/input/devices
 
<pre>
 
<pre>
title        Ubuntu 8.10, kernel 2.6.27-10-generic
+
cat /proc/bus/input/devices
uuid        84456e0a-8648-477a-96ef-0116151ecc8c
+
I: Bus=0018 Vendor=0000 Product=0000 Version=0000
kernel        /boot/vmlinuz-2.6.27-10-generic root=UUID=84456e0a-8648-477a-96ef-0116151ecc8c ro quiet splash rootflags=data=writeback vmalloc=256M
+
N: Name="i2c IR (CX23418 Z8F0811 Hauppau"
initrd        /boot/initrd.img-2.6.27-10-generic
+
P: Phys=i2c-0/0-0071/ir0
quiet
+
S: Sysfs=/devices/virtual/input/input6
 +
U: Uniq=
 +
H: Handlers=kbd event4
 +
B: EV=100003
 +
B: KEY=100fc312 214a802 0 0 0 0 18000 41a8 4801 9e1680 0 0 10000ffc
 
</pre>
 
</pre>
  
Now you should be able to boot normally with the nvidia driver installed and still use your Tuner card.
 
  
For systems using grub 2 edit /etc/default/grub and change the following line:
+
==== Lucid (10.4) ====
 +
 
 +
In Lucid (10.4) with kernel 2.6.32-23-generic all I had to do was:
 +
# Replace the lines in /etc/lirc/hardware.conf with the above (new) configuration.
 +
# Restart the lirc daemon
 +
# typed cat /proc/bus/input/devices to confirm the new device was loaded
 +
# Update /etc/lirc/hardware.conf with the correct event handler (event6 for me)
 +
# Restart lirc again.
 +
The only key not working now is the number 6 for some reason.
 +
 
 +
==== IR receiver and blaster in Lucid (10.04) ====
 +
After much pain and suffering, I was able to make my HVR-1600 model 1199 receiver and blaster work in Lucid, using Jarod Wilson's lirc_zilog kernel module. All of the grey remote's keys are working.
 +
 
 +
My recipe is posted here:
 +
[http://ubuntuforums.org/showpost.php?p=9548142&postcount=9]. But if I was going to do it again, I would get a separate USB MCE receiver/blaster.
 +
 
 +
If you are considering building a new system that uses this card's IR blaster, you might want to use Mythdora, which includes Jarod's driver.
 +
 
 +
==Common Problems==
 +
===Driver refuses to load with mysterious errors===
 +
 
 +
Under certain memory configurations on 32-bit platforms, using this card's driver and some other drivers (usually but not exclusively nVidia's proprietary driver) at the same time requires more of a particular type of address space allocated than the kernel will allocate by default.  If you experience the driver refusing to load for no obvious reason, check the output of `dmesg`.  If you see either of the two following messages appear, you will need to go to [[Common Problem: vmalloc too small]] to learn how to apply a very small kernel configuration change which requires one reboot.
 +
 
 +
The above problem can also be what is causing a second HVR-1600 to not mount.  Increasing vmalloc will allow more than one card to start on some system configurations.
 +
 
 +
The messages to look for:
 +
allocation failed: out of vmalloc space - use vmalloc=<size> to increase size.
 +
cx18-1: ioremap failed, perhaps increasing __VMALLOC_RESERVE in page.h
 +
 
 +
===Missing audio for analog recordings===
 +
 
 +
There is also a problem with over-the-air analog recordings sometimes having no audio.
 +
 
 +
One suggestion was to adjust the MythTV recording profile settings
 +
to match the default audio sampling rate (48000) and bit rate (224kb/sec)
 +
of the cs5345 audio driver, but this does not always fix the issue.
 +
[On my system (Mythbuntu 9.10 + hg driver), 48000 is the only value allowed by the profile editor GUI.]
  
<pre>
+
The most successful workaround seems to be to rmmod/modprobe the cx18 driver
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash vmalloc=256M"
+
over and over until working audio is achieved.  It then often continues
</pre>
+
to work fine until (at least) the next reboot.  But not always.
 +
And once it stops working, the only recovery is to rmmod/modprobe again.
 +
 
 +
As of April 2010, this stubborn issue was being actively worked on
 +
by the cx18 driver guy (Andy Walls) and another Linux kernel developer (Mark Lord).
 +
Several new ideas and code changes seem to have helped,
 +
but a complete cure was not found.  Those efforts are now at a standstill.
  
 
== Resources ==
 
== Resources ==
Line 255: Line 316:
 
The mailing lists at http://www.ivtvdriver.org where use and development of the cx18 driver is discussed for the HVR-1600 and other CX23418 based cards.
 
The mailing lists at http://www.ivtvdriver.org where use and development of the cx18 driver is discussed for the HVR-1600 and other CX23418 based cards.
  
Hauppauge product page for the [http://www.hauppauge.com/Pages/products/data_hvr1600.html HVR-1600]
+
Hauppauge product page for the [http://www.hauppauge.com/site/products/data_hvr1600.html HVR-1600]
  
 
Conexant product page for the [http://www.conexant.com/products/entry.jsp?id=150 CX23418-chip]
 
Conexant product page for the [http://www.conexant.com/products/entry.jsp?id=150 CX23418-chip]
Line 266: Line 327:
 
   Linux support for both the analog TV tuner and the digital TV tuner available at LinuxTV.ORG in the "cx18"
 
   Linux support for both the analog TV tuner and the digital TV tuner available at LinuxTV.ORG in the "cx18"
 
   section."
 
   section."
 
[[Category:Video capture cards]]
 
[[Category:Analog TV capture cards]]
 
[[Category:Mpeg encoder capture cards]]
 
[[Category:HDTV capture cards]]
 
[[Category:Hauppauge]]
 

Latest revision as of 00:27, 18 February 2011

Warning.png Warning: This page has been locked and archived on September 27, 2010. The official documentation for this card can be found at Hauppauge_WinTV-HVR-1600. This page remains as there is significant information herein not included in the official documentation. Please migrate any such information to the proper location.

The Hauppauge HVR-1600 dual tuner capture card


WinTV-HVR-1600
Vendors Website http://www.hauppauge.com/site/products/data_hvr1600.html
Input Formats not applicable
Support Status Works with MythTV 0.21, but not explicitly supported
Works with MythTV 0.22 and greater
Driver Linux cx18 driver
Sound Driver Not needed, the hardware encoder will multiplex the audio with the video stream.
Chipset Conexant CX23418 MPEG-2 encoder, and CX24227 ATSC demodulator


The Hauppauge WinTV-HVR-1600 has two tuners (1 digital / 1 analog) ATSC/NTSC capture board by Hauppauge Computer Works. The card is PCI based, and is designed for use in North America where NTSC and ATSC signals are used for television broadcast. Non-NTSC analog baseband video can be captured using the basedband video input (CVBS or S-Video).

Description

The HVR-1600 is a capture card from Hauppauge (pronounced /hɔphɔg/ like the Hamlet on Long Island, New York where the company originated and still resides) Computer Works. The design is made entirely of Conexant chips. The Conexant CX23418 is the TV broadcast decoder, MPEG2 encoder, and host bus interface chip. The CX23418 is the next generation of the CX23416 that was used on the very well supported PVR-150 and PVR-500 series cards, it combines the hardware encoding engine of the CX23416 with a CX25843 broadcast decoder/digitizer core on one chip. The only other chip worth mentioning is the new Conexent CX24227 ATSC demodulator used for digital TV reception. The retail version of the card supports and comes with an IR Blaster and Receiver, as well as a Remote. The over-the-air tuner supports all ATSC formats, up to the high definition 1080i format. Some of the HVR-1600's (product code 74021 and 74041 found on the tuner label) also support Clear QAM, which is most likely the stuff your cable company uses for your local HD channels. Again, the analog tuner supports encoding NTSC into MPEG-2 at 720x480 resolution with a data rate of up to 12Mbits/sec.

IVTV Heritage

The HVR-1600 and other CX23418 based cards are not supported by the ivtv driver. They are supported by the cx18 driver. For more information see: http://ivtvdriver.org/index.php/Cx18

The cx18 driver code is based heavily on the ivtv driver code; hence the strong similarity between the ivtv and cx18 driver (as far as MythTV is concerned).

Options for Linux Drivers

Drivers included in recent kernels may contain a bug which causes stuttering in TV playback. Concurrent Analog and ATSC capture are working with current driver. The latest stable version can be found here: http://www.linuxtv.org/wiki/index.php/How_to_Obtain,_Build_and_Install_V4L-DVB_Device_Drivers

Output Messages

Further information that may be useful are the following lspci command outputs.

lspci returns

      02:02.0 Multimedia video controller: Conexant Unknown device 5b7a

lspci -vn

  02:02.0 0400: 14f1:5b7a
       Subsystem: 0070:7404
       Flags: bus master, medium devsel, latency 64, IRQ 5
       Memory at f8000000 (32-bit, non-prefetchable) [size=64M]
       Capabilities: <access denied>

lspci -v

   02:02.0 Multimedia video controller: Conexant Unknown device 5b7a
       Subsystem: Hauppauge computer works Inc. Unknown device 7404
       Flags: bus master, medium devsel, latency 64, IRQ 5
       Memory at f8000000 (32-bit, non-prefetchable) [size=64M]
       Capabilities: <access denied>


Installation Guide

Improvements in the Digital tuner affecting Clear QAM have been made by developers @ KernelLabs.com. These improvements are now available in the main v4l-dvb tree @ linuxtv.org and should result in improved experience compared to drivers compiled before 11/15/2009.


A serious error can occur if the user has a cx18 card and an NVIDIA Graphics card(with/without using the restricted drivers.)This error has been confirmed here with a work around here. See Hauppauge_HVR-1600#Common_Problems for more info.


Important.png Note: The drivers released and included in recent kernels contain a bug which may cause stuttering while watching TV, so it will be necessary to build them yourself.


Drivers

New drivers are needed for this card provided by linuxtv.org.

http://www.linuxtv.org/wiki/index.php/How_to_Obtain,_Build_and_Install_V4L-DVB_Device_Drivers

  • Stop the MythBackend to avoid receiving errors while installing these drivers.
 sudo /etc/init.d/mythtv-backend stop
  • Download the latest.
 sudo apt-get install mercurial linux-headers-`uname -r` build-essential qt3-dev-tools libncurses5-dev
 for Fedora: yum install mercurial linux-headers-`uname -r` build-essential
 hg clone http://linuxtv.org/hg/v4l-dvb

Or if you are updating, instead of the clone command above:

 cd v4l-dvb 
 hg pull -u http://linuxtv.org/hg/v4l-dvb
 hg update
  • Pre-Compilation Steps
 cd v4l-dvb #(if you are not already in that directory)
 sudo make rminstall
 sudo make distclean 
 sudo make menuconfig  #(default selections are probably appropriate so this step should be unecessary)

note: While in menuconfig, unless you have downloaded the entire kernel source, you will need to disable Multimedia support-->DVB/ATSC adapters --->FireDTV and FloppyDTV or build will fail

  • Compile and add the module to the kernel:
 make
 sudo make install


  • Getting remote to work with newer kernels.

How To

Firmware

Conexant gave permission to redistribute the firmware files. The firmware from ivtvdriver.org may contain the bug that causes a stuttering problem.

Instead you will need to get the firmware from the linuxtv.org site. The firmware from yum repositories may not have the right version either.

http://linuxtv.org/downloads/firmware/

  • Get the firmware files and copy the files to the firmware directory (usually under /lib/firmware/).
wget http://linuxtv.org/downloads/firmware/v4l-cx23418-cpu.fw
wget http://linuxtv.org/downloads/firmware/v4l-cx23418-apu.fw
wget http://linuxtv.org/downloads/firmware/v4l-cx23418-dig.fw
sudo cp *.fw /lib/firmware              # Preferred.
...or...
sudo cp *.fw /lib/firmware/`uname -r`   # Repeat after kernel updates.

Reboot

  • If one or both of the previous steps were done:
 sudo shutdown -r now
  • Verify that everything was installed correctly. Expect the following (probably more):
 dmesg | grep cx18
 [    8.651532] cx18:  Start initialization, version 1.0.1
 [    8.651572] cx18-0: Initializing card #0
 [    8.651575] cx18-0: Autodetected Hauppauge card
 [   23.555603] cx18-0: loaded v4l-cx23418-apu.fw firmware V00120000 (141200 bytes)
 [   24.227119] cx18-0: loaded v4l-cx23418-cpu.fw firmware (158332 bytes)
 [   25.651060] cx18-0: loaded v4l-cx23418-dig.fw firmware (16382 bytes)


Important.png Note: The Drivers, Firmware and Reboot sections may need be repeated after each kernel update. When these drivers are out of beta, this will hopefully all be handled by the package manager.


Backend Setup

  • Configure MythTV to use both "halves" of the card
  1. Enter mythsetup and go to Capture cards
  2. Select (New capture card)


  • Configure the analog half of the card like a supported MPEG-2 Encoder PVR-150 card. Treating the analog half of the card as an ivtv based card in MythTV works as the cx18 driver is heavily based on (i.e. cut and pasted from) the ivtv driver.
  1. Under Card type, choose IVTV MPEG-2 encoder (or MPEG-2 encoder card (PVR-x50, PVR-500)). Do not select Analog V4L capture
  2. Choose the correct video device (usually /dev/video0 unless there is more than one card). Note: if the video device is not listed and a could not open to probe its inputs message appears, add /dev/video0 manually
  3. Probed info should populate with Hauppauge HVR-1600 [cx18]
  4. To use NTSC RF from an antenna or cable TV provider, choose 'Tuner 1' under Default input
  5. Select Finish.


  • Configure the ATSC (digital) half of the card as any other DVB DTV capture card
  1. Add another tuner card
  2. Under Card type choose 'DVB DTV capture card (v3.x)'.
  3. Choose the correct value under DVB Device Number (usually 0, this should be the same number appended to /dev/video when configuring the analog portion of the card). Starting with 0.22, this field will be a string like: /dev/dvb/adapter0/frontend0. A second card would be /dev/dvb/adapter1/frontend0.
  4. Frontend ID should populate to something like "Samsung S5H1409 QAM/Subtype: ATSC'.
  5. Select Recording Options.
  6. Change Max recordings to 1, since this card can only record one thing at a time.
  7. Select Finish.
  8. Select Finish again.


  • Under 'Video Sources' create two video sources, one for each half of the card. I called mine 'Analog' and 'Digital'.


  • To scan for digital channels:
  1. Go back to the main menu and select Input connections, then select the correct DVB input for the card just configured.
  2. Set the video source to 'Digital', created in step 4.
  3. Select Scan for channels.
  4. A DVB device should be selected under Input.
  5. Scan Type should be 'Full Scan'.
  6. For cable, change Frequency Table to 'Cable' (you'll probably want to use 'Cable High' since most QAM channels are in the high range).
  7. For cable, change Modulation to 'Cable (QAM-256)'. All U.S. cable companies either use QAM-256 or QAM-64, most including Comcast use QAM-256.
  8. Choose an ATSC Channel Separator (most television tuners use a period).
  9. Select Next and then wait for the scan to complete. This may take a while.
  10. When it's done scanning, select Finish


Startup Script for Analog Tuner

Important.png Note: If you're running a recent Linux kernel, then building and installing the drivers (see "Installation Guide" above) will most likely address this issue. Hopefully this driver issue will be resolved in a future kernel release.

Because the first analog capture after system startup experiences dropped frames and/or no audio, you may want to add a script to use the analog tuner on startup so that your first recording isn't garbled. The following script reads 2MB (1-2 seconds) of data from the analog tuner and throws the data away.

  • Save this script as tune.sh (probably in /usr/share/mythtv).
#!/bin/bash
for dev in /dev/video[0-9] ; do
        if v4l2-ctl -D -d $dev | grep -q 'Hauppauge HVR-1600' &>/dev/null ; then
                dd if=$dev bs=1024k count=2 > /dev/null
        fi
done
  • In MythSetup under General > Shutdown/Wakeup Options, under Startup Command put "bash /usr/share/mythtv/tune.sh" (or whatever the path to the script is). Or call this from an existing script.

IR Transmitter

A cable set top box, for example, can be controlled by this card's IR transmitter. The following was known to work in ubuntu 9.04.

Information.png Tip: Type in the next line. Then configure as needed.

 dmesg|egrep "haup-ir-blaster|pvr150"
 20.123294] lirc_pvr150: chip found with RX and TX
 20.123400] i2c ir driver 4-0070: firmware: requesting haup-ir-blaster.bin
 20.234544] lirc_pvr150: firmware of size 302355 loaded
 20.234780] lirc_pvr150: 743 codesets loaded
 20.278765] lirc_pvr150: Hauppauge PVR-150 IR blaster: firmware version 2.1.
  • See this page for details.
  • If the firmware lines are missing,start at step 6.
  • And/Or start at step 8 for setting up a specific device.

IR Remote

The HVR-1600 comes with an IR remote control that is well supported.

Due to some kernel and lirc_i2c module changes >= 2.6.28 some users have found that their remote no longer worked out-of-the box. Switching to the ir-kbd-i2c module should get it working again.

The directions below were taken from: https://bugs.launchpad.net/ubuntu/+source/lirc/+bug/454371/comments/21

My current kernel:

# uname -r
2.6.32-21-generic

My old config (that no longer works):

# /etc/lirc/hardware.conf
#
#Chosen Remote Control
REMOTE="PVR"
REMOTE_MODULES="lirc_dev lirc_i2c"
REMOTE_DRIVER=""
REMOTE_DEVICE="/dev/lirc0"
REMOTE_LIRCD_CONF="hauppauge/lircd.conf.hauppauge"
REMOTE_LIRCD_ARGS=""

My new config (that works now):

# /etc/lirc/hardware.conf
#
#Chosen Remote Control
REMOTE="Hauppauge TV card"
REMOTE_MODULES="ir_kbd_i2c lirc_dev lirc_i2c"
REMOTE_DRIVER="dev/input"
REMOTE_DEVICE="/dev/input/event4"
REMOTE_LIRCD_CONF="hauppauge/lircd.conf.hauppauge"
REMOTE_LIRCD_ARGS=""

dmesg output that let me know ir_kbd_i2c was looking good:

dmesg | grep " IR "
[ 1257.753138] input: i2c IR (CX23418 Z8F0811 Hauppau as /devices/virtual/input/input6
[ 1257.753306] ir-kbd-i2c: i2c IR (CX23418 Z8F0811 Hauppau detected at i2c-0/0-0071/ir0 [cx18 i2c driver #0-0]

Found which /dev/intput/event* device it was by looking at /proc/bus/input/devices

cat /proc/bus/input/devices
I: Bus=0018 Vendor=0000 Product=0000 Version=0000
N: Name="i2c IR (CX23418 Z8F0811 Hauppau"
P: Phys=i2c-0/0-0071/ir0
S: Sysfs=/devices/virtual/input/input6
U: Uniq=
H: Handlers=kbd event4
B: EV=100003
B: KEY=100fc312 214a802 0 0 0 0 18000 41a8 4801 9e1680 0 0 10000ffc


Lucid (10.4)

In Lucid (10.4) with kernel 2.6.32-23-generic all I had to do was:

  1. Replace the lines in /etc/lirc/hardware.conf with the above (new) configuration.
  2. Restart the lirc daemon
  3. typed cat /proc/bus/input/devices to confirm the new device was loaded
  4. Update /etc/lirc/hardware.conf with the correct event handler (event6 for me)
  5. Restart lirc again.
The only key not working now is the number 6 for some reason.

IR receiver and blaster in Lucid (10.04)

After much pain and suffering, I was able to make my HVR-1600 model 1199 receiver and blaster work in Lucid, using Jarod Wilson's lirc_zilog kernel module. All of the grey remote's keys are working.

My recipe is posted here: [1]. But if I was going to do it again, I would get a separate USB MCE receiver/blaster.

If you are considering building a new system that uses this card's IR blaster, you might want to use Mythdora, which includes Jarod's driver.

Common Problems

Driver refuses to load with mysterious errors

Under certain memory configurations on 32-bit platforms, using this card's driver and some other drivers (usually but not exclusively nVidia's proprietary driver) at the same time requires more of a particular type of address space allocated than the kernel will allocate by default. If you experience the driver refusing to load for no obvious reason, check the output of `dmesg`. If you see either of the two following messages appear, you will need to go to Common Problem: vmalloc too small to learn how to apply a very small kernel configuration change which requires one reboot.

The above problem can also be what is causing a second HVR-1600 to not mount. Increasing vmalloc will allow more than one card to start on some system configurations.

The messages to look for:

allocation failed: out of vmalloc space - use vmalloc=<size> to increase size.
cx18-1: ioremap failed, perhaps increasing __VMALLOC_RESERVE in page.h

Missing audio for analog recordings

There is also a problem with over-the-air analog recordings sometimes having no audio.

One suggestion was to adjust the MythTV recording profile settings to match the default audio sampling rate (48000) and bit rate (224kb/sec) of the cs5345 audio driver, but this does not always fix the issue. [On my system (Mythbuntu 9.10 + hg driver), 48000 is the only value allowed by the profile editor GUI.]

The most successful workaround seems to be to rmmod/modprobe the cx18 driver over and over until working audio is achieved. It then often continues to work fine until (at least) the next reboot. But not always. And once it stops working, the only recovery is to rmmod/modprobe again.

As of April 2010, this stubborn issue was being actively worked on by the cx18 driver guy (Andy Walls) and another Linux kernel developer (Mark Lord). Several new ideas and code changes seem to have helped, but a complete cure was not found. Those efforts are now at a standstill.

Resources

Here are some resources to take a look at. The data sheets for the Hauppauge HVR-1600 and the Conexant CX23418 MPEG-2 encoder chip.

The mailing lists at http://www.ivtvdriver.org where use and development of the cx18 driver is discussed for the HVR-1600 and other CX23418 based cards.

Hauppauge product page for the HVR-1600

Conexant product page for the CX23418-chip


This is a link to the linuxtv.org page that lists currently supported cards, as well as the unsupported cards.

 From the Hauppauge product support page:
 "Linux support for the WinTV-HVR-1600 is in the upcoming kernel 2.6.26 release. Also, there is WinTV-HVR-1600
  Linux support for both the analog TV tuner and the digital TV tuner available at LinuxTV.ORG in the "cx18"
  section."