List:       linux-video
Subject:    FAQ, howto, something???
From:       Pontus Hanserkers <running.linux () home ! se>
Date:       1999-04-21 21:27:53

Isnt there anny easy FAQ, howto or something thats explain how to get a tv card to
work with linux. I downloaded the xawtv app, and read all the docs, i have kernel
2.2.6 with the vido 4 linux and bttv driver built in it, they both seems to work
(they say that they finds my Hauppauge tv card at bootup), but when i run the
xawtv app it say something about not finding the /dev/video device???? How do i
make the /dev/video device, MAKEDEV video??? (doesnt work)

I just wounder if there is anny easy "step by step" textfile out there annywhere
(I guess these questions is asked pretty often)

Hope annyone could help me, i just hate to run win95 only to be able to watch tv
and surf the internet at the same time!!!!! :-)


Best Regards //Pontus


-- 
         To unsubscribe: mail video4linux-list-request@redhat.com with 
                       "unsubscribe" as the Subject.

List:       linux-video
Subject:    Re: FAQ, howto, something???
From:       William Burrow <aa126 () fan ! nb ! ca>
Date:       1999-04-21 23:25:36

On Wed, Apr 21, 1999 at 11:27:53PM +0200, Pontus Hanserkers wrote:
> Isnt there anny easy FAQ, howto or something thats explain how to
> get a tv card to work with linux. I downloaded the xawtv app, and

I've made up a simple HOWTO in text.  Not sure if it is useful or not,
I'll email you a copy.

> my Hauppauge tv card at bootup), but when i run the xawtv app it say
> something about not finding the /dev/video device???? How do i make
> the /dev/video device, MAKEDEV video??? (doesnt work)

There is a MAKEDEV included with the bttv driver, if you get that
separately.  The device major number is 81, and the minor number is
the device sequence number (eg /dev/video0 is maj 81, min 0).

> Hope annyone could help me, i just hate to run win95 only to be able
> to watch tv and surf the internet at the same time!!!!! :-)

Sounds like you are close enough to get a picture.



-- 
William Burrow, VE9WIL -- New Brunswick, Canada
"The only combination device the American public has bought in great
numbers is the clock-radio," says the chairman of the Portable Computer
and Communications Association.


-- 
         To unsubscribe: mail video4linux-list-request@redhat.com with 
                       "unsubscribe" as the Subject.

List:       linux-video
Subject:    Re: FAQ, howto, something???
From:       Brett Bolen <brettb () clarinet ! mmac ! com>
Date:       1999-04-22 1:22:40

Why not post it?

I'd like a copy too.  

b\253

William Burrow wrote:
> 
> On Wed, Apr 21, 1999 at 11:27:53PM +0200, Pontus Hanserkers wrote:
> > Isnt there anny easy FAQ, howto or something thats explain how to
> > get a tv card to work with linux. I downloaded the xawtv app, and
> 
> I've made up a simple HOWTO in text.  Not sure if it is useful or not,
> I'll email you a copy.
> 
> > my Hauppauge tv card at bootup), but when i run the xawtv app it say
> > something about not finding the /dev/video device???? How do i make
> > the /dev/video device, MAKEDEV video??? (doesnt work)
> 
> There is a MAKEDEV included with the bttv driver, if you get that
> separately.  The device major number is 81, and the minor number is
> the device sequence number (eg /dev/video0 is maj 81, min 0).
> 
> > Hope annyone could help me, i just hate to run win95 only to be able
> > to watch tv and surf the internet at the same time!!!!! :-)
> 
> Sounds like you are close enough to get a picture.
> 
> --
> William Burrow, VE9WIL -- New Brunswick, Canada
> "The only combination device the American public has bought in great
> numbers is the clock-radio," says the chairman of the Portable Computer
> and Communications Association.
> 
> --
>          To unsubscribe: mail video4linux-list-request@redhat.com with
>                        "unsubscribe" as the Subject.


-- 
         To unsubscribe: mail video4linux-list-request@redhat.com with 
                       "unsubscribe" as the Subject.

