| Harvey Harrison | 3ca7fc8 | 2008-04-08 23:20:00 -0300 | [diff] [blame] | 1 |  | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2 | #ifndef __BUDGET_DVB__ | 
|  | 3 | #define __BUDGET_DVB__ | 
|  | 4 |  | 
|  | 5 | #include "dvb_frontend.h" | 
|  | 6 | #include "dvbdev.h" | 
|  | 7 | #include "demux.h" | 
|  | 8 | #include "dvb_demux.h" | 
|  | 9 | #include "dmxdev.h" | 
|  | 10 | #include "dvb_filter.h" | 
|  | 11 | #include "dvb_net.h" | 
|  | 12 |  | 
|  | 13 | #include <linux/module.h> | 
| Ingo Molnar | 3593cab | 2006-02-07 06:49:14 -0200 | [diff] [blame] | 14 | #include <linux/mutex.h> | 
|  | 15 |  | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 16 | #include <media/saa7146.h> | 
|  | 17 |  | 
|  | 18 | extern int budget_debug; | 
|  | 19 |  | 
|  | 20 | #ifdef dprintk | 
|  | 21 | #undef dprintk | 
|  | 22 | #endif | 
|  | 23 |  | 
|  | 24 | #define dprintk(level,args...) \ | 
| Harvey Harrison | 3ca7fc8 | 2008-04-08 23:20:00 -0300 | [diff] [blame] | 25 | do { if ((budget_debug & level)) { printk("%s: %s(): ", KBUILD_MODNAME, __func__); printk(args); } } while (0) | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 26 |  | 
|  | 27 | struct budget_info { | 
|  | 28 | char *name; | 
|  | 29 | int type; | 
|  | 30 | }; | 
|  | 31 |  | 
|  | 32 | /* place to store all the necessary device information */ | 
|  | 33 | struct budget { | 
|  | 34 |  | 
|  | 35 | /* devices */ | 
|  | 36 | struct dvb_device dvb_dev; | 
|  | 37 | struct dvb_net dvb_net; | 
|  | 38 |  | 
|  | 39 | struct saa7146_dev *dev; | 
|  | 40 |  | 
|  | 41 | struct i2c_adapter i2c_adap; | 
|  | 42 | struct budget_info *card; | 
|  | 43 |  | 
|  | 44 | unsigned char *grabbing; | 
|  | 45 | struct saa7146_pgtable pt; | 
|  | 46 |  | 
|  | 47 | struct tasklet_struct fidb_tasklet; | 
|  | 48 | struct tasklet_struct vpe_tasklet; | 
|  | 49 |  | 
|  | 50 | struct dmxdev dmxdev; | 
|  | 51 | struct dvb_demux demux; | 
|  | 52 |  | 
|  | 53 | struct dmx_frontend hw_frontend; | 
|  | 54 | struct dmx_frontend mem_frontend; | 
|  | 55 |  | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 56 | int ci_present; | 
|  | 57 | int video_port; | 
|  | 58 |  | 
| Ingo Schneider | afa47ab | 2006-03-29 22:05:16 -0300 | [diff] [blame] | 59 | u32 buffer_width; | 
|  | 60 | u32 buffer_height; | 
|  | 61 | u32 buffer_size; | 
|  | 62 | u32 buffer_warning_threshold; | 
|  | 63 | u32 buffer_warnings; | 
|  | 64 | unsigned long buffer_warning_time; | 
|  | 65 |  | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 66 | u32 ttbp; | 
|  | 67 | int feeding; | 
|  | 68 |  | 
|  | 69 | spinlock_t feedlock; | 
|  | 70 |  | 
|  | 71 | spinlock_t debilock; | 
|  | 72 |  | 
| Johannes Stezenbach | fdc53a6 | 2005-05-16 21:54:39 -0700 | [diff] [blame] | 73 | struct dvb_adapter dvb_adapter; | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 74 | struct dvb_frontend *dvb_frontend; | 
| Oliver Endriss | 32e4c3a | 2006-07-18 22:55:23 -0300 | [diff] [blame] | 75 | int (*read_fe_status)(struct dvb_frontend *fe, fe_status_t *status); | 
|  | 76 | int fe_synced; | 
|  | 77 |  | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 78 | void *priv; | 
|  | 79 | }; | 
|  | 80 |  | 
|  | 81 | #define MAKE_BUDGET_INFO(x_var,x_name,x_type) \ | 
|  | 82 | static struct budget_info x_var ## _info = { \ | 
|  | 83 | .name=x_name,	\ | 
|  | 84 | .type=x_type };	\ | 
|  | 85 | static struct saa7146_pci_extension_data x_var = { \ | 
|  | 86 | .ext_priv = &x_var ## _info, \ | 
|  | 87 | .ext = &budget_extension }; | 
|  | 88 |  | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 89 | #define BUDGET_TT		   0 | 
|  | 90 | #define BUDGET_TT_HW_DISEQC	   1 | 
|  | 91 | #define BUDGET_PATCH		   3 | 
|  | 92 | #define BUDGET_FS_ACTIVY	   4 | 
|  | 93 | #define BUDGET_CIN1200S		   5 | 
|  | 94 | #define BUDGET_CIN1200C		   6 | 
|  | 95 | #define BUDGET_CIN1200T		   7 | 
|  | 96 | #define BUDGET_KNC1S		   8 | 
|  | 97 | #define BUDGET_KNC1C		   9 | 
|  | 98 | #define BUDGET_KNC1T		   10 | 
| Johannes Stezenbach | 2d4f2c2 | 2005-05-16 21:54:23 -0700 | [diff] [blame] | 99 | #define BUDGET_KNC1SP		   11 | 
|  | 100 | #define BUDGET_KNC1CP		   12 | 
|  | 101 | #define BUDGET_KNC1TP		   13 | 
| Regis Prevot | f8bf134 | 2006-01-11 23:31:53 -0200 | [diff] [blame] | 102 | #define BUDGET_TVSTAR		   14 | 
| Hartmut Birr | aa323ac | 2007-04-21 19:37:17 -0300 | [diff] [blame] | 103 | #define BUDGET_CIN1200C_MK3	   15 | 
|  | 104 | #define BUDGET_KNC1C_MK3	   16 | 
|  | 105 | #define BUDGET_KNC1CP_MK3	   17 | 
| Manu Abraham | 41e1151 | 2007-09-22 21:28:11 -0300 | [diff] [blame] | 106 | #define BUDGET_KNC1S2              18 | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 107 |  | 
|  | 108 | #define BUDGET_VIDEO_PORTA         0 | 
|  | 109 | #define BUDGET_VIDEO_PORTB         1 | 
|  | 110 |  | 
|  | 111 | extern int ttpci_budget_init(struct budget *budget, struct saa7146_dev *dev, | 
|  | 112 | struct saa7146_pci_extension_data *info, | 
| Janne Grunau | 26dc4d0 | 2008-09-21 20:50:11 -0300 | [diff] [blame] | 113 | struct module *owner, short *adapter_nums); | 
| Oliver Endriss | 32e4c3a | 2006-07-18 22:55:23 -0300 | [diff] [blame] | 114 | extern void ttpci_budget_init_hooks(struct budget *budget); | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 115 | extern int ttpci_budget_deinit(struct budget *budget); | 
|  | 116 | extern void ttpci_budget_irq10_handler(struct saa7146_dev *dev, u32 * isr); | 
|  | 117 | extern void ttpci_budget_set_video_port(struct saa7146_dev *dev, int video_port); | 
|  | 118 | extern int ttpci_budget_debiread(struct budget *budget, u32 config, int addr, int count, | 
|  | 119 | int uselocks, int nobusyloop); | 
|  | 120 | extern int ttpci_budget_debiwrite(struct budget *budget, u32 config, int addr, int count, u32 value, | 
|  | 121 | int uselocks, int nobusyloop); | 
|  | 122 |  | 
|  | 123 | #endif |