aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/ttpci/budget.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
commit1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch)
tree0bba044c4ce775e45a88a51686b5d9f90697ea9d /drivers/media/dvb/ttpci/budget.h
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
Diffstat (limited to 'drivers/media/dvb/ttpci/budget.h')
-rw-r--r--drivers/media/dvb/ttpci/budget.h110
1 files changed, 110 insertions, 0 deletions
diff --git a/drivers/media/dvb/ttpci/budget.h b/drivers/media/dvb/ttpci/budget.h
new file mode 100644
index 000000000000..10bd41f0363b
--- /dev/null
+++ b/drivers/media/dvb/ttpci/budget.h
@@ -0,0 +1,110 @@
1#ifndef __BUDGET_DVB__
2#define __BUDGET_DVB__
3
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"
11
12#include <linux/module.h>
13#include <media/saa7146.h>
14
15extern int budget_debug;
16
17#ifdef dprintk
18#undef dprintk
19#endif
20
21#define dprintk(level,args...) \
22 do { if ((budget_debug & level)) { printk("%s: %s(): ",__stringify(KBUILD_MODNAME), __FUNCTION__); printk(args); } } while (0)
23
24struct budget_info {
25 char *name;
26 int type;
27};
28
29/* place to store all the necessary device information */
30struct budget {
31
32 /* devices */
33 struct dvb_device dvb_dev;
34 struct dvb_net dvb_net;
35
36 struct saa7146_dev *dev;
37
38 struct i2c_adapter i2c_adap;
39 struct budget_info *card;
40
41 unsigned char *grabbing;
42 struct saa7146_pgtable pt;
43
44 struct tasklet_struct fidb_tasklet;
45 struct tasklet_struct vpe_tasklet;
46
47 struct dmxdev dmxdev;
48 struct dvb_demux demux;
49
50 struct dmx_frontend hw_frontend;
51 struct dmx_frontend mem_frontend;
52
53 int fe_synced;
54 struct semaphore pid_mutex;
55
56 int ci_present;
57 int video_port;
58
59 u8 tsf;
60 u32 ttbp;
61 int feeding;
62
63 spinlock_t feedlock;
64
65 spinlock_t debilock;
66
67 struct dvb_adapter *dvb_adapter;
68 struct dvb_frontend *dvb_frontend;
69 void *priv;
70};
71
72#define MAKE_BUDGET_INFO(x_var,x_name,x_type) \
73static struct budget_info x_var ## _info = { \
74 .name=x_name, \
75 .type=x_type }; \
76static struct saa7146_pci_extension_data x_var = { \
77 .ext_priv = &x_var ## _info, \
78 .ext = &budget_extension };
79
80#define TS_WIDTH (376)
81#define TS_HEIGHT (512)
82#define TS_BUFLEN (TS_WIDTH*TS_HEIGHT)
83#define TS_MAX_PACKETS (TS_BUFLEN/TS_SIZE)
84
85#define BUDGET_TT 0
86#define BUDGET_TT_HW_DISEQC 1
87#define BUDGET_PATCH 3
88#define BUDGET_FS_ACTIVY 4
89#define BUDGET_CIN1200S 5
90#define BUDGET_CIN1200C 6
91#define BUDGET_CIN1200T 7
92#define BUDGET_KNC1S 8
93#define BUDGET_KNC1C 9
94#define BUDGET_KNC1T 10
95
96#define BUDGET_VIDEO_PORTA 0
97#define BUDGET_VIDEO_PORTB 1
98
99extern int ttpci_budget_init(struct budget *budget, struct saa7146_dev *dev,
100 struct saa7146_pci_extension_data *info,
101 struct module *owner);
102extern int ttpci_budget_deinit(struct budget *budget);
103extern void ttpci_budget_irq10_handler(struct saa7146_dev *dev, u32 * isr);
104extern void ttpci_budget_set_video_port(struct saa7146_dev *dev, int video_port);
105extern int ttpci_budget_debiread(struct budget *budget, u32 config, int addr, int count,
106 int uselocks, int nobusyloop);
107extern int ttpci_budget_debiwrite(struct budget *budget, u32 config, int addr, int count, u32 value,
108 int uselocks, int nobusyloop);
109
110#endif