BKTR(4)
π NAME π
bktr β Brooktree 848 compatible TV card driver. Yep bestie, this is the BKTR(4) manual page and we're gonna get through it together, hand in hand, no cap π
β¨ SYNOPSIS β¨
bktr* at pci? dev ? function ?
radio* at bktr?
#include <dev/ic/bt8xx.h>
options BKTR_OVERRIDE_CARD=n
options BKTR_OVERRIDE_TUNER=n
options BKTR_OVERRIDE_DBX=n
options BKTR_OVERRIDE_MSP=n
options BKTR_SYSTEM_DEFAULT=n
options BKTR_USE_PLL
options BKTR_GPIO_ACCESS
options BKTR_NO_MSP_RESET
π¦ DESCRIPTION π¦
Okay so this driver is the whole personality for video capture (frame grabber) and TV tuner cards built on the Brooktree Bt848, Bt848A, Bt849A, Bt878, and Bt879 chips. Iconic chips, honestly.
Important vibe check first: bktr is not part of the dtv(4) framework. Not in it. Separate. Don't @ me.
Supported cards include most cards by AVerMedia, Hauppauge, Leadtek, Miro, Pinnacle, Pixelview, Terratec, and some other companies β especially all cards based on the Brooktree Bt848, Bt848A, Bt849A, Bt878, or Bt879 chips. A notable exception are the ATI All-in-Wonder cards, which are simply not invited to this party π
The following kernel configuration options are available:
options BKTR_OVERRIDE_CARD=nβ if the card is not recognized correctly by the auto-detection routine (happens, auto-detect can be a little flop sometimes), you can override it by setting this option to the appropriate value. The following values are allowed:1β Pinnacle Systems (Miro) TV2β Hauppauge WinCast/TV3β STB TV/PCI4β Intel Smart Video III and Videologic Captivator PCI5β IMS TV Turbo6β AVerMedia TV/FM7β MMAC Osprey8β NEC PK-UG-X0179β I/O DATA GV-BCTV2/PCI10β Animation Technologies FlyVideo11β Zoltrix TV12β KISS TV/FM PCI13β Video Highway Xtreme14β Askey/Dynalink Magic TView15β Leadtek WinFast TV 2000/VC10016β TerraTec TerraTV+, and17β TerraTec TValue.
options BKTR_OVERRIDE_TUNER=nβ if the TV tuner is not recognized correctly by the auto-detection routine, override it with this one. Known values are:1β Temic NTSC2β Temic PAL3β Temic SECAM4β Philips NTSC5β Philips PAL6β Philips SECAM7β Temic PAL I8β Philips PAL I9β Philips FR1236 NTSC FM10β Philips FR1216 PAL FM11β Philips FR1236 SECAM FM12β ALPS TSCH5 NTSC FM, and13β ALPS TSBH1 NTSC.
options BKTR_OVERRIDE_DBX=nβ to override detection of the BTSC (dbx) chip, set this to1if you have one, or0if not. Just be honest with it π«Άoptions BKTR_OVERRIDE_MSP=nβ to override detection of the MSP 34xx chip, set this to1if you have one, or0if not.options BKTR_SYSTEM_DEFAULT=nβ if this option is set toBROOKTREE_PAL, default to PAL, else to NTSC.options BKTR_USE_PLLβ default to PLL instead of XTAL.options BKTR_GPIO_ACCESSβ useioctl()s for direct GPIO access.options BKTR_NO_MSP_RESETβ skip the MSP reset. This option is handy if you initialize the MSP audio in another operating system first and then do a soft reboot. Sneaky little dual-boot hack, I respect it π
π₯ VIDEO CAPTURE INTERFACE π₯
The video capture interface to bktr is accessed through the /dev/bktrN devices. The following ioctl(2) 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β NTSCMETEOR_FMT_PALβ PALMETEOR_FMT_SECAMβ SECAMMETEOR_FMT_AUTOMODEβ hardware default
π METEORGFMT unsigned long *
This command retrieves the current video format into 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 β so don't get too ambitious with it, bestie π
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 RGBMETEOR_GEO_RGB24β 24-bit RGB in 32 bitsMETEOR_GEO_YUV_PACKEDβ 16-bit 4:2:2 YUVMETEOR_GEO_YUV_PLANARβ 16-bit 4:2:2 YUVMETEOR_GEO_YUV_UNSIGNEDβ unsigned UVMETEOR_GEO_YUV_422METEOR_GEO_YUV_12METEOR_GEO_YUV_9
The following are supported field capture modes:
METEOR_GEO_ODD_ONLYβ only odd fieldsMETEOR_GEO_EVEN_ONLYβ only even fields
By default, frames will consist of both the odd and even fields. Balanced, as all things should be β¨
π¦ METEORGSUPPIXFMT struct meteor_pixfmt *
This command is used interactively 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. That error isn't a fail, it's a graduation π
π 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β tunerMETEOR_INPUT_DEV2β composite S-videoMETEOR_INPUT_DEV3β mystery device πMETEOR_INPUT_DEV_RGBβ rgb meteorMETEOR_INPUT_DEV_SVIDEOβ S-Video
Not all devices built with Brooktree848 chips support the full list of input ports. So likeβ¦ check before you plug your whole heart into port 3, okay? π
π METEORGINPUT unsigned long *
This command retrieves the current input port into 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 frameMETEOR_CAP_CONTINOUSβ continuously captureMETEOR_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 frameMETEOR_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. Periodt β that's the off switch π
π 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 the /dev/tunerN devices. The following ioctl(2) 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 β order of operations, bestie, it matters π«Ά The following is a list of valid channel sets:
CHNLSET_NABCSTβ North America broadcastCHNLSET_CABLEIRCβ North America IRC cableCHNLSET_CABLEHRCβ North America HRC cableCHNLSET_WEUROPEβ Western EuropeCHNLSET_JPNBCSTβ Japan broadcastCHNLSET_JPNCABLEβ Japan cableCHNLSET_XUSSRβ RussiaCHNLSET_AUSTRALIAβ AustraliaCHNLSET_FRANCEβ France
π¦ TVTUNER_GETTYPE unsigned int *
This command fetches the tuner's current channel set into 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. So your "last selected channel" memory can be a little delulu, that's just how it is π
β¨ 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. Math! But make it fashion π
π TVTUNER_GETFREQ unsigned int *
This command fetches the tuner's current frequency into the unsigned int * argument. Note that this value is 16 times the actual tuner frequency, in MHz. Yes, 16Γ. It's giving conversion era, and honestly she ate with that consistency π₯
π 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 portAUDIO_EXTERNβ external audio portAUDIO_INTERNβ internal audio portAUDIO_MUTEβ mute audioAUDIO_UNMUTEβ unmute audio
π§ BT848_GAUDIO int *
This command fetches the audio input and mute state bits into the int * argument.
π FILES π
/dev/bktr*βbktrdriver interface device/dev/tuner*βbktrtuner interface device/dev/vbi*β teletext interface device
still more to come, stay tuned bestie π
π SEE ALSO β¨
okay so if you wanna go deeper down this rabbit hole (and honestly why wouldn't you π ), go peek at:
options(4)β kernel config option lore, iykykpci(4)β the PCI bus icon itselfradio(4)β radio device gang πpkgsrc/audio/xmradioβ a whole lil app for ur tuner vibespkgsrc/multimedia/ffmpegβ the goat of multimedia, no cappkgsrc/multimedia/fxtvβ the classic TV watcher bestie π¦
π HISTORY π
okay so fun little time-travel moment β¨ the bktr driver first appeared in FreeBSD 2.2 and then in NetBSD 1.5. it's giving elder millennial of drivers, honestly iconic of it πΈ
π AUTHORS π
real ones, in order, let's go π«Ά:
- the
bktrdriver was originally written by Amancio Hasty for FreeBSD, and is now maintained by Roger Hardiman π - the NetBSD porting was done by Bernd Ernesti, Berndt Josef Wulf, Matthias Scheler, and Thomas Klausner π
and that's literally the whole page bestie, u ate it up π thanks for reading all the way to the end, ur a real one fr fr π
cute lil sign-off: this page came from the Debian crew, dated August 30, 2011, and it's the BKTR(4) manual page πβ¨ go forth and capture some video, u got this π
π¦ where this page comes from
- nixpkgs unstable: netbsd-source 11.0
- Copyright (c) 2000, 2001, 2002, 2003, 2004, 2005 Thomas Klausner
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms