---
name: "bktr"
section: "4"
platform: "openbsd"
package: "man"
version: "8.0-current-20261101"
release: "OpenBSD 8.0-current (2026-11-01)"
platforms: ["linux", "openbsd"]
url: "https://new.carta.tech/bktr"
---

# bktr(4)

Brooktree Bt848/849/878/879 PCI TV tuners and video capture boards

## NAME

**bktr** – Brooktree Bt848/849/878/879 PCI TV tuners and video capture boards

## SYNOPSIS

**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**

## DESCRIPTION

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.

## VIDEO CAPTURE INTERFACE

The video capture interface to **bktr** is accessed through */dev/bktrN* devices. The following [ioctl(2)](/ioctl/2.md) commands are supported on the Brooktree848 video capture interface:

- METEORSFMT *unsigned long \**

  This command sets the video format, also sometimes referred to as the video norm. The supported formats are:

  - METEOR\_FMT\_NTSC

    NTSC

  - METEOR\_FMT\_PAL

    PAL

  - METEOR\_FMT\_SECAM

    SECAM

  - METEOR\_FMT\_AUTOMODE

    hardware default

- METEORGFMT *unsigned long \**

  This command retrieves the current video format to the *unsigned* *long* *\** argument.

- METEORSETGEO *struct meteor\_geomet \**

  This command sets the video properties that affect the bit size of a frame through the *meteor\_geomet* *\** argument.

  ```
  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\_RGB16

    16-bit RGB

  - METEOR\_GEO\_RGB24

    24-bit RGB in 32 bits

  - METEOR\_GEO\_YUV\_PACKED

    16-bit 4:2:2 YUV

  - METEOR\_GEO\_YUV\_PLANAR

    16-bit 4:2:2 YUV

  - METEOR\_GEO\_YUV\_UNSIGNED

    unsigned UV

  - METEOR\_GEO\_YUV\_422

    - METEOR\_GEO\_YUV\_12

    - METEOR\_GEO\_YUV\_9

    The following are supported field capture modes:

    - METEOR\_GEO\_ODD\_ONLY

      only odd fields

    - METEOR\_GEO\_EVEN\_ONLY

      only even fields

      By default, frames will consist of both the odd and even fields.

- METEORGSUPPIXFMT *struct meteor\_pixfmt \**

  This command is used iteratively to fetch descriptions of supported output pixel formats into the *meteor\_pixfmt* *\** argument.

  ```
  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 \**

  This command sets the active pixel format. The *int* *\** argument is the index of the pixel format as returned by METEORGSUPPIXFMT.

- METEORGACTPIXFMT *int \**

  This command fetches the active pixel format index into the *int* *\** argument.

- METEORSINPUT *unsigned long \**

  This command sets the input port of the Brooktree848 device. The following are supported input ports:

  - METEOR\_INPUT\_DEV0

    composite (RCA)

  - METEOR\_INPUT\_DEV1

    tuner

  - METEOR\_INPUT\_DEV2

    composite S-video

  - METEOR\_INPUT\_DEV3

    mystery device

  - METEOR\_INPUT\_DEV\_RGB

    rgb meteor

  - METEOR\_INPUT\_DEV\_SVIDEO

    S-Video

    Not all devices built with Brooktree848 chips support the full list of input ports.

- METEORGINPUT *unsigned long \**

  This command retrieves the current input port to the *unsigned* *long* *\** argument.

- METEORSFPS *unsigned short \**

  This command sets the number of frames to grab each second. Valid frame rates are integers from 0 to 30.

- METEORGFPS *unsigned short \**

  This command fetches the number of frames to grab each second into the *unsigned* *short* *\** argument.

- METEORCAPTUR *int \**

  This command controls capturing of video data. The following are valid arguments:

  - METEOR\_CAP\_SINGLE

    capture one frame

  - METEOR\_CAP\_CONTINOUS

    continuously capture

  - METEOR\_CAP\_STOP\_CONT

    stop continuous capture

- METEORSSIGNAL *unsigned int \**

  This command controls the signal emission properties of **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\_FRAME

    signal every frame

  - METEOR\_SIG\_FIELD

    signal every field

    By default, signals will be generated for every frame. Generation of signals is terminated with the METEOR\_SIG\_MODE\_MASK argument.

## TUNER INTERFACE

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)](/ioctl/2.md) commands are supported on the tuner interface:

- TVTUNER\_SETTYPE *unsigned int \**

  This command sets the tuner's TV channel set, also sometimes called the TV channel band. This setting is used to calculate the proper tuning frequencies. The desired channel set must be selected before attempting to set the tuner channel or frequency. The following is a list of valid channel sets:

  - CHNLSET\_NABCST

    North America broadcast

  - CHNLSET\_CABLEIRC

    North America IRC cable

  - CHNLSET\_CABLEHRC

    North America HRC cable

  - CHNLSET\_WEUROPE

    Western Europe

  - CHNLSET\_JPNBCST

    Japan broadcast

  - CHNLSET\_JPNCABLE

    Japan cable

  - CHNLSET\_XUSSR

    Russia

  - CHNLSET\_AUSTRALIA

    Australia

  - CHNLSET\_FRANCE

    France

- TVTUNER\_GETTYPE *unsigned int \**

  This command fetches the tuner's current channel set to the *unsigned* *int* *\** argument.

