FreeCalypso > hg > tcs211-l1-reconst
changeset 59:250c8bc322c7
l1_cmplx.c: reconstructed up to beginning of l1s_ctrl_snb_dl()
author | Mychaela Falconia <falcon@ivan.Harhan.ORG> |
---|---|
date | Sun, 27 Mar 2016 07:30:36 +0000 |
parents | fcdbd97411c4 |
children | 0894f542a30c |
files | chipsetsw/layer1/cfile/l1_cmplx.c |
diffstat | 1 files changed, 22 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/chipsetsw/layer1/cfile/l1_cmplx.c Sun Mar 27 06:48:45 2016 +0000 +++ b/chipsetsw/layer1/cfile/l1_cmplx.c Sun Mar 27 07:30:36 2016 +0000 @@ -1116,10 +1116,10 @@ // ******************************** #if (L1_FF_MULTIBAND == 0) + // Get AGC to be applied. + agc = Cust_get_agc_from_IL(cell_info_ptr->radio_freq,l1a_l1s_com.last_input_level[cell_info_ptr->radio_freq - l1_config.std.radio_freq_index_offset].input_level >> 1, AV_ID); // lna_off flag is updated ONLY in case of l1ctl_pgc2 control algo lna_off = l1a_l1s_com.last_input_level[cell_info_ptr->radio_freq - l1_config.std.radio_freq_index_offset].lna_off; - // Get AGC to be applied. - agc = Cust_get_agc_from_IL(cell_info_ptr->radio_freq,l1a_l1s_com.last_input_level[cell_info_ptr->radio_freq - l1_config.std.radio_freq_index_offset].input_level >> 1, AV_ID); #else // L1_FF_MULTIBAND = 1 below @@ -1526,10 +1526,10 @@ // ******************************** #if (L1_FF_MULTIBAND == 0) + // Get AGC to be applied. + agc = Cust_get_agc_from_IL(cell_info_ptr->radio_freq, input_level >> 1, AV_ID); // lna_off flag is ONLY updated in case of l1ctl_pgc2 control algorithm lna_off = l1a_l1s_com.last_input_level[cell_info_ptr->radio_freq - l1_config.std.radio_freq_index_offset].lna_off; - // Get AGC to be applied. - agc = Cust_get_agc_from_IL(cell_info_ptr->radio_freq, input_level >> 1, AV_ID); #else // L1_FF_MULTIBAND = 0 below @@ -1701,9 +1701,9 @@ // **************************** #if (L1_FF_MULTIBAND == 0) - lna_off = l1a_l1s_com.last_input_level[radio_freq - l1_config.std.radio_freq_index_offset].lna_off; // agc is just computed from last stored IL agc = Cust_get_agc_from_IL(radio_freq, l1a_l1s_com.last_input_level[radio_freq - l1_config.std.radio_freq_index_offset].input_level >> 1, AV_ID); + lna_off = l1a_l1s_com.last_input_level[radio_freq - l1_config.std.radio_freq_index_offset].lna_off; #else // L1_FF_MULTIBAND = 1 below @@ -1928,8 +1928,8 @@ // agc is just computed from last stored IL input_level = l1a_l1s_com.last_input_level[radio_freq - l1_config.std.radio_freq_index_offset].input_level; + agc = Cust_get_agc_from_IL(radio_freq, input_level >> 1, AV_ID); lna_off = l1a_l1s_com.last_input_level[radio_freq - l1_config.std.radio_freq_index_offset].lna_off; - agc = Cust_get_agc_from_IL(radio_freq, input_level >> 1, AV_ID); #else // L1_FF_MULTIBAND = 1 below @@ -2067,7 +2067,9 @@ UWORD32 dsp_task; static WORD32 new_tpu_offset; static BOOL change_synchro; +#if 0 /* FreeCalypso TCS211 reconstruction */ UWORD8 input_level; +#endif #if (L1_FF_MULTIBAND == 1) UWORD16 operative_radio_freq; #endif @@ -2190,12 +2192,18 @@ if (offset_smscb >= TPU_CLOCK_RANGE) offset_smscb -= TPU_CLOCK_RANGE; -#if (L1_FF_MULTIBAND == 0) +#if 1 /* FreeCalypso match TCS211 */ + + // agc is set with the input_level computed from PAGC algo + agc = Cust_get_agc_from_IL(l1a_l1s_com.Scell_info.radio_freq, l1a_l1s_com.last_input_level[l1a_l1s_com.Scell_info.radio_freq - l1_config.std.radio_freq_index_offset].input_level >> 1, MAX_ID); + lna_off = l1a_l1s_com.last_input_level[l1a_l1s_com.Scell_info.radio_freq - l1_config.std.radio_freq_index_offset].lna_off; + +#elif (L1_FF_MULTIBAND == 0) // agc is set with the input_level computed from PAGC algo input_level = l1a_l1s_com.last_input_level[l1a_l1s_com.Scell_info.radio_freq - l1_config.std.radio_freq_index_offset].input_level; + agc = Cust_get_agc_from_IL(l1a_l1s_com.Scell_info.radio_freq,input_level >> 1, MAX_ID); lna_off = l1a_l1s_com.last_input_level[l1a_l1s_com.Scell_info.radio_freq - l1_config.std.radio_freq_index_offset].lna_off; - agc = Cust_get_agc_from_IL(l1a_l1s_com.Scell_info.radio_freq,input_level >> 1, MAX_ID); #else // L1_FF_MULTIBAND = 1 below @@ -2218,7 +2226,12 @@ // Store IL used for current CTRL in order to be able to buil IL from pm // in READ phase. -#if (L1_FF_MULTIBAND == 0) +#if 1 /* FreeCalypso match TCS211 */ + + l1a_l1s_com.Scell_used_IL.input_level = l1a_l1s_com.last_input_level[l1a_l1s_com.Scell_info.radio_freq - l1_config.std.radio_freq_index_offset].input_level; + l1a_l1s_com.Scell_used_IL.lna_off = l1a_l1s_com.last_input_level[l1a_l1s_com.Scell_info.radio_freq - l1_config.std.radio_freq_index_offset].lna_off; + +#elif (L1_FF_MULTIBAND == 0) l1a_l1s_com.Scell_used_IL.input_level = input_level; l1a_l1s_com.Scell_used_IL.lna_off = l1a_l1s_com.last_input_level[l1a_l1s_com.Scell_info.radio_freq - l1_config.std.radio_freq_index_offset].lna_off;