Commit 7fa676c6 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab

[media] dib8000: Fix alignments at dib8000_tune()

There are two tabs instead of one aligning this struct.
Worse than that, on some places, the alignment is wrong.
Fix it.

No functional changes.
Acked-By: default avatarPatrick Boettcher <pboettcher@kernellabs.com>
Signed-off-by: default avatarMauro Carvalho Chehab <m.chehab@samsung.com>
parent c063c7c6
...@@ -3018,313 +3018,313 @@ static int dib8000_tune(struct dvb_frontend *fe) ...@@ -3018,313 +3018,313 @@ static int dib8000_tune(struct dvb_frontend *fe)
switch (*tune_state) { switch (*tune_state) {
case CT_DEMOD_START: /* 30 */ case CT_DEMOD_START: /* 30 */
dib8000_reset_stats(fe); dib8000_reset_stats(fe);
if (state->revision == 0x8090) if (state->revision == 0x8090)
dib8090p_init_sdram(state); dib8090p_init_sdram(state);
state->status = FE_STATUS_TUNE_PENDING; state->status = FE_STATUS_TUNE_PENDING;
state->channel_parameters_set = is_manual_mode(c); state->channel_parameters_set = is_manual_mode(c);
dprintk("Tuning channel on %s search mode", dprintk("Tuning channel on %s search mode",
state->channel_parameters_set ? "manual" : "auto"); state->channel_parameters_set ? "manual" : "auto");
dib8000_viterbi_state(state, 0); /* force chan dec in restart */ dib8000_viterbi_state(state, 0); /* force chan dec in restart */
/* Layer monitor */ /* Layer monitor */
dib8000_write_word(state, 285, dib8000_read_word(state, 285) & 0x60); dib8000_write_word(state, 285, dib8000_read_word(state, 285) & 0x60);
dib8000_set_frequency_offset(state); dib8000_set_frequency_offset(state);
dib8000_set_bandwidth(fe, c->bandwidth_hz / 1000); dib8000_set_bandwidth(fe, c->bandwidth_hz / 1000);
if (state->channel_parameters_set == 0) { /* The channel struct is unknown, search it ! */ if (state->channel_parameters_set == 0) { /* The channel struct is unknown, search it ! */
#ifdef DIB8000_AGC_FREEZE #ifdef DIB8000_AGC_FREEZE
if (state->revision != 0x8090) { if (state->revision != 0x8090) {
state->agc1_max = dib8000_read_word(state, 108); state->agc1_max = dib8000_read_word(state, 108);
state->agc1_min = dib8000_read_word(state, 109); state->agc1_min = dib8000_read_word(state, 109);
state->agc2_max = dib8000_read_word(state, 110); state->agc2_max = dib8000_read_word(state, 110);
state->agc2_min = dib8000_read_word(state, 111); state->agc2_min = dib8000_read_word(state, 111);
agc1 = dib8000_read_word(state, 388); agc1 = dib8000_read_word(state, 388);
agc2 = dib8000_read_word(state, 389); agc2 = dib8000_read_word(state, 389);
dib8000_write_word(state, 108, agc1); dib8000_write_word(state, 108, agc1);
dib8000_write_word(state, 109, agc1); dib8000_write_word(state, 109, agc1);
dib8000_write_word(state, 110, agc2); dib8000_write_word(state, 110, agc2);
dib8000_write_word(state, 111, agc2); dib8000_write_word(state, 111, agc2);
}
#endif
state->autosearch_state = AS_SEARCHING_FFT;
state->found_nfft = TRANSMISSION_MODE_AUTO;
state->found_guard = GUARD_INTERVAL_AUTO;
*tune_state = CT_DEMOD_SEARCH_NEXT;
} else { /* we already know the channel struct so TUNE only ! */
state->autosearch_state = AS_DONE;
*tune_state = CT_DEMOD_STEP_3;
} }
state->symbol_duration = dib8000_get_symbol_duration(state); #endif
break; state->autosearch_state = AS_SEARCHING_FFT;
state->found_nfft = TRANSMISSION_MODE_AUTO;
state->found_guard = GUARD_INTERVAL_AUTO;
*tune_state = CT_DEMOD_SEARCH_NEXT;
} else { /* we already know the channel struct so TUNE only ! */
state->autosearch_state = AS_DONE;
*tune_state = CT_DEMOD_STEP_3;
}
state->symbol_duration = dib8000_get_symbol_duration(state);
break;
case CT_DEMOD_SEARCH_NEXT: /* 51 */ case CT_DEMOD_SEARCH_NEXT: /* 51 */
dib8000_autosearch_start(fe); dib8000_autosearch_start(fe);
if (state->revision == 0x8090) if (state->revision == 0x8090)
ret = 50; ret = 50;
else else
ret = 15; ret = 15;
*tune_state = CT_DEMOD_STEP_1; *tune_state = CT_DEMOD_STEP_1;
break; break;
case CT_DEMOD_STEP_1: /* 31 */ case CT_DEMOD_STEP_1: /* 31 */
switch (dib8000_autosearch_irq(fe)) { switch (dib8000_autosearch_irq(fe)) {
case 1: /* fail */ case 1: /* fail */
state->status = FE_STATUS_TUNE_FAILED; state->status = FE_STATUS_TUNE_FAILED;
state->autosearch_state = AS_DONE; state->autosearch_state = AS_DONE;
*tune_state = CT_DEMOD_STOP; /* else we are done here */ *tune_state = CT_DEMOD_STOP; /* else we are done here */
break; break;
case 2: /* Succes */ case 2: /* Succes */
state->status = FE_STATUS_FFT_SUCCESS; /* signal to the upper layer, that there was a channel found and the parameters can be read */ state->status = FE_STATUS_FFT_SUCCESS; /* signal to the upper layer, that there was a channel found and the parameters can be read */
*tune_state = CT_DEMOD_STEP_3; *tune_state = CT_DEMOD_STEP_3;
if (state->autosearch_state == AS_SEARCHING_GUARD) if (state->autosearch_state == AS_SEARCHING_GUARD)
*tune_state = CT_DEMOD_STEP_2; *tune_state = CT_DEMOD_STEP_2;
else else
state->autosearch_state = AS_DONE; state->autosearch_state = AS_DONE;
break; break;
case 3: /* Autosearch FFT max correlation endded */ case 3: /* Autosearch FFT max correlation endded */
*tune_state = CT_DEMOD_STEP_2; *tune_state = CT_DEMOD_STEP_2;
break;
}
break; break;
}
break;
case CT_DEMOD_STEP_2: case CT_DEMOD_STEP_2:
switch (state->autosearch_state) { switch (state->autosearch_state) {
case AS_SEARCHING_FFT: case AS_SEARCHING_FFT:
/* searching for the correct FFT */ /* searching for the correct FFT */
if (state->revision == 0x8090) { if (state->revision == 0x8090) {
corm[2] = (dib8000_read_word(state, 596) << 16) | (dib8000_read_word(state, 597)); corm[2] = (dib8000_read_word(state, 596) << 16) | (dib8000_read_word(state, 597));
corm[1] = (dib8000_read_word(state, 598) << 16) | (dib8000_read_word(state, 599)); corm[1] = (dib8000_read_word(state, 598) << 16) | (dib8000_read_word(state, 599));
corm[0] = (dib8000_read_word(state, 600) << 16) | (dib8000_read_word(state, 601)); corm[0] = (dib8000_read_word(state, 600) << 16) | (dib8000_read_word(state, 601));
} else { } else {
corm[2] = (dib8000_read_word(state, 594) << 16) | (dib8000_read_word(state, 595)); corm[2] = (dib8000_read_word(state, 594) << 16) | (dib8000_read_word(state, 595));
corm[1] = (dib8000_read_word(state, 596) << 16) | (dib8000_read_word(state, 597)); corm[1] = (dib8000_read_word(state, 596) << 16) | (dib8000_read_word(state, 597));
corm[0] = (dib8000_read_word(state, 598) << 16) | (dib8000_read_word(state, 599)); corm[0] = (dib8000_read_word(state, 598) << 16) | (dib8000_read_word(state, 599));
} }
/* dprintk("corm fft: %u %u %u", corm[0], corm[1], corm[2]); */ /* dprintk("corm fft: %u %u %u", corm[0], corm[1], corm[2]); */
max_value = 0; max_value = 0;
for (find_index = 1 ; find_index < 3 ; find_index++) { for (find_index = 1 ; find_index < 3 ; find_index++) {
if (corm[max_value] < corm[find_index]) if (corm[max_value] < corm[find_index])
max_value = find_index ; max_value = find_index ;
} }
switch (max_value) { switch (max_value) {
case 0: case 0:
state->found_nfft = TRANSMISSION_MODE_2K; state->found_nfft = TRANSMISSION_MODE_2K;
break; break;
case 1: case 1:
state->found_nfft = TRANSMISSION_MODE_4K; state->found_nfft = TRANSMISSION_MODE_4K;
break; break;
case 2: case 2:
default:
state->found_nfft = TRANSMISSION_MODE_8K;
break;
}
/* dprintk("Autosearch FFT has found Mode %d", max_value + 1); */
*tune_state = CT_DEMOD_SEARCH_NEXT;
state->autosearch_state = AS_SEARCHING_GUARD;
if (state->revision == 0x8090)
ret = 50;
else
ret = 10;
break;
case AS_SEARCHING_GUARD:
/* searching for the correct guard interval */
if (state->revision == 0x8090)
state->found_guard = dib8000_read_word(state, 572) & 0x3;
else
state->found_guard = dib8000_read_word(state, 570) & 0x3;
/* dprintk("guard interval found=%i", state->found_guard); */
*tune_state = CT_DEMOD_STEP_3;
break;
default: default:
/* the demod should never be in this state */ state->found_nfft = TRANSMISSION_MODE_8K;
state->status = FE_STATUS_TUNE_FAILED; break;
state->autosearch_state = AS_DONE;
*tune_state = CT_DEMOD_STOP; /* else we are done here */
break;
} }
/* dprintk("Autosearch FFT has found Mode %d", max_value + 1); */
*tune_state = CT_DEMOD_SEARCH_NEXT;
state->autosearch_state = AS_SEARCHING_GUARD;
if (state->revision == 0x8090)
ret = 50;
else
ret = 10;
break; break;
case AS_SEARCHING_GUARD:
/* searching for the correct guard interval */
if (state->revision == 0x8090)
state->found_guard = dib8000_read_word(state, 572) & 0x3;
else
state->found_guard = dib8000_read_word(state, 570) & 0x3;
/* dprintk("guard interval found=%i", state->found_guard); */
case CT_DEMOD_STEP_3: /* 33 */ *tune_state = CT_DEMOD_STEP_3;
state->symbol_duration = dib8000_get_symbol_duration(state);
dib8000_set_isdbt_loop_params(state, LOOP_TUNE_1);
dib8000_set_isdbt_common_channel(state, 0, 0);/* setting the known channel parameters here */
*tune_state = CT_DEMOD_STEP_4;
break; break;
default:
/* the demod should never be in this state */
state->status = FE_STATUS_TUNE_FAILED;
state->autosearch_state = AS_DONE;
*tune_state = CT_DEMOD_STOP; /* else we are done here */
break;
}
break;
case CT_DEMOD_STEP_3: /* 33 */
state->symbol_duration = dib8000_get_symbol_duration(state);
dib8000_set_isdbt_loop_params(state, LOOP_TUNE_1);
dib8000_set_isdbt_common_channel(state, 0, 0);/* setting the known channel parameters here */
*tune_state = CT_DEMOD_STEP_4;
break;
case CT_DEMOD_STEP_4: /* (34) */ case CT_DEMOD_STEP_4: /* (34) */
dib8000_demod_restart(state); dib8000_demod_restart(state);
dib8000_set_sync_wait(state); dib8000_set_sync_wait(state);
dib8000_set_diversity_in(state->fe[0], state->diversity_onoff); dib8000_set_diversity_in(state->fe[0], state->diversity_onoff);
locks = (dib8000_read_word(state, 180) >> 6) & 0x3f; /* P_coff_winlen ? */ locks = (dib8000_read_word(state, 180) >> 6) & 0x3f; /* P_coff_winlen ? */
/* coff should lock over P_coff_winlen ofdm symbols : give 3 times this length to lock */ /* coff should lock over P_coff_winlen ofdm symbols : give 3 times this length to lock */
*timeout = dib8000_get_timeout(state, 2 * locks, SYMBOL_DEPENDENT_ON); *timeout = dib8000_get_timeout(state, 2 * locks, SYMBOL_DEPENDENT_ON);
*tune_state = CT_DEMOD_STEP_5; *tune_state = CT_DEMOD_STEP_5;
break; break;
case CT_DEMOD_STEP_5: /* (35) */ case CT_DEMOD_STEP_5: /* (35) */
locks = dib8000_read_lock(fe); locks = dib8000_read_lock(fe);
if (locks & (0x3 << 11)) { /* coff-lock and off_cpil_lock achieved */ if (locks & (0x3 << 11)) { /* coff-lock and off_cpil_lock achieved */
dib8000_update_timf(state); /* we achieved a coff_cpil_lock - it's time to update the timf */ dib8000_update_timf(state); /* we achieved a coff_cpil_lock - it's time to update the timf */
if (!state->differential_constellation) { if (!state->differential_constellation) {
/* 2 times lmod4_win_len + 10 symbols (pipe delay after coff + nb to compute a 1st correlation) */ /* 2 times lmod4_win_len + 10 symbols (pipe delay after coff + nb to compute a 1st correlation) */
*timeout = dib8000_get_timeout(state, (20 * ((dib8000_read_word(state, 188)>>5)&0x1f)), SYMBOL_DEPENDENT_ON); *timeout = dib8000_get_timeout(state, (20 * ((dib8000_read_word(state, 188)>>5)&0x1f)), SYMBOL_DEPENDENT_ON);
*tune_state = CT_DEMOD_STEP_7; *tune_state = CT_DEMOD_STEP_7;
} else { } else {
*tune_state = CT_DEMOD_STEP_8; *tune_state = CT_DEMOD_STEP_8;
}
} else if (now > *timeout) {
*tune_state = CT_DEMOD_STEP_6; /* goto check for diversity input connection */
} }
break; } else if (now > *timeout) {
*tune_state = CT_DEMOD_STEP_6; /* goto check for diversity input connection */
}
break;
case CT_DEMOD_STEP_6: /* (36) if there is an input (diversity) */ case CT_DEMOD_STEP_6: /* (36) if there is an input (diversity) */
if ((state->fe[1] != NULL) && (state->output_mode != OUTMODE_DIVERSITY)) { if ((state->fe[1] != NULL) && (state->output_mode != OUTMODE_DIVERSITY)) {
/* if there is a diversity fe in input and this fe is has not already failled : wait here until this this fe has succedeed or failled */ /* if there is a diversity fe in input and this fe is has not already failled : wait here until this this fe has succedeed or failled */
if (dib8000_get_status(state->fe[1]) <= FE_STATUS_STD_SUCCESS) /* Something is locked on the input fe */ if (dib8000_get_status(state->fe[1]) <= FE_STATUS_STD_SUCCESS) /* Something is locked on the input fe */
*tune_state = CT_DEMOD_STEP_8; /* go for mpeg */ *tune_state = CT_DEMOD_STEP_8; /* go for mpeg */
else if (dib8000_get_status(state->fe[1]) >= FE_STATUS_TUNE_TIME_TOO_SHORT) { /* fe in input failled also, break the current one */ else if (dib8000_get_status(state->fe[1]) >= FE_STATUS_TUNE_TIME_TOO_SHORT) { /* fe in input failled also, break the current one */
*tune_state = CT_DEMOD_STOP; /* else we are done here ; step 8 will close the loops and exit */ *tune_state = CT_DEMOD_STOP; /* else we are done here ; step 8 will close the loops and exit */
dib8000_viterbi_state(state, 1); /* start viterbi chandec */
dib8000_set_isdbt_loop_params(state, LOOP_TUNE_2);
state->status = FE_STATUS_TUNE_FAILED;
}
} else {
dib8000_viterbi_state(state, 1); /* start viterbi chandec */ dib8000_viterbi_state(state, 1); /* start viterbi chandec */
dib8000_set_isdbt_loop_params(state, LOOP_TUNE_2); dib8000_set_isdbt_loop_params(state, LOOP_TUNE_2);
*tune_state = CT_DEMOD_STOP; /* else we are done here ; step 8 will close the loops and exit */
state->status = FE_STATUS_TUNE_FAILED; state->status = FE_STATUS_TUNE_FAILED;
} }
break; } else {
dib8000_viterbi_state(state, 1); /* start viterbi chandec */
dib8000_set_isdbt_loop_params(state, LOOP_TUNE_2);
*tune_state = CT_DEMOD_STOP; /* else we are done here ; step 8 will close the loops and exit */
state->status = FE_STATUS_TUNE_FAILED;
}
break;
case CT_DEMOD_STEP_7: /* 37 */ case CT_DEMOD_STEP_7: /* 37 */
locks = dib8000_read_lock(fe); locks = dib8000_read_lock(fe);
if (locks & (1<<10)) { /* lmod4_lock */ if (locks & (1<<10)) { /* lmod4_lock */
ret = 14; /* wait for 14 symbols */ ret = 14; /* wait for 14 symbols */
*tune_state = CT_DEMOD_STEP_8; *tune_state = CT_DEMOD_STEP_8;
} else if (now > *timeout) } else if (now > *timeout)
*tune_state = CT_DEMOD_STEP_6; /* goto check for diversity input connection */ *tune_state = CT_DEMOD_STEP_6; /* goto check for diversity input connection */
break; break;
case CT_DEMOD_STEP_8: /* 38 */ case CT_DEMOD_STEP_8: /* 38 */
dib8000_viterbi_state(state, 1); /* start viterbi chandec */ dib8000_viterbi_state(state, 1); /* start viterbi chandec */
dib8000_set_isdbt_loop_params(state, LOOP_TUNE_2); dib8000_set_isdbt_loop_params(state, LOOP_TUNE_2);
/* mpeg will never lock on this condition because init_prbs is not set : search for it !*/ /* mpeg will never lock on this condition because init_prbs is not set : search for it !*/
if (c->isdbt_sb_mode if (c->isdbt_sb_mode
&& c->isdbt_sb_subchannel < 14 && c->isdbt_sb_subchannel < 14
&& !state->differential_constellation) { && !state->differential_constellation) {
state->subchannel = 0; state->subchannel = 0;
*tune_state = CT_DEMOD_STEP_11; *tune_state = CT_DEMOD_STEP_11;
} else { } else {
*tune_state = CT_DEMOD_STEP_9; *tune_state = CT_DEMOD_STEP_9;
state->status = FE_STATUS_LOCKED; state->status = FE_STATUS_LOCKED;
} }
break; break;
case CT_DEMOD_STEP_9: /* 39 */ case CT_DEMOD_STEP_9: /* 39 */
if ((state->revision == 0x8090) || ((dib8000_read_word(state, 1291) >> 9) & 0x1)) { /* fe capable of deinterleaving : esram */ if ((state->revision == 0x8090) || ((dib8000_read_word(state, 1291) >> 9) & 0x1)) { /* fe capable of deinterleaving : esram */
/* defines timeout for mpeg lock depending on interleaver length of longest layer */ /* defines timeout for mpeg lock depending on interleaver length of longest layer */
for (i = 0; i < 3; i++) { for (i = 0; i < 3; i++) {
if (c->layer[i].interleaving >= deeper_interleaver) { if (c->layer[i].interleaving >= deeper_interleaver) {
dprintk("layer%i: time interleaver = %d ", i, c->layer[i].interleaving); dprintk("layer%i: time interleaver = %d ", i, c->layer[i].interleaving);
if (c->layer[i].segment_count > 0) { /* valid layer */ if (c->layer[i].segment_count > 0) { /* valid layer */
deeper_interleaver = c->layer[0].interleaving; deeper_interleaver = c->layer[0].interleaving;
state->longest_intlv_layer = i; state->longest_intlv_layer = i;
}
} }
} }
}
if (deeper_interleaver == 0) if (deeper_interleaver == 0)
locks = 2; /* locks is the tmp local variable name */ locks = 2; /* locks is the tmp local variable name */
else if (deeper_interleaver == 3) else if (deeper_interleaver == 3)
locks = 8; locks = 8;
else else
locks = 2 * deeper_interleaver; locks = 2 * deeper_interleaver;
if (state->diversity_onoff != 0) /* because of diversity sync */ if (state->diversity_onoff != 0) /* because of diversity sync */
locks *= 2; locks *= 2;
*timeout = now + (2000 * locks); /* give the mpeg lock 800ms if sram is present */ *timeout = now + (2000 * locks); /* give the mpeg lock 800ms if sram is present */
dprintk("Deeper interleaver mode = %d on layer %d : timeout mult factor = %d => will use timeout = %d", deeper_interleaver, state->longest_intlv_layer, locks, *timeout); dprintk("Deeper interleaver mode = %d on layer %d : timeout mult factor = %d => will use timeout = %d", deeper_interleaver, state->longest_intlv_layer, locks, *timeout);
*tune_state = CT_DEMOD_STEP_10; *tune_state = CT_DEMOD_STEP_10;
} else } else
*tune_state = CT_DEMOD_STOP; *tune_state = CT_DEMOD_STOP;
break; break;
case CT_DEMOD_STEP_10: /* 40 */ case CT_DEMOD_STEP_10: /* 40 */
locks = dib8000_read_lock(fe); locks = dib8000_read_lock(fe);
if (locks&(1<<(7-state->longest_intlv_layer))) { /* mpeg lock : check the longest one */ if (locks&(1<<(7-state->longest_intlv_layer))) { /* mpeg lock : check the longest one */
dprintk("Mpeg locks [ L0 : %d | L1 : %d | L2 : %d ]", (locks>>7)&0x1, (locks>>6)&0x1, (locks>>5)&0x1); dprintk("Mpeg locks [ L0 : %d | L1 : %d | L2 : %d ]", (locks>>7)&0x1, (locks>>6)&0x1, (locks>>5)&0x1);
if (c->isdbt_sb_mode if (c->isdbt_sb_mode
&& c->isdbt_sb_subchannel < 14 && c->isdbt_sb_subchannel < 14
&& !state->differential_constellation) && !state->differential_constellation)
/* signal to the upper layer, that there was a channel found and the parameters can be read */ /* signal to the upper layer, that there was a channel found and the parameters can be read */
state->status = FE_STATUS_DEMOD_SUCCESS; state->status = FE_STATUS_DEMOD_SUCCESS;
else else
state->status = FE_STATUS_DATA_LOCKED;
*tune_state = CT_DEMOD_STOP;
} else if (now > *timeout) {
if (c->isdbt_sb_mode
&& c->isdbt_sb_subchannel < 14
&& !state->differential_constellation) { /* continue to try init prbs autosearch */
state->subchannel += 3;
*tune_state = CT_DEMOD_STEP_11;
} else { /* we are done mpeg of the longest interleaver xas not locking but let's try if an other layer has locked in the same time */
if (locks & (0x7<<5)) {
dprintk("Mpeg locks [ L0 : %d | L1 : %d | L2 : %d ]", (locks>>7)&0x1, (locks>>6)&0x1, (locks>>5)&0x1);
state->status = FE_STATUS_DATA_LOCKED; state->status = FE_STATUS_DATA_LOCKED;
} else
state->status = FE_STATUS_TUNE_FAILED;
*tune_state = CT_DEMOD_STOP; *tune_state = CT_DEMOD_STOP;
} else if (now > *timeout) {
if (c->isdbt_sb_mode
&& c->isdbt_sb_subchannel < 14
&& !state->differential_constellation) { /* continue to try init prbs autosearch */
state->subchannel += 3;
*tune_state = CT_DEMOD_STEP_11;
} else { /* we are done mpeg of the longest interleaver xas not locking but let's try if an other layer has locked in the same time */
if (locks & (0x7<<5)) {
dprintk("Mpeg locks [ L0 : %d | L1 : %d | L2 : %d ]", (locks>>7)&0x1, (locks>>6)&0x1, (locks>>5)&0x1);
state->status = FE_STATUS_DATA_LOCKED;
} else
state->status = FE_STATUS_TUNE_FAILED;
*tune_state = CT_DEMOD_STOP;
}
} }
break; }
break;
case CT_DEMOD_STEP_11: /* 41 : init prbs autosearch */ case CT_DEMOD_STEP_11: /* 41 : init prbs autosearch */
if (state->subchannel <= 41) { if (state->subchannel <= 41) {
dib8000_set_subchannel_prbs(state, dib8000_get_init_prbs(state, state->subchannel)); dib8000_set_subchannel_prbs(state, dib8000_get_init_prbs(state, state->subchannel));
*tune_state = CT_DEMOD_STEP_9; *tune_state = CT_DEMOD_STEP_9;
} else { } else {
*tune_state = CT_DEMOD_STOP; *tune_state = CT_DEMOD_STOP;
state->status = FE_STATUS_TUNE_FAILED; state->status = FE_STATUS_TUNE_FAILED;
} }
break; break;
default: default:
break; break;
} }
/* tuning is finished - cleanup the demod */ /* tuning is finished - cleanup the demod */
switch (*tune_state) { switch (*tune_state) {
case CT_DEMOD_STOP: /* (42) */ case CT_DEMOD_STOP: /* (42) */
#ifdef DIB8000_AGC_FREEZE #ifdef DIB8000_AGC_FREEZE
if ((state->revision != 0x8090) && (state->agc1_max != 0)) { if ((state->revision != 0x8090) && (state->agc1_max != 0)) {
dib8000_write_word(state, 108, state->agc1_max); dib8000_write_word(state, 108, state->agc1_max);
dib8000_write_word(state, 109, state->agc1_min); dib8000_write_word(state, 109, state->agc1_min);
dib8000_write_word(state, 110, state->agc2_max); dib8000_write_word(state, 110, state->agc2_max);
dib8000_write_word(state, 111, state->agc2_min); dib8000_write_word(state, 111, state->agc2_min);
state->agc1_max = 0; state->agc1_max = 0;
state->agc1_min = 0; state->agc1_min = 0;
state->agc2_max = 0; state->agc2_max = 0;
state->agc2_min = 0; state->agc2_min = 0;
} }
#endif #endif
ret = FE_CALLBACK_TIME_NEVER; ret = FE_CALLBACK_TIME_NEVER;
break; break;
default: default:
break; break;
} }
if ((ret > 0) && (*tune_state > CT_DEMOD_STEP_3)) if ((ret > 0) && (*tune_state > CT_DEMOD_STEP_3))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment