GNU.WIKI: The GNU/Linux Knowledge Base

  [HOME] [HowTo] [ABS] [MAN1] [MAN2] [MAN3] [MAN4] [MAN5] [MAN6] [MAN7] [MAN8] [MAN9]



Howard Shane

Revision History                                                             
Revision 0.9           2005-01-29            Revised by: jhs                 
Initial rewrite                                                              

This document was written to assist the reader in the steps necessary to
configure and use a video tuner card based on the popular Bt848 and Bt878
chipsets within the Linux operating system.

Table of Contents
1. Introduction
    1.1. Copyright Information
    1.2. Disclaimer
    1.3. New Versions
    1.4. Credits
    1.5. Feedback
    1.6. Conventions Used in this Document
2. The BTTV Hardware
    2.1. Bttv Basics
    2.2. The Sound Output
3. Enabling Support for Your Bt8x8 Hardware in Linux
    3.1. The Bttv Driver
    3.2. No Bttv module or in-kernel support found?
    3.3. Configuration Requirements for Use of your Bttv Hardware
    3.4. Groups and Permissions
4. Loading the Modules
    4.1. The Bttv Module
    4.2. The Tuner Module
    4.3. Other Modules
    4.4. Automating the Module Loading Process
5. Television Applications
    5.1. Console-Based Applications
    5.2. GUI-based Applications
A. Optional Arguments for Loading Modules
B. Bt8x8 Cards by Number
C. Cards and Features by Manufacturer
D. Recording Video and Sound with Bttv
E. Enabling The FM Radio for Radio-Equipped Cards
F. Gnu Free Documentation License

1. Introduction

This document was written to assist the reader in setting up and configuring
TV tuner cards based on the Bt848 or Bt878 chipsets in the Linux operating
system. It outlines how to enable the necessary kernel and/or software
support and various television applications and software methods of capture
usable with your device. While there is some attempt to catalog individual
cards and features in Appendix C, the ultimate best source of information
about your card and its capabilities will be found in the printed manual that
came with your device or the manufacturer's website.

1.1. Copyright Information

This document is Copyright 2005, by Howard Shane.

Permission is granted to copy, distribute, and/or modify this document under
the terms of the GNU Free Documentation License, Version 1.2 or any later
version published by the Free Software Foundation with no Invariant Sections,
no Front-Cover Texts, and no Back-Cover Texts. A copy of the license can be
found in Appendix F.

1.2. Disclaimer

No liability for the contents of this document can be accepted. Use the
concepts, examples and other content entirely at your own risk. There may be
technical or other inaccuracies that may result in the loss of irreplaceable
data. In any case, proceed with caution, and realize that although errors are
unlikely, the author can accept no responsibility for them.

All copyrights are held by their respective owners, unless specifically noted
otherwise. Use of a term in this document should not be regarded as affecting
the validity of any trademark or service mark.

Naming of particular products or brands should not be seen as endorsements.

1.3. New Versions

This is the first release of the initial rewrite.

The latest version number of this document can be found [
HOWTO/BTTV.html] here.

1.4. Credits

Eric Sandeen deserves profuse thanks for writing the original Bttv-HOWTO and
allowing me to assume its maintenance. Thanks also to Greg Watson for use of
the script in Appendix D

Also, I would like to thank Marla, without whose encouragement this project
would not have been possible.

1.5. Feedback

Please send any information you may feel important to the following email
address: <hshane[AT]>, whether you have a correction, addition
or update. I welcome suggestions on how to improve this document.

1.6. Conventions Used in this Document

The following conventions are used in this document and are outlined here for
those who may not yet have a complete understanding of how to access and
control the underlying operating system in Linux, which is usually via the
Bash shell.

First, filenames are referenced in a paragraph like so: /path/file

Commands in Linux are executed (or 'called') at the command prompt, otherwise
known as the 'command line.' If you are in the non-graphical (text-based)
environment, you will usually be presented with the Bash shell prompt which
is a dollar sign:

|   $                                                                       |

...or the hash mark:

|   #                                                                       |

...if you have logged in as root or have otherwise acquired root, or
'superuser' privileges. You can also access the Bash shell in the X window
system, otherwise known as X or X11, with an [
xterm/] xterm or similar X-terminal-emulator. Commands to be performed at the
Bash prompt, but referenced in a paragraph of this document, usually look
like this: do this now

Commands and/or the resulting output of commands may also be outlined with
screen output in their own paragraph or heading:

|   $ date                                                                  |
|   Sun Jul 27 22:37:11 CDT 2003                                            |

When a command is written in front of the Bash prompt (e.g., $ date above),
it is assumed the [Return] or [Enter] key has been pressed after the command,
possibly followed by the output on a new line as shown in the preceding

2. The BTTV Hardware

2.1. Bttv Basics

