drm: add 32/64 support for MGA/R128/i915
[deliverable/linux.git] / drivers / media / dvb / ttpci / budget.h
CommitLineData
1da177e4
LT
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
fdc53a6d 67 struct dvb_adapter dvb_adapter;
1da177e4
LT
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
2d4f2c2e
JS
95#define BUDGET_KNC1SP 11
96#define BUDGET_KNC1CP 12
97#define BUDGET_KNC1TP 13
1da177e4
LT
98
99#define BUDGET_VIDEO_PORTA 0
100#define BUDGET_VIDEO_PORTB 1
101
102extern int ttpci_budget_init(struct budget *budget, struct saa7146_dev *dev,
103 struct saa7146_pci_extension_data *info,
104 struct module *owner);
105extern int ttpci_budget_deinit(struct budget *budget);
106extern void ttpci_budget_irq10_handler(struct saa7146_dev *dev, u32 * isr);
107extern void ttpci_budget_set_video_port(struct saa7146_dev *dev, int video_port);
108extern int ttpci_budget_debiread(struct budget *budget, u32 config, int addr, int count,
109 int uselocks, int nobusyloop);
110extern int ttpci_budget_debiwrite(struct budget *budget, u32 config, int addr, int count, u32 value,
111 int uselocks, int nobusyloop);
112
113#endif
This page took 0.62076 seconds and 5 git commands to generate.