bttv - BT848 frame grabber driver 0.3

    Copyright (C) 1996,97 Ralph Metzler  (
                        & Marcus Metzler (

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

This driver is solely based on a Bt848 manual and Philips data sheets for the 
various chips of the tuner. (No "NDAed" code, no reverse engineering)
Except for the tuner and videotext code it should work on any card using
the Bt848. 
The following cards (AFAIK) use a Bt848:
Miro PCTV, Hauppauge Win/TV pci, STB PCI TV, Intel Smart Video III and
the Diamond DTV2000.

The only differences between the cards are the types of tuners used and 
extra components on the boards.
E.g., the Hauppauge cards (at least the German version 405) have an additional
Videotext decoder chip, while the Miro product will have to do this in
On the other hand, the Miro cards have both crystals (for NTSC AND PAL) and
an S-VHS input on board. 

Starting with version 0.3 you can use several cards at the same time.
I tested this with a Miro PCTV and a Hauppauge Win/TV pci (304) in an 
ASUS P6NP5. IRQs can be shared.
The (arbitrary) maximum number of cards is 4 but can be adjusted by
changing BTTV_MAX at the beginning of bttv.c if you need more.
(But which board has more than 4 slots plus 1 for the VGA card?)

This is still a test version and might crash your computer! 
Use it at your own risk!
Only kernel versions 2.0.x and 2.1.x are supported.
If you use 2.1.x then 2.1.16 with modutils 2.1.13 is a good start.
Due to the massive changes to the modules code later 2.1.x might not work.
E.g., I have problems with 2.1.28... 
Of the 2.0.x kernels I only tested 2.0.28 and newer. 
If you have to upgrade anyway I recommend using kernel 2.0.30.

I will not support older kernels. If you upgrade your system to a 2.x.x
kernel you might also have to get new module utilities, a
new libc, etc.
Read the file linux/Documentation/Changes in the kernel sources for details.

Support for the videotext decoder chip SAA5246 on Hauppauge Win/TV cards
to work over the I2C interface of the Bt848 with the videotext package by
Martin Buck is included in the vtx-driver sub-directory and in the 
newer versions of the videotext package.
(The videotext decoder chip is not included on the WinCast/TV card or 
AFAIK other non-Hauppauge cards. )
You can get the videotext package at sunsite in:
Software decoding of the videotext signal is not supported yet by bttv.

Matrox Millennium/Mystique, S3 and some other cards are supported and tested
to work.
Support for other cards will be added if there are volunteers for testing
or somebody sends me detailed information about the card or a test card.
If you test this with S3 cards, install the wintv module AFTER starting X11
for the first time!!!
Since X11 checks for 64MB alignment of the videomem it might
remap it and wintv would write into the wrong memory (actually into 
non-existing memory ...).
There might be even more problems with S3 cards. Read the file PROBLEMS
for details.

The driver is tested by myself with Accelerated X 3.1 and XFree 3.2(A)
on a Matrox Millennium.
Older XFree versions seem to be a problem with some S3 cards (see PROBLEMS).

Some preliminary code for grabbing into memory is now included.
Some drivers (e.g. Matrox Meteor) reserve a large memory chunk at boot time
for grabbing into and let user programs mmap() it.
Since the Bt848 can write each pixel (or even parts of pixels) to a different
memory location, I actually don't need one continuous chunk of memory.
The picture can be scatter-written directly into the 4Kb pages of user

Send questions regarding the driver to 
and questions regarding xtvscreen to

But please first check if you have the latest version of bttv.
You can always find it at: