diff options
Diffstat (limited to 'drivers/media/dvb/frontends/stv0900_priv.h')
-rw-r--r-- | drivers/media/dvb/frontends/stv0900_priv.h | 81 |
1 files changed, 24 insertions, 57 deletions
diff --git a/drivers/media/dvb/frontends/stv0900_priv.h b/drivers/media/dvb/frontends/stv0900_priv.h index 5ed7a145c7d3..d8ba8a984abe 100644 --- a/drivers/media/dvb/frontends/stv0900_priv.h +++ b/drivers/media/dvb/frontends/stv0900_priv.h | |||
@@ -46,22 +46,6 @@ | |||
46 | #define FALSE (!TRUE) | 46 | #define FALSE (!TRUE) |
47 | #endif | 47 | #endif |
48 | 48 | ||
49 | #define dmd_reg(a, b, c) \ | ||
50 | do { \ | ||
51 | a = 0; \ | ||
52 | switch (demod) { \ | ||
53 | case STV0900_DEMOD_1: \ | ||
54 | default: \ | ||
55 | a = b; \ | ||
56 | break; \ | ||
57 | case STV0900_DEMOD_2: \ | ||
58 | a = c; \ | ||
59 | break; \ | ||
60 | } \ | ||
61 | } while (0) | ||
62 | |||
63 | static int stvdebug; | ||
64 | |||
65 | #define dprintk(args...) \ | 49 | #define dprintk(args...) \ |
66 | do { \ | 50 | do { \ |
67 | if (stvdebug) \ | 51 | if (stvdebug) \ |
@@ -70,6 +54,8 @@ static int stvdebug; | |||
70 | 54 | ||
71 | #define STV0900_MAXLOOKUPSIZE 500 | 55 | #define STV0900_MAXLOOKUPSIZE 500 |
72 | #define STV0900_BLIND_SEARCH_AGC2_TH 700 | 56 | #define STV0900_BLIND_SEARCH_AGC2_TH 700 |
57 | #define STV0900_BLIND_SEARCH_AGC2_TH_CUT30 1400 | ||
58 | #define IQPOWER_THRESHOLD 30 | ||
73 | 59 | ||
74 | /* One point of the lookup table */ | 60 | /* One point of the lookup table */ |
75 | struct stv000_lookpoint { | 61 | struct stv000_lookpoint { |
@@ -263,14 +249,14 @@ struct stv0900_init_params{ | |||
263 | int tuner1_adc; | 249 | int tuner1_adc; |
264 | 250 | ||
265 | /* IQ from the tuner1 to the demod */ | 251 | /* IQ from the tuner1 to the demod */ |
266 | enum stv0900_iq_inversion tun1_iq_inversion; | 252 | enum stv0900_iq_inversion tun1_iq_inv; |
267 | enum fe_stv0900_clock_type path2_ts_clock; | 253 | enum fe_stv0900_clock_type path2_ts_clock; |
268 | 254 | ||
269 | u8 tun2_maddress; | 255 | u8 tun2_maddress; |
270 | int tuner2_adc; | 256 | int tuner2_adc; |
271 | 257 | ||
272 | /* IQ from the tuner2 to the demod */ | 258 | /* IQ from the tuner2 to the demod */ |
273 | enum stv0900_iq_inversion tun2_iq_inversion; | 259 | enum stv0900_iq_inversion tun2_iq_inv; |
274 | struct stv0900_reg *ts_config; | 260 | struct stv0900_reg *ts_config; |
275 | }; | 261 | }; |
276 | 262 | ||
@@ -300,7 +286,7 @@ struct stv0900_signal_info { | |||
300 | enum fe_stv0900_modcode modcode; | 286 | enum fe_stv0900_modcode modcode; |
301 | enum fe_stv0900_modulation modulation; | 287 | enum fe_stv0900_modulation modulation; |
302 | enum fe_stv0900_pilot pilot; | 288 | enum fe_stv0900_pilot pilot; |
303 | enum fe_stv0900_frame_length frame_length; | 289 | enum fe_stv0900_frame_length frame_len; |
304 | enum stv0900_iq_inversion spectrum; | 290 | enum stv0900_iq_inversion spectrum; |
305 | enum fe_stv0900_rolloff rolloff; | 291 | enum fe_stv0900_rolloff rolloff; |
306 | 292 | ||
@@ -318,47 +304,25 @@ struct stv0900_internal{ | |||
318 | /* Demodulator use for single demod or for dual demod) */ | 304 | /* Demodulator use for single demod or for dual demod) */ |
319 | enum fe_stv0900_demod_mode demod_mode; | 305 | enum fe_stv0900_demod_mode demod_mode; |
320 | 306 | ||
321 | /*Demod 1*/ | 307 | /*Demods */ |
322 | s32 tuner1_freq; | 308 | s32 freq[2]; |
323 | s32 tuner1_bw; | 309 | s32 bw[2]; |
324 | s32 dmd1_symbol_rate; | 310 | s32 symbol_rate[2]; |
325 | s32 dmd1_srch_range; | 311 | s32 srch_range[2]; |
326 | 312 | ||
327 | /* algorithm for search Blind, Cold or Warm*/ | 313 | /* algorithm for search Blind, Cold or Warm*/ |
328 | enum fe_stv0900_search_algo dmd1_srch_algo; | 314 | enum fe_stv0900_search_algo srch_algo[2]; |
329 | /* search standard: Auto, DVBS1/DSS only or DVBS2 only*/ | 315 | /* search standard: Auto, DVBS1/DSS only or DVBS2 only*/ |
330 | enum fe_stv0900_search_standard dmd1_srch_standard; | 316 | enum fe_stv0900_search_standard srch_standard[2]; |
331 | /* inversion search : auto, auto norma first, normal or inverted */ | 317 | /* inversion search : auto, auto norma first, normal or inverted */ |
332 | enum fe_stv0900_search_iq dmd1_srch_iq_inv; | 318 | enum fe_stv0900_search_iq srch_iq_inv[2]; |
333 | enum fe_stv0900_modcode dmd1_modcode; | 319 | enum fe_stv0900_modcode modcode[2]; |
334 | enum fe_stv0900_modulation dmd1_modulation; | 320 | enum fe_stv0900_modulation modulation[2]; |
335 | enum fe_stv0900_fec dmd1_fec; | 321 | enum fe_stv0900_fec fec[2]; |
336 | |||
337 | struct stv0900_signal_info dmd1_rslts; | ||
338 | enum fe_stv0900_signal_type dmd1_state; | ||
339 | 322 | ||
340 | enum fe_stv0900_error dmd1_err; | 323 | struct stv0900_signal_info result[2]; |
324 | enum fe_stv0900_error err[2]; | ||
341 | 325 | ||
342 | /*Demod 2*/ | ||
343 | s32 tuner2_freq; | ||
344 | s32 tuner2_bw; | ||
345 | s32 dmd2_symbol_rate; | ||
346 | s32 dmd2_srch_range; | ||
347 | |||
348 | enum fe_stv0900_search_algo dmd2_srch_algo; | ||
349 | enum fe_stv0900_search_standard dmd2_srch_stndrd; | ||
350 | /* inversion search : auto, auto normal first, normal or inverted */ | ||
351 | enum fe_stv0900_search_iq dmd2_srch_iq_inv; | ||
352 | enum fe_stv0900_modcode dmd2_modcode; | ||
353 | enum fe_stv0900_modulation dmd2_modulation; | ||
354 | enum fe_stv0900_fec dmd2_fec; | ||
355 | |||
356 | /* results of the search*/ | ||
357 | struct stv0900_signal_info dmd2_rslts; | ||
358 | /* current state of the search algorithm */ | ||
359 | enum fe_stv0900_signal_type dmd2_state; | ||
360 | |||
361 | enum fe_stv0900_error dmd2_err; | ||
362 | 326 | ||
363 | struct i2c_adapter *i2c_adap; | 327 | struct i2c_adapter *i2c_adap; |
364 | u8 i2c_addr; | 328 | u8 i2c_addr; |
@@ -379,6 +343,8 @@ struct stv0900_state { | |||
379 | int demod; | 343 | int demod; |
380 | }; | 344 | }; |
381 | 345 | ||
346 | extern int stvdebug; | ||
347 | |||
382 | extern s32 ge2comp(s32 a, s32 width); | 348 | extern s32 ge2comp(s32 a, s32 width); |
383 | 349 | ||
384 | extern void stv0900_write_reg(struct stv0900_internal *i_params, | 350 | extern void stv0900_write_reg(struct stv0900_internal *i_params, |
@@ -418,13 +384,14 @@ extern u8 stv0900_get_optim_short_carr_loop(s32 srate, | |||
418 | extern void stv0900_stop_all_s2_modcod(struct stv0900_internal *i_params, | 384 | extern void stv0900_stop_all_s2_modcod(struct stv0900_internal *i_params, |
419 | enum fe_stv0900_demod_num demod); | 385 | enum fe_stv0900_demod_num demod); |
420 | 386 | ||
421 | extern void stv0900_activate_s2_modcode(struct stv0900_internal *i_params, | 387 | extern void stv0900_activate_s2_modcod(struct stv0900_internal *i_params, |
422 | enum fe_stv0900_demod_num demod); | 388 | enum fe_stv0900_demod_num demod); |
423 | 389 | ||
424 | extern void stv0900_activate_s2_modcode_single(struct stv0900_internal *i_params, | 390 | extern void stv0900_activate_s2_modcod_single(struct stv0900_internal *i_params, |
425 | enum fe_stv0900_demod_num demod); | 391 | enum fe_stv0900_demod_num demod); |
426 | 392 | ||
427 | extern enum fe_stv0900_tracking_standard stv0900_get_standard(struct dvb_frontend *fe, | 393 | extern enum |
394 | fe_stv0900_tracking_standard stv0900_get_standard(struct dvb_frontend *fe, | ||
428 | enum fe_stv0900_demod_num demod); | 395 | enum fe_stv0900_demod_num demod); |
429 | 396 | ||
430 | #endif | 397 | #endif |