Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
xc5000.c File Reference
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/videodev2.h>
#include <linux/delay.h>
#include <linux/dvb/frontend.h>
#include <linux/i2c.h>
#include "dvb_frontend.h"
#include "xc5000.h"
#include "tuner-i2c.h"

Go to the source code of this file.

Data Structures

struct  xc5000_priv
 
struct  XC_TV_STANDARD
 
struct  xc5000_fw_cfg
 

Macros

#define dprintk(level, fmt, arg...)
 
#define MAX_TV_STANDARD   24
 
#define XC_MAX_I2C_WRITE_LENGTH   64
 
#define XC_RF_MODE_AIR   0
 
#define XC_RF_MODE_CABLE   1
 
#define XC_RESULT_SUCCESS   0
 
#define XC_RESULT_RESET_FAILURE   1
 
#define XC_RESULT_I2C_WRITE_FAILURE   2
 
#define XC_RESULT_I2C_READ_FAILURE   3
 
#define XC_RESULT_OUT_OF_RANGE   5
 
#define XC_PRODUCT_ID_FW_NOT_LOADED   0x2000
 
#define XC_PRODUCT_ID_FW_LOADED   0x1388
 
#define XREG_INIT   0x00
 
#define XREG_VIDEO_MODE   0x01
 
#define XREG_AUDIO_MODE   0x02
 
#define XREG_RF_FREQ   0x03
 
#define XREG_D_CODE   0x04
 
#define XREG_IF_OUT   0x05
 
#define XREG_SEEK_MODE   0x07
 
#define XREG_POWER_DOWN   0x0A /* Obsolete */
 
#define XREG_OUTPUT_AMP   0x0B
 
#define XREG_SIGNALSOURCE   0x0D /* 0=Air, 1=Cable */
 
#define XREG_SMOOTHEDCVBS   0x0E
 
#define XREG_XTALFREQ   0x0F
 
#define XREG_FINERFREQ   0x10
 
#define XREG_DDIMODE   0x11
 
#define XREG_ADC_ENV   0x00
 
#define XREG_QUALITY   0x01
 
#define XREG_FRAME_LINES   0x02
 
#define XREG_HSYNC_FREQ   0x03
 
#define XREG_LOCK   0x04
 
#define XREG_FREQ_ERROR   0x05
 
#define XREG_SNR   0x06
 
#define XREG_VERSION   0x07
 
#define XREG_PRODUCT_ID   0x08
 
#define XREG_BUSY   0x09
 
#define XREG_BUILD   0x0D
 
#define XREG_TOTALGAIN   0x0F
 
#define XREG_FW_CHECKSUM   0x12
 
#define XREG_INIT_STATUS   0x13
 
#define MN_NTSC_PAL_BTSC   0
 
#define MN_NTSC_PAL_A2   1
 
#define MN_NTSC_PAL_EIAJ   2
 
#define MN_NTSC_PAL_Mono   3
 
#define BG_PAL_A2   4
 
#define BG_PAL_NICAM   5
 
#define BG_PAL_MONO   6
 
#define I_PAL_NICAM   7
 
#define I_PAL_NICAM_MONO   8
 
#define DK_PAL_A2   9
 
#define DK_PAL_NICAM   10
 
#define DK_PAL_MONO   11
 
#define DK_SECAM_A2DK1   12
 
#define DK_SECAM_A2LDK3   13
 
#define DK_SECAM_A2MONO   14
 
#define L_SECAM_NICAM   15
 
#define LC_SECAM_NICAM   16
 
#define DTV6   17
 
#define DTV8   18
 
#define DTV7_8   19
 
#define DTV7   20
 
#define FM_Radio_INPUT2   21
 
#define FM_Radio_INPUT1   22
 
#define FM_Radio_INPUT1_MONO   23
 
#define XC5000A_FIRMWARE   "dvb-fe-xc5000-1.6.114.fw"
 
#define XC5000C_FIRMWARE   "dvb-fe-xc5000c-4.1.30.7.fw"
 
#define XC_TUNE_ANALOG   0
 
#define XC_TUNE_DIGITAL   1
 

