Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
bttv-cards.c File Reference
#include <linux/delay.h>
#include <linux/module.h>
#include <linux/kmod.h>
#include <linux/init.h>
#include <linux/pci.h>
#include <linux/vmalloc.h>
#include <linux/firmware.h>
#include <net/checksum.h>
#include <asm/unaligned.h>
#include <asm/io.h>
#include "bttvp.h"
#include <media/v4l2-common.h>
#include <media/tvaudio.h>
#include "bttv-audio-hook.h"

Go to the source code of this file.

Data Structures

struct  CARD
 

Macros

#define pr_fmt(fmt)   KBUILD_MODNAME ": " fmt
 
#define LM1882_SYNC_DRIVE   0x200000L
 
#define PVR_GPIO_DELAY   10
 
#define BTTV_ALT_DATA   0x000001
 
#define BTTV_ALT_DCLK   0x100000
 
#define BTTV_ALT_NCONFIG   0x800000
 
#define TEA_FREQ   0:14
 
#define TEA_BUFFER   15:15
 
#define TEA_SIGNAL_STRENGTH   16:17
 
#define TEA_PORT1   18:18
 
#define TEA_PORT0   19:19
 
#define TEA_BAND   20:21
 
#define TEA_BAND_FM   0
 
#define TEA_BAND_MW   1
 
#define TEA_BAND_LW   2
 
#define TEA_BAND_SW   3
 
#define TEA_MONO   22:22
 
#define TEA_ALLOW_STEREO   0
 
#define TEA_FORCE_MONO   1
 
#define TEA_SEARCH_DIRECTION   23:23
 
#define TEA_SEARCH_DOWN   0
 
#define TEA_SEARCH_UP   1
 
#define TEA_STATUS   24:24
 
#define TEA_STATUS_TUNED   0
 
#define TEA_STATUS_SEARCHING   1
 
#define ENA0   0x01
 
#define ENB0   0x02
 
#define ENA1   0x04
 
#define ENB1   0x08
 
#define IN10   0x10
 
#define IN00   0x20
 
#define IN11   0x40
 
#define IN01   0x80
 
#define I2C_TDA8540   0x90
 
#define I2C_TDA8540_ALT1   0x92
 
#define I2C_TDA8540_ALT2   0x94
 
#define I2C_TDA8540_ALT3   0x96
 
#define I2C_TDA8540_ALT4   0x98
 
#define I2C_TDA8540_ALT5   0x9a
 
#define I2C_TDA8540_ALT6   0x9c
 
#define PX_CFG_PXC200F   0x01
 
#define PX_FLAG_PXC200A   0x00001000 /* a pxc200A is bt-878 based */
 
#define PX_I2C_PIC   0x0f
 
#define PX_PXC200A_CARDID   0x200a1295
 
#define PX_I2C_CMD_CFG   0x00
 

Functions

 module_param (triton1, int, 0444)
 
 module_param (vsfx, int, 0444)
 
 module_param (no_overlay, int, 0444)
 
 module_param (latency, int, 0444)
 
 module_param (gpiomask, int, 0444)
 
 module_param (audioall, int, 0444)
 
 module_param (autoload, int, 0444)
 
 module_param_array (card, int, NULL, 0444)
 
 module_param_array (pll, int, NULL, 0444)
 
 module_param_array (tuner, int, NULL, 0444)
 
 module_param_array (svhs, int, NULL, 0444)
 
 module_param_array (remote, int, NULL, 0444)
 
 module_param_array (audiodev, int, NULL, 0444)
 
 module_param_array (audiomux, int, NULL, 0444)
 
 MODULE_PARM_DESC (triton1,"set ETBF pci config bit ""[enable bug compatibility for triton1 + others]")
 
 MODULE_PARM_DESC (vsfx,"set VSFX pci config bit ""[yet another chipset flaw workaround]")
 
 MODULE_PARM_DESC (latency,"pci latency timer")
 
 MODULE_PARM_DESC (card,"specify TV/grabber card model, see CARDLIST file for a list")
 
 MODULE_PARM_DESC (pll,"specify installed crystal (0=none, 28=28 MHz, 35=35 MHz)")
 
 MODULE_PARM_DESC (tuner,"specify installed tuner type")
 
 MODULE_PARM_DESC (autoload,"obsolete option, please do not use anymore")
 
 MODULE_PARM_DESC (audiodev,"specify audio device:\n""\t\t-1 = no audio\n""\t\t 0 = autodetect (default)\n""\t\t 1 = msp3400\n""\t\t 2 = tda7432\n""\t\t 3 = tvaudio")
 
 MODULE_PARM_DESC (saa6588,"if 1, then load the saa6588 RDS module, default (0) is to use the card definition.")
 
 MODULE_PARM_DESC (no_overlay,"allow override overlay default (0 disables, 1 enables)"" [some VIA/SIS chipsets are known to have problem with overlay]")
 
