blob: f852a1ac7740c630b610e92ba5a51a9b372f8158 [file] [log] [blame]
Greg Kroah-Hartmanc81c8b62008-03-06 21:30:23 -08001#ifndef __FIRESAT_H
2#define __FIRESAT_H
3
4#include "dvb_frontend.h"
5#include "dmxdev.h"
6#include "dvb_demux.h"
7#include "dvb_net.h"
8
9#include <linux/semaphore.h>
10#include <linux/dvb/frontend.h>
11#include <linux/dvb/dmx.h>
12
13enum model_type {
14 FireSAT_DVB_S = 1,
15 FireSAT_DVB_C = 2,
16 FireSAT_DVB_T = 3
17};
18
19struct firesat {
20 struct dvb_demux dvb_demux;
21 char *model_name;
22
23 /* DVB bits */
24 struct dvb_adapter *adapter;
25 struct dmxdev dmxdev;
26 struct dvb_demux demux;
27 struct dmx_frontend frontend;
28 struct dvb_net dvbnet;
29 struct dvb_frontend_info *frontend_info;
30 struct dvb_frontend *fe;
31
32 struct dvb_device *cadev;
33 int has_ci;
34
35 struct semaphore avc_sem;
36 atomic_t avc_reply_received;
37
38 atomic_t reschedule_remotecontrol;
39
40 struct firesat_channel {
41 struct firesat *firesat;
42 struct dvb_demux_feed *dvbdmxfeed;
43
44 int active;
45 int id;
46 int pid;
47 int type; /* 1 - TS, 2 - Filter */
48 } channel[16];
49 struct semaphore demux_sem;
50
51 /* needed by avc_api */
52 void *respfrm;
53 int resp_length;
54
55// nodeid_t nodeid;
56 struct hpsb_host *host;
57 u64 guid; /* GUID of this node */
58 u32 guid_vendor_id; /* Top 24bits of guid */
59 struct node_entry *nodeentry;
60
61 enum model_type type;
62 char subunit;
63 fe_sec_voltage_t voltage;
64 fe_sec_tone_mode_t tone;
65
66 int isochannel;
67
68 struct list_head list;
69};
70
71extern struct list_head firesat_list;
72extern spinlock_t firesat_list_lock;
73
74/* firesat_dvb.c */
75extern int firesat_start_feed(struct dvb_demux_feed *dvbdmxfeed);
76extern int firesat_stop_feed(struct dvb_demux_feed *dvbdmxfeed);
77extern int firesat_dvbdev_init(struct firesat *firesat,
78 struct device *dev,
79 struct dvb_frontend *fe);
80
81/* firesat_fe.c */
82extern int firesat_frontend_attach(struct firesat *firesat, struct dvb_frontend *fe);
83
84
85#endif