Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
cx18-driver.c File Reference
#include "cx18-driver.h"
#include "cx18-io.h"
#include "cx18-version.h"
#include "cx18-cards.h"
#include "cx18-i2c.h"
#include "cx18-irq.h"
#include "cx18-gpio.h"
#include "cx18-firmware.h"
#include "cx18-queue.h"
#include "cx18-streams.h"
#include "cx18-av-core.h"
#include "cx18-scb.h"
#include "cx18-mailbox.h"
#include "cx18-ioctl.h"
#include "cx18-controls.h"
#include "tuner-xc2028.h"
#include <linux/dma-mapping.h>
#include <media/tveeprom.h>

Go to the source code of this file.

Macros

#define request_modules(dev)
 
#define flush_request_modules(dev)
 
#define TVEEPROM_TUNER_FORMAT_ALL
 

Functions

 EXPORT_SYMBOL (cx18_ext_init)
 
 MODULE_DEVICE_TABLE (pci, cx18_pci_tbl)
 
 module_param_array (tuner, int,&tuner_c, 0644)
 
 module_param_array (radio, int,&radio_c, 0644)
 
 module_param_array (cardtype, int,&cardtype_c, 0644)
 
 module_param_string (pal, pal, sizeof(pal), 0644)
 
 module_param_string (secam, secam, sizeof(secam), 0644)
 
 module_param_string (ntsc, ntsc, sizeof(ntsc), 0644)
 
 module_param_named (debug, cx18_debug, int, 0644)
 
 module_param (mmio_ndelay, int, 0644)
 
 module_param (retry_mmio, int, 0644)
 
 module_param (cx18_pci_latency, int, 0644)
 
 module_param (cx18_first_minor, int, 0644)
 
 module_param (enc_ts_buffers, int, 0644)
 
 module_param (enc_mpg_buffers, int, 0644)
 
 module_param (enc_idx_buffers, int, 0644)
 
 module_param (enc_yuv_buffers, int, 0644)
 
 module_param (enc_vbi_buffers, int, 0644)
 
 module_param (enc_pcm_buffers, int, 0644)
 
 module_param (enc_ts_bufsize, int, 0644)
 
 module_param (enc_mpg_bufsize, int, 0644)
 
 module_param (enc_idx_bufsize, int, 0644)
 
 module_param (enc_yuv_bufsize, int, 0644)
 
 module_param (enc_pcm_bufsize, int, 0644)
 
 module_param (enc_ts_bufs, int, 0644)
 
 module_param (enc_mpg_bufs, int, 0644)
 
 module_param (enc_idx_bufs, int, 0644)
 
 module_param (enc_yuv_bufs, int, 0644)
 
 module_param (enc_vbi_bufs, int, 0644)
 
 module_param (enc_pcm_bufs, int, 0644)
 
 MODULE_PARM_DESC (tuner,"Tuner type selection,\n""\t\t\tsee tuner.h for values")
 
 MODULE_PARM_DESC (radio,"Enable or disable the radio. Use only if autodetection\n""\t\t\tfails. 0 = disable, 1 = enable")
 
 MODULE_PARM_DESC (cardtype,"Only use this option if your card is not detected properly.\n""\t\tSpecify card type:\n""\t\t\t 1 = Hauppauge HVR 1600 (ESMT memory)\n""\t\t\t 2 = Hauppauge HVR 1600 (Samsung memory)\n""\t\t\t 3 = Compro VideoMate H900\n""\t\t\t 4 = Yuan MPC718\n""\t\t\t 5 = Conexant Raptor PAL/SECAM\n""\t\t\t 6 = Toshiba Qosmio DVB-T/Analog\n""\t\t\t 7 = Leadtek WinFast PVR2100\n""\t\t\t 8 = Leadtek WinFast DVR3100 H\n""\t\t\t 9 = GoTView PCI DVD3 Hybrid\n""\t\t\t 10 = Hauppauge HVR 1600 (S5H1411)\n""\t\t\t 0 = Autodetect (default)\n""\t\t\t-1 = Ignore this card\n\t\t")
 
 MODULE_PARM_DESC (pal,"Set PAL standard: B, G, H, D, K, I, M, N, Nc, 60")
 
 MODULE_PARM_DESC (secam,"Set SECAM standard: B, G, H, D, K, L, LC")
 
 MODULE_PARM_DESC (ntsc,"Set NTSC standard: M, J, K")
 
 MODULE_PARM_DESC (debug,"Debug level (bitmask). Default: 0\n""\t\t\t 1/0x0001: warning\n""\t\t\t 2/0x0002: info\n""\t\t\t 4/0x0004: mailbox\n""\t\t\t 8/0x0008: dma\n""\t\t\t 16/0x0010: ioctl\n""\t\t\t 32/0x0020: file\n""\t\t\t 64/0x0040: i2c\n""\t\t\t128/0x0080: irq\n""\t\t\t256/0x0100: high volume\n")
 
 MODULE_PARM_DESC (cx18_pci_latency,"Change the PCI latency to 64 if lower: 0 = No, 1 = Yes,\n""\t\t\tDefault: Yes")
 
 MODULE_PARM_DESC (retry_mmio,"(Deprecated) MMIO writes are now always checked and retried\n""\t\t\tEffectively: 1 [Yes]")
 
 MODULE_PARM_DESC (mmio_ndelay,"(Deprecated) MMIO accesses are now never purposely delayed\n""\t\t\tEffectively: 0 ns")
 
 MODULE_PARM_DESC (enc_ts_buffers,"Encoder TS buffer memory (MB). (enc_ts_bufs can override)\n""\t\t\tDefault: "__stringify(CX18_DEFAULT_ENC_TS_BUFFERS))
 
 MODULE_PARM_DESC (enc_ts_bufsize,"Size of an encoder TS buffer (kB)\n""\t\t\tDefault: "__stringify(CX18_DEFAULT_ENC_TS_BUFSIZE))
 
 MODULE_PARM_DESC (enc_ts_bufs,"Number of encoder TS buffers\n""\t\t\tDefault is computed from other enc_ts_* parameters")
 
 MODULE_PARM_DESC (enc_mpg_buffers,"Encoder MPG buffer memory (MB). (enc_mpg_bufs can override)\n""\t\t\tDefault: "__stringify(CX18_DEFAULT_ENC_MPG_BUFFERS))
 
 MODULE_PARM_DESC (enc_mpg_bufsize,"Size of an encoder MPG buffer (kB)\n""\t\t\tDefault: "__stringify(CX18_DEFAULT_ENC_MPG_BUFSIZE))
 
 MODULE_PARM_DESC (enc_mpg_bufs,"Number of encoder MPG buffers\n""\t\t\tDefault is computed from other enc_mpg_* parameters")
 
 MODULE_PARM_DESC (enc_idx_buffers,"(Deprecated) Encoder IDX buffer memory (MB)\n""\t\t\tIgnored, except 0 disables IDX buffer allocations\n""\t\t\tDefault: 1 [Enabled]")
 
 MODULE_PARM_DESC (enc_idx_bufsize,"Size of an encoder IDX buffer (kB)\n""\t\t\tAllowed values are multiples of 1.5 kB rounded up\n""\t\t\t(multiples of size required for 64 index entries)\n""\t\t\tDefault: 2")
 
 MODULE_PARM_DESC (enc_idx_bufs,"Number of encoder IDX buffers\n""\t\t\tDefault: "__stringify(CX18_MAX_FW_MDLS_PER_STREAM))
 
 MODULE_PARM_DESC (enc_yuv_buffers,"Encoder YUV buffer memory (MB). (enc_yuv_bufs can override)\n""\t\t\tDefault: "__stringify(CX18_DEFAULT_ENC_YUV_BUFFERS))
 
 MODULE_PARM_DESC (enc_yuv_bufsize,"Size of an encoder YUV buffer (kB)\n""\t\t\tAllowed values are multiples of 33.75 kB rounded up\n""\t\t\t(multiples of size required for 32 screen lines)\n""\t\t\tDefault: 102")
 
 MODULE_PARM_DESC (enc_yuv_bufs,"Number of encoder YUV buffers\n""\t\t\tDefault is computed from other enc_yuv_* parameters")
 
 MODULE_PARM_DESC (enc_vbi_buffers,"Encoder VBI buffer memory (MB). (enc_vbi_bufs can override)\n""\t\t\tDefault: "__stringify(CX18_DEFAULT_ENC_VBI_BUFFERS))
 
 MODULE_PARM_DESC (enc_vbi_bufs,"Number of encoder VBI buffers\n""\t\t\tDefault is computed from enc_vbi_buffers")
 
 MODULE_PARM_DESC (enc_pcm_buffers,"Encoder PCM buffer memory (MB). (enc_pcm_bufs can override)\n""\t\t\tDefault: "__stringify(CX18_DEFAULT_ENC_PCM_BUFFERS))
 
 MODULE_PARM_DESC (enc_pcm_bufsize,"Size of an encoder PCM buffer (kB)\n""\t\t\tDefault: "__stringify(CX18_DEFAULT_ENC_PCM_BUFSIZE))
 
 MODULE_PARM_DESC (enc_pcm_bufs,"Number of encoder PCM buffers\n""\t\t\tDefault is computed from other enc_pcm_* parameters")
 
 MODULE_PARM_DESC (cx18_first_minor,"Set device node number assigned to first card")
 
 MODULE_AUTHOR ("Hans Verkuil")
 
 MODULE_DESCRIPTION ("CX23418 driver")
 
 MODULE_SUPPORTED_DEVICE ("CX23418 MPEG2 encoder")
 
 MODULE_LICENSE ("GPL")
 
 MODULE_VERSION (CX18_VERSION)
 