void __devinit bttv_idcard (struct bttv *btv)
 
void __devinit bttv_init_card1 (struct bttv *btv)
 
void __devinit bttv_init_card2 (struct bttv *btv)
 
void __devinit bttv_init_tuner (struct bttv *btv)
 
u32 bttv_tda9880_setnorm (struct bttv *btv, u32 gpiobits)
 
void tea5757_set_freq (struct bttv *btv, unsigned short freq)
 
void __init bttv_check_chipset (void)
 
int __devinit bttv_handle_chipset (struct bttv *btv)
 

Variables

int no_overlay =-1
 
struct tvcard bttv_tvcards []
 

Macro Definition Documentation

#define BTTV_ALT_DATA   0x000001

Definition at line 3708 of file bttv-cards.c.

#define BTTV_ALT_DCLK   0x100000

Definition at line 3709 of file bttv-cards.c.

#define BTTV_ALT_NCONFIG   0x800000

Definition at line 3710 of file bttv-cards.c.

#define ENA0   0x01

Definition at line 4499 of file bttv-cards.c.

#define ENA1   0x04

Definition at line 4501 of file bttv-cards.c.

#define ENB0   0x02

Definition at line 4500 of file bttv-cards.c.

#define ENB1   0x08

Definition at line 4502 of file bttv-cards.c.

#define I2C_TDA8540   0x90

Definition at line 4559 of file bttv-cards.c.

#define I2C_TDA8540_ALT1   0x92

Definition at line 4560 of file bttv-cards.c.

#define I2C_TDA8540_ALT2   0x94

Definition at line 4561 of file bttv-cards.c.

#define I2C_TDA8540_ALT3   0x96

Definition at line 4562 of file bttv-cards.c.

#define I2C_TDA8540_ALT4   0x98

Definition at line 4563 of file bttv-cards.c.

#define I2C_TDA8540_ALT5   0x9a

Definition at line 4564 of file bttv-cards.c.

#define I2C_TDA8540_ALT6   0x9c

Definition at line 4565 of file bttv-cards.c.

#define IN00   0x20

Definition at line 4505 of file bttv-cards.c.

#define IN01   0x80

Definition at line 4507 of file bttv-cards.c.

#define IN10   0x10

Definition at line 4504 of file bttv-cards.c.

#define IN11   0x40

Definition at line 4506 of file bttv-cards.c.

#define LM1882_SYNC_DRIVE   0x200000L

Definition at line 3095 of file bttv-cards.c.

#define pr_fmt (   fmt)    KBUILD_MODNAME ": " fmt

Definition at line 28 of file bttv-cards.c.

#define PVR_GPIO_DELAY   10

Definition at line 3706 of file bttv-cards.c.

#define PX_CFG_PXC200F   0x01

Definition at line 4611 of file bttv-cards.c.

#define PX_FLAG_PXC200A   0x00001000 /* a pxc200A is bt-878 based */

Definition at line 4612 of file bttv-cards.c.

#define PX_I2C_CMD_CFG   0x00

Definition at line 4615 of file bttv-cards.c.

#define PX_I2C_PIC   0x0f

Definition at line 4613 of file bttv-cards.c.

#define PX_PXC200A_CARDID   0x200a1295

Definition at line 4614 of file bttv-cards.c.

#define TEA_ALLOW_STEREO   0

Definition at line 4199 of file bttv-cards.c.

#define TEA_BAND   20:21

Definition at line 4192 of file bttv-cards.c.

#define TEA_BAND_FM   0

Definition at line 4193 of file bttv-cards.c.

#define TEA_BAND_LW   2

Definition at line 4195 of file bttv-cards.c.

#define TEA_BAND_MW   1

Definition at line 4194 of file bttv-cards.c.

#define TEA_BAND_SW   3

Definition at line 4196 of file bttv-cards.c.

#define TEA_BUFFER   15:15

Definition at line 4185 of file bttv-cards.c.

#define TEA_FORCE_MONO   1

Definition at line 4200 of file bttv-cards.c.