Functions

 module_param (debug, int, 0644)
 
 MODULE_PARM_DESC (debug,"Turn on/off debugging (default:off).")
 
 module_param (no_poweroff, int, 0644)
 
 MODULE_PARM_DESC (no_poweroff,"0 (default) powers device off when not used.\n""\t\t1 keep device energized and with tuner ready all the times.\n""\t\tFaster, but consumes more power and keeps the device hotter")
 
struct dvb_frontendxc5000_attach (struct dvb_frontend *fe, struct i2c_adapter *i2c, const struct xc5000_config *cfg)
 
 EXPORT_SYMBOL (xc5000_attach)
 
 MODULE_AUTHOR ("Steven Toth")
 
 MODULE_DESCRIPTION ("Xceive xc5000 silicon tuner driver")
 
 MODULE_LICENSE ("GPL")
 
 MODULE_FIRMWARE (XC5000A_FIRMWARE)
 
 MODULE_FIRMWARE (XC5000C_FIRMWARE)
 

Macro Definition Documentation

#define BG_PAL_A2   4

Definition at line 165 of file xc5000.c.

#define BG_PAL_MONO   6

Definition at line 167 of file xc5000.c.

#define BG_PAL_NICAM   5

Definition at line 166 of file xc5000.c.

#define DK_PAL_A2   9

Definition at line 170 of file xc5000.c.

#define DK_PAL_MONO   11

Definition at line 172 of file xc5000.c.

#define DK_PAL_NICAM   10

Definition at line 171 of file xc5000.c.

#define DK_SECAM_A2DK1   12

Definition at line 173 of file xc5000.c.

#define DK_SECAM_A2LDK3   13

Definition at line 174 of file xc5000.c.

#define DK_SECAM_A2MONO   14

Definition at line 175 of file xc5000.c.