List:       linux-video
Subject:    Re: FAQ, howto, something???
From:       William Burrow <aa126 () fan ! nb ! ca>
Date:       1999-04-28 15:07:55
[Download message RAW]

On Wed, Apr 21, 1999 at 09:22:40PM -0400, Brett Bolen wrote:
> Why not post it?
> 
> I'd like a copy too.  

OK, I got one comment that it was at least somewhat useful, so I will
attach it herewith.  Anybody who feels like converting it into an
SGMLized HOWTO will likely get permission from me to distribute it.
Additions and corrections greatfully accepted.

-- 
William Burrow, VE9WIL -- New Brunswick, Canada
"The only combination device the American public has bought in great
numbers is the clock-radio," says the chairman of the Portable Computer
and Communications Association.


bttv mini-HOWTO
===============

Second draft version

Copyright
---------

Copyright 1999 William Burrow.  All Rights Reserved.  Changes may be
submitted to the author at:  aa126@fan.nb.ca.  May be distributed 
freely, as long as no changes are made to its content.  HTML version
available for review at:

http://will.freehosting.net/bttv-HOWTO.html

Disclaimer
----------

If following this document breaks something, you are responsible for it.

Requirements
------------

Linux 2.0 or 2.2 kernel with source, development installation of X Window
System (with DGA support, if available), modules, a supported BrookTree
(now Connexant {formerly Rockwell Semiconductor}) bt848, bt878 or other
supported chipset and a working compiler.  With Linux 2.0, the bttv driver
is also required.  A TV display program is also handy, one is included
with the bttv driver and there are pointers to others, such as xawtv,
on the bttv web page.

See the bttv driver page if necessary:

http://www.thp.uni-koeln.de/~rjkm/linux/bttv.html

Kernel is available at:

http;//www.kernel.org

XFree86 is available at:

http://www.xfree86.org

You can also seek help from the video4linux-list.  To subscribe to this
list, send an email message to:  video4linux-list-request@redhat.com
with a subject of:  subscribe

eg.

echo | mail -s subscribe video4linux-list-request@redhat.com


WARNING!! WARNING!! WARNING!! WARNING!! WARNING!! WARNING!!

Using the bttv driver may result in hard, unrecoverable lockups, especially
when starting a TV viewer or video grabber program.  Be sure to back up your
system regularly and save all work in progress before using the video grabber.


Hardware Installation
---------------------

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, the rating 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 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 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 video card 
audio out if you do not have an audio card or don't want to route through
the sound card.

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.


Software Installation
---------------------

Kernel

For Linux kernel 2.2 series, the driver is included with the kernel.  
See the Kernel-HOWTO to find out how to compile the kernel and install
modules.  You need to compile the kernel with the following options:

Prompt for development and/or incomplete code/drivers (CONFIG_EXPERIMENTAL) [Y/n/?]   \
answer Y

In the Loadable kernel module support section:

Enable loadable module support (CONFIG_MODULES) [Y/n/?]  answer Y
Kernel module loader (CONFIG_KMOD) [Y/n/?]               answer Y 

In General Setup section:

PCI support (CONFIG_PCI) [Y/n/?]                         answer Y
Backward-compatible /proc/pci (CONFIG_PCI_OLD_PROC) [Y/n/?] 
                                                         answer Y

In the *Video for Linux* section:

Video For Linux (CONFIG_VIDEO_DEV) [Y/m/n/?]             either Y or M 
BT848 Video For Linux (CONFIG_VIDEO_BT848) [M/n/y/?]     answer M


Note that the reason that the BT848 driver is compiled as a module, is
so that you can easily change almost all the parameters necessary when
inserting the modules.

Also, see the documentation in the directory: 

/usr/src/linux/Documentation/video4linux/bttv

There is much useful information there, including card and tuner types.

For the 2.0 kernel or if you want to compile the driver separately for
some reason, you will need to obtain and unpack an appropriate bttv
driver for your kernel.  Use the following commands to compile the driver:

cd bttv/driver
make
su -c "make install"

