Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
bttv-driver.c File Reference
#include <linux/init.h>
#include <linux/module.h>
#include <linux/delay.h>
#include <linux/slab.h>
#include <linux/errno.h>
#include <linux/fs.h>
#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/interrupt.h>
#include <linux/kdev_t.h>
#include "bttvp.h"
#include <media/v4l2-common.h>
#include <media/v4l2-ioctl.h>
#include <media/tvaudio.h>
#include <media/msp3400.h>
#include <linux/dma-mapping.h>
#include <asm/io.h>
#include <asm/byteorder.h>
#include <media/saa6588.h>

Go to the source code of this file.

Macros

#define pr_fmt(fmt)   KBUILD_MODNAME ": " fmt
 
#define BTTV_VERSION   "0.9.19"
 
#define request_modules(dev)
 
#define flush_request_modules(dev)
 
#define CROPCAP(minhdelayx1, hdelayx1, swidth, totalwidth, sqwidth,vdelay, sheight, videostart0)
 
#define V4L2_CID_PRIVATE_CHROMA_AGC   (V4L2_CID_PRIVATE_BASE + 0)
 
#define V4L2_CID_PRIVATE_COMBFILTER   (V4L2_CID_PRIVATE_BASE + 1)
 
#define V4L2_CID_PRIVATE_AUTOMUTE   (V4L2_CID_PRIVATE_BASE + 2)
 
#define V4L2_CID_PRIVATE_LUMAFILTER   (V4L2_CID_PRIVATE_BASE + 3)
 
#define V4L2_CID_PRIVATE_AGC_CRUSH   (V4L2_CID_PRIVATE_BASE + 4)
 
#define V4L2_CID_PRIVATE_VCR_HACK   (V4L2_CID_PRIVATE_BASE + 5)
 
#define V4L2_CID_PRIVATE_WHITECRUSH_UPPER   (V4L2_CID_PRIVATE_BASE + 6)
 
#define V4L2_CID_PRIVATE_WHITECRUSH_LOWER   (V4L2_CID_PRIVATE_BASE + 7)
 
#define V4L2_CID_PRIVATE_UV_RATIO   (V4L2_CID_PRIVATE_BASE + 8)
 
#define V4L2_CID_PRIVATE_FULL_LUMA_RANGE   (V4L2_CID_PRIVATE_BASE + 9)
 
#define V4L2_CID_PRIVATE_CORING   (V4L2_CID_PRIVATE_BASE + 10)
 
#define V4L2_CID_PRIVATE_LASTP1   (V4L2_CID_PRIVATE_BASE + 11)
 
#define VBI_RESOURCES   (RESOURCE_VBI)
 
#define VIDEO_RESOURCES
 