#define TEA_FREQ   0:14

Definition at line 4184 of file bttv-cards.c.

#define TEA_MONO   22:22

Definition at line 4198 of file bttv-cards.c.

#define TEA_PORT0   19:19

Definition at line 4190 of file bttv-cards.c.

#define TEA_PORT1   18:18

Definition at line 4189 of file bttv-cards.c.

#define TEA_SEARCH_DIRECTION   23:23

Definition at line 4202 of file bttv-cards.c.

#define TEA_SEARCH_DOWN   0

Definition at line 4203 of file bttv-cards.c.

#define TEA_SEARCH_UP   1

Definition at line 4204 of file bttv-cards.c.

#define TEA_SIGNAL_STRENGTH   16:17

Definition at line 4187 of file bttv-cards.c.

#define TEA_STATUS   24:24

Definition at line 4206 of file bttv-cards.c.

#define TEA_STATUS_SEARCHING   1

Definition at line 4208 of file bttv-cards.c.

#define TEA_STATUS_TUNED   0

Definition at line 4207 of file bttv-cards.c.

Function Documentation

void __init bttv_check_chipset ( void  )

Definition at line 4811 of file bttv-cards.c.

int __devinit bttv_handle_chipset ( struct bttv *  btv)

Definition at line 4854 of file bttv-cards.c.

void __devinit bttv_idcard ( struct bttv *  btv)

Definition at line 2840 of file bttv-cards.c.

void __devinit bttv_init_card1 ( struct bttv *  btv)

Definition at line 3238 of file bttv-cards.c.

void __devinit bttv_init_card2 ( struct bttv *  btv)

Definition at line 3270 of file bttv-cards.c.

void __devinit bttv_init_tuner ( struct bttv *  btv)

Definition at line 3574 of file bttv-cards.c.

u32 bttv_tda9880_setnorm ( struct bttv *  btv,
u32  gpiobits 
)

Definition at line 3941 of file bttv-cards.c.

module_param ( triton1  ,
int  ,
0444   
)
module_param ( vsfx  ,
int  ,
0444   
)
module_param ( no_overlay  ,
int  ,
0444   
)
module_param ( latency  ,
int  ,
0444   
)
module_param ( gpiomask  ,
int  ,
0444   
)
module_param ( audioall  ,
int  ,
0444   
)
module_param ( autoload  ,
int  ,
0444   
)
module_param_array ( card  ,
int  ,
NULL  ,
0444   
)
module_param_array ( pll  ,
int  ,
NULL  ,
0444   
)
module_param_array ( tuner  ,
int  ,
NULL  ,
0444   
)
module_param_array ( svhs  ,
int  ,
NULL  ,
0444   
)
module_param_array ( remote  ,
int  ,
NULL  ,
0444   
)
module_param_array ( audiodev  ,
int  ,
NULL  ,
0444   
)
module_param_array ( audiomux  ,
int  ,
NULL  ,
0444   
)
MODULE_PARM_DESC ( triton1  ,
"set ETBF pci config bit """  [enable bug compatibility for triton1+others] 
)
MODULE_PARM_DESC ( vsfx  ,
"set VSFX pci config bit """  [yet another chipset flaw workaround] 
)
MODULE_PARM_DESC ( latency  ,
"pci latency timer  
)
MODULE_PARM_DESC ( card  ,
"specify TV/grabber card  model,
see CARDLIST file for a list  
)
MODULE_PARM_DESC ( pll  ,
"specify installed crystal (0=none, 28=28 MHz, 35=35 MHz)"   
)
MODULE_PARM_DESC ( tuner  ,
"specify installed tuner type  
)
MODULE_PARM_DESC ( autoload  ,
"obsolete  option,
please do not use anymore"   
)
MODULE_PARM_DESC ( audiodev  )
MODULE_PARM_DESC ( saa6588  ,
"if  1,
then load the saa6588 RDS  module,
default(0) is to use the card definition."   
)
MODULE_PARM_DESC ( no_overlay  ,
"allow override overlay default (0 disables, 1 enables)"" "  [some VIA/SIS chipsets are known to have problem with overlay] 
)
void tea5757_set_freq ( struct bttv *  btv,
unsigned short  freq 
)

Definition at line 4294 of file bttv-cards.c.

Variable Documentation

struct tvcard bttv_tvcards[]

Definition at line 355 of file bttv-cards.c.

int no_overlay =-1

Definition at line 96 of file bttv-cards.c.