1
2
3
4
5
6 #ifndef _AS10X_TYPES_H_
7 #define _AS10X_TYPES_H_
8
9
10
11
12
13
14 #define BW_5_MHZ 0x00
15 #define BW_6_MHZ 0x01
16 #define BW_7_MHZ 0x02
17 #define BW_8_MHZ 0x03
18
19
20 #define HIER_NO_PRIORITY 0x00
21 #define HIER_LOW_PRIORITY 0x01
22 #define HIER_HIGH_PRIORITY 0x02
23
24
25 #define CONST_QPSK 0x00
26 #define CONST_QAM16 0x01
27 #define CONST_QAM64 0x02
28 #define CONST_UNKNOWN 0xFF
29
30
31 #define HIER_NONE 0x00
32 #define HIER_ALPHA_1 0x01
33 #define HIER_ALPHA_2 0x02
34 #define HIER_ALPHA_4 0x03
35 #define HIER_UNKNOWN 0xFF
36
37
38 #define INTLV_NATIVE 0x00
39 #define INTLV_IN_DEPTH 0x01
40 #define INTLV_UNKNOWN 0xFF
41
42
43 #define CODE_RATE_1_2 0x00
44 #define CODE_RATE_2_3 0x01
45 #define CODE_RATE_3_4 0x02
46 #define CODE_RATE_5_6 0x03
47 #define CODE_RATE_7_8 0x04
48 #define CODE_RATE_UNKNOWN 0xFF
49
50
51 #define GUARD_INT_1_32 0x00
52 #define GUARD_INT_1_16 0x01
53 #define GUARD_INT_1_8 0x02
54 #define GUARD_INT_1_4 0x03
55 #define GUARD_UNKNOWN 0xFF
56
57
58 #define TRANS_MODE_2K 0x00
59 #define TRANS_MODE_8K 0x01
60 #define TRANS_MODE_4K 0x02
61 #define TRANS_MODE_UNKNOWN 0xFF
62
63
64 #define TIMESLICING_PRESENT 0x01
65 #define MPE_FEC_PRESENT 0x02
66
67
68 #define TUNE_STATUS_NOT_TUNED 0x00
69 #define TUNE_STATUS_IDLE 0x01
70 #define TUNE_STATUS_LOCKING 0x02
71 #define TUNE_STATUS_SIGNAL_DVB_OK 0x03
72 #define TUNE_STATUS_STREAM_DETECTED 0x04
73 #define TUNE_STATUS_STREAM_TUNED 0x05
74 #define TUNE_STATUS_ERROR 0xFF
75
76
77 #define TS_PID_TYPE_TS 0
78 #define TS_PID_TYPE_PSI_SI 1
79 #define TS_PID_TYPE_MPE 2
80
81
82 #define MAX_ECHOS 15
83
84
85 #define CONTEXT_LNA 1010
86 #define CONTEXT_ELNA_HYSTERESIS 4003
87 #define CONTEXT_ELNA_GAIN 4004
88 #define CONTEXT_MER_THRESHOLD 5005
89 #define CONTEXT_MER_OFFSET 5006
90 #define CONTEXT_IR_STATE 7000
91 #define CONTEXT_TSOUT_MSB_FIRST 7004
92 #define CONTEXT_TSOUT_FALLING_EDGE 7005
93
94
95 #define CFG_MODE_ON 0
96 #define CFG_MODE_OFF 1
97 #define CFG_MODE_AUTO 2
98
99 struct as10x_tps {
100 uint8_t modulation;
101 uint8_t hierarchy;
102 uint8_t interleaving_mode;
103 uint8_t code_rate_HP;
104 uint8_t code_rate_LP;
105 uint8_t guard_interval;
106 uint8_t transmission_mode;
107 uint8_t DVBH_mask_HP;
108 uint8_t DVBH_mask_LP;
109 uint16_t cell_ID;
110 } __packed;
111
112 struct as10x_tune_args {
113
114 uint32_t freq;
115
116 uint8_t bandwidth;
117
118 uint8_t hier_select;
119
120 uint8_t modulation;
121
122 uint8_t hierarchy;
123
124 uint8_t interleaving_mode;
125
126 uint8_t code_rate;
127
128 uint8_t guard_interval;
129
130 uint8_t transmission_mode;
131 } __packed;
132
133 struct as10x_tune_status {
134
135 uint8_t tune_state;
136
137 int16_t signal_strength;
138
139 uint16_t PER;
140
141 uint16_t BER;
142 } __packed;
143
144 struct as10x_demod_stats {
145
146 uint32_t frame_count;
147
148 uint32_t bad_frame_count;
149
150 uint32_t bytes_fixed_by_rs;
151
152 uint16_t mer;
153
154 uint8_t has_started;
155 } __packed;
156
157 struct as10x_ts_filter {
158 uint16_t pid;
159 uint8_t type;
160 uint8_t idx;
161 } __packed;
162
163 struct as10x_register_value {
164 uint8_t mode;
165 union {
166 uint8_t value8;
167 uint16_t value16;
168 uint32_t value32;
169 } __packed u;
170 } __packed;
171
172 struct as10x_register_addr {
173
174 uint32_t addr;
175
176 uint8_t mode;
177 };
178
179 #endif