Functions

 module_param (bttv_verbose, int, 0644)
 
 module_param (bttv_gpio, int, 0644)
 
 module_param (bttv_debug, int, 0644)
 
 module_param (irq_debug, int, 0644)
 
 module_param (debug_latency, int, 0644)
 
 module_param (disable_ir, int, 0444)
 
 module_param (fdsr, int, 0444)
 
 module_param (gbuffers, int, 0444)
 
 module_param (gbufsize, int, 0444)
 
 module_param (reset_crop, int, 0444)
 
 module_param (v4l2, int, 0644)
 
 module_param (bigendian, int, 0644)
 
 module_param (irq_iswitch, int, 0644)
 
 module_param (combfilter, int, 0444)
 
 module_param (lumafilter, int, 0444)
 
 module_param (automute, int, 0444)
 
 module_param (chroma_agc, int, 0444)
 
 module_param (adc_crush, int, 0444)
 
 module_param (whitecrush_upper, int, 0444)
 
 module_param (whitecrush_lower, int, 0444)
 
 module_param (vcr_hack, int, 0444)
 
 module_param (uv_ratio, int, 0444)
 
 module_param (full_luma_range, int, 0444)
 
 module_param (coring, int, 0444)
 
 module_param_array (radio, int, NULL, 0444)
 
 module_param_array (video_nr, int, NULL, 0444)
 
 module_param_array (radio_nr, int, NULL, 0444)
 
 module_param_array (vbi_nr, int, NULL, 0444)
 
 MODULE_PARM_DESC (radio,"The TV card supports radio, default is 0 (no)")
 
 MODULE_PARM_DESC (bigendian,"byte order of the framebuffer, default is native endian")
 
 MODULE_PARM_DESC (bttv_verbose,"verbose startup messages, default is 1 (yes)")
 
 MODULE_PARM_DESC (bttv_gpio,"log gpio changes, default is 0 (no)")
 
 MODULE_PARM_DESC (bttv_debug,"debug messages, default is 0 (no)")
 
 MODULE_PARM_DESC (irq_debug,"irq handler debug messages, default is 0 (no)")
 
 MODULE_PARM_DESC (disable_ir,"disable infrared remote support")
 
 MODULE_PARM_DESC (gbuffers,"number of capture buffers. range 2-32, default 8")
 
 MODULE_PARM_DESC (gbufsize,"size of the capture buffers, default is 0x208000")
 
 MODULE_PARM_DESC (reset_crop,"reset cropping parameters at open(), default ""is 1 (yes) for compatibility with older applications")
 
 MODULE_PARM_DESC (automute,"mute audio on bad/missing video signal, default is 1 (yes)")
 
 MODULE_PARM_DESC (chroma_agc,"enables the AGC of chroma signal, default is 0 (no)")
 
 MODULE_PARM_DESC (adc_crush,"enables the luminance ADC crush, default is 1 (yes)")
 
 MODULE_PARM_DESC (whitecrush_upper,"sets the white crush upper value, default is 207")
 
 MODULE_PARM_DESC (whitecrush_lower,"sets the white crush lower value, default is 127")
 
 MODULE_PARM_DESC (vcr_hack,"enables the VCR hack (improves synch on poor VCR tapes), default is 0 (no)")
 
 MODULE_PARM_DESC (irq_iswitch,"switch inputs in irq handler")
 
 MODULE_PARM_DESC (uv_ratio,"ratio between u and v gains, default is 50")
 
 MODULE_PARM_DESC (full_luma_range,"use the full luma range, default is 0 (no)")
 
 MODULE_PARM_DESC (coring,"set the luma coring level, default is 0 (no)")
 
 MODULE_PARM_DESC (video_nr,"video device numbers")
 
 MODULE_PARM_DESC (vbi_nr,"vbi device numbers")
 
 MODULE_PARM_DESC (radio_nr,"radio device numbers")
 
 MODULE_DESCRIPTION ("bttv - v4l/v4l2 driver module for bt848/878 based cards")
 
 MODULE_AUTHOR ("Ralph Metzler & Marcus Metzler & Gerd Knorr")
 
 MODULE_LICENSE ("GPL")
 
 MODULE_VERSION (BTTV_VERSION)
 
void bttv_gpio_tracking (struct bttv *btv, char *comment)
 
 MODULE_DEVICE_TABLE (pci, bttv_pci_tbl)
 
 module_init (bttv_init_module)
 
 module_exit (bttv_cleanup_module)
 

Variables

unsigned int bttv_num
 
struct bttv * bttvs [BTTV_MAX]
 
unsigned int bttv_debug
 
unsigned int bttv_verbose = 1
 
unsigned int bttv_gpio
 
struct bttv_tvnorm bttv_tvnorms []
 

Macro Definition Documentation

#define BTTV_VERSION   "0.9.19"

Definition at line 62 of file bttv-driver.c.

#define CROPCAP (   minhdelayx1,
  hdelayx1,
  swidth,
  totalwidth,
  sqwidth,
  vdelay,
  sheight,
  videostart0 
)
Value:
.cropcap.bounds.left = minhdelayx1, \
/* * 2 because vertically we count field lines times two, */ \
/* e.g. 23 * 2 to 23 * 2 + 576 in PAL-BGHI defrect. */ \
.cropcap.bounds.top = (videostart0) * 2 - (vdelay) + MIN_VDELAY, \
/* 4 is a safety margin at the end of the line. */ \
.cropcap.bounds.width = (totalwidth) - (minhdelayx1) - 4, \
.cropcap.bounds.height = (sheight) + (vdelay) - MIN_VDELAY, \
.cropcap.defrect.left = hdelayx1, \
.cropcap.defrect.top = (videostart0) * 2, \
.cropcap.defrect.width = swidth, \
.cropcap.defrect.height = sheight, \
.cropcap.pixelaspect.numerator = totalwidth, \
.cropcap.pixelaspect.denominator = sqwidth,