int cx18_msleep_timeout (unsigned int msecs, int intr)
 
void cx18_read_eeprom (struct cx18 *cx, struct tveeprom *tv)
 
int cx18_init_on_first_open (struct cx18 *cx)
 
 module_init (module_start)
 
 module_exit (module_cleanup)
 
 MODULE_FIRMWARE (XC2028_DEFAULT_FIRMWARE)
 

Variables

int cx18_first_minor
 
int(* cx18_ext_init )(struct cx18 *)
 
int cx18_debug
 

Macro Definition Documentation

#define flush_request_modules (   dev)

Definition at line 279 of file cx18-driver.c.

#define request_modules (   dev)

Definition at line 278 of file cx18-driver.c.

#define TVEEPROM_TUNER_FORMAT_ALL
Value:
V4L2_STD_MN | \
V4L2_STD_PAL_I | \
V4L2_STD_SECAM_L | V4L2_STD_SECAM_LC | \
V4L2_STD_DK)

Function Documentation

int cx18_init_on_first_open ( struct cx18 cx)

Definition at line 1151 of file cx18-driver.c.

int cx18_msleep_timeout ( unsigned int  msecs,
int  intr 
)

Definition at line 283 of file cx18-driver.c.

void cx18_read_eeprom ( struct cx18 cx,
struct tveeprom tv 
)

