Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
tea5761.c File Reference
#include <linux/i2c.h>
#include <linux/slab.h>
#include <linux/delay.h>
#include <linux/videodev2.h>
#include <media/tuner.h>
#include "tuner-i2c.h"
#include "tea5761.h"

Go to the source code of this file.

Data Structures

struct  tea5761_priv
 

Macros

#define TEA5761_INTREG_IFFLAG   0x10
 
#define TEA5761_INTREG_LEVFLAG   0x8
 
#define TEA5761_INTREG_FRRFLAG   0x2
 
#define TEA5761_INTREG_BLFLAG   0x1
 
#define TEA5761_INTREG_IFMSK   0x10
 
#define TEA5761_INTREG_LEVMSK   0x8
 
#define TEA5761_INTREG_FRMSK   0x2
 
#define TEA5761_INTREG_BLMSK   0x1
 
#define TEA5761_FRQSET_SEARCH_UP   0x80 /* 1=Station search from botton to up */
 
#define TEA5761_FRQSET_SEARCH_MODE   0x40 /* 1=Search mode */
 
#define TEA5761_TNCTRL_PUPD_0   0x40 /* Power UP/Power Down MSB */
 
#define TEA5761_TNCTRL_BLIM   0X20 /* 1= Japan Frequencies, 0= European frequencies */
 
#define TEA5761_TNCTRL_SWPM   0x10 /* 1= software port is FRRFLAG */
 
#define TEA5761_TNCTRL_IFCTC   0x08 /* 1= IF count time 15.02 ms, 0= IF count time 2.02 ms */
 
#define TEA5761_TNCTRL_AFM   0x04
 
#define TEA5761_TNCTRL_SMUTE   0x02 /* 1= Soft mute */
 
#define TEA5761_TNCTRL_SNC   0x01
 
#define TEA5761_TNCTRL_MU   0x80 /* 1=Hard mute */
 
#define TEA5761_TNCTRL_SSL_1   0x40
 
#define TEA5761_TNCTRL_SSL_0   0x20
 
#define TEA5761_TNCTRL_HLSI   0x10
 
#define TEA5761_TNCTRL_MST   0x08 /* 1 = mono */
 
#define TEA5761_TNCTRL_SWP   0x04
 
#define TEA5761_TNCTRL_DTC   0x02 /* 1 = deemphasis 50 us, 0 = deemphasis 75 us */
 
#define TEA5761_TNCTRL_AHLSI   0x01
 
#define TEA5761_TUNCHECK_IF_MASK   0x7e /* IF count */
 
#define TEA5761_TUNCHECK_TUNTO   0x01
 
#define TEA5761_TUNCHECK_LEV_MASK   0xf0 /* Level Count */
 
#define TEA5761_TUNCHECK_LD   0x08
 
#define TEA5761_TUNCHECK_STEREO   0x04
 
#define TEA5767_MANID_VERSION_MASK   0xf0 /* Version = 1 */
 
#define TEA5767_MANID_ID_MSB_MASK   0x0f /* Manufacurer ID - should be 0 */
 
#define TEA5767_MANID_ID_LSB_MASK   0xfe /* Manufacturer ID - should be 0x15 */
 
#define TEA5767_MANID_IDAV   0x01 /* 1 = Chip has ID, 0 = Chip has no ID */
 
#define FREQ_OFFSET   0 /* for TEA5767, it is 700 to give the right freq */
 

Functions

 module_param (debug, int, 0644)
 
 MODULE_PARM_DESC (debug,"enable verbose debug messages")
 
int tea5761_autodetection (struct i2c_adapter *i2c_adap, u8 i2c_addr)
 
struct dvb_frontendtea5761_attach (struct dvb_frontend *fe, struct i2c_adapter *i2c_adap, u8 i2c_addr)
 
 EXPORT_SYMBOL_GPL (tea5761_attach)
 
 EXPORT_SYMBOL_GPL (tea5761_autodetection)
 
 MODULE_DESCRIPTION ("Philips TEA5761 FM tuner driver")
 
 MODULE_AUTHOR ("Mauro Carvalho Chehab <[email protected]>")
 
 MODULE_LICENSE ("GPL")
 

Macro Definition Documentation

#define FREQ_OFFSET   0 /* for TEA5767, it is 700 to give the right freq */

Definition at line 125 of file tea5761.c.

#define TEA5761_FRQSET_SEARCH_MODE   0x40 /* 1=Search mode */

Definition at line 53 of file tea5761.c.

#define TEA5761_FRQSET_SEARCH_UP   0x80 /* 1=Station search from botton to up */

Definition at line 52 of file tea5761.c.

#define TEA5761_INTREG_BLFLAG   0x1

Definition at line 41 of file tea5761.c.

#define TEA5761_INTREG_BLMSK   0x1

