Input: xpad - add support for Xbox1 PDP Camo series gamepad
[linux/fpc-iii.git] / drivers / media / common / siano / smsdvb.h
blobb15754d95ec0923d768416e123636253b856aeae
1 /***********************************************************************
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
16 ***********************************************************************/
18 struct smsdvb_debugfs;
19 struct smsdvb_client_t;
21 typedef void (*sms_prt_dvb_stats_t)(struct smsdvb_debugfs *debug_data,
22 struct sms_stats *p);
24 typedef void (*sms_prt_isdb_stats_t)(struct smsdvb_debugfs *debug_data,
25 struct sms_isdbt_stats *p);
27 typedef void (*sms_prt_isdb_stats_ex_t)
28 (struct smsdvb_debugfs *debug_data,
29 struct sms_isdbt_stats_ex *p);
32 struct smsdvb_client_t {
33 struct list_head entry;
35 struct smscore_device_t *coredev;
36 struct smscore_client_t *smsclient;
38 struct dvb_adapter adapter;
39 struct dvb_demux demux;
40 struct dmxdev dmxdev;
41 struct dvb_frontend frontend;
43 enum fe_status fe_status;
45 struct completion tune_done;
46 struct completion stats_done;
48 int last_per;
50 int legacy_ber, legacy_per;
52 int event_fe_state;
53 int event_unc_state;
55 unsigned long get_stats_jiffies;
57 int feed_users;
58 bool has_tuned;
60 /* stats debugfs data */
61 struct dentry *debugfs;
63 struct smsdvb_debugfs *debug_data;
65 sms_prt_dvb_stats_t prt_dvb_stats;
66 sms_prt_isdb_stats_t prt_isdb_stats;
67 sms_prt_isdb_stats_ex_t prt_isdb_stats_ex;
71 * This struct is a mix of struct sms_rx_stats_ex and
72 * struct sms_srvm_signal_status.
73 * It was obtained by comparing the way it was filled by the original code
75 struct RECEPTION_STATISTICS_PER_SLICES_S {
76 u32 result;
77 u32 snr;
78 s32 in_band_power;
79 u32 ts_packets;
80 u32 ets_packets;
81 u32 constellation;
82 u32 hp_code;
83 u32 tps_srv_ind_lp;
84 u32 tps_srv_ind_hp;
85 u32 cell_id;
86 u32 reason;
87 u32 request_id;
88 u32 modem_state; /* from SMSHOSTLIB_DVB_MODEM_STATE_ET */
90 u32 ber; /* Post Viterbi BER [1E-5] */
91 s32 RSSI; /* dBm */
92 s32 carrier_offset; /* Carrier Offset in bin/1024 */
94 u32 is_rf_locked; /* 0 - not locked, 1 - locked */
95 u32 is_demod_locked; /* 0 - not locked, 1 - locked */
97 u32 ber_bit_count; /* Total number of SYNC bits. */
98 u32 ber_error_count; /* Number of erroneous SYNC bits. */
100 s32 MRC_SNR; /* dB */
101 s32 mrc_in_band_pwr; /* In band power in dBM */
102 s32 MRC_RSSI; /* dBm */
105 /* From smsdvb-debugfs.c */
106 #ifdef CONFIG_SMS_SIANO_DEBUGFS
108 int smsdvb_debugfs_create(struct smsdvb_client_t *client);
109 void smsdvb_debugfs_release(struct smsdvb_client_t *client);
110 int smsdvb_debugfs_register(void);
111 void smsdvb_debugfs_unregister(void);
113 #else
115 static inline int smsdvb_debugfs_create(struct smsdvb_client_t *client)
117 return 0;
120 static inline void smsdvb_debugfs_release(struct smsdvb_client_t *client) {}
122 static inline int smsdvb_debugfs_register(void)
124 return 0;
127 static inline void smsdvb_debugfs_unregister(void) {};
129 #endif