| BKTR(4) | Device Drivers Manual | BKTR(4) |
bktr — Brooktree
Bt848/849/878/879 PCI TV tuners and video capture boards
bktr* at pci?
radio* at bktr?
#include <dev/ic/bt8xx.h>
option BKTR_ALLOC_PAGES=nnn
option BKTR_SYSTEM_DEFAULT=XXX
option BKTR_OVERRIDE_CARD=nnn
option BKTR_OVERRIDE_MSP=n
option BKTR_OVERRIDE_TUNER=nnn
The bktr driver provides support for PCI
video capture and VBI capture on low cost, high performance boards. This
should support most video cards based on the Brooktree Bt848/849/878/879
Video Capture Chip. The driver also supports FM Radio if the Tuner supports
it.
Specifically, the following cards are known to work:
Animation Technologies FlyVideo AOpen VA1000 Askey/Dynalink Magic TView ATI TV-Wonder and Wonder/VE AverMedia cards Hauppauge Wincast TV and WinTV/PCI IMS TV Turbo Intel Smart Video Recorder III I/O DATA GV-BCTV2/PCI I/O DATA GV-BCTV3/PCI KISS TV/FM PCI Leadtek Winfast TV 2000 Leadtek Winfast TV 2000 XP Miro PC TV MMAC Osprey NEC PK-UG-X017 STB TV PCI Television Tuner Terratec TerraTVplus Video Highway XTreme VideoLogic Captivator PCI Zoltrix TV and Genie TV/FM
The driver currently supports the following features:
PCI to PCI DMA transfer clipping yuv rgb16 rgb24 rgb32
On these cards, tuners and other components are interconnected with an I2C bus. The Brooktree848 chips act as a master device on the bus to control them.
The video capture interface to bktr is
accessed through /dev/bktrN devices. The following
ioctl(2) commands are supported on
the Brooktree848 video capture interface:
METEORSFMT
unsigned long *METEOR_FMT_NTSCMETEOR_FMT_PALMETEOR_FMT_SECAMMETEOR_FMT_AUTOMODEMETEORGFMT
unsigned long *METEORSETGEO
struct meteor_geomet *struct meteor_geomet {
u_short rows; /* height in pixels*/
u_short columns; /* width in pixels */
u_short frames;
u_long oformat;
}
The frames field is the number of frames to buffer. Currently only 1 frame is supported for most operations.
The oformat field is a bit-field describing the output pixel format type and which video fields to capture. The following are supported pixel format types:
METEOR_GEO_RGB16METEOR_GEO_RGB24METEOR_GEO_YUV_PACKEDMETEOR_GEO_YUV_PLANARMETEOR_GEO_YUV_UNSIGNEDMETEOR_GEO_YUV_422METEOR_GEO_YUV_12METEOR_GEO_YUV_9The following are supported field capture modes:
METEOR_GEO_ODD_ONLYMETEOR_GEO_EVEN_ONLYBy default, frames will consist of both the odd and even fields.
METEORGSUPPIXFMT
struct meteor_pixfmt *struct meteor_pixfmt {
u_int index;
METEOR_PIXTYPE type;
u_int Bpp; /* bytes per pixel */
u_long masks[3]; /* YUV bit masks */
unsigned swap_bytes :1;
unsigned swap_shorts:1;
};
To query all the supported formats, start with an index field of 0 and continue with successive encodings (1, 2, ...) until the command returns an error.
METEORSACTPIXFMT
int *METEORGSUPPIXFMT.METEORGACTPIXFMT
int *METEORSINPUT
unsigned long *METEOR_INPUT_DEV0METEOR_INPUT_DEV1METEOR_INPUT_DEV2METEOR_INPUT_DEV3METEOR_INPUT_DEV_RGBMETEOR_INPUT_DEV_SVIDEONot all devices built with Brooktree848 chips support the full list of input ports.
METEORGINPUT
unsigned long *METEORSFPS
unsigned short *METEORGFPS
unsigned short *METEORCAPTUR
int *METEOR_CAP_SINGLEMETEOR_CAP_CONTINOUSMETEOR_CAP_STOP_CONTMETEORSSIGNAL
unsigned int *bktr. If the unsigned int *
argument is a valid signal, then that signal will be emitted when either a
frame or field capture has completed. To select between frame or field
signalling, the following arguments are used:
METEOR_SIG_FRAMEMETEOR_SIG_FIELDBy default, signals will be generated for every frame.
Generation of signals is terminated with the
METEOR_SIG_MODE_MASK argument.
Most cards supported by this driver feature a hardware television
tuner on the I2C bus. The tuner interface to bktr is
accessed through /dev/tunerN devices. The following
ioctl(2) commands are supported on
the tuner interface:
TVTUNER_SETTYPE
unsigned int *CHNLSET_NABCSTCHNLSET_CABLEIRCCHNLSET_CABLEHRCCHNLSET_WEUROPECHNLSET_JPNBCSTCHNLSET_JPNCABLECHNLSET_XUSSRCHNLSET_AUSTRALIACHNLSET_FRANCETVTUNER_GETTYPE
unsigned int *TVTUNER_SETCHNL
unsigned int *TVTUNER_GETCHNL
unsigned int *TVTUNER_SETCHNL
will not update this setting, and it defaults to 0 on driver
initialization.TVTUNER_SETFREQ
unsigned int *TVTUNER_GETFREQ
unsigned int *BT848_SAUDIO
int *AUDIO_TUNERAUDIO_EXTERNAUDIO_INTERNAUDIO_MUTEAUDIO_UNMUTEBT848_GAUDIO
int *The following kernel configuration options are available:
option BKTR_ALLOC_PAGES=nnnoption BKTR_SYSTEM_DEFAULT="(BROOKTREE_PAL |
BROOKTREE_NTSC)"option BKTR_OVERRIDE_CARD=nnnoption BKTR_OVERRIDE_MSP=noption BKTR_OVERRIDE_TUNER=nnnThe bktr driver first appeared in
FreeBSD 2.2.
The bktr driver is based on the work of
Jim Lowe
<james@miller.cs.uwm.edu>,
Mark Tinguely
<tinguely@plains.nodak.edu>,
Amancio Hasty
<hasty@star-gate.com>,
Roger Hardiman
<roger@FreeBSD.org>
and a bunch of other people.
On big-endian architectures it is not possible to program the card to perform proper byte swapping in 24 bit modes, therefore only 16 and 32 bit modes are supported.
| September 1, 2024 | openbsd |