(Thanks to William Burrow for this section.)
If you are afraid to open the case of your computer, be sure to read over this entire HOWTO first and make notes about the card, such as its tuner type, integrated circuit numbers, the frequencies of the crystal(s) and so on. Then get someone competent to install the card for you.
Otherwise, open the case and install the card in an available slot. Pick one that supports PCI bus transfers and PCI bus mastering, if your mainboard is picky about this (see your mainboard's manual). You will want this for overlay mode.
For sound, there are two different ways to connect your video grabber card and your sound card. One way is internal routing. Connect your CD-ROM audio cable to the video card sound input and the video card output to the sound card CD-ROM or Tuner audio input. Another way is to connect the external 1/8'' audio jack on the video card to the audio card's 1/8'' line audio in jack. You can also just plug amplified speakers into the grabber card audio out if you do not have an audio card or don't want to route through the sound card. (A few of the newer bt878 cards don't have any sound connector, because they send digital audio data across the PCI bus. There is no support for this at the time of this writing.)
A video source is also handy, especially for determining if the card is working or not. Many cards handle composite video in, S-Video in and, if equipped with a tuner, RF in. There is a separate connector for each of these inputs.
Your kernel will need to be correctly configured to support your card. Most newer Linux distributions come with the necessary modules already compiled, so if you can find the
/lib/modules/2.x.x/misc, you should be ready to go.
If not, you'll need to recompile your kernel with
enabled, preferably as loadable modules. See the Linux Kernel HOWTO ( http://www.linuxdoc.org/HOWTO/Kernel-HOWTO.html) for details on recompiling your kernel.
If you want to use the updated 0.6.x package, you should first retrieve the archive from one of the sites mentioned above. Extract it with
tar -xvzf bttv-0.6.x.tar.gz
and change to the newly created directory.
su to root, and type
in the main directory to create the drivers. (You can safely ignore the information in the
INSTALL file about editing makefiles, and the like, since we will pass this information to the driver as module parameters.) Then, type
to install them. Finally, run
to update your module dependency information.
Next, you may need to make the special character files in the
/dev directory. Type
ls /dev/video*; ls /dev/radio* to see if these devices already exist. If not, you'll need to create them. All of the files have major device number 81, and the minor device numbers depend on the specific device (video, radio, etc.) as well as multiple instances of these files. See the Video4Linux API ( http://roadrunner.swansea.uk.linux.org/v4lapi.shtml) for the programming-related details.
There is a
MAKEDEV script in the
driver directory of the bttv driver package which will create four video devices for you. You can also do it yourself fairly easily if you only have one video capture card. As root, type:
mknod /dev/video0 c 81 0
chmod 666 /dev/video0
ln -s /dev/video0 /dev/video
mknod /dev/radio0 c 81 64
chmod 666 /dev/radio0
ln -s /dev/radio0 /dev/radio
There are also videotext and VBI devices which can be created if you have an application which needs them. (Currently, there are only a few.) Type:
mknod /dev/vtx0 c 81 192
chmod 666 /dev/vtx0
ln -s /dev/vtx0 /dev/vtx
mknod /dev/vbi0 c 81 224
chmod 666 /dev/vbi0
ln -s /dev/vbi0 /dev/vbi
The bttv driver provides many different modules, with many different options, as described in the appendix of this document. With so many modules and options, you may wish to do this by hand until you get everything working. On the off chance that this causes your box to crash, it wouldn't hurt to type
sync; sleep 1; sync
to flush any dirty disk buffers before proceeding. Then, using the
insmod command as root, try loading up the modules. The first two are easy, because they don't usually need any options:
Now you're ready to load the bttv module itself:
By default, the
bttv module attempts to autodetect your card type. Watch
/var/log/messages to see what it finds. If it doesn't autodetect properly, you can add the
card=n option to the end of the previous command to force a card type, with
n chosen from the following list. (Types 0 through 19 are provided in the kernel series driver, bttv-0.6.4h contains support for types 20 through 27) You can also add the
radio=1 option if your card has FM tuner functionality.
card=n card type 0: Auto-Detect 1: Miro 2: Hauppauge (old bt848 boards) 3: STB 4: Intel 5: Diamond 6: AVerMedia 7: MATRIX Vision MV-Delta 8: FlyVideo 9: TurboTV 10: Hauppauge (new bt878 boards) 11: MIRO PCTV pro 12: Terratec/Vobis TV-Boostar 13: Newer Hauppauge WinCam (bt878) 14: MAXI TV Video PCI2 15: Terratec TerraTV+ 16: Aimslab VHX 17: PXC200 18: AVermedia98 19: FlyVideo98 (newer FlyVideo cards) 20: Zoltrix TV-Max 21: iProTV 22: ADS Technologies Channel Surfer TV 23: Pixelview PlayTV (bt878) 24: Leadtek WinView 601 25: AVEC Intercapture 26: LifeView FlyKit w/o Tuner 27: Intel Create and Share PCI
Next, load the tuner module, with
modprobe tuner type=n
You will probably need to dig into your case to see which tuner you have. Some cards (Miro and Hauppauge) allow the tuner to be automatically detected, but you may need to specify it. The tuner should be marked with the brand name, and you can look at the crystals (little aluminum cans) on the board to see if you have an NTSC or a PAL tuner. For PAL, the crystal is marked 28.xxxMHz (where xxx are three digits). For NTSC, the canister should say 35.xxxMHz. Once you have identified your tuner, select the value of
n from the following list (types 8 and 9 are included only in bttv-0.6.4h):
type=n type of the tuner chip. n as follows: 0: Temic PAL tuner 1: Philips PAL_I tuner 2: Philips NTSC tuner 3: Philips SECAM tuner 4: no tuner 5: Philips PAL tuner 6: Temic NTSC tuner 7: Temic PAL tuner 8: Alps TSBH1 NTSC tuner 9: Alps TSBE1 PAL tuner
Finally, insert any sound modules you may need. Again, you will probably need to take a very close look at the card to see what you've got. Note that drivers for TEA6300, TDA8425, TDA9855, and DPL3518 chips are only included in the 0.6.4h series driver, and are not included with the current (2.2.14) kernel drivers.
modprobe msp3400 or
dpl3518(see the appendix for details and options)
Fire up your favorite video4linux program, and see if it works. If you can't change the channel, make sure you have inserted the correct tuner module. If you can't hear any sound, double check the sound module, and make sure that the channel is not muted, if you're running the audio through your sound card.
After you know which modules and options you need, you can automate the process by putting the information into
/etc/conf.modules. Then, running an application which needs the driver will cause it to be loaded automatically. I use the following:
# TV alias char-major-81 bttv pre-install bttv modprobe -k tuner; modprobe -k msp3400 options bttv radio=1 card=3 options tuner type=2
/sbin/depmod -ato make sure all your module dependency information is up to date, as well.)