- TVTUNER\_SETCHNL *unsigned int \**

  This command sets the tuner's frequency to a specified channel in the current channel set.

- TVTUNER\_GETCHNL *unsigned int \**

  This command fetches the last selected channel. Note that it is not necessarily the current channel. In particular, changing the tuner's frequency by a command other than TVTUNER\_SETCHNL will not update this setting, and it defaults to 0 on driver initialization.

- TVTUNER\_SETFREQ *unsigned int \**

  This command sets the tuner's frequency to 1/16th the value of the *unsigned* *int* *\** argument, in MHz. Note that the current channelset is used to determine frequency offsets when this command is executed.

- TVTUNER\_GETFREQ *unsigned int \**

  This command fetches the tuner's current frequency to the *unsigned* *int* *\** argument. Note that this value is 16 times the actual tuner frequency, in MHz.

- BT848\_SAUDIO *int \**

  This command controls the audio input port and mute state. The following is a list of valid arguments:

  - AUDIO\_TUNER

    tuner audio port

  - AUDIO\_EXTERN

    external audio port

  - AUDIO\_INTERN

    internal audio port

  - AUDIO\_MUTE

    mute audio

  - AUDIO\_UNMUTE

    unmute audio

- BT848\_GAUDIO *int \**

  This command fetches the audio input and mute state bits to the *int* *\** argument.

## KERNEL OPTIONS

The following kernel configuration options are available:

- **option** **BKTR\_ALLOC\_PAGES=nnn**

  Specifies the number of contiguous pages to allocate when successfully probed. The default number of pages allocated by the kernel is 216. This means that there are (216\*4096) bytes available for use.

- **option** **BKTR\_SYSTEM\_DEFAULT="(BROOKTREE\_PAL** \| **BROOKTREE\_NTSC)"**

  One of these options can be used to set the default video format for the driver. This fixed random hangs and lockups with the VideoLogic Captivator PCI card.

- **option** **BKTR\_OVERRIDE\_CARD=nnn**

  Select a specific card (overrides autodetection). \`nnn' is set to one of the names listed and explained below.

  - CARD\_ASKEY\_DYNALINK\_MAGIC\_TVIEW

    Askey/Dynalink Magic TView

  - CARD\_AVER\_MEDIA

    AverMedia

  - CARD\_FLYVIDEO

    Animation Technologies FlyVideo

  - CARD\_AOPEN\_VA1000

    AOpen VA1000

  - CARD\_TVWONDER

    ATI TV-Wonder/VE

  - CARD\_HAUPPAUGE

    Hauppauge Wincast TV and WinTV

  - CARD\_IMS\_TURBO

    IMS TV Turbo

  - CARD\_INTEL

    Intel Smart Video Recorder III

  - CARD\_IO\_GV

    I/O DATA GV-BCTV2/PCI

  - CARD\_IO\_BCTV3

    I/O DATA GV-BCTV3/PCI

  - CARD\_KISS

    KISS TV/FM PCI

  - CARD\_LEADTEK

    Leadtek Winfast TV 2000

  - CARD\_LEADTEK\_XP

    Leadtek Winfast TV 2000 XP

  - CARD\_MIRO

    Miro PC TV

  - CARD\_OSPREY

    MMAC Osprey

  - CARD\_NEC\_PK

    NEC PK-UG-X017

  - CARD\_STB

    STB TV PCI Television Tuner

  - CARD\_TERRATVPLUS

    Terratec TerraTVplus

  - CARD\_VIDEO\_HIGHWAY\_XTREME

    Video Highway XTreme

  - CARD\_ZOLTRIX

    Zoltrix TV

  - CARD\_ZOLTRIX\_GENIE\_FM

    Zoltrix Genie TV/FM

- **option** **BKTR\_OVERRIDE\_MSP=n**

  Specifies whether the MSP3400C chip is present (overrides autodetection).

- **option** **BKTR\_OVERRIDE\_TUNER=nnn**

  Select a specific tuner (overrides autodetection). \`nnn' is set to one of the names listed and explained below.

  - TEMIC\_NTSC

    Temic 4032FY5

  - TEMIC\_PAL

    Temic 4002FH5

  - TEMIC\_SECAM

    Temic 4002FN5

  - PHILIPS\_NTSC

    Philips FI1236

  - PHILIPS\_PAL

    Philips FM1216

  - PHILIPS\_SECAM

    Philips FI1216MF

  - TEMIC\_PALI

    Temic 4062FY5

  - PHILIPS\_PALI

    Philips FI1246

  - PHILIPS\_FR1236\_NTSC

    Philips FR1236 MK2

  - PHILIPS\_FR1216\_PAL

    Philips FM1216

  - PHILIPS\_FR1236\_SECAM

    Philips FM1216MF

  - ALPS\_TSCH5

    Alps TSCH5 NTSC

  - ALPS\_TSBH1

    Alps TSBH1 NTSC

  - TIVISION\_TVF5533

    Tivision TVF5533-MF NTSC

## SEE ALSO

[intro(4)](/intro/4.md), [pci(4)](/pci/4.md), [radio(4)](/radio/4.md)

## HISTORY

The **bktr** driver first appeared in FreeBSD 2.2.

## AUTHORS

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.

## CAVEATS

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.
