Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions
tuner-xc2028.c File Reference
#include <linux/i2c.h>
#include <asm/div64.h>
#include <linux/firmware.h>
#include <linux/videodev2.h>
#include <linux/delay.h>
#include <media/tuner.h>
#include <linux/mutex.h>
#include <linux/slab.h>
#include <asm/unaligned.h>
#include "tuner-i2c.h"
#include "tuner-xc2028.h"
#include "tuner-xc2028-types.h"
#include <linux/dvb/frontend.h>
#include "dvb_frontend.h"

Go to the source code of this file.

Data Structures

struct  firmware_description
 
struct  firmware_properties
 
struct  xc2028_data
 

Macros

#define XREG_INIT   0x00
 
#define XREG_RF_FREQ   0x02
 
#define XREG_POWER_DOWN   0x08
 
#define XREG_FREQ_ERROR   0x01
 
#define XREG_LOCK   0x02
 
#define XREG_VERSION   0x04
 
#define XREG_PRODUCT_ID   0x08
 
#define XREG_HSYNC_FREQ   0x10
 
#define XREG_FRAME_LINES   0x20
 
#define XREG_SNR   0x40
 
#define XREG_ADC_ENV   0x0100
 
#define i2c_send(priv, buf, size)
 
#define i2c_rcv(priv, buf, size)
 
#define i2c_send_recv(priv, obuf, osize, ibuf, isize)
 
#define send_seq(priv, data...)
 
#define dump_firm_type(t)   dump_firm_type_and_int_freq(t, 0)
 
#define DIV   15625
 

Enumerations

enum  xc2028_state {
  XC2028_NO_FIRMWARE = 0, XC2028_WAITING_FIRMWARE, XC2028_ACTIVE, XC2028_SLEEP,
  XC2028_NODEV
}
 

Functions

 module_param (debug, int, 0644)
 
 MODULE_PARM_DESC (debug,"enable verbose debug messages")
 
 module_param (no_poweroff, int, 0644)
 
 MODULE_PARM_DESC (no_poweroff,"0 (default) powers device off when not used.\n""1 keep device energized and with tuner ready all the times.\n"" Faster, but consumes more power and keeps the device hotter\n")
 
 module_param_string (audio_std, audio_std, sizeof(audio_std), 0)
 
 MODULE_PARM_DESC (audio_std,"Audio standard. XC3028 audio decoder explicitly ""needs to know what audio\n""standard is needed for some video standards with audio A2 or NICAM.\n""The valid values are:\n""A2\n""A2/A\n""A2/B\n""NICAM\n""NICAM/A\n""NICAM/B\n")
 
 module_param_string (firmware_name, firmware_name, sizeof(firmware_name), 0)
 
 MODULE_PARM_DESC (firmware_name,"Firmware file name. Allows overriding the ""default firmware name\n")
 
struct dvb_frontendxc2028_attach (struct dvb_frontend *fe, struct xc2028_config *cfg)
 
 EXPORT_SYMBOL (xc2028_attach)
 
 MODULE_DESCRIPTION ("Xceive xc2028/xc3028 tuner driver")
 
 MODULE_AUTHOR ("Michel Ludwig <[email protected]>")
 
 MODULE_AUTHOR ("Mauro Carvalho Chehab <[email protected]>")
 
 MODULE_LICENSE ("GPL")
 
 MODULE_FIRMWARE (XC2028_DEFAULT_FIRMWARE)
 
 MODULE_FIRMWARE (XC3028L_DEFAULT_FIRMWARE)
 

Macro Definition Documentation

#define DIV   15625

Definition at line 993 of file tuner-xc2028.c.

#define dump_firm_type (   t)    dump_firm_type_and_int_freq(t, 0)

Definition at line 184 of file tuner-xc2028.c.

#define i2c_rcv (   priv,
  buf,
  size 
)
Value:
({ \
int _rc; \
_rc = tuner_i2c_xfer_recv(&priv->i2c_props, buf, size); \
if (size != _rc) \
tuner_err("i2c input error: rc = %d (should be %d)\n", \
_rc, (int)size); \
_rc; \
})

Definition at line 134 of file tuner-xc2028.c.

#define i2c_send (   priv,
  buf,
  size 
)
Value:
({ \
int _rc; \
_rc = tuner_i2c_xfer_send(&priv->i2c_props, buf, size); \
if (size != _rc) \
tuner_info("i2c output error: rc = %d (should be %d)\n",\
_rc, (int)size); \
if (priv->ctrl.msleep) \
msleep(priv->ctrl.msleep); \
_rc; \
})

