2008-04-09 10:20:00 +08:00
|
|
|
|
2005-04-17 06:20:36 +08:00
|
|
|
#ifndef __BUDGET_DVB__
|
|
|
|
#define __BUDGET_DVB__
|
|
|
|
|
|
|
|
#include "dvb_frontend.h"
|
|
|
|
#include "dvbdev.h"
|
|
|
|
#include "demux.h"
|
|
|
|
#include "dvb_demux.h"
|
|
|
|
#include "dmxdev.h"
|
|
|
|
#include "dvb_filter.h"
|
|
|
|
#include "dvb_net.h"
|
|
|
|
|
|
|
|
#include <linux/module.h>
|
2006-02-07 16:49:14 +08:00
|
|
|
#include <linux/mutex.h>
|
|
|
|
|
2005-04-17 06:20:36 +08:00
|
|
|
#include <media/saa7146.h>
|
|
|
|
|
|
|
|
extern int budget_debug;
|
|
|
|
|
|
|
|
#ifdef dprintk
|
|
|
|
#undef dprintk
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#define dprintk(level,args...) \
|
2008-04-09 10:20:00 +08:00
|
|
|
do { if ((budget_debug & level)) { printk("%s: %s(): ", KBUILD_MODNAME, __func__); printk(args); } } while (0)
|
2005-04-17 06:20:36 +08:00
|
|
|
|
|
|
|
struct budget_info {
|
|
|
|
char *name;
|
|
|
|
int type;
|
|
|
|
};
|
|
|
|
|
|
|
|
/* place to store all the necessary device information */
|
|
|
|
struct budget {
|
|
|
|
|
|
|
|
/* devices */
|
|
|
|
struct dvb_device dvb_dev;
|
|
|
|
struct dvb_net dvb_net;
|
|
|
|
|
|
|
|
struct saa7146_dev *dev;
|
|
|
|
|
|
|
|
struct i2c_adapter i2c_adap;
|
|
|
|
struct budget_info *card;
|
|
|
|
|
|
|
|
unsigned char *grabbing;
|
|
|
|
struct saa7146_pgtable pt;
|
|
|
|
|
|
|
|
struct tasklet_struct fidb_tasklet;
|
|
|
|
struct tasklet_struct vpe_tasklet;
|
|
|
|
|
|
|
|
struct dmxdev dmxdev;
|
|
|
|
struct dvb_demux demux;
|
|
|
|
|
|
|
|
struct dmx_frontend hw_frontend;
|
|
|
|
struct dmx_frontend mem_frontend;
|
|
|
|
|
|
|
|
int ci_present;
|
|
|
|
int video_port;
|
|
|
|
|
2006-03-30 09:05:16 +08:00
|
|
|
u32 buffer_width;
|
|
|
|
u32 buffer_height;
|
|
|
|
u32 buffer_size;
|
|
|
|
u32 buffer_warning_threshold;
|
|
|
|
u32 buffer_warnings;
|
|
|
|
unsigned long buffer_warning_time;
|
|
|
|
|
2005-04-17 06:20:36 +08:00
|
|
|
u32 ttbp;
|
|
|
|
int feeding;
|
|
|
|
|
|
|
|
spinlock_t feedlock;
|
|
|
|
|
|
|
|
spinlock_t debilock;
|
|
|
|
|
2005-05-17 12:54:39 +08:00
|
|
|
struct dvb_adapter dvb_adapter;
|
2005-04-17 06:20:36 +08:00
|
|
|
struct dvb_frontend *dvb_frontend;
|
2006-07-19 09:55:23 +08:00
|
|
|
int (*read_fe_status)(struct dvb_frontend *fe, fe_status_t *status);
|
|
|
|
int fe_synced;
|
|
|
|
|
2005-04-17 06:20:36 +08:00
|
|
|
void *priv;
|
|
|
|
};
|
|
|
|
|
|
|
|
#define MAKE_BUDGET_INFO(x_var,x_name,x_type) \
|
|
|
|
static struct budget_info x_var ## _info = { \
|
|
|
|
.name=x_name, \
|
|
|
|
.type=x_type }; \
|
|
|
|
static struct saa7146_pci_extension_data x_var = { \
|
|
|
|
.ext_priv = &x_var ## _info, \
|
|
|
|
.ext = &budget_extension };
|
|
|
|
|
|
|
|
#define BUDGET_TT 0
|
|
|
|
#define BUDGET_TT_HW_DISEQC 1
|
|
|
|
#define BUDGET_PATCH 3
|
|
|
|
#define BUDGET_FS_ACTIVY 4
|
|
|
|
#define BUDGET_CIN1200S 5
|
|
|
|
#define BUDGET_CIN1200C 6
|
|
|
|
#define BUDGET_CIN1200T 7
|
|
|
|
#define BUDGET_KNC1S 8
|
|
|
|
#define BUDGET_KNC1C 9
|
|
|
|
#define BUDGET_KNC1T 10
|
2005-05-17 12:54:23 +08:00
|
|
|
#define BUDGET_KNC1SP 11
|
|
|
|
#define BUDGET_KNC1CP 12
|
|
|
|
#define BUDGET_KNC1TP 13
|
2006-01-12 09:31:53 +08:00
|
|
|
#define BUDGET_TVSTAR 14
|
2007-04-22 06:37:17 +08:00
|
|
|
#define BUDGET_CIN1200C_MK3 15
|
|
|
|
#define BUDGET_KNC1C_MK3 16
|
|
|
|
#define BUDGET_KNC1CP_MK3 17
|
2007-09-23 08:28:11 +08:00
|
|
|
#define BUDGET_KNC1S2 18
|
2011-07-28 19:04:33 +08:00
|
|
|
#define BUDGET_KNC1C_TDA10024 19
|
2005-04-17 06:20:36 +08:00
|
|
|
|
|
|
|
#define BUDGET_VIDEO_PORTA 0
|
|
|
|
#define BUDGET_VIDEO_PORTB 1
|
|
|
|
|
|
|
|
extern int ttpci_budget_init(struct budget *budget, struct saa7146_dev *dev,
|
|
|
|
struct saa7146_pci_extension_data *info,
|
2008-09-22 07:50:11 +08:00
|
|
|
struct module *owner, short *adapter_nums);
|
2006-07-19 09:55:23 +08:00
|
|
|
extern void ttpci_budget_init_hooks(struct budget *budget);
|
2005-04-17 06:20:36 +08:00
|
|
|
extern int ttpci_budget_deinit(struct budget *budget);
|
|
|
|
extern void ttpci_budget_irq10_handler(struct saa7146_dev *dev, u32 * isr);
|
|
|
|
extern void ttpci_budget_set_video_port(struct saa7146_dev *dev, int video_port);
|
|
|
|
extern int ttpci_budget_debiread(struct budget *budget, u32 config, int addr, int count,
|
|
|
|
int uselocks, int nobusyloop);
|
|
|
|
extern int ttpci_budget_debiwrite(struct budget *budget, u32 config, int addr, int count, u32 value,
|
|
|
|
int uselocks, int nobusyloop);
|
|
|
|
|
|
|
|
#endif
|