If things go OK, you will have workable drivers.  

Note that you can disregard setting the card and tuner types for the
modules in the Makefile.  Instead, set these parameters when inserting
the module with modprobe.  It is much easier and quicker than recompiling
over and over.

See also the documentation that comes with the driver in the doc directory.
There is much useful information there, including card and tuner types,
installation instructions and so on.

Video Devices

You will need to install at least one device file for video to work.  The
major number for Linux video devices is 81.  The bttv package includes a
file MAKEDEV that will automatically create the video devices for you.
Otherwise, use the following commands to create the devices:

cd /dev
mknod video0 c 81 0
mknod video1 c 81 1
mknod video1 c 81 2
mknod video1 c 81 3
ln -s video0 video

TV Program

Unpack and compile the TV software of your choice.  If you want to use
the program that comes with the bttv driver, *first get the Lesstif
libraries.* The program xtvscreen included with the driver source will
not link without the Lesstif libraries (Xm).  See:

http://www.lesstif.org

for the the Lesstif libraries.  Because this is so involved, the author
selected xawtv.  It is readily available and should compile on your system.
If the program mostly compiles, but does not link because it is looking
for some file ending with .a or a library, you might not have the necessary
static libraries.  Another TV program might be for you.

Xawtv

Get the xawtv sources from:

http://www.cs.tu-berlin.de/~kraxel/index.html#xawtv

Obtain and unpack the xawtv source somewhere and change to the source 
directory.  Xawtv uses the configure program, so it is fairly easy to 
setup.  To compile with most options available, use the following:

./configure --with-x --enable-jpeg --enable-xfree-ext 
make
su -c make install

If you are not using a later version of XFree86, it may be necessary to
Leave off the last argument of the configure line.  Overlay might not
work properly if you do not have the DGA extension.  If you do not have
the jpeg library installed, you may have to drop the second argument.
You will not be able to grab jpeg images without the jpeg option, but
ppm still images may be possible.

Xawtv requires a simple initialization file:  ~/.xawtv
The most basic contents of this file for a North American user might be:

---------------%<---------------
# this is a comment
# empty lines are ignored too

# Start with capture off in case something goes wrong
capture = off
source  = Composite1

# For North America with cable
norm    = ntsc
freqtab = ntsc-cable

# You can give the channels meaningful names of your choice inside the [ ]'s
[Composite1]
source  = Composite1
capture = off
key     = Alt+C

[S-Video]
source  = S-Video
capture = off
key     = Alt+S

[Channel 2]
source  = television
capture = overlay
channel = 2
key     = F2

[Channel 3]
source  = television
capture = overlay
channel = 3
key     = F3

[Channel 4]
source = television
capture = overlay
channel = 4
key = F4

# If you do not have any of these channels available, edit this file
# and add one that you do have.  The format should be obvious.
---------------%<---------------

That should be enough to get you started.  The names in square brackets ([])
can be anything you like.  Usually the station names.


Installing the video drivers
----------------------------

The first trick is to get the video card to work.  To do this, the 
various drivers must be installed into the kernel.  But first you 
must know what your video card and tuner model and type are.  This
may require some experimentation if you do not know or your card
is not listed in the Makefile for the driver (available in the separate
package).  See Appendix A of this HOWTO for a (possibly outdated) list
of known cards and Appendix B for a list of tuner modes.  

As of writing, only two brands of tuner are supported, the Temic and
the Philips tuners.  Some cards can support both NTSC (North America)
and PAL or SECAM (the rest of the world), some have only the crystal
installed for one of these.

You can inspect your board easily for the tuner type and available crystals.
The tuner is the large silver box with the external F connector attached
to it.  It should either bear ``Temic'' or ``Philips.''  Some manufacturors
may stick their own labels on top of the labels that are already there,
so check if that is the case.  The crystal(s) are the small shiny canisters
near the large decoder chip.  For PAL, this is marked 28.xxxMHz (where xxx
are three digits).  For NTSC, the canister should bear 35.xxxMHz (again,
the xxx are three digits).