If you haven't figured it out by now, this document deals with the
Linux-specific configuration of frame grabber cards that include the [http://] Conexant Bt848 and related family of video decoder chips,
collectively referred to as the "Bt8x8" chipset. You can probably see the
Bt8x8 chip (it's usually labelled as such) embedded on your TV card upon
inspection, in addition to other chips which you should probably make note of
before installation in case there are problems later. The "Bt" stands for
Brooktree, after the original manufacturer of the chipset, now a part of
Conexant. The Bt8x8 family has enjoyed remarkable longevity in a world where
[] Moore's Law is the rule, the
first ISA boards manufactured in the mid-1990s. There are several chips in
this family, including the Bt848, Bt848A, Bt849, Bt878 and Bt879, and as a
rule are all supported by the [] BTTV
driver for which this document is named.

In addition to the Bt8x8 decoder chip, these cards vary by accompanying
components such as the tuner and sound decoder, and may include an optional
videotext decoder, radio tuner, and/or hardware mpeg encoder.

Note that the next generation of bt8x8, the [
cx88.html] Conexant 2388x, is now supported by a driver in the Linux 2.6
kernel. The configuration of hardware with that chipset is beyond the scope
of this document (but similar).

In general, any PCI card with a Bt8x8 chipset should work with the Linux Bttv
driver. TV cards known NOT to work include the following:

��*�Cards with a Zoran 36057/36067 PCI controller chipset, which are instead
    supported by [] this driver, and
    includes the following models:
    ��+�Iomega Buz
    ��+�Pinnacle DC10+
    ��+�Linux Media Labs LML33
��*�Cards with a Philips SAA7130/7134 controller
��*�Multimedia eXtension Board cards, manufactured by Siemens-Nixdorf
��*�Hexium HV-PCI6, Orion or Gemini framegrabber cards
��*�Any ISA-based TV card

If you are uncertain which chipset your TV card has, use the lspci command.
An example of such output for a Bt8x8 card might look similar to the
|   0000:02:0a.0 Multimedia video controller: Brooktree Corporation Bt878 Video   |
|      Capture (rev 02)                                                           |
|   0000:02:0a.1 Multimedia controller: Brooktree Corporation Bt878 Audio Capture |
|      (rev 02)                                                                   |

A list of hardware (mostly PCI cards) compatible with the Bttv driver is
found in Appendix B

2.2. The Sound Output

Your card may have come with a short external audio connector with two male
ends. This is for connecting your Bttv audio out to your sound card's input
jack so you won't require an extra set of speakers. Some cards may also have
a 4-pin socket for output of your Bt8x8 audio signals directly to your sound
card within your computer case. You can connect this to your "CDROM" input
with reasonable certainty that you will be able to control the input with
your mixer from your primary sound card as well as record (see Appendix D for
more information on recording). Alternatively you can use external speakers
connected to the line out of your Bt8x8 card.

3. Enabling Support for Your Bt8x8 Hardware in Linux

3.1. The Bttv Driver

Drivers for Bt8x8-based hardware have been a part of the [http://] Linux [
Kernel_%28computer_science%29] kernel since version 2.2.0, and are likely to
be already enabled in your running kernel if you have not recompiled or
otherwise replaced your system's stock kernel with a custom version. If
unavailable, Bt8x8 support can be enabled two ways:

��*�by recompiling your kernel using the source code using downloaded
    kernel-source from your distribution or fetched directly from [http://] the kernel source repository
��*�the Bttv driver can be fetched directly from [
    bttv.html] the Bttv home page and then patching your available kernel
    source, which should only be necessary if you have a kernel version prior
    to 2.2.0 or later than 2.0.35; earlier versions are not likely to work.

3.1.1. Module or In-Kernel?

It is likely the stock kernel that was installed on your Linux system, if
unmodified, already supports Bt8x8-based hardware. The driver will exist
either as a loadable module or within the already running kernel. An easy way
to tell is to use the dmesg command piped into less (for easy viewing) to
look for an acknowledgement that the driver in question was loaded when your
system started up:

|   $ dmesg | less                                                          |

...which may yield something like the following, depending on your exact
Bt8x8 chipset features and kernel version (in this case, 2.6):

|   Jan 26 19:40:04 localhost kernel: bttv: driver version 0.9.15 loaded         |
|   Jan 26 19:40:04 localhost kernel: bttv: using 8 buffers with 2080k           |
|      (520 pages) each for capture                                              |
|   Jan 26 19:40:04 localhost kernel: bttv: Bt8xx card found (0).                |
|   Jan 26 19:40:04 localhost kernel: ACPI: PCI interrupt 0000:02:09.0[A] ->     |
|      GSI 17 (level, low) -> IRQ 17                                             |
|   Jan 26 19:40:04 localhost kernel: bttv0: Bt878 (rev 2) at 0000:02:09.0,      |
|      irq: 17, latency: 32, mmio: 0xe7000000                                    |
|   Jan 26 19:40:04 localhost kernel: bttv0: detected: Hauppauge WinTV           |
|      [card=10], PCI subsystem ID is 0070:13eb                                  |
|   Jan 26 19:40:04 localhost kernel: bttv0: using: Hauppauge (bt878) [card=10,  |
|      autodetected]                                                             |
|   Jan 26 19:40:04 localhost kernel: bttv0: using tuner=2                       |
|   Jan 26 19:40:04 localhost kernel: tuner: chip found at addr 0xc2 i2c-bus     |
|      bt878 #0 [sw]                                                             |
|   Jan 26 19:40:04 localhost kernel: tuner: type set to 2 (Philips NTSC         |
|      (FI1236, FM1236 and compatibles)) by bt878 #0 [sw]                        |

If you don't see it, the particular driver module you are interested in may
be available but not necessarily loaded at that time. If you know what the
module is named, try using find; in this example we are looking for the
'bttv' module:

|   $ find /lib/modules -name bttv.o                                        |

Note that up until the 2.4 series modules had the suffix .o; for 2.6+ series
kernels this was replaced with .ko.

You can get a list of all modules available by typing the following at the
command line:

|                                                                           |
|   $ ls -R /lib/modules/`uname -r`/kernel                                  |

Where `uname -r`, surrounded by forward tick marks, is your kernel version
number. The following output is an example of what you might find in a
Bttv-ready kernel, where everything is loaded as a module (edited for

|   /lib/modules/2.6.8/kernel/drivers/media/video:                           |
|    btcx-risc.ko    ir-kbd-i2c.ko  tda9875.ko  tvaudio.ko      video-buf.ko |
|    bttv.ko         msp3400.ko     tda9887.ko  v4l1-compat.ko  videodev.ko  |
|    ir-kbd-gpio.ko  tda7432.ko     tuner.ko    v4l2-common.ko               |

Again, your output may vary by the currently running kernel capabilities.

Once you know which module your hardware needs you can find out if it is
already loaded by typing at the command line or in a terminal window:

|   # lsmod                                                                 |

As shown by the prompt above, you will need to have root privileges to do
this. You should get output similar to, but not necessarily limited to the

|   snd_bt87x              11400  0                                         |
|   tuner                  18832  0                                         |
|   tvaudio                20428  0                                         |
|   msp3400                22100  0                                         |
|   bttv                  145804  0                                         |
|   video_buf              17476  1 bttv                                    |
|   i2c_algo_bit            8904  1 bttv                                    |
|   v4l2_common             4928  1 bttv                                    |
|   videodev                7232  2 quickcam,bttv                           |

Most stock kernels are compiled with kmod, which enables automatic loading of
necessary modules when the appropriate hardware is detected. It may not
always do so, however, so if you don't have the particular module you're
seeking loaded and you think the module may be available, try loading it
manually with modprobe, as in the following example (using the bttv module):

|   # modprobe -v bttv                                                      |

3.2. No Bttv module or in-kernel support found?

If your running kernel or precompiled distribution kernel inexplicably
doesn't have Bt8x8 support enabled or available, your can always acquire new
kernel source code from the Linux [] source
code repository. If you are unfamiliar with the prerequisites and procedure
of compiling your own kernel, I direct you to the [
Kernel-HOWTO.html] Kernel HOWTO for more information.

If you do recompile, the Bttv driver itself will obviously need to be
enabled, and is found in the heading entitled "Multimedia Devices" -> "Video
for Linux" in the 2.4 and earlier kernels in menuconfig or xconfig, or
alternatively in "Device Drivers" -> "Multimedia Devices" -> "Video for
Linux" -> "BT848 Video For Linux" in the 2.6+ series.

Note You will need i2c subsystem support enabled as well as i2c-algo-bit.    

Device support (i2c-dev) is not required for Bt8x8 support. Earlier than
kernel version 2.3.34 i2c is not present in the kernel source and a patch
must be fetched and applied to your source, found at the [http://] lm_sensors homepage.

If you are running a 2.4 series kernel, btaudio in the OSS "Sound" category
is optional if you want to use external speakers attached to the the card's
audio out jack, and either (or both) OSS or ALSA sound system btaudio drivers
in the 2.6+ series.

3.3. Configuration Requirements for Use of your Bttv Hardware

Once you know your kernel is enabled you can proceed to some minor tuning
that may already be done for you depending on your system and distributor and
distribution features.

3.3.1. Device Files

If you are using [
devfs.html] Device Filesystem (devfs) or [
utils/kernel/hotplug/udev.html] udev your work in this respect may be done
for you dynamically, but at the same time the devices may not exist until
they are recognized by the kernel (i.e., the necessary modules loaded), so be
sure you have taken care of the previously outlined prerequisites first.

The Linux kernel requires a virtual device node be created to access and
control a particular piece of hardware. This node may have already been
created for you automatically; ls -l /dev/video* (with an asterisk) or
alternatively find /dev -name video* or even visual inspection of the /dev
directory with your favorite file manager can give you an idea if the video
devices exist. If so you can proceed to Section 3.4; if not you will need to
create them manually.

An easy way to create them, if available with your Linux distribution, is use
of the MAKEDEV script, which may be located in /dev or the usual places for
storing executable commands (/bin,/sbin and so on). The manual page for
MAKEDEV (man MAKEDEV) can guide you further, but be aware of the
device-specific command options. If MAKEDEV doesn't work or doesn't exist, or
you just prefer doing things the hard way, move on to the next paragraph.

A device can be created as a block (such as a drive), a FIFO
(file-in-file-out or pipe, as in xconsole) or a character device, which
represents other hardware. Each device has a major and a minor number 
"coordinate" to tell the kernel what it is and where to access it. These
numbers are not arbitrary. The major number 81 with minor number 0, 1, 2, and
so on are by convention assigned to Video4linux devices, including TV tuner
boards and webcams. In order to create the video device /dev/video0, use 
mknod at the command line:

|   # mknod /dev/video0 c 81 0                                              |

where c represents a character device.

 You can use the following script, which I have borrowed from the kernel
source (located in linux/Documentation/video4linux/bttv/MAKEDEV of the source

|   #!/bin/bash                                                             |
|   function makedev () {                                                   |
|        for dev in 0 1 2 3; do echo "/dev/$1$dev:                          |
|        char 81 $[ $2 + $dev ]" rm -f /dev/$1$dev                          |
|        mknod /dev/$1$dev c 81 $[ $2 + $dev ] chmod                        |
|        666 /dev/$1$dev                                                    |
|        done                                                               |
|                                                                           |
|        # symlink for default device                                       |
|        rm -f /dev/$1 ln -s /dev/${1}0 /dev/$1                             |
|        }                                                                  |
|                                                                           |
|        # see          |
|        echo "*** new device names ***" makedev video                      |
|        0 makedev radio 64 makedev vtx 192 makedev vbi 224                 |
|        # "*** old device names (for compatibility only) ***"              |
|        #makedev bttv 0 #makedev bttv-fm 64 #makedev bttv-vbi 224          |

Simply copy and paste the above into your favorite editing program, save it
as MAKEDEV or whatever name you like, make it executable (i.e., chmod u+x
MAKEDEV), and then execute it as root:

|   # ./MAKEDEV                                                             |

3.4. Groups and Permissions

It is a good idea to be sure that your user account can access the device
once all modules are loaded and device nodes created. The most
security-conscious way to do that is to add access for a particular group. On
my system, the members of the group 'video' are allowed to use the webcam,
scanner and other photographic devices. The way to accomplish this is to
first change the ownership of the devices in /dev like so (as root):

|   # chown /dev/usb/video*                                      |

...where are the owner and group the device will now belong to.
Obviously, the specific command will vary by your system and the type of
device. It is important that you change the ownership of the device node
itself and not the symlink; symlinks' ownerships are affected only by
changing the parent devices or files they point to.

To see if your user account is a member of the group in question, as root
issue the following command:
|   # grep -e video /etc/group                                              |
You should see something like the following:

|   video:x:44:                                                             |

...where '44' is the group number. Since no members follow the last colon in
the 'video' group, we can add them, let's say user 'jhs' with the command

|   # adduser jhs  video                                                    |

After this, it's simply a matter of allowing read and write access for the
user in question of the device like so:

|   # chmod g+rw /dev/v4l/video0                                            |

...where g+rw means add read and write access for group. See the
documentation for chmod (man chmod or info chmod) for further info.

4. Loading the Modules

This section is only for those whose modules don't load automatically and/or
correctly. For a complete list of options by module, see Appendix A.

4.1. The Bttv Module

Once your card is installed, you can load the bttv module if your kernel
hasn't already done it for you. Using the modprobe command as root, type
|   # modprobe bttv                                                         |
The modules videodev and i2c may be required prior to this if you are running
a pre-2.4 series kernel. By default, the bttv will try to autodetect your
card type; you can inspect /var/log/messages to see what it finds. If it
doesn't autodetect properly, you can add the card=# option to the end of the
previous command to force a your particular card type, a list of which are
found in Appendix B or on your system in your kernel source Documentation if
installed in the usual place (/usr/src/linux. If you get in trouble and need
to remove the module, you can use rmmod:
|   $ rmmod bttv                                                            |
You can then reload the module with the appropriate options.

4.2. The Tuner Module

If necessary, load the tuner module, with
|   # modprobe tuner                                                        |
If the tuner is not correctly identified you may need to supply the magic
number for tuner-type:
|   # modprobe tuner type=#                                                 |

You may need to dig into your case to see which tuner you have if you can't
find the maker and model in the printed specifications that came with your
hardware, or if this information is otherwise unavailable. It should be
marked with the brand name and may support one or more of the three major
broadcast standards in use in the world, whether [
wiki/NTSC] NTSC, [] PAL or [http://] SECAM. In general, chipsets manufactured for the
US market are NTSC; for Europe, PAL, and Asia PAL or SECAM. Some countries
support more than one standard.

Once you have identified your tuner, select the value of n from the following

���tuner=n��������type of tuner chip


4.3. Other Modules

Don't forget to load any other modules you may need, including btaudio if you
plan on recording or capturing audio to another application.

4.4. Automating the Module Loading Process

After you know which modules and options you need, you can automate the
process by putting the information into /etc/conf.modules or /etc/
modules.conf, depending on your distribution. Then, running an application
which needs the driver will cause it to be loaded automatically with the
appropriate options. The following is an example entry:
| # 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                                            |

5. Television Applications

Now that your kernel is configured, your devices have been configured, and
your modules are inserted, you will also need an application to actually view
or capture the images from your card.


5.1. Console-Based Applications

5.1.1. FbTV

Fbtv is a console-only mode TV viewing program available for viewing on a
framebuffer-video enabled system with a Bt8x8 card. If you don't know what a
framebuffer is you can read the [
Framebuffer-HOWTO.html] Framebuffer HOWTO. Fbtv is available from the Bttv
homepage with [] Xawtv.

5.1.2. AATV

[] AATV is a simple program to watch TV on a text
console under Linux using aalib and a Bt8x8 card. While the graphics are
enabled in ascii graphics only, the advantage is that you (or anyone) can
watch television from anywhere over the internet using your local Bt8x8

5.2. GUI-based Applications

The following applications require a graphical user interface such as GNOME,
KDE etc.

5.2.1. Xawtv

[] Xawtv is arguably the best-known Linux
application used for viewing TV from video sources including Bt8x8 devices;
most Linux distributions have packaged versions. If you're not sure of your
device configuration you probably ought to start with Xawtv and the -hwscan
option to check for suitable devices:
| $ xawtv -hwscan                                                           |
| This is xawtv-3.94, running on Linux/i686 (2.6.8)                         |
| looking for available devices                                             |
| port 139-139                                                              |
|     type : Xvideo, image scaler                                           |
|     name : NV17 Video Overlay                                             |
|                                                                           |
| port 140-140                                                              |
|     type : Xvideo, image scaler                                           |
|     name : NV17 Video Texture                                             |
|                                                                           |
| port 141-172                                                              |
|     type : Xvideo, image scaler                                           |
|     name : NV05 Video Blitter                                             |
|                                                                           |
| port 173-173                            [ -xvport 173 ]                   |
|     type : Xvideo, video overlay                                          |
|     name : NVIDIA Video Interface Port                                    |
|                                                                           |
| /dev/video0: OK                         [ -device /dev/video0 ]           |
|     type : v4l2                                                           |
|     name : BT878 video (Hauppauge (bt878))                                |
|     flags: overlay capture tuner                                          |
Now that you know your Bt8x8 device is available, try starting Xawtv:
|   $ xawtv -device /dev/video0                                             |
|                                                                           |
Note that some Nvidia cards may confuse xawtv, so if you have one of these be
sure to use the -device switch as above.

5.2.2. Motv

Motv is a Motif-based rewrite of Xawtv. Other than a more attractive
interface, and is also found at [] the Xawtv homepage.
It is otherwise identical to Xawtv.

5.2.3. TVtime

TVtime is the ultimate application for those who want to watch TV using an
application that doesn't get in the way and requires little or no
configuration 'out of the box.' The homepage can be found at [http://] the sourceforge TVtime homepage.

A. Optional Arguments for Loading Modules





������vidmem=base frame�buffer�address�over�20�(of�
������radio=0/1 card�supports�radio














������type=n�type�of�the�tuner�chip.�n�as�seen�in�Section 4



B. Bt8x8 Cards by Number

These are the option numbers for cards for use with modprobe.This does not
boast to be a complete list by any means; it is copied nearly verbatim from
the kernel source documentation for bttv. If your card is not listed it may
or may not be supported depending on the chipset and accompanying components
with which it is constructed.

�card=n��������card type


C. Cards and Features by Manufacturer


















������LR136 �=�Flyvideo�2100/3100�(Low�profile,�SAA7130/SAA7134)





























���M108-B������Bt848���������������������--�����FR1236 �US���(2),(3)








���Terra�TValue�New�Revision ��"LR102�Rec.C"














���WinDVR =�Kworld�"KW-TVL878RF"�































































D. Recording Video and Sound with Bttv

In addition to the applications referenced in Section 5, recording can be
managed from the command line. The issues discussed here with regard to sound
capture deal only with the default kernel-2.6 and higher sound system: the
[] Advanced Linux Sound Architecture.

The easy part is grabbing the video, for which we will use streamer,
available with the [] Xawtv suite. Sound is
another matter, however. You will need to access your mixer settings using 
amixer, the ALSA command-line mixer that should be available in the
ALSA-tools package available from your Linux distributor. See man amixer to
follow the command line options.

Your recording can be managed either using your primary soundcard if you have
your Bt8x8 audio output connected to a mixer conduit that allows for capture
(e.g. the 4-pin analog CDROM input slot), or the Bt8x8 card itself using the 
btaudio module. The following steps utilize the latter. First, identify the
individual cards on your system (requires /proc filesystem):
|   $ cat /proc/asound/pcm                                                  |
|   00-00: Intel ICH : NVidia CK8S : playback 1 : capture 1                 |
|   00-01: Intel ICH - MIC ADC : NVidia CK8S - MIC ADC : capture 1          |
|   00-02: Intel ICH - IEC958 : NVidia CK8S - IEC958 : playback 1           |
|   01-00: Bt87x Digital : Bt87x Digital : capture 1                        |
|   01-01: Bt87x Analog : Bt87x Analog : capture 1                          |
The first column indicates the system numbering of your available sound
devices, i.e., card 0 is the soundcard and card 01, or 1, is the Bt8x8.

Next, identify the mixer controls for the Bt8x8 card.
|   $ amixer -c 1 controls                                                  |
|   numid=3,iface=MIXER,name='Capture Source'                               |
|   numid=2,iface=MIXER,name='Capture Boost'                                |
|   numid=1,iface=MIXER,name='Capture Volume'                               |
Then identify the item settings of each:
|   $ amixer -c 1 cget name='Capture Source'                                |
|   numid=3,iface=MIXER,name='Capture Source'                               |
|   ; type=ENUMERATED,access=rw---,values=1,items=3                         |
|   ; Item #0 'TV Tuner'                                                    |
|   ; Item #1 'FM'                                                          |
|   ; Item #2 'Mic/Line'                                                    |
|   : values=1                                                              |
|                                                                           |
|   $ amixer -c 1 cget name='Capture Boost'                                 |
|   numid=2,iface=MIXER,name='Capture Boost'                                |
|   ; type=BOOLEAN,access=rw---,values=1                                    |
|   values=on                                                               |
|                                                                           |
|   $ amixer -c 1 cget name='Capture Volume'                                |
|   numid=1,iface=MIXER,name='Capture Volume'                               |
|   ; type=INTEGER,access=rw---,values=1,min=0,max=15,step=0                |
|   : values=0                                                              |
Use cset for the capture source:
|   $ amixer -c 1 cset name='Capture Source' 0                              |
...and to set the volume:
|   $ amixer -c 1 cset name="Capture Volume' 15                             |
...and you should be ready.

Now try to record something:
|   $ streamer -p 4 -t 1:00 -r 24 -q -o test.avi -j 90 -f mjpeg -F mono16   |
...and you should be recording a sound-enabled avi file. Press [Ctrl]-C to
cancel early. Next step is to automate the recording for your very own
home-brewed Tivo??!

I offer the following script as an example program for automating recording;
you can copy and paste it into a file and make it executable (chmod u+x

Warning This script (and any recording from your Bttv device for that matter)
        generates extremely large files, on the order of several GB per hour,
        so be sure you have lots of free disk space available.               

| #!/bin/bash                                                                                               |
| # =================  ============================                                            |
| # = copyright 2003 by Greg Watson   =                                            |
| # = GPL2 License, minor modifications by Howard Shane        =                                            |
| # = , under same license               =                                            |
| # = usage prefix-filename record-time channel   =                                            |
| # = Example:  ./ enterprise 61:00 20             =                                            |
| # ============================================================                                            |
| # Version 0.9                                                                                             |
| # Last Mod: Wed Feb 20 11:27 CST 2005                                                                     |
|                                                                                                           |
| # Output directory                                                                                        |
| OUTPUT=$HOME/vcr                                                                                          |
| # Streamer location                                                                                       |
| STREAMER=/usr/bin/streamer                                                                                |
| # Alsa Mixer                                                                                              |
| AMIXER=/usr/bin/amixer                                                                                    |
| # v4lctl path                                                                                             |
| V4LCTL=/usr/bin/v4lctl                                                                                    |
| # Capture Volume to ensure sound is recorded (80%)                                                        |
| CAPTURE_VOLUME=100                                                                                        |
|                                                                                                           |
| # Tvtime settings file for color/brightness/contrast values                                               |
| TVTIME=$HOME/.tvtime/tvtime.xml                                                                           |
|                                                                                                           |
| # End of Config                                                                                           |
| ###############                                                                                           |
|                                                                                                           |
| # check if I'm running TV, if so just exit                                                                |
| if [ `ps -C tvtime | grep -c tvtime` -gt 0 ]; then                                                        |
|         echo "TVtime is running, aborting recording."                                                     |
|         exit                                                                                              |
| fi                                                                                                        |
|                                                                                                           |
| # If the filename prefix wasn't given, set it to 'recording'                                              |
| if [ -z $1 ]; then                                                                                        |
|         PREFIX="recording"                                                                                |
| else                                                                                                      |
|         PREFIX=$1                                                                                         |
| fi                                                                                                        |
|                                                                                                           |
| # if time is blank, record for 30 minutes                                                                 |
| if [ -z $2 ]; then                                                                                        |
|         TIME="30:00"                                                                                      |
| else                                                                                                      |
|         TIME=$2                                                                                           |
| fi                                                                                                        |
|                                                                                                           |
| if [ ! -z $3 ]; then                                                                                      |
|         $V4LCTL setchannel $3                                                                             |
| fi                                                                                                        |
|                                                                                                           |
| # Check for vcr dir                                                                                       |
| if [ ! -x $OUTPUT ]; then                                                                                 |
|         mkdir $OUTPUT                                                                                     |
| fi                                                                                                        |
|                                                                                                           |
| DATE=`date +%m-%d-%Y-%H:%M`                                                                               |
|                                                                                                           |
| # Set the AC97 volume to 0 (so we don't hear the sounds)                                                  |
| # Get mixer values first                                                                                  |
| PLAY_VOL=`$AMIXER -c 0 cget name='Master Playback Volume' | grep : | sed 's/^.*=\([^,]*\).*$/\1/'`        |
| CAP_VOL=`$AMIXER -c 0 cget name='PCM Playback Volume' | grep : | sed 's/^.*=\([^,]*\).*$/\1/'`            |
| #                                                                                                         |
| $AMIXER -c 0 -q cset name='CD Playback Volume' 100                                                        |
| $AMIXER -c 0 -q cset name='Capture Volume' 1                                                              |
|                                                                                                           |
| # if tvtime.xml is set, then grab settings out of it                                                      |
| if [ -f $TVTIME ]; then                                                                                   |
|         CONTRAST=`cat ${TVTIME} | grep DefaultContrast | sed 's/^.*value="\([^"]*\).*$/\1/'`              |
|         BRIGHTNESS=`cat ${TVTIME} | grep DefaultBrightness | sed 's/^.*value="\([^"]*\).*$/\1/'`          |
|         COLOR=`cat ${TVTIME} | grep DefaultColour | sed 's/^.*value="\([^"]*\).*$/\1/'`                   |
|         HUE=`cat ${TVTIME} | grep DefaultHue | sed 's/^.*value="\([^"]*\).*$/\1/'`                        |
|                                                                                                           |
|         $V4LCTL bright ${BRIGHTNESS}% color ${COLOR}% contrast ${CONTRAST}% hue ${HUE}%                   |
| fi                                                                                                        |
|                                                                                                           |
| $STREAMER -p 4 -q -t ${TIME} -r 24 -q -o ${OUTPUT}/${PREFIX}-${DATE}-${TIME}.avi -j 90 -f mjpeg -F mono16 |
|                                                                                                           |
| # Sometimes streamer doesn't always re-mute audio, mute it again just to be sure                          |
| $V4LCTL volume mute on                                                                                    |
|                                                                                                           |
| # Restore volumes                                                                                         |
| $AMIXER -q cset name='Master Playback Volume' $PLAY_VOL                                                   |
| $AMIXER -q cset name='PCM Playback Volume' $CAP_VOL                                                       |
| #                                                                                                         |
| # EOF                                                                                                     |
|                                                                                                           |

E. Enabling The FM Radio for Radio-Equipped Cards

FM radio tuners are easily enabled when inserting modules. Simply
|   $ modprobe bttv radio=1                                                 |
...or add a similar option to your /etc/modules.conf and you should be set
the next time you restart or load the module. You will also need an
application to access the radio. I suggest the console based radio, available
with the [] Xawtv suite, or [http://] fmtools. For graphical programs, try [http://] gnomeradio or []
gradio or [] xmms with the [
xmms-FMRadio/] FMRadio plug-in.

Also, you can't listen to radio at the same time as watching TV with your
Bttv card (unless you have more than one card, that is).

F. Gnu Free Documentation License

Version 1.2, November 2002

Copyright (C) 2000,2001,2002 Free Software Foundation, Inc. 59 Temple Place,
Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and
distribute verbatim copies of this license document but changing it is not


The purpose of this License is to make a manual, textbook, or other
functional and useful document "free" in the sense of freedom: to assure
everyone the effective freedom to copy and redistribute it, with or without
modifying it, either commercially or noncommercially. Secondarily, this
License preserves for the author and publisher a way to get credit for their
work, while not being considered responsible for modifications made by

This License is a kind of "copyleft", which means that derivative works of
the document must themselves be free in the same sense. It complements the
GNU General Public License, which is a copyleft cense designed for free

We have designed this License in order to use it for manuals for free
software, because free software needs free documentation: a free program
should come with manuals providing the same freedoms that the software does.
But this License is not limited to software manuals; it can be used for any
textual work, regardless of subject matter or whether it is published as a
printed book. We recommend this License principally for works in which its
purpose is instruction or reference.


This License applies to any manual or other work, in any medium, that
contains a notice placed by the copyright holder saying it can be distributed
under the terms of this License. Such a notice grants a world-wide,
royalty-free license, unlimited in duration, to use that work under the
conditions stated herein. The "Document", below, refers to any such manual or
work. Any member of the public is a licensee and is addressed as "you". You
accept the license if you copy, modify, or distribute the work in a way, thus
requiring permission under copyright law.

A "Modified Version" of the Document means any work containing the Document
or a portion of it, either copied verbatim, or with modifications and/or
translated into another language.

A "Secondary Section" is a named appendix or a front-matter section of the
Document that deals exclusively with the relationship of the publishers or
authors of the Document to the Document's overall subject (or to related
matters) and contains nothing that could fall directly within that overall
subject. (Thus, if the Document is in part a textbook of mathematics, a
Secondary Section may not explain any mathematics.) The relationship could be
a matter of historical connection with the subject or with related matters,
or of legal, commercial, philosophical, ethical, or political position
regarding them.

The "Invariant Sections" are certain Secondary Sections in which titles are
designated, as being those of Invariant Sections, in the notice that says
that the Document is released under this License. If a section does not fit
the above definition of Secondary, then it is not allowed to be designated as
Invariant. The Document may contain zero Invariant Sections. If the Document
does not identify any Invariant Sections, then there are none.

The "Cover Texts" are certain short passages of text that are listed, as
Front-Cover Texts or Back-Cover Texts, in the notice that says that the
Document is released under this License. A Front-Cover Text may be at most
five words, and a Back-Cover Text may be at most 25 words.

A "Transparent" copy of the Document means a machine-readable copy,
represented in a format where its specification is available to the general
public, that is suitable for revising the document straightforwardly with
generic text editors or (for images composed of pixels) generic paint
programs or (for drawings) some widely available drawing editor, and that is
suitable for input to text formatters or for automatic translation to a
variety of formats suitable for input to text formatters. A copy made in an
otherwise Transparent file format in which its markup, or absence of markup,
has been arranged to thwart or discourage subsequent modification by readers
is not Transparent. An image format is not Transparent if used for any
substantial amount of text. A copy that is not "Transparent" is called

Examples of suitable formats for Transparent copies include plain ASCII
without markup, Texinfo input format, LaTeX input format, SGML or XML using a
publicly available DTD, and standard-conforming simple HTML, PostScript or
PDF designed for human modification. Examples of transparent image formats
include PNG, XCF, and JPG. Opaque formats include proprietary formats that
can be read and edited only by proprietary word processors, SGML or XML for
which the DTD and/or processing tools are not generally available, and the
machine-generated HTML, PostScript or PDF produced by some word processors
for output purposes only.

The "Title Page" means, for a printed book, the title page itself, plus such
following pages as are needed to hold, legibly, the material this License
requires to appear in the title page. For works in formats, which do not have
any title page as such, "Title Page" means the text near the most prominent
appearance of the work's title, preceding the beginning of the body of the

A section "Entitled XYZ" means a named subunit of the Document in which its
title either is precisely XYZ or contains XYZ in parentheses following text
that translates XYZ in another language. (Here XYZ stands for a specific
section name mentioned below, such as "Acknowledgements", "Dedications",
"Endorsements", or "History".) To "Preserve the Title" of such a section,
when you modify the Document, means that it remains a section "Entitled XYZ",
according to this definition.

The Document may include Warranty Disclaimers next to the notice which states
that this License applies to the Document. These Warranty Disclaimers are
considered to be included by reference in this License, but only as regards
disclaiming warranties: any other implication that these Warranty Disclaimers
may have is void and has no effect on the meaning of this License.


You may copy and distribute the Document in any medium, either commercially
or noncommercially, provided that this License, the copyright notices, and
the license notice saying this License applies to the Document are reproduced
in all copies, and that you add no other conditions whatsoever to those of
this License. You may not use technical measures to obstruct or control the
reading or further copying of the copies you make or distribute. However, you
may accept compensation in exchange for copies. If you distribute a large
enough number of copies you must also follow the conditions in section 3.

You may also lend copies, under the same conditions stated above, and you may
publicly display copies.


If you publish printed copies (or copies in media that commonly have printed
covers) of the Document, numbering more than 100, and the Document's license
notice requires Cover Texts, you must enclose the copies in covers that
carry, clearly and legibly, all these Cover Texts: Front-Cover Texts on the
front cover, and Back-Cover Texts on the back cover. Both covers must also
clearly and legibly identify you as the publisher of these copies. The front
cover must present the full title with all words of the title equally
prominent and visible. You may add other material on the covers in addition.
Copying with changes limited to the covers, as long as they preserve the
title of the Document and satisfy these conditions, can be treated as
verbatim copying in other respects.

If the required texts for either cover are too voluminous to fit legibly, you
should put the first ones listed (as many as fit reasonably) on the actual
cover, and continue the rest onto adjacent pages.

If you publish or distribute Opaque copies of the Document numbering more
than 100, you must either include a machine-readable Transparent copy along
with each Opaque copy, or state in or with each Opaque copy a
computer-network location from which the general network-using public has
access to download using public-standard network protocols a complete
Transparent copy of the Document, free of added material. If you use the
latter option, you must take reasonably prudent steps, when you begin
distribution of Opaque copies in quantity, to ensure that this Transparent
copy will remain thus accessible at the stated location until at least one
year after the last time you distribute an Opaque copy (directly or through
your agents or retailers) of that edition to the public.

It is requested, but not required, that you contact the authors of the
Document well before redistributing any large number of copies, to give them
a chance to provide you with an updated version of the Document.


You may copy and distribute a Modified Version of the Document under the
conditions of sections 2 and 3 above, provided that you release the Modified
Version under precisely this License, with the Modified Version filling the
role of the Document, thus licensing distribution and modification of the
Modified Version to whoever possesses a copy of it. In addition, you must do
these things in the Modified Version:

A. Use in the Title Page (and on the covers, if any) a title distinct from
that of the Document, and from those of previous versions (which should, if
there were any, be listed in the History section of the Document). You may
use the same title as a previous version if the original publisher of that
version gives permission.

B. List on the Title Page, as authors, one or more persons or entities
responsible for authorship of the modifications in the Modified Version,
together with at least five of the principal authors of the Document (all of
its principal authors, if it has fewer than five), unless they release you
from this requirement.

C. State on the Title page the name of the publisher of the Modified Version,
as the publisher.

D. Preserve all the copyright notices of the Document.

E. Add an appropriate copyright notice for your modifications adjacent to the
other copyright notices.

F. Include, immediately after the copyright notices, a license notice giving
the public permission to use the Modified Version under the terms of this
License, in the form shown in the Addendum below.

G. Preserve in that license notice the full lists of Invariant Sections and
required Cover Texts given in the Document's license notice.

H. Include an unaltered copy of this License.

I. Preserve the section Entitled "History", Preserve its Title, and add to it
an item stating at least the title, year, new authors, and publisher of the
Modified Version as given on the Title Page. If there is no section Entitled
"History" in the Document, create one stating the title, year, authors, and
publisher of the Document as given on its Title Page, then add an item
describing the Modified Version as stated in the previous sentence.

J. Preserve the network location, if any, given in the Document for public
access to a Transparent copy of the Document and likewise the network
locations given in the Document for previous versions it was based on. These
may be placed in the "History" section. You may omit a network location for a
work that was published at least four years before the Document itself, or if
the original publisher of the version it refers to gives permission.

K. For any section Entitled "Acknowledgements" or "Dedications", Preserve the
Title of the section, and preserve in the section all the substance and tone
of each of the contributor acknowledgements and/or dedications given therein.

L. Preserve all the Invariant Sections of the Document, unaltered in their
text and in their titles. Section numbers or the equivalent are not
considered part of the section titles.

M. Delete any section Entitled "Endorsements". Such a section may not be
included in the Modified Version.

N. Do not retitle any existing section to be Entitled "Endorsements" or to
conflict in title with any Invariant Section.

O. Preserve any Warranty Disclaimers. If the Modified Version includes new
front-matter sections or appendices that qualify as Secondary Sections and
contain no material copied from the Document, you may at your option
designate some or all of these sections as invariant. To do this, add their
titles to the list of Invariant Sections in the Modified Version's license
notice. These titles must be distinct from any other section titles. You may
add a section Entitled "Endorsements", provided it contains nothing but
endorsements of your Modified Version by various parties--for example,
statements of peer review or that the text has been approved by an
organization as the authoritative definition of a standard.

You may add a passage of up to five words as a Front-Cover Text, and a
passage of up to 25 words as a Back-Cover Text, to the end of the list of
Cover Texts in the Modified Version. Only one passage of Front-Cover Text and
one of Back-Cover Text may be added by (or through arrangements made by) any
one entity. If the Document already includes a cover text for the same cover,
previously added by you or by arrangement made by the same entity you are
acting on behalf of, you may not add another; but you may replace the old
one, on explicit permission from the previous publisher that added the old

The author(s) and publisher(s) of the Document do not by this License give
permission to use their names for publicity for or to assert or imply
endorsement of any Modified Version.


You may combine the Document with other documents released under this
License, under the terms defined in section 4 above for modified versions,
provided that you include in the combination all of the Invariant Sections of
all of the original documents, unmodified, and list them all as Invariant
Sections of your combined work in its license notice, and that you preserve
all their Warranty Disclaimers.

The combined work need only contain one copy of this License, and multiple
identical Invariant Sections may be replaced with a single copy. If there are
multiple Invariant Sections with the same name but different contents, make
the title of each such section unique by adding at the end of it, in
parentheses, the name of the original author or publisher of that section if
known, or else a unique number. Make the same adjustment to the section
titles in the list of Invariant Sections in the license notice of the
combined work.

In the combination, you must combine any sections Entitled "History" in the
various original documents, forming one section Entitled "History"; likewise
combine any sections Entitled "Acknowledgements", and any sections Entitled
"Dedications". You must delete all sections Entitled "Endorsements".


You may make a collection consisting of the Document and other documents
released under this License, and replace the individual copies of this
License in the various documents with a single copy that is included in the
collection, provided that you follow the rules of this License for verbatim
copying of each of the documents in all other respects.

You may extract a single document from such a collection and distribute it
individually under this License, provided you insert a copy of this License
into the extracted document and follow this License in all other respects
regarding verbatim copying of that document.


A compilation of the Document or its derivatives with other separate and
independent documents or works, in or on a volume of a storage or
distribution medium, is called an "aggregate" if the copyright resulting from
the compilation is not used to limit the legal rights of the compilation's
users beyond what the individual works permit. When the Document is included
in an aggregate, this License does not apply to the other works in the
aggregate which are not themselves derivative works of the Document.

If the Cover Text requirement of section 3 is applicable to these copies of
the Document, then if the Document is less than one half of the entire
aggregate, the Document's Cover Texts may be placed on covers that bracket
the Document within the aggregate, or the electronic equivalent of covers if
the Document is in electronic form. Otherwise, they must appear on printed
covers that bracket the whole aggregate.


Translation is considered a kind of modification, so you may distribute
translations of the Document under the terms of section 4. Replacing
Invariant Sections with translations requires special permission from their
copyright holders, but you may include translations of some or all Invariant
Sections in addition to the original versions of these Invariant Sections.
You may include a translation of this License, and all the license notices in
the Document, and any Warranty Disclaimers, provided that you also include
the original English version of this License and the original versions of
those notices and disclaimers. In case of a disagreement between the
translation and the original version of this License or a notice or
disclaimer, the original version will prevail.

If a section in the Document is Entitled "Acknowledgements", "Dedications",
or "History", the requirement (section 4) to Preserve its Title (section 1)
will typically require changing the actual title.


You may not copy, modify, sublicense, or distribute the Document except as
expressly provided for under this License. Any other attempt to copy, modify,
sublicense, or distribute the Document is void and will automatically
terminate your rights under this License. However, parties who have received
copies, or rights, from you under this License will not have their licenses
terminated so long as such parties remain in full compliance.


The Free Software Foundation may publish new, revised versions of the GNU
Free Documentation License from time to time. Such new versions will be
similar in spirit to the present version but may differ in detail to address
new problems or concerns. See

Each version of the License is given a distinguishing version number. If the
Document specifies that a particular numbered version of this License "or any
later version" applies to it, you have the option of following the terms and
conditions either of that specified version or of any later version that has
been published (not as a draft) by the Free Software Foundation. If the
Document does not specify a version number of this License, you may choose
any version ever published (not as a draft) by the Free Software Foundation.

ADDENDUM: How to use this License for your documents

To use this License in a document you have written, include a copy of the
License in the document and put the following copyright and license notices
just after the title page:

Copyright (c) YEAR YOUR NAME. Permission is granted to copy, distribute, and/
or modify this document under the terms of the GNU Free Documentation
License, Version 1.2 or any later version published by the Free Software
Foundation; with no Invariant Sections, no Front-Cover Texts, and no
Back-Cover Texts. A copy of the license is included in the section entitled
"GNU Free Documentation License".

If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts,
replace the "with...Texts." line with this: with the Invariant Sections being
LIST THEIR TITLES, with the Front-Cover Texts being LIST, and with the
Back-Cover Texts being LIST. If you have Invariant Sections without Cover
Texts, or some other combination of the three, merge those two alternatives
to suit the situation.

If your document contains nontrivial examples of program code, we recommend
releasing these examples in parallel under your choice of free software
license, such as the GNU General Public License, to permit their use in free

  All copyrights belong to their respective owners. Other site content (c) 2014, GNU.WIKI. Please report any site errors to