man.bsd.lv manual page server

Manual Page Search Parameters

BKTR(4) Device Drivers Manual BKTR(4)

bktrBrooktree 848 compatible TV card driver

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

This driver supports video capture (frame grabber) and TV tuner cards based on the Brooktree Bt848, Bt848A, Bt849A, Bt878, and Bt879 chips.

Note that bktr is not part of the dtv(4) framework.

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.

The following kernel configuration options are available:

options BKTR_OVERRIDE_CARD=n
If the card is not recognized correctly by the auto-detection routine, it can be overridden by setting this option to the appropriate value. The following values are allowed:
1
Pinnacle Systems (Miro) TV,
2
Hauppauge WinCast/TV,
3
STB TV/PCI,
4
Intel Smart Video III and Videologic Captivator PCI,
5
IMS TV Turbo,
6
AVerMedia TV/FM,
7
MMAC Osprey,
8
NEC PK-UG-X017,
9
I/O DATA GV-BCTV2/PCI,
10
Animation Technologies FlyVideo,
11
Zoltrix TV,
12
KISS TV/FM PCI,
13
Video Highway Xtreme,
14
Askey/Dynalink Magic TView,
15
Leadtek WinFast TV 2000/VC100,
16
TerraTec TerraTV+, and
17
TerraTec TValue.
options BKTR_OVERRIDE_TUNER=n
If the TV tuner is not recognized correctly by the auto-detection routine, it can be overridden by setting this option to the appropriate value. Known values are:
1
Temic NTSC,
2
Temic PAL,
3
Temic SECAM,
4
Philips NTSC,
5
Philips PAL,
6
Philips SECAM,
7
Temic PAL I,
8
Philips PAL I,
9
Philips FR1236 NTSC FM,
10
Philips FR1216 PAL FM,
11
Philips FR1236 SECAM FM,
12
ALPS TSCH5 NTSC FM, and
13
ALPS TSBH1 NTSC.
options BKTR_OVERRIDE_DBX=n
To override detection of the BTSC (dbx) chip, set this to 1 if you have one, or 0 if not.
options BKTR_OVERRIDE_MSP=n
To override detection of the MSP 34xx chip, set this to 1 if you have one, or 0 if not.
options BKTR_SYSTEM_DEFAULT=n
If this option is set to default to PAL, else to NTSC.
options BKTR_USE_PLL
Default to PLL instead of XTAL.
options BKTR_GPIO_ACCESS
Use ()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.

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:

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

NTSC
PAL
SECAM
hardware default
unsigned long *
This command retrieves the current video format to the unsigned long * argument.
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:
.Pp

16-bit RGB
24-bit RGB in 32 bits
16-bit 4:2:2 YUV
16-bit 4:2:2 YUV
unsigned UV
 
 
 

The following are supported field capture modes:

only odd fields
only even fields

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

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.

int *
This command sets the active pixel format. The int * argument is the index of the pixel format as returned by METEORGSUPPIXFMT.
int *
This command fetches the active pixel format index into the int * argument.
unsigned long *
This command sets the input port of the Brooktree848 device. The following are supported input ports:

composite (RCA)
tuner
composite S-video
mystery device
rgb meteor
S-Video

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

unsigned long *
This command retrieves the current input port to the unsigned long * argument.
unsigned short *
This command sets the number of frames to grab each second. Valid frame rates are integers from 0 to 30.
unsigned short *
This command fetches the number of frames to grab each second into the unsigned short * argument.
int *
This command controls capturing of video data. The following are valid arguments:

capture one frame
continuously capture
stop continuous capture
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:

signal every frame
signal every field

By 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 the /dev/tunerN devices. The following ioctl(2) commands are supported on the tuner interface:

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:

North America broadcast
North America IRC cable
North America HRC cable
Western Europe
Japan broadcast
Japan cable
Russia
Australia
France
unsigned int *
This command fetches the tuner's current channel set to the unsigned int * argument.
unsigned int *
This command sets the tuner's frequency to a specified channel in the current channel set.
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.
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.
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.
int *
This command controls the audio input port and mute state. The following is a list of valid arguments:

tuner audio port
external audio port
internal audio port
mute audio
unmute audio
int *
This command fetches the audio input and mute state bits to the int * argument.

/dev/bktr*
bktr driver interface device
/dev/tuner*
bktr tuner interface device
/dev/vbi*
teletext interface device

options(4), pci(4), radio(4), pkgsrc/audio/xmradio, pkgsrc/multimedia/ffmpeg, pkgsrc/multimedia/fxtv

The bktr driver appeared in FreeBSD 2.2 and NetBSD 1.5.

The bktr driver was originally written by Amancio Hasty for FreeBSD and is now maintained by Roger Hardiman. NetBSD porting was done by Bernd Ernesti, Berndt Josef Wulf, Matthias Scheler, and Thomas Klausner.

August 30, 2011 NetBSD-9.2