Penguin
Note: You are viewing an old revision of this page. View the current version.

A TV Tuner Card (as the name suggests) allows you to pick up broadcast television signals on your computer.

Under windows, drivers are normally specific to a manufacturer's board, while under linux the driver is normally specific to the chip used on the board. (This is true for just about all PCI/AGP/ISA cards and drivers.)

Hardware Setup

BT878 / BT848

The most popular cards are boards based on the BrookTree Technologies BT878 or BT848 chip, and drivers are in the standard linux kernel (2.4.x and possibly earlier). The difference is one chip also does sound, while for the other chip the board requires a separate audio chip.

In the kernel, you need:

  • I²C Support (Character Devices -> I²C Support -> I²C Support and I²C bit-banging interfaces).

(in the 2.6.x kernel this is in Device Drivers -> I²C Support -> I²C Support and I²C bit-banging interfaces)

  • Video for Linux (Multimedia devices -> Video For Linux -> proc filesystem and BT848 for linux).

(in the 2.6.x kernel this is in Device Drivers -> Multimedia devices -> Video For Linux -> BT848 Video For Linux)

  • Audio support (Sound -> BT878 audio DMA and TV Card (bt878) mixer support).

(in the 2.6.x kernel this is in Device Drivers -> Sound -> ALSA -> PCI Devices -> bt87x Audio Capture and in Device Drivers -> Sound -> OSS - bt878 audio DMA and Tv card (bt848) mixer support)

BT829

This chip is a BrookTree chip, and is not supported by the bttv driver.

Hauppage WinTV-PVR350

See the IvTv page for kernel support notes, and IvTvNotes for module/ PAL? support and other hints.

Philips SAA713x

A newer chip is made by Philips. The Lifeview Fly Video 2000 and 3000 boards sold at DSE in New Zealand are based on the saa7130 chip (which uses the same driver as the saa7134 chip). Support is not in the default 2.4 kernel (but it is in the version 2.6 series and some of the 2.5.x series), so you will need to download drivers and a few small kernel patches from http://bytesex.org/saa7134/. You will need to be using kernel 2.4.20 or 2.5.x or later - the kernel patches use V4L (video for linux) version 2, while the 2.4 series kernels use version 1). You still need to configure the kernel as above (apart from the BT878/848 specific stuff). Note that this card also has a RadioTuner in it - see that page for setup hints.

Here a some gotchas I noticed (for the New Zealand version of this board, at least):

  1. It didn't compile cleanly with gcc-2.95 (used by Debian version 3, for example), due to some problems with initialisation of a static array. I have a trivial patch for version 0.2.7 of the drivers, if anyone is interested (and they don't know enough about C to edit it themselves) -- JohnMcPherson.
  2. I needed to add "oss=1" as a option for the saa7134 module to get any sound. I guess it was defaulting to alsa, but this option wasn't mentioned anywhere - I found it accidentally when doing modinfo(8).
  3. Audio is handled by a small loop-back cable, out of the tuner card going back into the "line in" on the sound card. (Don't forget to adjust the volume for "line in" in your favourite sound mixer/volume control.)
  4. The default tuner type for the card was wrong. In New Zealand we use PAL BG (or compatible), and it was defaulting to some other tuner which meant I could pick up UHF but not VHF channels.
Here is the relevant snippet from my /etc/modules.conf
  1. for /video0 and vbi0 devices...

alias char-major-81-0 saa7134

  1. card=3 => flyvideo2000
  2. tuner=5 for PAL_BG
  3. oss=1

options saa7134 card=3 tuner=5 oss=1

Notes for LinuxKernel2.6

Overlay

As mentioned above, the saal7134 driver is part of 2.6. However, xawtv didn't work, and didn't even try to access the /dev/video device! However, reading the documentation suggested adding

Load "v4l"

in your /etc/X11/XF86Config file (for XFree86 version 4). This allows the "Xvideo" extension to do video overlays and scaling (and means that xawtv won't send those annoying refresh commands that make your desktop flicker every time the window is resized, or another window obscures or reveals part of the xawtv window).

Infrared Remote

The saa7134 module in kernel 2.6 includes support for the infra-red remote. The driver acts as another keyboard - if it is working, you should look in the file /proc/bus/input/devices and see if there is a section

similar to
I: Bus=0001 Vendor=1131 Product=0000 Version=0001 N: Name="saa7134 IR (!LifeView? FlyVIDEO20" P: Phys=pci-0000:00:0a.0/ir0 H: Handlers=kbd event2 B: EV=100003 B: KEY=c0304 100000 0 0 0 0 1 10000 2 1e0001 7bb80 0 0

Use the "xev" program to see if X can see remote button presses. If you use the "Multimedia Keys" settings in GNOME (and presumably something similar in KDE), you can assign arbitrary keys (including those buttons on the remote) to various desktop functions such as volume/mute control. (Use of xev(1) shows that not all the buttons on the remote are supported - while most generate events, the buttons labelled "CATV", "Video", "Audio", "Full Screen", and channel up and down don't appear to be visible for some reason).

This however isn't sufficient to program "change channel" functions and so forth. For this, perhaps you could investigate using the "lirc" userland daemons with the generic "event interface" (EVDEV support needed in the kernel) for this IR support, have a look at http://linux.bytesex.org/v4l2/faq.html#ir, and update this page :)

If you don't want the driver to print debugging messages to syslog every time you press a button, edit the file /usr/src/linux/drivers/media/video/saa7134/saa7134-input.c

and comment out or remove the two lines

printk("%s: build_key gpio=0x%x mask=0x%x data=%d\n",

dev->name, gpio, ir->mask_keycode, data);

and re-compile the module or your kernel. (This worked for kernel 2.6.4 at least.)

Applications

Xawtv

See the xawtv(1) manpage.

Tvtime

Probably the Linux tv-viewing app with the most user-friendly GUI frontend.

Mplayer

You need to specify the channel on the command line. For example, try
mplayer tv://10 -tv driver=v4l2

(VHF channel 10 is the frequency that broadcasts TV3 in Hamilton).

Mplayer can apparently also be used to encode and stream the video and audio across a network. If you figure out how to do this, please update this page.

Radio

See the RadioTuner page.


See also HowToBTTV? for info about device files and applications for viewing TV.


CategoryHardware