Definition at line 123 of file tuner-xc2028.c.

#define i2c_send_recv (   priv,
  obuf,
  osize,
  ibuf,
  isize 
)
Value:
({ \
int _rc; \
_rc = tuner_i2c_xfer_send_recv(&priv->i2c_props, obuf, osize, \
ibuf, isize); \
if (isize != _rc) \
tuner_err("i2c input error: rc = %d (should be %d)\n", \
_rc, (int)isize); \
if (priv->ctrl.msleep) \
msleep(priv->ctrl.msleep); \
_rc; \
})

Definition at line 143 of file tuner-xc2028.c.

#define send_seq (   priv,
  data... 
)
Value:
({ \
static u8 _val[] = data; \
int _rc; \
if (sizeof(_val) != \
(_rc = tuner_i2c_xfer_send(&priv->i2c_props, \
_val, sizeof(_val)))) { \
tuner_err("Error on line %d: %d\n", __LINE__, _rc); \
} else if (priv->ctrl.msleep) \
msleep(priv->ctrl.msleep); \
_rc; \
})

Definition at line 155 of file tuner-xc2028.c.

#define XREG_ADC_ENV   0x0100

Definition at line 41 of file tuner-xc2028.c.

#define XREG_FRAME_LINES   0x20

Definition at line 38 of file tuner-xc2028.c.

#define XREG_FREQ_ERROR   0x01

Definition at line 33 of file tuner-xc2028.c.

#define XREG_HSYNC_FREQ   0x10

Definition at line 37 of file tuner-xc2028.c.

#define XREG_INIT   0x00

Definition at line 28 of file tuner-xc2028.c.

#define XREG_LOCK   0x02

Definition at line 34 of file tuner-xc2028.c.

#define XREG_POWER_DOWN   0x08

Definition at line 30 of file tuner-xc2028.c.

#define XREG_PRODUCT_ID   0x08

Definition at line 36 of file tuner-xc2028.c.

#define XREG_RF_FREQ   0x02

Definition at line 29 of file tuner-xc2028.c.

#define XREG_SNR   0x40

Definition at line 39 of file tuner-xc2028.c.

#define XREG_VERSION   0x04

Definition at line 35 of file tuner-xc2028.c.

Enumeration Type Documentation

Enumerator:
XC2028_NO_FIRMWARE 
XC2028_WAITING_FIRMWARE 
XC2028_ACTIVE 
XC2028_SLEEP 
XC2028_NODEV 

Definition at line 93 of file tuner-xc2028.c.

Function Documentation

EXPORT_SYMBOL ( xc2028_attach  )
MODULE_AUTHOR ( "Michel Ludwig <[email protected]>"  )
MODULE_AUTHOR ( "Mauro Carvalho Chehab <[email protected]>"  )
MODULE_DESCRIPTION ( "Xceive xc2028/xc3028 tuner driver )
MODULE_FIRMWARE ( XC2028_DEFAULT_FIRMWARE  )
MODULE_FIRMWARE ( XC3028L_DEFAULT_FIRMWARE  )
MODULE_LICENSE ( "GPL"  )
module_param ( debug  ,
int  ,
0644   
)
module_param ( no_poweroff  ,
int  ,
0644   
)
module_param_string ( audio_std  ,
audio_std  ,
sizeof(audio_std)  ,
 
)
module_param_string ( firmware_name  ,
firmware_name  ,
sizeof(firmware_name)  ,
 
)
MODULE_PARM_DESC ( debug  ,
"enable verbose debug messages"   
)
MODULE_PARM_DESC ( no_poweroff  ,
"0 (default) powers device off when not used.\n""1 keep device energized and with tuner ready all the times.\n""  Faster,
but consumes more power and keeps the device hotter\n  
)
MODULE_PARM_DESC ( audio_std  ,
"Audio standard. XC3028 audio decoder explicitly ""needs to know what audio\n""standard is needed for some video standards with audio A2 or NICAM.\n""The valid values are:\n""A2\n""A2/A\n""A2/B\n""NICAM\n""NICAM/A\n""NICAM/B\n  
)
MODULE_PARM_DESC ( firmware_name  ,
"Firmware file name. Allows overriding the ""default firmware name\n  
)
struct dvb_frontend* xc2028_attach ( struct dvb_frontend fe,
struct xc2028_config cfg 
)
read

Definition at line 1442 of file tuner-xc2028.c.