Path: blob/master/drivers/media/dvb/ttpci/budget.h
15112 views
1#ifndef __BUDGET_DVB__2#define __BUDGET_DVB__34#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"1112#include <linux/module.h>13#include <linux/mutex.h>1415#include <media/saa7146.h>1617extern int budget_debug;1819#ifdef dprintk20#undef dprintk21#endif2223#define dprintk(level,args...) \24do { if ((budget_debug & level)) { printk("%s: %s(): ", KBUILD_MODNAME, __func__); printk(args); } } while (0)2526struct budget_info {27char *name;28int type;29};3031/* place to store all the necessary device information */32struct budget {3334/* devices */35struct dvb_device dvb_dev;36struct dvb_net dvb_net;3738struct saa7146_dev *dev;3940struct i2c_adapter i2c_adap;41struct budget_info *card;4243unsigned char *grabbing;44struct saa7146_pgtable pt;4546struct tasklet_struct fidb_tasklet;47struct tasklet_struct vpe_tasklet;4849struct dmxdev dmxdev;50struct dvb_demux demux;5152struct dmx_frontend hw_frontend;53struct dmx_frontend mem_frontend;5455int ci_present;56int video_port;5758u32 buffer_width;59u32 buffer_height;60u32 buffer_size;61u32 buffer_warning_threshold;62u32 buffer_warnings;63unsigned long buffer_warning_time;6465u32 ttbp;66int feeding;6768spinlock_t feedlock;6970spinlock_t debilock;7172struct dvb_adapter dvb_adapter;73struct dvb_frontend *dvb_frontend;74int (*read_fe_status)(struct dvb_frontend *fe, fe_status_t *status);75int fe_synced;7677void *priv;78};7980#define MAKE_BUDGET_INFO(x_var,x_name,x_type) \81static struct budget_info x_var ## _info = { \82.name=x_name, \83.type=x_type }; \84static struct saa7146_pci_extension_data x_var = { \85.ext_priv = &x_var ## _info, \86.ext = &budget_extension };8788#define BUDGET_TT 089#define BUDGET_TT_HW_DISEQC 190#define BUDGET_PATCH 391#define BUDGET_FS_ACTIVY 492#define BUDGET_CIN1200S 593#define BUDGET_CIN1200C 694#define BUDGET_CIN1200T 795#define BUDGET_KNC1S 896#define BUDGET_KNC1C 997#define BUDGET_KNC1T 1098#define BUDGET_KNC1SP 1199#define BUDGET_KNC1CP 12100#define BUDGET_KNC1TP 13101#define BUDGET_TVSTAR 14102#define BUDGET_CIN1200C_MK3 15103#define BUDGET_KNC1C_MK3 16104#define BUDGET_KNC1CP_MK3 17105#define BUDGET_KNC1S2 18106107#define BUDGET_VIDEO_PORTA 0108#define BUDGET_VIDEO_PORTB 1109110extern int ttpci_budget_init(struct budget *budget, struct saa7146_dev *dev,111struct saa7146_pci_extension_data *info,112struct module *owner, short *adapter_nums);113extern void ttpci_budget_init_hooks(struct budget *budget);114extern int ttpci_budget_deinit(struct budget *budget);115extern void ttpci_budget_irq10_handler(struct saa7146_dev *dev, u32 * isr);116extern void ttpci_budget_set_video_port(struct saa7146_dev *dev, int video_port);117extern int ttpci_budget_debiread(struct budget *budget, u32 config, int addr, int count,118int uselocks, int nobusyloop);119extern int ttpci_budget_debiwrite(struct budget *budget, u32 config, int addr, int count, u32 value,120int uselocks, int nobusyloop);121122#endif123124125