Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
altera-ci.c File Reference
#include <media/videobuf-dma-sg.h>
#include <media/videobuf-dvb.h>
#include "altera-ci.h"
#include "dvb_ca_en50221.h"

Go to the source code of this file.

Data Structures

struct  fpga_internal
 
struct  altera_ci_state
 
struct  netup_hw_pid_filter
 
struct  fpga_inode
 

Macros

#define NETUP_CI_INT_CTRL   0x00
 
#define NETUP_CI_BUSCTRL2   0x01
 
#define NETUP_CI_ADDR0   0x04
 
#define NETUP_CI_ADDR1   0x05
 
#define NETUP_CI_DATA   0x06
 
#define NETUP_CI_BUSCTRL   0x07
 
#define NETUP_CI_PID_ADDR0   0x08
 
#define NETUP_CI_PID_ADDR1   0x09
 
#define NETUP_CI_PID_DATA   0x0a
 
#define NETUP_CI_TSA_DIV   0x0c
 
#define NETUP_CI_TSB_DIV   0x0d
 
#define NETUP_CI_REVISION   0x0f
 
#define NETUP_CI_FLG_CTL   1
 
#define NETUP_CI_FLG_RD   1
 
#define NETUP_CI_FLG_AD   1
 
#define ci_dbg_print(args...)
 
#define pid_dbg_print(args...)
 

Functions

 module_param (ci_dbg, int, 0644)
 
 MODULE_PARM_DESC (ci_dbg,"Enable CI debugging")
 
 module_param (pid_dbg, int, 0644)
 
 MODULE_PARM_DESC (pid_dbg,"Enable PID filtering debugging")
 
 MODULE_DESCRIPTION ("altera FPGA CI module")
 
 MODULE_AUTHOR ("Igor M. Liplianin <[email protected]>")
 
 MODULE_LICENSE ("GPL")
 
int altera_ci_op_cam (struct dvb_ca_en50221 *en50221, int slot, u8 flag, u8 read, int addr, u8 val)
 
int altera_ci_read_attribute_mem (struct dvb_ca_en50221 *en50221, int slot, int addr)
 
int altera_ci_write_attribute_mem (struct dvb_ca_en50221 *en50221, int slot, int addr, u8 data)
 
int altera_ci_read_cam_ctl (struct dvb_ca_en50221 *en50221, int slot, u8 addr)
 
int altera_ci_write_cam_ctl (struct dvb_ca_en50221 *en50221, int slot, u8 addr, u8 data)
 
int altera_ci_slot_reset (struct dvb_ca_en50221 *en50221, int slot)
 
int altera_ci_slot_shutdown (struct dvb_ca_en50221 *en50221, int slot)
 
int altera_ci_slot_ts_ctl (struct dvb_ca_en50221 *en50221, int slot)
 
int altera_ci_irq (void *dev)
 
 EXPORT_SYMBOL (altera_ci_irq)
 
int altera_poll_ci_slot_status (struct dvb_ca_en50221 *en50221, int slot, int open)
 
void altera_hw_filt_release (void *main_dev, int filt_nr)
 
 EXPORT_SYMBOL (altera_hw_filt_release)
 
void altera_ci_release (void *dev, int ci_nr)
 
 EXPORT_SYMBOL (altera_ci_release)
 
int altera_pid_feed_control (void *demux_dev, int filt_nr, struct dvb_demux_feed *feed, int onoff)
 
 EXPORT_SYMBOL (altera_pid_feed_control)
 
int altera_ci_start_feed (struct dvb_demux_feed *feed, int num)
 
int altera_ci_stop_feed (struct dvb_demux_feed *feed, int num)
 
int altera_ci_start_feed_1 (struct dvb_demux_feed *feed)
 
int altera_ci_stop_feed_1 (struct dvb_demux_feed *feed)
 
int altera_ci_start_feed_2 (struct dvb_demux_feed *feed)
 
int altera_ci_stop_feed_2 (struct dvb_demux_feed *feed)
 
int altera_hw_filt_init (struct altera_ci_config *config, int hw_filt_nr)
 
 EXPORT_SYMBOL (altera_hw_filt_init)
 
int altera_ci_init (struct altera_ci_config *config, int ci_nr)
 
 EXPORT_SYMBOL (altera_ci_init)
 
int altera_ci_tuner_reset (void *dev, int ci_nr)
 
 EXPORT_SYMBOL (altera_ci_tuner_reset)
 

Macro Definition Documentation

#define ci_dbg_print (   args...)
Value:
do { \
if (ci_dbg) \
printk(KERN_DEBUG args); \
} while (0)

Definition at line 91 of file altera-ci.c.

#define NETUP_CI_ADDR0   0x04

Definition at line 63 of file altera-ci.c.

#define NETUP_CI_ADDR1   0x05

Definition at line 64 of file altera-ci.c.

#define NETUP_CI_BUSCTRL   0x07

Definition at line 66 of file altera-ci.c.

#define NETUP_CI_BUSCTRL2   0x01

Definition at line 62 of file altera-ci.c.

#define NETUP_CI_DATA   0x06

Definition at line 65 of file altera-ci.c.

#define NETUP_CI_FLG_AD   1

Definition at line 77 of file altera-ci.c.

#define NETUP_CI_FLG_CTL   1

