Bttv Setup

From Linuxhelp Wiki

Author:Corey
Created On:January 25th, 2005
Updated On:Not updated

Contents

Introduction

BTTV is the Linux driver for TV tuners that use the BT848 and BT878 chipsets. There are many TV tuners that use this chipset, more on that is listed below. Before you attempt to install the BTTV driver, you should first ensure that your tuner is using one of these chipsets first, if not, you may need one of the other drivers like saa7134 or cx88. Currently, the BTTV driver is maintained by Gerd Knorr.

Availability

The BTTV is included with the 2.4/2.6 kernel tree primarily, but you can also download the video4linux package from Gerd's website which will be listed below. Your best bet is to compile right from the kernel. If you need help with this, please see Joey's Kernel Compile Guide, or my TV Tuner Guide.

Supported Cards

It would be impossible for me to keep an updated list of supported TV tuners here, so, the best thing for you to do is to check out the documentation that comes with the kernel source. You can find the list of supported TV cards in "\Documentation\video4linux\bttv\CARDLIST" or "\Documentation\video4linux\CARDLIST.bttv".

Kernel Compile

For a more complete guide on configuring your kernel, please see our Kernel Compile Guide. When compiling your kernel, during the "make menuconfig" stage, compile the following sections as modules:

For kernel 2.6:

  • Device Drivers -> I2C Support -> I2C Support (M)
  • Device Drivers -> I2C Support -> I2C device interface (M)
  • Device Drivers -> Multimedia Devices -> Video For Linux (M)
  • Device Drivers -> Multimedia Devices -> Video For Linux -> BT848 Video for Linux (M)

For kernel 2.4:

  • Multimedia Devices -> Video For Linux (M)
  • Multimedia Devices -> Video For Linux -> V4L Information in the proc filesystem (Y)
  • Multimedia Devices -> Video For Linux -> BT848 Video For Linux (M)
  • Sound -> TV Card (bt848) mixer support (M)
  • Character Devices -> I2C Support -> I2C Support (M)
  • Character Devices -> I2C Support -> I2C bit-banging interfaces (M)

This will create the modules "tuner.o" and "bttv.o". If you are compiling your kernel for the first time, or you compiled more than just modules, you may need to reboot your computer with the new kernel. If you just compiled modules for your currently running kernel, you can go ahead to the next section and insert the modules right into your running system.

Module Configuration

Different distributions have different methods of providing kernel module options. I will try to list as many here as i can, please refer to your distribution's documentation for more instructions.

Gentoo Linux

In Gentoo you need to configure the options for your kernel module. To do this, you need to create a file in /etc/modules.d/ called "bttv" with something like the following:

options bttv tuner=2 card=34 radio=1 automute=0

tuner and card refers to the tuner and card that is associated with your card, please refer to the CARDLIST documentation listed earlier. radio refers to if your tuner supports FM radio. For a complete list of options that bttv supports, execute the following command:

/sbin/modinfo bttv

Next you need to set up bttv to autoload on bootup, to do this, execute the following command as root:

For kernel 2.4:

echo "bttv" >>/etc/modules.autoload.d/kernel-2.4

For Kernel 2.6:

echo "bttv" >>/etc/modules.autoload.d/kernel-2.6

After doing this, you can go ahead and commit your module changes with the following command:

modules-update

Debian GNU/Linux

In Debian you need to configure the options for your kernel modules, this is done by creating the file /etc/modutils/bttv , and placing the following in it:

options bttv tuner=2 card=34 radio=1 automute=0

tuner and card refers to the tuner and card that is associated with your card, please refer to the CARDLIST documentation listed earlier. radio refers to if your tuner supports FM radio. For a complete list of options that bttv supports, execute the following command:

/sbin/modinfo bttv

Next you need to set up bttv to autoload on bootup, to do this, execute the following command as root:

echo "bttv" >>/etc/modules

After doing this, you can go ahead and commit your module changes with the following command:

update-modules

Inserting the Module

Now, we need to insert the module into the currently running kernel, you can do this with the following command:

modprobe -v bttv

To ensure that this worked, run the "dmesg" and see the output. Make sure you check that the tuner and card was set correctly. The following is an example output of dmesg:

bttv0: using: BT878(Leadtek WinFast 2000/ W) [card=34,autodetected]
i2c-core.o: adapter bt848 #0 registered as adapter 0.
bttv0: using tuner=2
bttv0: i2c: checking for MSP34xx @ 0x80... not found
bttv0: i2c: checking for TDA9875 @ 0xb0... not found
bttv0: i2c: checking for TDA7432 @ 0x8a... not found
i2c-core.o: driver i2c TV tuner driver registered.
tuner: chip found @ 0xc2
tuner: type set to 2 (Philips NTSC (FI1236,FM1236 and compatibles))
i2c-core.o: client [Philips NTSC (FI1236,FM1236 and] registered to adapter [bt848 #0](pos. 0).
bttv0: PLL: 28636363 => 35468950 .. ok
bttv0: registered device video0
bttv0: registered device vbi0
bttv0: registered device radio0
tuner: TV freq (268435455.93) out of range (44-958)
tuner: TV freq (268435455.93) out of range (44-958)
bttv0: PLL can sleep, using XTAL (28636363).
tuner: TV freq (268435455.93) out of range (44-958)
bttv0: PLL: 28636363 => 35468950 .. ok

If you see something like this and it looks like everything checks out, then you're good. If not, remove the module again with "rmmod bttv" "rmmod tuner" and try specifying your options on the command line itself. ex. "modprobe -v bttv tuner=2 card=34".

Testing the Driver

In my opinion, TVtime is the best tv program available for Linux for many reasons, so, I would advise testing your new configuration with this program. After running tvtime, it should work, if you have any problems, please visit our forums for help.