Definition at line 325 of file cx18-driver.c.

EXPORT_SYMBOL ( cx18_ext_init  )
MODULE_AUTHOR ( "Hans Verkuil"  )
MODULE_DESCRIPTION ( "CX23418 driver )
MODULE_DEVICE_TABLE ( pci  ,
cx18_pci_tbl   
)
module_exit ( module_cleanup  )
MODULE_FIRMWARE ( XC2028_DEFAULT_FIRMWARE  )
module_init ( module_start  )
MODULE_LICENSE ( "GPL"  )
module_param ( mmio_ndelay  ,
int  ,
0644   
)
module_param ( retry_mmio  ,
int  ,
0644   
)
module_param ( cx18_pci_latency  ,
int  ,
0644   
)
module_param ( cx18_first_minor  ,
int  ,
0644   
)
module_param ( enc_ts_buffers  ,
int  ,
0644   
)
module_param ( enc_mpg_buffers  ,
int  ,
0644   
)
module_param ( enc_idx_buffers  ,
int  ,
0644   
)
module_param ( enc_yuv_buffers  ,
int  ,
0644   
)
module_param ( enc_vbi_buffers  ,
int  ,
0644   
)
module_param ( enc_pcm_buffers  ,
int  ,
0644   
)
module_param ( enc_ts_bufsize  ,
int  ,
0644   
)
module_param ( enc_mpg_bufsize  ,
int  ,
0644   
)
module_param ( enc_idx_bufsize  ,
int  ,
0644   
)
module_param ( enc_yuv_bufsize  ,
int  ,
0644   
)
module_param ( enc_pcm_bufsize  ,
int  ,
0644   
)
module_param ( enc_ts_bufs  ,
int  ,
0644   
)
module_param ( enc_mpg_bufs  ,
int  ,
0644   
)
module_param ( enc_idx_bufs  ,
int  ,
0644   
)
module_param ( enc_yuv_bufs  ,
int  ,
0644   
)
module_param ( enc_vbi_bufs  ,
int  ,
0644   
)
module_param ( enc_pcm_bufs  ,
int  ,
0644   
)
module_param_array ( tuner  ,
int  ,
tuner_c,
0644   
)
module_param_array ( radio  ,
int  ,
radio_c,
0644   
)
module_param_array ( cardtype  ,
int  ,
cardtype_c,
0644   
)
module_param_named ( debug  ,
cx18_debug  ,
int  ,
0644   
)
module_param_string ( pal  ,
pal  ,
sizeof(pal ,
0644   
)
module_param_string ( secam  ,
secam  ,
sizeof(secam)  ,
0644   
)
module_param_string ( ntsc  ,
ntsc  ,
sizeof(ntsc ,
0644   
)
MODULE_PARM_DESC ( tuner  ,
"Tuner type  selection,
\n""\t\t\tsee tuner.h for values  
)
MODULE_PARM_DESC ( radio  ,
"Enable or disable the radio. Use only if autodetection\n""\t\t\tfails.  0 = disable 
)
MODULE_PARM_DESC ( cardtype  )
MODULE_PARM_DESC ( pal  ,
"Set PAL standard:  B,
G  ,
H  ,
D  ,
K  ,
I  ,
M  ,
N  ,
Nc  ,
60"   
)
MODULE_PARM_DESC ( secam  ,
"Set SECAM standard:  B,
G  ,
H  ,
D  ,
K  ,
L  ,
LC  
)
MODULE_PARM_DESC ( ntsc  ,
"Set NTSC standard:  M,
,
K  
)
MODULE_PARM_DESC ( debug  ,
"Debug level (bitmask). Default: 0\n""\t\t\t 1/0x0001: warning\n""\t\t\t 2/0x0002: info\n""\t\t\t 4/0x0004: mailbox\n""\t\t\t 8/0x0008: dma\n""\t\t\t 16/0x0010: ioctl\n""\t\t\t 32/0x0020: file\n""\t\t\t 64/0x0040: i2c\n""\t\t\t128/0x0080: irq\n""\t\t\t256/0x0100: high volume\n"   
)
MODULE_PARM_DESC ( cx18_pci_latency  ,
"Change the PCI latency to 64 if lower:  0 = No,
= Yes,
\n""\t\t\tDefault:Yes"   
)
MODULE_PARM_DESC ( retry_mmio  ,
"(Deprecated) MMIO writes are now always checked and retried\n""\t\t\tEffectively: 1 "  [Yes] 
)
MODULE_PARM_DESC ( mmio_ndelay  ,
"(Deprecated) MMIO accesses are now never purposely delayed\n""\t\t\tEffectively: 0 ns  
)
MODULE_PARM_DESC ( enc_ts_buffers  ,
"Encoder TS buffer memory   MB). (enc_ts_bufs can override)\n""\t\t\tDefault: "__stringify(CX18_DEFAULT_ENC_TS_BUFFERS 
)
MODULE_PARM_DESC ( enc_ts_bufsize  ,
"Size of an encoder TS buffer   kB)\n""\t\t\tDefault: "__stringify(CX18_DEFAULT_ENC_TS_BUFSIZE 
)
MODULE_PARM_DESC ( enc_ts_bufs  ,
"Number of encoder TS buffers\n""\t\t\tDefault is computed from other enc_ts_* parameters  
)
MODULE_PARM_DESC ( enc_mpg_buffers  ,
"Encoder MPG buffer memory   MB). (enc_mpg_bufs can override)\n""\t\t\tDefault: "__stringify(CX18_DEFAULT_ENC_MPG_BUFFERS 
)
MODULE_PARM_DESC ( enc_mpg_bufsize  ,
"Size of an encoder MPG buffer   kB)\n""\t\t\tDefault: "__stringify(CX18_DEFAULT_ENC_MPG_BUFSIZE 
)
MODULE_PARM_DESC ( enc_mpg_bufs  ,
"Number of encoder MPG buffers\n""\t\t\tDefault is computed from other enc_mpg_* parameters  
)
MODULE_PARM_DESC ( enc_idx_buffers  ,
"(Deprecated) Encoder IDX buffer memory (MB)\n""\t\t\  tIgnored,
except 0 disables IDX buffer allocations\n""\t\t\tDefault:1"  [Enabled] 
)
MODULE_PARM_DESC ( enc_idx_bufsize  ,
"Size of an encoder IDX buffer (kB)\n""\t\t\tAllowed values are multiples of 1.5 kB rounded up\n""\t\t\t(multiples of size required for 64 index entries)\n""\t\t\tDefault: 2"   
)
MODULE_PARM_DESC ( enc_idx_bufs  ,
"Number of encoder IDX buffers\n""\t\t\tDefault: "  __stringifyCX18_MAX_FW_MDLS_PER_STREAM 
)
MODULE_PARM_DESC ( enc_yuv_buffers  ,
"Encoder YUV buffer memory   MB). (enc_yuv_bufs can override)\n""\t\t\tDefault: "__stringify(CX18_DEFAULT_ENC_YUV_BUFFERS 
)
MODULE_PARM_DESC ( enc_yuv_bufsize  ,
"Size of an encoder YUV buffer (kB)\n""\t\t\tAllowed values are multiples of 33.75 kB rounded up\n""\t\t\t(multiples of size required for 32 screen lines)\n""\t\t\tDefault: 102"   
)
MODULE_PARM_DESC ( enc_yuv_bufs  ,
"Number of encoder YUV buffers\n""\t\t\tDefault is computed from other enc_yuv_* parameters  
)
MODULE_PARM_DESC ( enc_vbi_buffers  ,
"Encoder VBI buffer memory   MB). (enc_vbi_bufs can override)\n""\t\t\tDefault: "__stringify(CX18_DEFAULT_ENC_VBI_BUFFERS 
)
MODULE_PARM_DESC ( enc_vbi_bufs  ,
"Number of encoder VBI buffers\n""\t\t\tDefault is computed from enc_vbi_buffers"   
)
MODULE_PARM_DESC ( enc_pcm_buffers  ,
"Encoder PCM buffer memory   MB). (enc_pcm_bufs can override)\n""\t\t\tDefault: "__stringify(CX18_DEFAULT_ENC_PCM_BUFFERS 
)
MODULE_PARM_DESC ( enc_pcm_bufsize  ,
"Size of an encoder PCM buffer   kB)\n""\t\t\tDefault: "__stringify(CX18_DEFAULT_ENC_PCM_BUFSIZE 
)
MODULE_PARM_DESC ( enc_pcm_bufs  ,
"Number of encoder PCM buffers\n""\t\t\tDefault is computed from other enc_pcm_* parameters  
)
MODULE_PARM_DESC ( cx18_first_minor  ,
"Set device node number assigned to first card  
)
MODULE_SUPPORTED_DEVICE ( "CX23418 MPEG2 encoder"  )
MODULE_VERSION ( CX18_VERSION  )

Variable Documentation

int cx18_debug

Definition at line 110 of file cx18-driver.c.

int(* cx18_ext_init)(struct cx18 *)

Definition at line 52 of file cx18-driver.c.

int cx18_first_minor

Definition at line 49 of file cx18-driver.c.