diff -r 0b04be0c088a linux/drivers/media/dvb/frontends/stb0899_algo.c
|
a
|
b
|
static enum stb0899_status stb0899_check
|
| 381 | 381 | */ |
| 382 | 382 | static enum stb0899_status stb0899_search_data(struct stb0899_state *state) |
| 383 | 383 | { |
| 384 | | short int derot_freq, derot_step, derot_limit, next_loop = 3; |
| | 384 | short int derot_freq, derot_limit, next_loop = 3; |
| 385 | 385 | u8 cfr[2]; |
| 386 | 386 | u8 reg; |
| 387 | 387 | int index = 1; |
| … |
… |
static enum stb0899_status stb0899_searc
|
| 389 | 389 | struct stb0899_internal *internal = &state->internal; |
| 390 | 390 | struct stb0899_params *params = &state->params; |
| 391 | 391 | |
| 392 | | derot_step = (params->srate / 4L) / internal->mclk; |
| 393 | 392 | derot_limit = (internal->sub_range / 2L) / internal->mclk; |
| 394 | 393 | derot_freq = internal->derot_freq; |
| 395 | 394 | |
| 396 | 395 | do { |
| 397 | 396 | if ((internal->status != CARRIEROK) || (stb0899_check_data(state) != DATAOK)) { |
| 398 | 397 | |
| 399 | | derot_freq += index * internal->direction * derot_step; /* next zig zag derotator position */ |
| | 398 | derot_freq += index * internal->direction * internal->derot_step; /* next zig zag derotator position */ |
| 400 | 399 | if (ABS(derot_freq) > derot_limit) |
| 401 | 400 | next_loop--; |
| 402 | 401 | |