1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
|
#ifndef _DEMOD_WRAPPER_H_
#define _DEMOD_WRAPPER_H_
#include <linux/ioctl.h>
/**
* enum demod_wrapper_path_type -
* represents all the possible path types in demod wrapper.
* @demod_wrapper_forza_atv: a path for analog tv that passes through
* forza demod. This path type is for all analog standards supported by forza.
* @demod_wrapper_dtv_s: a path for digital tv that passes through
* digital demod. This path type is for satellite standards supported by
* this demod.
* @demod_wrapper_dtv_t_c: a path for digital tv that passes through
* digital demod. This path type is for terrestrial and cable standards
* supported by this demod.
* @demod_wrapper_ext_atv: a path for analog tv. The demod in this case is
* external and located outside the demod wrapper.
* @demod_wrapper_num_of_paths: number of path types.
*/
enum demod_wrapper_path_type {
DEMOD_WRAPPER_FORZA_ATV,
DEMOD_WRAPPER_DTV_S,
DEMOD_WRAPPER_DTV_T_C,
DEMOD_WRAPPER_EXT_ATV,
DEMOD_WRAPPER_NUM_OF_PATHS
};
/**
* enum demod_wrapper_power_mode -
* represents all the possible power modes of demod wrapper.
* @demod_wrapper_full_preformance: demod wrapper will operate in full
* performance mode.
* @demod_wrapper_num_of_power_modes: number of power modes.
*/
enum demod_wrapper_power_mode {
DEMOD_WRAPPER_FULL_PREFORMANCE,
DEMOD_WRAPPER_NUM_OF_POWER_MODES
};
/**
* enum demod_wrapper_baud_rate_mode -
* represents all the baud rate modes that are supported in dtv satellite paths.
* @demod_wrapper_narrow: narrow baud rate mode.
* @demod_wrapper_medium: medium baud rate mode.
* @demod_wrapper_wide: wide baud rate mode.
* @demod_wrapper_num_of_baud_rate_modes: number of baud_rate modes.
*/
enum demod_wrapper_baud_rate_mode {
DEMOD_WRAPPER_NARROW,
DEMOD_WRAPPER_MEDIUM,
DEMOD_WRAPPER_WIDE,
DEMOD_WRAPPER_NUM_OF_BAUD_RATE_MODES
};
/**
* enum demod_wrapper_pdm_num -
* represents the two pdms that exists in demod wrapper: pdm0 and pdm1.
* @demod_wrapper_pdm0:
* @demod_wrapper_pdm1:
*/
enum demod_wrapper_pdm_num {
DEMOD_WRAPPER_PDM0,
DEMOD_WRAPPER_PDM1
};
/**
* enum demod_wrapper_ts_bridge -
* represents the output types of the ts bridge.
* @demod_wrapper_ts_serial: output of ts bridge is serial.
* @demod_wrapper_ts_parallel: output of ts bridge is parallel.
*/
enum demod_wrapper_ts_bridge {
DEMOD_WRAPPER_TS_SERIAL,
DEMOD_WRAPPER_TS_PARALLEL
};
/**
* struct demod_wrapper_release_path_args -
* arguments to be passed to DEMOD_WRAPPER_RELEASE_PATH ioctl.
* @type: the type of the path to be released.
*/
struct demod_wrapper_release_path_args {
enum demod_wrapper_path_type type;
};
/**
* struct demod_wrapper_set_path_args -
* arguments to be passed to DEMOD_WRAPPER_SET_PATH ioctl.
* @type: the type of the path to set.
* @pdm: the number of the pdm that this path should work with.
* @power: the power mode that this path should work in.
* Note: if we want to set external_atv path there is no pdm
* involved so passing any value as pdm will be fine
*/
struct demod_wrapper_set_path_args {
enum demod_wrapper_path_type type;
enum demod_wrapper_pdm_num pdm;
enum demod_wrapper_power_mode power;
};
/**
* struct demod_wrapper_set_path_dtv_sat_args -
* arguments that should be passed to DEMOD_WRAPPER_SET_PATH_DTV_SAT
* ioctl.
* @pdm: the number of the pdm that dtv satellite path should work with.
* @power: the power mode that dtv satellite path should work in.
* @br_mode: baud rate parameter that is a specific paramter for dtv satellite,
* and indicates what is the baud rate of the satellite signal.
*/
struct demod_wrapper_set_path_dtv_sat_args {
enum demod_wrapper_pdm_num pdm;
enum demod_wrapper_power_mode power;
enum demod_wrapper_baud_rate_mode br_mode;
};
/**
* struct demod_wrapper_init_ts_bridge -
* argumants that should be passed to DEMOD_WRAPPER_TS_BRIDGE_INIT ioctl.
* @out: indicates if the output signal of the ts bridge is serial or parallel.
*/
struct demod_wrapper_init_ts_bridge_args {
enum demod_wrapper_ts_bridge out;
};
/**
* struct demod_wrapper_pm_set_params_args -
* argumants that should be passed to DEMOD_WRAPPER_PM_SET_PARAMS ioctl.
* @pm_loop_cntr: the value that will be set to BCDEM_REGS_PM_LOOP_CNTR register
* @pm_params_threshold: the value that will be set to
* BCDEM_REGS_PM_PARAMS_THRESHOLD
*/
struct demod_wrapper_pm_set_params_args {
unsigned int pm_loop_cntr;
unsigned int pm_params_threshold;
};
/**
* struct demod_wrapper_pm_get_thrshld_cntr_args -
* argumants that should be passed to DEMOD_WRAPPER_PM_GET_THRSHLD_CNTR ioctl.
* @pm_thrshld_cntr: the parameter will hold the value gotten from
* BCDEM_REGS_PM_RO_THRSHLD_CNTR
*/
struct demod_wrapper_pm_get_thr_cntr_args {
unsigned int pm_thrshld_cntr;
};
/**
* struct demod_wrapper_pm_get_power_args -
* argumants that should be passed to DEMOD_WRAPPER_PM_GET_POWER ioctl.
* @pm_power: the parameter will hold the value gotten from
* BCDEM_REGS_PM_RO_POWER
*/
struct demod_wrapper_pm_get_power_args {
unsigned int pm_power;
};
#define DEMOD_WRAPPER_BASIC_CMDS_NUM 1
/**
* ioctl cmd : DEMOD_WRAPPER_SET_PATH -
* Performs initialization and configuration of components
* in demod_wrapper that are needed for the requested path.
* If there is any path conflict - overrides.
* Returns 0 in success.
*/
#define DEMOD_WRAPPER_SET_PATH _IOW(DEMOD_WRAPPER_BASIC_CMDS_NUM,\
1, struct demod_wrapper_set_path_args)
/**
* ioctl cmd : DEMOD_WRAPPER_SET_PATH_DTV_SAT -
* Performs initialization and configuration of components
* in demod_wrapper that are needed for dtv sat path.
* If there is any path conflict - overrides.
* Returns 0 in success.
*/
#define DEMOD_WRAPPER_SET_PATH_DTV_SAT _IOW(\
DEMOD_WRAPPER_BASIC_CMDS_NUM, 2,\
struct demod_wrapper_set_path_dtv_sat_args)
/**
* ioctl cmd : DEMOD_WRAPPER_RELEASE_PATH -
* Releases the requested path.
* Returns 0 in success.
*/
#define DEMOD_WRAPPER_RELEASE_PATH _IOW(DEMOD_WRAPPER_BASIC_CMDS_NUM,\
3, struct demod_wrapper_release_path_args)
/**
* ioctl cmd : DEMOD_WRAPPER_RELEASE_PATH -
* Sets the out of the ts-bridge according to received
* argument. Sets the in as parallel.
* Returns 0 in success.
*/
#define DEMOD_WRAPPER_TS_BRIDGE_INIT _IOW(DEMOD_WRAPPER_BASIC_CMDS_NUM,\
4, struct demod_wrapper_init_ts_bridge_args)
/**
* ioctl cmd : DEMOD_WRAPPER_RELEASE_PATH -
* Enables the ts-bridge. If ts-bridge was'nt initialized
* (with DEMOD_WRAPPER_TS_BRIDGE_INIT) sets default values:
* in - parallel
* out - parallel
* Returns 0 in success.
*/
#define DEMOD_WRAPPER_TS_BRIDGE_ENABLE _IO(DEMOD_WRAPPER_BASIC_CMDS_NUM, 5)
/**
* ioctl cmd : DEMOD_WRAPPER_RELEASE_PATH -
* Disables the ts-bridge.
* Returns 0 in success.
*/
#define DEMOD_WRAPPER_TS_BRIDGE_DISABLE _IO(\
DEMOD_WRAPPER_BASIC_CMDS_NUM, 6)
/**
* ioctl cmd : DEMOD_WRAPPER_PM_SET_PARAMS -
* Sets values for BCDEM_REGS_PM_LOOP_CNTR and BCDEM_REGS_PM_PARAMS_THRESHOLD
* Returns 0 in success.
*/
#define DEMOD_WRAPPER_PM_SET_PARAMS _IOW(DEMOD_WRAPPER_BASIC_CMDS_NUM,\
7, struct demod_wrapper_pm_set_params_args)
/**
* ioctl cmd : DEMOD_WRAPPER_PM_GET_THR_CNTR -
* Gets the value of the BCDEM_REGS_OM_RO_THRSHLD_CNTR
* Returns 0 in success.
*/
#define DEMOD_WRAPPER_PM_GET_THRSHLD_CNTR _IOR(\
DEMOD_WRAPPER_BASIC_CMDS_NUM,\
8, struct demod_wrapper_pm_get_thr_cntr_args)
/**
* ioctl cmd : DEMOD_WRAPPER_PM_GET_POWER -
* Gets the value of the BCDEM_REGS_RO_POWER
* Returns 0 in success.
*/
#define DEMOD_WRAPPER_PM_GET_POWER _IOR(DEMOD_WRAPPER_BASIC_CMDS_NUM,\
9, struct demod_wrapper_pm_get_power_args)
#endif /* _DEMOD_WRAPPER_H_ */
|