Definition at line 47 of file tea5761.c.

#define TEA5761_INTREG_FRMSK   0x2

Definition at line 46 of file tea5761.c.

#define TEA5761_INTREG_FRRFLAG   0x2

Definition at line 40 of file tea5761.c.

#define TEA5761_INTREG_IFFLAG   0x10

Definition at line 38 of file tea5761.c.

#define TEA5761_INTREG_IFMSK   0x10

Definition at line 44 of file tea5761.c.

#define TEA5761_INTREG_LEVFLAG   0x8

Definition at line 39 of file tea5761.c.

#define TEA5761_INTREG_LEVMSK   0x8

Definition at line 45 of file tea5761.c.

#define TEA5761_TNCTRL_AFM   0x04

Definition at line 68 of file tea5761.c.

#define TEA5761_TNCTRL_AHLSI   0x01

Definition at line 81 of file tea5761.c.

#define TEA5761_TNCTRL_BLIM   0X20 /* 1= Japan Frequencies, 0= European frequencies */

Definition at line 65 of file tea5761.c.

#define TEA5761_TNCTRL_DTC   0x02 /* 1 = deemphasis 50 us, 0 = deemphasis 75 us */

Definition at line 80 of file tea5761.c.

#define TEA5761_TNCTRL_HLSI   0x10

Definition at line 77 of file tea5761.c.

#define TEA5761_TNCTRL_IFCTC   0x08 /* 1= IF count time 15.02 ms, 0= IF count time 2.02 ms */

Definition at line 67 of file tea5761.c.

#define TEA5761_TNCTRL_MST   0x08 /* 1 = mono */

Definition at line 78 of file tea5761.c.

#define TEA5761_TNCTRL_MU   0x80 /* 1=Hard mute */

Definition at line 74 of file tea5761.c.

#define TEA5761_TNCTRL_PUPD_0   0x40 /* Power UP/Power Down MSB */

Definition at line 64 of file tea5761.c.

#define TEA5761_TNCTRL_SMUTE   0x02 /* 1= Soft mute */

Definition at line 69 of file tea5761.c.

#define TEA5761_TNCTRL_SNC   0x01

Definition at line 70 of file tea5761.c.

#define TEA5761_TNCTRL_SSL_0   0x20

Definition at line 76 of file tea5761.c.

#define TEA5761_TNCTRL_SSL_1   0x40

Definition at line 75 of file tea5761.c.

#define TEA5761_TNCTRL_SWP   0x04

Definition at line 79 of file tea5761.c.

#define TEA5761_TNCTRL_SWPM   0x10 /* 1= software port is FRRFLAG */

Definition at line 66 of file tea5761.c.

#define TEA5761_TUNCHECK_IF_MASK   0x7e /* IF count */

Definition at line 94 of file tea5761.c.

#define TEA5761_TUNCHECK_LD   0x08

Definition at line 99 of file tea5761.c.

#define TEA5761_TUNCHECK_LEV_MASK   0xf0 /* Level Count */

Definition at line 98 of file tea5761.c.

#define TEA5761_TUNCHECK_STEREO   0x04

Definition at line 100 of file tea5761.c.

#define TEA5761_TUNCHECK_TUNTO   0x01

Definition at line 95 of file tea5761.c.

#define TEA5767_MANID_ID_LSB_MASK   0xfe /* Manufacturer ID - should be 0x15 */

Definition at line 114 of file tea5761.c.

#define TEA5767_MANID_ID_MSB_MASK   0x0f /* Manufacurer ID - should be 0 */

Definition at line 110 of file tea5761.c.

#define TEA5767_MANID_IDAV   0x01 /* 1 = Chip has ID, 0 = Chip has no ID */

Definition at line 115 of file tea5761.c.

#define TEA5767_MANID_VERSION_MASK   0xf0 /* Version = 1 */

Definition at line 109 of file tea5761.c.

Function Documentation

EXPORT_SYMBOL_GPL ( tea5761_attach  )
EXPORT_SYMBOL_GPL ( tea5761_autodetection  )
MODULE_AUTHOR ( "Mauro Carvalho Chehab <[email protected]>"  )
MODULE_DESCRIPTION ( "Philips TEA5761 FM tuner driver )
MODULE_LICENSE ( "GPL"  )
module_param ( debug  ,
int  ,
0644   
)
MODULE_PARM_DESC ( debug  ,
"enable verbose debug messages"   
)
struct dvb_frontend* tea5761_attach ( struct dvb_frontend fe,
struct i2c_adapter i2c_adap,
u8  i2c_addr 
)
read

Definition at line 316 of file tea5761.c.

int tea5761_autodetection ( struct i2c_adapter i2c_adap,
u8  i2c_addr 
)

Definition at line 265 of file tea5761.c.