Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
firedtv.h
Go to the documentation of this file.
1 /*
2  * FireDTV driver (formerly known as FireSAT)
3  *
4  * Copyright (C) 2004 Andreas Monitzer <[email protected]>
5  * Copyright (C) 2008 Henrik Kurelid <[email protected]>
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License as
9  * published by the Free Software Foundation; either version 2 of
10  * the License, or (at your option) any later version.
11  */
12 
13 #ifndef _FIREDTV_H
14 #define _FIREDTV_H
15 
16 #include <linux/dvb/dmx.h>
17 #include <linux/dvb/frontend.h>
18 #include <linux/list.h>
19 #include <linux/mod_devicetable.h>
20 #include <linux/mutex.h>
21 #include <linux/spinlock_types.h>
22 #include <linux/types.h>
23 #include <linux/wait.h>
24 #include <linux/workqueue.h>
25 
26 #include <demux.h>
27 #include <dmxdev.h>
28 #include <dvb_demux.h>
29 #include <dvb_frontend.h>
30 #include <dvb_net.h>
31 #include <dvbdev.h>
32 
34  unsigned active_system:8;
35  unsigned searching:1;
36  unsigned moving:1;
37  unsigned no_rf:1;
38  unsigned input:1;
39  unsigned selected_antenna:7;
40  unsigned ber:32;
41  unsigned signal_strength:8;
42  unsigned raster_frequency:2;
43  unsigned rf_frequency:22;
44  unsigned man_dep_info_length:8;
45  unsigned front_end_error:1;
46  unsigned antenna_error:1;
48  unsigned power_supply:1;
49  unsigned carrier_noise_ratio:16;
51  unsigned antenna_voltage:8;
53  unsigned ca_mmi:1;
54  unsigned ca_pmt_reply:1;
56  unsigned ca_application_info:1;
58  unsigned ca_dvb_flag:1;
59  unsigned ca_error_flag:1;
61 };
62 
63 enum model_type {
69 };
70 
71 struct device;
72 struct input_dev;
73 struct fdtv_ir_context;
74 
75 struct firedtv {
76  struct device *device;
77  struct list_head list;
78 
80  struct dmxdev dmxdev;
81  struct dvb_demux demux;
83  struct dvb_net dvbnet;
84  struct dvb_frontend fe;
85 
86  struct dvb_device *cadev;
89 
90  struct mutex avc_mutex;
94  struct input_dev *remote_ctrl_dev;
95 
97  char subunit;
98  char isochannel;
100 
103 
105  unsigned long channel_active;
107 
109  u8 avc_data[512];
110 };
111 
112 /* firedtv-avc.c */
113 int avc_recv(struct firedtv *fdtv, void *data, size_t length);
114 int avc_tuner_status(struct firedtv *fdtv, struct firedtv_tuner_status *stat);
116 int avc_tuner_dsd(struct firedtv *fdtv, struct dtv_frontend_properties *params);
117 int avc_tuner_set_pids(struct firedtv *fdtv, unsigned char pidc, u16 pid[]);
118 int avc_tuner_get_ts(struct firedtv *fdtv);
119 int avc_identify_subunit(struct firedtv *fdtv);
120 struct dvb_diseqc_master_cmd;
121 int avc_lnb_control(struct firedtv *fdtv, char voltage, char burst,
122  char conttone, char nrdiseq,
123  struct dvb_diseqc_master_cmd *diseqcmd);
125 int avc_register_remote_control(struct firedtv *fdtv);
126 int avc_ca_app_info(struct firedtv *fdtv, char *app_info, unsigned int *len);
127 int avc_ca_info(struct firedtv *fdtv, char *app_info, unsigned int *len);
128 int avc_ca_reset(struct firedtv *fdtv);
129 int avc_ca_pmt(struct firedtv *fdtv, char *app_info, int length);
130 int avc_ca_get_time_date(struct firedtv *fdtv, int *interval);
131 int avc_ca_enter_menu(struct firedtv *fdtv);
132 int avc_ca_get_mmi(struct firedtv *fdtv, char *mmi_object, unsigned int *len);
133 int cmp_establish_pp_connection(struct firedtv *fdtv, int plug, int channel);
134 void cmp_break_pp_connection(struct firedtv *fdtv, int plug, int channel);
135 
136 /* firedtv-ci.c */
137 int fdtv_ca_register(struct firedtv *fdtv);
138 void fdtv_ca_release(struct firedtv *fdtv);
139 
140 /* firedtv-dvb.c */
141 int fdtv_start_feed(struct dvb_demux_feed *dvbdmxfeed);
142 int fdtv_stop_feed(struct dvb_demux_feed *dvbdmxfeed);
143 int fdtv_dvb_register(struct firedtv *fdtv, const char *name);
144 void fdtv_dvb_unregister(struct firedtv *fdtv);
145 
146 /* firedtv-fe.c */
147 void fdtv_frontend_init(struct firedtv *fdtv, const char *name);
148 
149 /* firedtv-fw.c */
150 int fdtv_lock(struct firedtv *fdtv, u64 addr, void *data);
151 int fdtv_read(struct firedtv *fdtv, u64 addr, void *data);
152 int fdtv_write(struct firedtv *fdtv, u64 addr, void *data, size_t len);
153 int fdtv_start_iso(struct firedtv *fdtv);
154 void fdtv_stop_iso(struct firedtv *fdtv);
155 
156 /* firedtv-rc.c */
157 #ifdef CONFIG_DVB_FIREDTV_INPUT
158 int fdtv_register_rc(struct firedtv *fdtv, struct device *dev);
159 void fdtv_unregister_rc(struct firedtv *fdtv);
160 void fdtv_handle_rc(struct firedtv *fdtv, unsigned int code);
161 #else
162 static inline int fdtv_register_rc(struct firedtv *fdtv,
163  struct device *dev) { return 0; }
164 static inline void fdtv_unregister_rc(struct firedtv *fdtv) {}
165 static inline void fdtv_handle_rc(struct firedtv *fdtv, unsigned int code) {}
166 #endif
167 
168 #endif /* _FIREDTV_H */