bttv

From LinuxTVWiki
Revision as of 09:04, 22 January 2012 by CityK (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

bttv is a kernel driver module meant to support any PCI card that uses a Bt848, Bt878 or Fusion 878A chip for video capture, which, taken collectively, are known as Bttv devices (bt848, bt878).

Associated bttv driver modules

Note: the dvb-bt8xx driver conflicts with the ALSA snd-bt78x driver.

Some hints to get the bttv driver up and running

From Gerd Knorr's "README.bttv" distributed in packages such as motv.

General hints

1. Make sure if your board is recognized correctly. The bttv driver should print a line like this one (use the 'dmesg' command to see the kernel messages):

bttv0: model: BT848 (Hauppauge old)

If your card isn't autodetected correctly, you have to specify the board type as insmod argument (card=n). You might also have to specify tuner=x and pll=x.

Check the driver documentation for details and a list of supported cards. The standard kernel has the bttv documentation in the Documentation/video4linux/bttv directory.

2. [It's recommended you use a recent kernel.]

3. If you have problems with xawtv, you should open a xterm (or whatever your favorite terminal app is) and start xawtv from there. This way you'll see any error messages xawtv might print on stderr which should help to find the source of the problems.

4. If something broke after an update, have a look at the changelog. It might be mentioned there.

Common problems

?: I have a black screen in overlay mode

!: The driver was not initialized correctly, v4l-conf (or the X-Server) has to configure the bttv driver with the current video mode and framebuffer address first. Check if v4l-conf is installed suid root, it needs root priviliges to do this. You can also start v4l-conf from a terminal and check the messages it prints.

?: I have a blue screen.

!: Good, the overlay is working. A blue screen is what you get if the grabber chip has no input signal. You are probably using the wrong video source, pick another. Also happens sometimes if the tuner type is wrong, check the driver configuration.

?: I have a noisy screen and/or can't tune (some) stations.

!: Most likely the tuner types is wrong, check the driver configuration. It's no problem to do trial-and-error here.

?: The video is outside the window and spread in thin lines over the screen.

I: xawtv / v4l-conf didn't autodetect the color depth for your screen correctly. You can fix that with xawtv's -bpp switch.

?: Only the left part of the window is updated, the right one is updated never / sometimes / only if the window is small.

!: Your graphics card and/or motherboard can't deal with the data rate going over the PCI bus, leading to canceled PCI transfers. Reduce the color depth, with 16 bpp instead of 32 bpp should work much better.

?: Secam channel is shifted (sound from channel appears on nex channel) on my bttv card with tda9887.

!: Use port2=0 option to tda

Hardware-specific problems

  • bttv + DRI seem not to play nicely together with some cards (ATI Rage128). The linux box just freezes. Don't know why. Suspect it's either a hardware problem or a bug somewhere in DRI (either kernel or xfree86). The only workaround I know of is to turn off DRI.
  • Some motherboard chipsets have PCI bugs, especially with PCI-PCI transfers which are used for video overlay. The bt848/878 chips have some bug compatibility options, which can be enabled to workaround these problems. Have a look at the triton1 and vsfx insmod options. For some known-buggy chipsets these are enabled automagically.
  • Sometimes IRQ sharing causes trouble. It works most of the time, but in combination with some hardware and/or drivers it doesn't work. Especially graphic cards are known to cause trouble due to the lack of a IRQ handler. Try disabling the VGA IRQ in the BIOS. Try moving cards to another PCI slot. Your motherboard manual should tell you which PCI slots share IRQ's.

insmod Options

General Options

Parameter Name
Permissions
Value Ranges
Default
Description
bttv_verbose 644 0-1 1 verbose startup messages
bttv_gpio 644 0-1 0 Log GPIO changes
bttv_debug 644 0-1 0 Display debug messages
irq_debug 644 0-1 0 (No) irq handler debug messages
debug_latency 644 0-1 0 (No) Enable frame-drop debug messages
fdsr 444 0-1 0 FIFO Data Stream Resynchronization
gbuffers 444 2-32 8 Number of capture buffers
gbufsize 444 0x208000 Size of the capture buffers
reset_crop 444 0-1 1 Reset cropping parameters at open()
v4l2 644 0-1 1 Turn on/off stuff for testing
irq_iswitch 644 0-1 Undefined Switch inputs in irq handler
combfilter 444 0-1 1 (Yes) Switches on the Comb filter
lumafilter 444 0-1 0 (No) Enables the Luma Notch filter
automute 444 0-1 1 (Yes) Mute audio on bad/missing video signal
chroma_agc 444 0-1 0 (No) Enables the AGC of chroma signal
adc_crush 444 0-1 1 (Yes) Enables the luminance ADC crush
whitecrush_upper 444 0xCF Sets the white crush upper value
whitecrush_lower 444 0x7F Sets the white crush lower value
vcr_hack 444 0-1 0 (No) Enables the VCR hack (improves sync on poor VCR tapes)
uv_ratio 444 50 Ratio between u and v gains
full_luma_range 444 0-1 0 (No) Use the full luma range
coring 444 0 (None) Set the luma coring level

Architecture-Specific

Parameter Name
Permissions
Value Ranges
Default
Description
bigendian 644 0-1 1 if architecture is big endian, else undefined Byte order of the framebuffer

Device Parameters

Parameter Name
Permissions
Value Ranges
Default
Description
radio 444 0-1 0 (No) Whether or not the device supports radio
video_nr 444 Video device numbers
radio_nr 444 Radio device numbers
vbi_nr 444 VBI device numbers

External Links

  • BTTV and related driver options -- An excellent, if somewhat dated page with useful BTTV kernel options is still hosted on the now defunct original project page at sourceforge.net
  • The BTTV HOWTO: how to configure and use a video tuner card based on the popular Bt848 and Bt878 chipsets within the Linux operating system.