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).

Note that this card also has a RadioTuner in it - see that page for setup hints.

Support is in the 2.6 kernel, or if you use a 2.4 series kernel 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 later to apply these patches - the kernel patches use V4L (video for linux) version 2, while the 2.4 series kernels use version 1).

You still need to configure I2C support in the kernel as above, as well as making a module for saa7134 ("Device Drivers -> Multimedia devices -> Video For Linux -> Philips SAA7134 support"). If you can "modprobe saa7134" then your kernel already has this module.

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

  1. 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).
  2. 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.)
  3. 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 type which meant I could pick up UHF but not VHF channels.
Here is the relevant snippet from my /etc/modules.conf (for 2.4 kernels, or /etc/modprobe.d/tv for 2.6 kernels)
  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 using the "Xvideo" extension. See the Xv page. Using Xvideo also 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.

Mandrake 10.0

The DSE PCI TV/FM tuner card works on Mandrake 10.0 Official (using 2.6 kernel). This card has Flyvideo3000 and chipset saa7134. In file /etc/modprobe.preload, add this line

saa7134

and from Mandrake install discs, install xawtv (and the dependencies it asks for).

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, you need to use "lirc" userland daemons with the generic "event interface" (CONFIG_INPUT_EVDEV support needed in the kernel) for this IR support. Merely having the "evdev" module loaded and the "liblircclient0" package installed on Debian meant that the numbers on the remote are seen just like the numbers on the keypad.

In kernel 2.6.8 and later, debug messages are turned off by default, and enabled with the "ir_debug" module parameter. In earlier kernels, 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 page.

Tvtime

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

MythTV

See the MythTv page.

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