#define dprintk (   level,
  fmt,
  arg... 
)
Value:
if (debug >= level) \
printk(KERN_INFO "%s: " fmt, "xc5000", ## arg)

Definition at line 49 of file xc5000.c.

#define DTV6   17

Definition at line 178 of file xc5000.c.

#define DTV7   20

Definition at line 181 of file xc5000.c.

#define DTV7_8   19

Definition at line 180 of file xc5000.c.

#define DTV8   18

Definition at line 179 of file xc5000.c.

#define FM_Radio_INPUT1   22

Definition at line 183 of file xc5000.c.

#define FM_Radio_INPUT1_MONO   23

Definition at line 184 of file xc5000.c.

#define FM_Radio_INPUT2   21

Definition at line 182 of file xc5000.c.

#define I_PAL_NICAM   7

Definition at line 168 of file xc5000.c.

#define I_PAL_NICAM_MONO   8

Definition at line 169 of file xc5000.c.

#define L_SECAM_NICAM   15

Definition at line 176 of file xc5000.c.

#define LC_SECAM_NICAM   16

Definition at line 177 of file xc5000.c.

#define MAX_TV_STANDARD   24

Definition at line 71 of file xc5000.c.

#define MN_NTSC_PAL_A2   1

Definition at line 162 of file xc5000.c.

#define MN_NTSC_PAL_BTSC   0

Definition at line 161 of file xc5000.c.

#define MN_NTSC_PAL_EIAJ   2

Definition at line 163 of file xc5000.c.

#define MN_NTSC_PAL_Mono   3

Definition at line 164 of file xc5000.c.

#define XC5000A_FIRMWARE   "dvb-fe-xc5000-1.6.114.fw"

Definition at line 222 of file xc5000.c.

#define XC5000C_FIRMWARE   "dvb-fe-xc5000c-4.1.30.7.fw"

Definition at line 229 of file xc5000.c.

#define XC_MAX_I2C_WRITE_LENGTH   64

Definition at line 72 of file xc5000.c.

#define XC_PRODUCT_ID_FW_LOADED   0x1388

Definition at line 87 of file xc5000.c.

#define XC_PRODUCT_ID_FW_NOT_LOADED   0x2000

Definition at line 86 of file xc5000.c.

#define XC_RESULT_I2C_READ_FAILURE   3

Definition at line 82 of file xc5000.c.

#define XC_RESULT_I2C_WRITE_FAILURE   2

Definition at line 81 of file xc5000.c.

#define XC_RESULT_OUT_OF_RANGE   5

Definition at line 83 of file xc5000.c.

#define XC_RESULT_RESET_FAILURE   1

Definition at line 80 of file xc5000.c.

#define XC_RESULT_SUCCESS   0

Definition at line 79 of file xc5000.c.

#define XC_RF_MODE_AIR   0

Definition at line 75 of file xc5000.c.

#define XC_RF_MODE_CABLE   1

Definition at line 76 of file xc5000.c.

#define XC_TUNE_ANALOG   0

Definition at line 582 of file xc5000.c.

#define XC_TUNE_DIGITAL   1

Definition at line 583 of file xc5000.c.

#define XREG_ADC_ENV   0x00

Definition at line 106 of file xc5000.c.

#define XREG_AUDIO_MODE   0x02

Definition at line 92 of file xc5000.c.

#define XREG_BUILD   0x0D

Definition at line 116 of file xc5000.c.

#define XREG_BUSY   0x09

Definition at line 115 of file xc5000.c.

#define XREG_D_CODE   0x04

Definition at line 94 of file xc5000.c.

#define XREG_DDIMODE   0x11

Definition at line 104 of file xc5000.c.

#define XREG_FINERFREQ   0x10

Definition at line 103 of file xc5000.c.

#define XREG_FRAME_LINES   0x02

Definition at line 108 of file xc5000.c.

#define XREG_FREQ_ERROR   0x05

Definition at line 111 of file xc5000.c.

#define XREG_FW_CHECKSUM   0x12

Definition at line 118 of file xc5000.c.

#define XREG_HSYNC_FREQ   0x03

Definition at line 109 of file xc5000.c.

#define XREG_IF_OUT   0x05

Definition at line 95 of file xc5000.c.

#define XREG_INIT   0x00

Definition at line 90 of file xc5000.c.

#define XREG_INIT_STATUS   0x13

Definition at line 119 of file xc5000.c.

#define XREG_LOCK   0x04

Definition at line 110 of file xc5000.c.

#define XREG_OUTPUT_AMP   0x0B

Definition at line 99 of file xc5000.c.

#define XREG_POWER_DOWN   0x0A /* Obsolete */

Definition at line 97 of file xc5000.c.

#define XREG_PRODUCT_ID   0x08

Definition at line 114 of file xc5000.c.

#define XREG_QUALITY   0x01

Definition at line 107 of file xc5000.c.

#define XREG_RF_FREQ   0x03

Definition at line 93 of file xc5000.c.

#define XREG_SEEK_MODE   0x07

Definition at line 96 of file xc5000.c.

#define XREG_SIGNALSOURCE   0x0D /* 0=Air, 1=Cable */

Definition at line 100 of file xc5000.c.

#define XREG_SMOOTHEDCVBS   0x0E

Definition at line 101 of file xc5000.c.

#define XREG_SNR   0x06

Definition at line 112 of file xc5000.c.

#define XREG_TOTALGAIN   0x0F

Definition at line 117 of file xc5000.c.

#define XREG_VERSION   0x07

Definition at line 113 of file xc5000.c.

#define XREG_VIDEO_MODE   0x01

Definition at line 91 of file xc5000.c.

#define XREG_XTALFREQ   0x0F

Definition at line 102 of file xc5000.c.

Function Documentation

EXPORT_SYMBOL ( xc5000_attach  )
MODULE_AUTHOR ( "Steven Toth"  )
MODULE_DESCRIPTION ( "Xceive xc5000 silicon tuner driver )
MODULE_FIRMWARE ( XC5000A_FIRMWARE  )
MODULE_FIRMWARE ( XC5000C_FIRMWARE  )
MODULE_LICENSE ( "GPL"  )
module_param ( debug  ,
int  ,
0644   
)
module_param ( no_poweroff  ,
int  ,
0644   
)
MODULE_PARM_DESC ( debug  ,
"Turn on/off debugging (default:off)."   
)
MODULE_PARM_DESC ( no_poweroff  ,
"0 (default) powers device off when not used.\n""\t\t1 keep device energized and with tuner ready all the times.\n""\t\  tFaster,
but consumes more power and keeps the device hotter"   
)
struct dvb_frontend* xc5000_attach ( struct dvb_frontend fe,
struct i2c_adapter i2c,
const struct xc5000_config cfg 
)
read

Definition at line 1268 of file xc5000.c.