You can edit and use the ``update'' script included with the separately
available driver to install the modules, or you can use the the
instructions below to remove and insert the drivers.

Use ``lsmod'' to see the modules that are currently installed.  If any of
videodev, i2c, i2c-char, tuner, msp3400 or bttv are listed, remove them
in the order below using ``rmmod:''

rmmod bttv
rmmod msp3400
rmmod tuner
rmmod i2c_chardev
rmmod i2c-dev
rmmod algo-bit
rmmod i2c
rmmod videodev

Use ``modprobe'' to install your new drivers.  First, try default 
module arguments to see if that works:

modprobe videodev      # Not required if you answered Y to Video for Linux
modprobe i2c     verbose=1 scan=1 i2c_debug=0
modprobe tuner   debug=0 type=6   # for Temic NTSC tuner
modprobe msp3400
modprobe bttv    card=0 radio=0 pll=0

Getting the video card to work
------------------------------

Once you have installed the bttv driver, you can then start X in 16-bit
or higher mode (startx -- -bpp 16), then run the ``v4l-conf'' program to
configure your system for the TV application.  It will report something
like the following:

using X11 display :0.0 (dga available)
video mode: 1280x1024, 16 bit/pixel, 2560 byte/scanline
framebuffer at 0xf0800000
ok

The presence of ``(dga available)'' on the first line and ``ok'' on
the last line are good signs.  You should run v4l-conf after everytime
you modprobe or install the bttv driver.  You only need to do it once
each time.  (v4l-conf comes with xawtv.)  Xawtv seems to work here
without using it, though.

Now, in X, start your TV software and *turn on video capture.*  In xawtv,
right click on the black screen.  This should bring up a menu box.
Click on the line that reads ``Capture,'' near the bottom just above
the slider bars at the bottom.  Select ``grabdisplay.''  (For xtv,
select the window {click on the title bar} and press C.)

The black window should turn blue or otherwise be *not* black.
If the window remains black, then try ``overlay'' mode.  If it still
remains black, your card is not working with the parameters given.
Close the TV application and retry with another invocation of bttv.

Use ``rmmod'' to remove the bttv driver and ``modprobe'' again with a
specific card number from the list in Appendix A.  Try running the TV
application and capture again.  Run v4l-conf after modprobing.  See the
PROBLEMS file with the documentation for bttv for additional hints.


Video card shows blue screen
----------------------------

Once you get a blue screen, you know the driver is working.  Once you
get composite or S-video video in and a video signal verified working,
you can move onto the tuner.  First, check if you get an image with
the ``Overlay'' mode (click on the ``Capture'' line in xawtv). 
If you get a black screen, overlay is not working.  

If overlay does not work, go and change all occurrences of ``overlay''
in the ~/.xawtv file to ``grabvideo'' now.  Then quit and restart xawtv
for the changes to take place.  The author had a problem with overlay
not working, and solved it by installing a new video card.  You might
be able to solve it by compiling xawtv with no X extensions (no DGA).

You might also have to tell the bttv module where the memory for the
video card is.  Inspect /proc/pci for the memory region used by the
video card (eg cat /proc/pci).  Use vidmem parameter to specify
video card memory region using first five characters of the address.
eg. If the memory is at 0xf0000000, then use:  vidmem=0xf00

Now, if you have a tuner on your card, you can move on to see if that
works.  If you have no tuner, you are done, proceed to the ``Configuring
Modules'' section!


Setting up the tuner
--------------------

If you have selected the correct tuner, then you should get something
just by selecting a ``Video Source'' of ``Television.''

What you might get is just ``static,'' perhaps just a portion of the display
is randomly coloured, changing dots.  If so, you may have a working tuner.
Change the channel by either using the ``Channel Window'' (click on that line
in the menu or press ``C,'' then click on the channel title in the bar
presented).  If there is an RF signal present, one of Channel 2, 3 or 4
should show a picture, if you have such a channel available.  You can
also left click on the display for a selection of channels.