Definition at line 255 of file bttv-driver.c.

#define flush_request_modules (   dev)

Definition at line 203 of file bttv-driver.c.

#define pr_fmt (   fmt)    KBUILD_MODNAME ": " fmt

Definition at line 37 of file bttv-driver.c.

#define request_modules (   dev)

Definition at line 202 of file bttv-driver.c.

#define V4L2_CID_PRIVATE_AGC_CRUSH   (V4L2_CID_PRIVATE_BASE + 4)

Definition at line 631 of file bttv-driver.c.

#define V4L2_CID_PRIVATE_AUTOMUTE   (V4L2_CID_PRIVATE_BASE + 2)

Definition at line 629 of file bttv-driver.c.

#define V4L2_CID_PRIVATE_CHROMA_AGC   (V4L2_CID_PRIVATE_BASE + 0)

Definition at line 627 of file bttv-driver.c.

#define V4L2_CID_PRIVATE_COMBFILTER   (V4L2_CID_PRIVATE_BASE + 1)

Definition at line 628 of file bttv-driver.c.

#define V4L2_CID_PRIVATE_CORING   (V4L2_CID_PRIVATE_BASE + 10)

Definition at line 637 of file bttv-driver.c.

#define V4L2_CID_PRIVATE_FULL_LUMA_RANGE   (V4L2_CID_PRIVATE_BASE + 9)

Definition at line 636 of file bttv-driver.c.

#define V4L2_CID_PRIVATE_LASTP1   (V4L2_CID_PRIVATE_BASE + 11)

Definition at line 638 of file bttv-driver.c.

#define V4L2_CID_PRIVATE_LUMAFILTER   (V4L2_CID_PRIVATE_BASE + 3)

Definition at line 630 of file bttv-driver.c.

#define V4L2_CID_PRIVATE_UV_RATIO   (V4L2_CID_PRIVATE_BASE + 8)

Definition at line 635 of file bttv-driver.c.

#define V4L2_CID_PRIVATE_VCR_HACK   (V4L2_CID_PRIVATE_BASE + 5)

Definition at line 632 of file bttv-driver.c.

#define V4L2_CID_PRIVATE_WHITECRUSH_LOWER   (V4L2_CID_PRIVATE_BASE + 7)

Definition at line 634 of file bttv-driver.c.

#define V4L2_CID_PRIVATE_WHITECRUSH_UPPER   (V4L2_CID_PRIVATE_BASE + 6)

Definition at line 633 of file bttv-driver.c.

#define VBI_RESOURCES   (RESOURCE_VBI)

Definition at line 848 of file bttv-driver.c.

#define VIDEO_RESOURCES
Value:
(RESOURCE_VIDEO_READ | \
RESOURCE_VIDEO_STREAM | \
RESOURCE_OVERLAY)

Definition at line 849 of file bttv-driver.c.

Function Documentation

void bttv_gpio_tracking ( struct bttv *  btv,
char comment 
)

Definition at line 1646 of file bttv-driver.c.