Definition at line 75 of file altera-ci.c.

#define NETUP_CI_FLG_RD   1

Definition at line 76 of file altera-ci.c.

#define NETUP_CI_INT_CTRL   0x00

Definition at line 61 of file altera-ci.c.

#define NETUP_CI_PID_ADDR0   0x08

Definition at line 67 of file altera-ci.c.

#define NETUP_CI_PID_ADDR1   0x09

Definition at line 68 of file altera-ci.c.

#define NETUP_CI_PID_DATA   0x0a

Definition at line 69 of file altera-ci.c.

#define NETUP_CI_REVISION   0x0f

Definition at line 72 of file altera-ci.c.

#define NETUP_CI_TSA_DIV   0x0c

Definition at line 70 of file altera-ci.c.

#define NETUP_CI_TSB_DIV   0x0d

Definition at line 71 of file altera-ci.c.

#define pid_dbg_print (   args...)
Value:
do { \
if (pid_dbg) \
printk(KERN_DEBUG args); \
} while (0)

Definition at line 97 of file altera-ci.c.

Function Documentation

int altera_ci_init ( struct altera_ci_config config,
int  ci_nr 
)

Definition at line 707 of file altera-ci.c.

int altera_ci_irq ( void dev)

Definition at line 432 of file altera-ci.c.

int altera_ci_op_cam ( struct dvb_ca_en50221 en50221,
int  slot,
u8  flag,
u8  read,
int  addr,
u8  val 
)

Definition at line 266 of file altera-ci.c.

int altera_ci_read_attribute_mem ( struct dvb_ca_en50221 en50221,
int  slot,
int  addr 
)

Definition at line 301 of file altera-ci.c.

int altera_ci_read_cam_ctl ( struct dvb_ca_en50221 en50221,
int  slot,
u8  addr 
)

Definition at line 313 of file altera-ci.c.

void altera_ci_release ( void dev,
int  ci_nr 
)

Definition at line 491 of file altera-ci.c.

int altera_ci_slot_reset ( struct dvb_ca_en50221 en50221,
int  slot 
)

Definition at line 325 of file altera-ci.c.

int altera_ci_slot_shutdown ( struct dvb_ca_en50221 en50221,
int  slot 
)

Definition at line 368 of file altera-ci.c.

int altera_ci_slot_ts_ctl ( struct dvb_ca_en50221 en50221,
int  slot 
)

Definition at line 374 of file altera-ci.c.

int altera_ci_start_feed ( struct dvb_demux_feed feed,
int  num 
)

Definition at line 606 of file altera-ci.c.

int altera_ci_start_feed_1 ( struct dvb_demux_feed feed)

Definition at line 620 of file altera-ci.c.

int altera_ci_start_feed_2 ( struct dvb_demux_feed feed)

Definition at line 630 of file altera-ci.c.

int altera_ci_stop_feed ( struct dvb_demux_feed feed,
int  num 
)

Definition at line 613 of file altera-ci.c.

int altera_ci_stop_feed_1 ( struct dvb_demux_feed feed)

Definition at line 625 of file altera-ci.c.

int altera_ci_stop_feed_2 ( struct dvb_demux_feed feed)

Definition at line 635 of file altera-ci.c.

int altera_ci_tuner_reset ( void dev,
int  ci_nr 
)

Definition at line 810 of file altera-ci.c.

int altera_ci_write_attribute_mem ( struct dvb_ca_en50221 en50221,
int  slot,
int  addr,
u8  data 
)

Definition at line 307 of file altera-ci.c.

int altera_ci_write_cam_ctl ( struct dvb_ca_en50221 en50221,
int  slot,
u8  addr,
u8  data 
)

Definition at line 319 of file altera-ci.c.

int altera_hw_filt_init ( struct altera_ci_config config,
int  hw_filt_nr 
)

Definition at line 640 of file altera-ci.c.

void altera_hw_filt_release ( void main_dev,
int  filt_nr 
)

Definition at line 462 of file altera-ci.c.

int altera_pid_feed_control ( void demux_dev,
int  filt_nr,
struct dvb_demux_feed feed,
int  onoff 
)

Definition at line 584 of file altera-ci.c.

int altera_poll_ci_slot_status ( struct dvb_ca_en50221 en50221,
int  slot,
int  open 
)

Definition at line 451 of file altera-ci.c.

EXPORT_SYMBOL ( altera_ci_irq  )
EXPORT_SYMBOL ( altera_hw_filt_release  )
EXPORT_SYMBOL ( altera_ci_release  )
EXPORT_SYMBOL ( altera_pid_feed_control  )
EXPORT_SYMBOL ( altera_hw_filt_init  )
EXPORT_SYMBOL ( altera_ci_init  )
EXPORT_SYMBOL ( altera_ci_tuner_reset  )
MODULE_AUTHOR ( "Igor M. Liplianin <[email protected]>"  )
MODULE_DESCRIPTION ( "altera FPGA CI module )
MODULE_LICENSE ( "GPL"  )
module_param ( ci_dbg  ,
int  ,
0644   
)
module_param ( pid_dbg  ,
int  ,
0644   
)
MODULE_PARM_DESC ( ci_dbg  ,
"Enable CI debugging"   
)
MODULE_PARM_DESC ( pid_dbg  ,
"Enable PID filtering debugging"   
)