[PATCH] DVB: misc driver updates
[linux-2.6/history.git] / drivers / media / dvb / ttpci / budget.h
blobf0a15da1110a523118a7b539184dba79559aa8d6
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 <media/saa7146.h>
14 extern int budget_debug;
16 struct budget_info {
17 char *name;
18 int type;
21 /* place to store all the necessary device information */
22 struct budget {
24 /* devices */
25 struct dvb_device dvb_dev;
26 struct dvb_net dvb_net;
28 struct saa7146_dev *dev;
30 struct i2c_adapter i2c_adap;
31 struct budget_info *card;
33 unsigned char *grabbing;
34 struct saa7146_pgtable pt;
36 struct tasklet_struct fidb_tasklet;
37 struct tasklet_struct vpe_tasklet;
39 struct dmxdev dmxdev;
40 struct dvb_demux demux;
42 struct dmx_frontend hw_frontend;
43 struct dmx_frontend mem_frontend;
45 int fe_synced;
46 struct semaphore pid_mutex;
48 int ci_present;
49 int video_port;
51 u8 tsf;
52 u32 ttbp;
53 int feeding;
55 spinlock_t feedlock;
57 struct dvb_adapter *dvb_adapter;
58 void *priv;
63 #define MAKE_BUDGET_INFO(x_var,x_name,x_type) \
64 static struct budget_info x_var ## _info = { \
65 .name=x_name, \
66 .type=x_type }; \
67 static struct saa7146_pci_extension_data x_var = { \
68 .ext_priv = &x_var ## _info, \
69 .ext = &budget_extension };
71 #define TS_WIDTH (376)
72 #define TS_HEIGHT (512)
73 #define TS_BUFLEN (TS_WIDTH*TS_HEIGHT)
74 #define TS_MAX_PACKETS (TS_BUFLEN/TS_SIZE)
76 #define BUDGET_TT 0
77 #define BUDGET_TT_HW_DISEQC 1
78 #define BUDGET_KNC1 2
79 #define BUDGET_PATCH 3
80 #define BUDGET_FS_ACTIVY 4
81 #define BUDGET_CIN1200 5
83 #define BUDGET_VIDEO_PORTA 0
84 #define BUDGET_VIDEO_PORTB 1
86 extern int ttpci_budget_init (struct budget *budget,
87 struct saa7146_dev* dev,
88 struct saa7146_pci_extension_data *info);
89 extern int ttpci_budget_deinit (struct budget *budget);
90 extern void ttpci_budget_irq10_handler (struct saa7146_dev* dev, u32 *isr);
91 extern void ttpci_budget_set_video_port(struct saa7146_dev* dev, int video_port);
93 #endif