Merge with Linux 2.5.74.
[linux-2.6/linux-mips.git] / drivers / media / dvb / ttpci / budget.h
blob0135bee0f1d2bc5202567f98fea75f6dfe086292
1 #ifndef __BUDGET_DVB__
2 #define __BUDGET_DVB__
4 #include <media/saa7146.h>
6 #include "dvb_i2c.h"
7 #include "dvb_frontend.h"
8 #include "dvbdev.h"
9 #include "demux.h"
10 #include "dvb_demux.h"
11 #include "dmxdev.h"
12 #include "dvb_filter.h"
13 #include "dvb_net.h"
15 extern int budget_debug;
17 struct budget_info {
18 char *name;
19 int type;
22 /* place to store all the necessary device information */
23 struct budget {
25 /* devices */
26 struct dvb_device dvb_dev;
27 struct dvb_net dvb_net;
29 struct saa7146_dev *dev;
31 struct dvb_i2c_bus *i2c_bus;
32 struct budget_info *card;
34 unsigned char *grabbing;
35 struct saa7146_pgtable pt;
37 struct tasklet_struct fidb_tasklet;
38 struct tasklet_struct vpe_tasklet;
40 struct dmxdev dmxdev;
41 struct dvb_demux demux;
43 struct dmx_frontend hw_frontend;
44 struct dmx_frontend mem_frontend;
46 int fe_synced;
47 struct semaphore pid_mutex;
49 u8 tsf;
50 u32 ttbp;
51 int feeding;
53 struct dvb_adapter *dvb_adapter;
54 void *priv;
59 #define MAKE_BUDGET_INFO(x_var,x_name,x_type) \
60 static struct budget_info x_var ## _info = { \
61 .name=x_name, \
62 .type=x_type }; \
63 static struct saa7146_pci_extension_data x_var = { \
64 .ext_priv = &x_var ## _info, \
65 .ext = &budget_extension };
67 #define TS_WIDTH (4*188)
68 #define TS_HEIGHT (1024/4)
69 #define TS_BUFLEN (TS_WIDTH*TS_HEIGHT)
70 #define TS_MAX_PACKETS (TS_BUFLEN/TS_SIZE)
72 #define BUDGET_TT 0
73 #define BUDGET_TT_HW_DISEQC 1
74 #define BUDGET_KNC1 2
75 #define BUDGET_PATCH 3
78 extern int ttpci_budget_init (struct budget *budget,
79 struct saa7146_dev* dev,
80 struct saa7146_pci_extension_data *info);
81 extern int ttpci_budget_deinit (struct budget *budget);
82 extern void ttpci_budget_irq10_handler (struct saa7146_dev* dev, u32 *isr);
84 #endif