MODULE_AUTHOR ( "Ralph Metzler & Marcus Metzler & Gerd Knorr"  )
MODULE_DESCRIPTION ( "bttv - v4l/v4l2 driver module for bt848/878 based cards )
MODULE_DEVICE_TABLE ( pci  ,
bttv_pci_tbl   
)
module_exit ( bttv_cleanup_module  )
module_init ( bttv_init_module  )
MODULE_LICENSE ( "GPL"  )
module_param ( bttv_verbose  ,
int  ,
0644   
)
module_param ( bttv_gpio  ,
int  ,
0644   
)
module_param ( bttv_debug  ,
int  ,
0644   
)
module_param ( irq_debug  ,
int  ,
0644   
)
module_param ( debug_latency  ,
int  ,
0644   
)
module_param ( disable_ir  ,
int  ,
0444   
)
module_param ( fdsr  ,
int  ,
0444   
)
module_param ( gbuffers  ,
int  ,
0444   
)
module_param ( gbufsize  ,
int  ,
0444   
)
module_param ( reset_crop  ,
int  ,
0444   
)
module_param ( v4l2  ,
int  ,
0644   
)
module_param ( bigendian  ,
int  ,
0644   
)
module_param ( irq_iswitch  ,
int  ,
0644   
)
module_param ( combfilter  ,
int  ,
0444   
)
module_param ( lumafilter  ,
int  ,
0444   
)
module_param ( automute  ,
int  ,
0444   
)
module_param ( chroma_agc  ,
int  ,
0444   
)
module_param ( adc_crush  ,
int  ,
0444   
)
module_param ( whitecrush_upper  ,
int  ,
0444   
)
module_param ( whitecrush_lower  ,
int  ,
0444   
)
module_param ( vcr_hack  ,
int  ,
0444   
)
module_param ( uv_ratio  ,
int  ,
0444   
)
module_param ( full_luma_range  ,
int  ,
0444   
)
module_param ( coring  ,
int  ,
0444   
)
module_param_array ( radio  ,
int  ,
NULL  ,
0444   
)
module_param_array ( video_nr  ,
int  ,
NULL  ,
0444   
)
module_param_array ( radio_nr  ,
int  ,
NULL  ,
0444   
)
module_param_array ( vbi_nr  ,
int  ,
NULL  ,
0444   
)
MODULE_PARM_DESC ( radio  ,
"The TV card supports  radio,
default is 0(no)"   
)
MODULE_PARM_DESC ( bigendian  ,
"byte order of the  framebuffer,
default is native endian"   
)
MODULE_PARM_DESC ( bttv_verbose  ,
"verbose startup  messages,
default is 1(yes)"   
)
MODULE_PARM_DESC ( bttv_gpio  ,
"log gpio  changes,
default is 0(no)"   
)
MODULE_PARM_DESC ( bttv_debug  ,
"debug  messages,
default is 0(no)"   
)
MODULE_PARM_DESC ( irq_debug  ,
"irq handler debug  messages,
default is 0(no)"   
)
MODULE_PARM_DESC ( disable_ir  ,
"disable infrared remote support  
)
MODULE_PARM_DESC ( gbuffers  ,
"number of capture buffers. range 2-  32,
default 8"   
)
MODULE_PARM_DESC ( gbufsize  ,
"size of the capture  buffers,
default is 0x208000"   
)
MODULE_PARM_DESC ( reset_crop  ,
"reset cropping parameters at   open(),
default""is 1(yes) for compatibility with older applications"   
)
MODULE_PARM_DESC ( automute  ,
"mute audio on bad/missing video  signal,
default is 1(yes)"   
)
MODULE_PARM_DESC ( chroma_agc  ,
"enables the AGC of chroma  signal,
default is 0(no)"   
)
MODULE_PARM_DESC ( adc_crush  ,
"enables the luminance ADC  crush,
default is 1(yes)"   
)
MODULE_PARM_DESC ( whitecrush_upper  ,
"sets the white crush upper  value,
default is 207"   
)
MODULE_PARM_DESC ( whitecrush_lower  ,
"sets the white crush lower  value,
default is 127"   
)
MODULE_PARM_DESC ( vcr_hack  ,
"enables the VCR hack   improves synch on poor VCR tapes,
default is 0(no)"   
)
MODULE_PARM_DESC ( irq_iswitch  ,
"switch inputs in irq handler  
)
MODULE_PARM_DESC ( uv_ratio  ,
"ratio between u and v  gains,
default is 50"   
)
MODULE_PARM_DESC ( full_luma_range  ,
"use the full luma  range,
default is 0(no)"   
)
MODULE_PARM_DESC ( coring  ,
"set the luma coring  level,
default is 0(no)"   
)
MODULE_PARM_DESC ( video_nr  ,
"video device numbers"   
)
MODULE_PARM_DESC ( vbi_nr  ,
"vbi device numbers"   
)
MODULE_PARM_DESC ( radio_nr  ,
"radio device numbers"   
)
MODULE_VERSION ( BTTV_VERSION  )

Variable Documentation

unsigned int bttv_debug

Definition at line 67 of file bttv-driver.c.

unsigned int bttv_gpio

Definition at line 69 of file bttv-driver.c.

unsigned int bttv_num

Definition at line 64 of file bttv-driver.c.

struct bttv_tvnorm bttv_tvnorms[]

Definition at line 271 of file bttv-driver.c.

unsigned int bttv_verbose = 1

Definition at line 68 of file bttv-driver.c.

struct bttv* bttvs[BTTV_MAX]

Definition at line 65 of file bttv-driver.c.