allow coexistance of N build and AC build.
[tomato.git] / release / src-rt-6.x / linux / linux-2.6 / drivers / media / dvb / ttpci / budget.h
blobd764ffa728b0c48bfc1ba5864d529d72803b1dfe
1 #ifndef __BUDGET_DVB__
2 #define __BUDGET_DVB__
4 #include "dvb_frontend.h"
5 #include "dvbdev.h"
6 #include "demux.h"
7 #include "dvb_demux.h"
8 #include "dmxdev.h"
9 #include "dvb_filter.h"
10 #include "dvb_net.h"
12 #include <linux/module.h>
13 #include <linux/mutex.h>
15 #include <media/saa7146.h>
17 extern int budget_debug;
19 #ifdef dprintk
20 #undef dprintk
21 #endif
23 #define dprintk(level,args...) \
24 do { if ((budget_debug & level)) { printk("%s: %s(): ", KBUILD_MODNAME, __FUNCTION__); printk(args); } } while (0)
26 struct budget_info {
27 char *name;
28 int type;
31 /* place to store all the necessary device information */
32 struct budget {
34 /* devices */
35 struct dvb_device dvb_dev;
36 struct dvb_net dvb_net;
38 struct saa7146_dev *dev;
40 struct i2c_adapter i2c_adap;
41 struct budget_info *card;
43 unsigned char *grabbing;
44 struct saa7146_pgtable pt;
46 struct tasklet_struct fidb_tasklet;
47 struct tasklet_struct vpe_tasklet;
49 struct dmxdev dmxdev;
50 struct dvb_demux demux;
52 struct dmx_frontend hw_frontend;
53 struct dmx_frontend mem_frontend;
55 int ci_present;
56 int video_port;
58 u32 buffer_width;
59 u32 buffer_height;
60 u32 buffer_size;
61 u32 buffer_warning_threshold;
62 u32 buffer_warnings;
63 unsigned long buffer_warning_time;
65 u32 ttbp;
66 int feeding;
68 spinlock_t feedlock;
70 spinlock_t debilock;
72 struct dvb_adapter dvb_adapter;
73 struct dvb_frontend *dvb_frontend;
74 int (*read_fe_status)(struct dvb_frontend *fe, fe_status_t *status);
75 int fe_synced;
77 void *priv;
80 #define MAKE_BUDGET_INFO(x_var,x_name,x_type) \
81 static struct budget_info x_var ## _info = { \
82 .name=x_name, \
83 .type=x_type }; \
84 static struct saa7146_pci_extension_data x_var = { \
85 .ext_priv = &x_var ## _info, \
86 .ext = &budget_extension };
88 #define BUDGET_TT 0
89 #define BUDGET_TT_HW_DISEQC 1
90 #define BUDGET_PATCH 3
91 #define BUDGET_FS_ACTIVY 4
92 #define BUDGET_CIN1200S 5
93 #define BUDGET_CIN1200C 6
94 #define BUDGET_CIN1200T 7
95 #define BUDGET_KNC1S 8
96 #define BUDGET_KNC1C 9
97 #define BUDGET_KNC1T 10
98 #define BUDGET_KNC1SP 11
99 #define BUDGET_KNC1CP 12
100 #define BUDGET_KNC1TP 13
101 #define BUDGET_TVSTAR 14
102 #define BUDGET_CIN1200C_MK3 15
103 #define BUDGET_KNC1C_MK3 16
104 #define BUDGET_KNC1CP_MK3 17
106 #define BUDGET_VIDEO_PORTA 0
107 #define BUDGET_VIDEO_PORTB 1
109 extern int ttpci_budget_init(struct budget *budget, struct saa7146_dev *dev,
110 struct saa7146_pci_extension_data *info,
111 struct module *owner);
112 extern void ttpci_budget_init_hooks(struct budget *budget);
113 extern int ttpci_budget_deinit(struct budget *budget);
114 extern void ttpci_budget_irq10_handler(struct saa7146_dev *dev, u32 * isr);
115 extern void ttpci_budget_set_video_port(struct saa7146_dev *dev, int video_port);
116 extern int ttpci_budget_debiread(struct budget *budget, u32 config, int addr, int count,
117 int uselocks, int nobusyloop);
118 extern int ttpci_budget_debiwrite(struct budget *budget, u32 config, int addr, int count, u32 value,
119 int uselocks, int nobusyloop);
121 #endif