If you are outside North America, you may have to choose a ``TV Norm,''
either PAL or SECAM.  Also, an appropriate ``Frequency Table'' may have
to be chosen.  Xawtv comes with 11 preset tables.  You can save these
parameters in the ~/.xawtv file with the norm and freqtab variables,
respectively.  If necessary, you can read the xawtv documentation to
make your own frequency table, or use a program such as xtvscreen which
has a continuously variable channel selector.

Before going to far changing the application, be sure you have the correct
tuner parameters for the module.  There are several types available.
Use ``rmmod'' and ``modprobe'' just as for bttv, but with the appropriate
parameters for the tuner module (debug and tuner).  See Appendix B for
a list of tuner types.

You will have to rmmod the bttv module before you can remove the tuner
module.  Remember to use the correct parameters for the bttv module
when you modprobe it, or take hints from the next section on how to
save your working parameters.  The command line parameters override
the ones in /etc/modules.conf.


Configuring Modules
-------------------

For future use, you can configure your modules to start with the
correct parameters automatically.  Edit your module configuration
file:

/etc/modules.conf 

and add the following lines with appropriate values that *you determined*
are necessary (eg. for a Zoltrix TV-Max in North America using kernel 2.2):

---------------%<---------------
# TV
alias   char-major-81   bttv
pre-install bttv        modprobe -k tuner
options bttv            card=15 radio=0 pll=0
options tuner           debug=0 type=6
---------------%<---------------

If you compiled your 2.2 kernel with kmod or use kerneld, the modules
will be installed automatically whenever you start your TV software.

Appendix A
----------

Known video grabber cards for kernel 2.2.

    0: Auto-Detect
    1: Miro
    2: Hauppauge
    3: STB
    4: Intel
    5: Diamond
    6: AVerMedia
    7: Matrix Vision MV-Delta
    8: Fly Video II
    9: TurboTV
   10: Newer Hauppage (Bt878)
   11: Miro PCTV Pro
   12: ADS Tech Channel Surfer TV (and maybe TV+FM)
   13: AVerMedia TVCapture 98
   14: Aimslab VHX
   15: Zoltrix TV-Max

Known video cards for bttv 0.6.3 (see the driver Makefile):

  0:  Auto-Detect
  1:  Miro
  2:  Hauppauge (bt848)
  3:  STB
  4:  Intel
  5:  Diamond
  6:  AVerMedia
  7:  MATRIX Vision MV-Delta
  8:  FlyVideo
  9:  TurboTV
  10: Hauppauge (bt878)
  11: Miro Pro
  12: TV-Boostar
  13: Hauppauge WinCam
  14: MAXI
  15: Terratec TerraTV+
  16: Aimslab VHX
  17: PXC200
  18: AVermedia98
  19: FlyVideo98 (newer FlyVideo cards)

Appendix B
----------

  - If you do NOT have a Miro card:
    Adjust TUNER to a number between 0 and 7.

    This number has the following meaning:

    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: Temic 4036 FY5 NTSC tuner


-- 
         To unsubscribe: mail video4linux-list-request@redhat.com with 
                       "unsubscribe" as the Subject.

List:       linux-video
Subject:    bttv mini-HOWTO
From:       William Burrow <aa126 () fan ! nb ! ca>
Date:       1999-07-18 21:07:59

For newbies, the mini-HOWTO for setting up a bttv is available now at:

http://will.freehosting.net/bttv-HOWTO.html

This mini-HOWTO was in the works several months ago, but I have heard
no word back from the LDP folks as of yet.  Perhaps the current maintainer
will deign to answer my emails.

A name change to align the mini-HOWTO with the naming scheme used by
other mini-HOWTOs is planned, but the above link will still work.

Comments are welcome.  Thanks to past participants for your comments
and efforts, if you can remember who you are. :)

-- 
William Burrow, VE9WIL -- New Brunswick, Canada
Never laugh at live dragons.
                -- Bilbo Baggins [J.R.R. Tolkien, "The Hobbit"]


-- 
         To unsubscribe: mail video4linux-list-request@redhat.com with 
                       "unsubscribe" as the Subject.