# HG changeset patch # User Mychaela Falconia # Date 1459097695 0 # Node ID 0894f542a30c72a515c2a2a87d5284db0f806f2b # Parent 250c8bc322c7b5bba43bed47f92c28a872978efe l1_cmplx.c: l1s_ctrl_snb_dl() reconstructed diff -r 250c8bc322c7 -r 0894f542a30c chipsetsw/layer1/cfile/l1_cmplx.c --- a/chipsetsw/layer1/cfile/l1_cmplx.c Sun Mar 27 07:30:36 2016 +0000 +++ b/chipsetsw/layer1/cfile/l1_cmplx.c Sun Mar 27 16:54:55 2016 +0000 @@ -2440,17 +2440,19 @@ UWORD8 tsc; T_INPUT_LEVEL *IL_info_ptr; UWORD32 dsp_task; - //static BOOL change_synchro; + static BOOL change_synchro; UWORD8 adc_active = INACTIVE; #if (L1_FF_MULTIBAND == 1) UWORD16 operative_radio_freq; #endif /*L1_FF_MULTIBAND*/ #if L1_GPRS + static BOOL algo_change_synchro_active = FALSE; static BOOL BCCHS_in_transfert = FALSE; - static BOOL change_synchro;//OMAPS90550-new -#endif +#endif +#if 0 /* FreeCalypso match TCS211 */ UWORD8 input_level = 0; //omaps00090550 +#endif #if (RF_FAM == 61) UWORD16 dco_algo_ctl_nb = 0; UWORD8 if_ctl = 0; @@ -2506,53 +2508,53 @@ // Set CIPHERING reduced frame number. #if (AMR == 1) -#if (FF_L1_TCH_VOCODER_CONTROL == 1) + #if (FF_L1_TCH_VOCODER_CONTROL == 1) l1ddsp_load_tch_param(&(l1s.next_time), SIG_ONLY_MODE, l1a_l1s_com.dedic_set.aset->achan_ptr->desc_ptr->channel_type, - #if !FF_L1_IT_DSP_DTX - 0, 0, 0, 0, 0, 0); -#else - 0, 0, 0, 0, 0, 0, 0); - #endif + #if !FF_L1_IT_DSP_DTX + 0, 0, 0, 0, 0, 0); #else + 0, 0, 0, 0, 0, 0, 0); + #endif + #else l1ddsp_load_tch_param(&(l1s.next_time), SIG_ONLY_MODE, l1a_l1s_com.dedic_set.aset->achan_ptr->desc_ptr->channel_type, - #if !FF_L1_IT_DSP_DTX - 0, 0, 0, 0); - #else - 0, 0, 0, 0, 0); -#endif + #if !FF_L1_IT_DSP_DTX + 0, 0, 0, 0); + #else + 0, 0, 0, 0, 0); #endif + #endif #else -#if (FF_L1_TCH_VOCODER_CONTROL == 1) + #if (FF_L1_TCH_VOCODER_CONTROL == 1) l1ddsp_load_tch_param(&(l1s.next_time), SIG_ONLY_MODE, l1a_l1s_com.dedic_set.aset->achan_ptr->desc_ptr->channel_type, - #if !FF_L1_IT_DSP_DTX - 0, 0, 0, 0, 0); -#else - 0, 0, 0, 0, 0, 0); - #endif + #if !FF_L1_IT_DSP_DTX + 0, 0, 0, 0, 0); #else + 0, 0, 0, 0, 0, 0); + #endif + #else l1ddsp_load_tch_param(&(l1s.next_time), SIG_ONLY_MODE, l1a_l1s_com.dedic_set.aset->achan_ptr->desc_ptr->channel_type, - #if !FF_L1_IT_DSP_DTX - 0, 0, 0); - #else - 0, 0, 0, 0); -#endif -#endif -#endif - lna_off = IL_info_ptr->lna_off; + #if !FF_L1_IT_DSP_DTX + 0, 0, 0); + #else + 0, 0, 0, 0); + #endif + #endif +#endif // for SDCCH we use DPAGC algorithm. #if DPAGC_MAX_FLAG agc = Cust_get_agc_from_IL(rx_radio_freq, IL_info_ptr->input_level >> 1, MAX_ID); #else agc = Cust_get_agc_from_IL(rx_radio_freq, IL_info_ptr->input_level >> 1, AV_ID); #endif + lna_off = IL_info_ptr->lna_off; @@ -2569,7 +2571,16 @@ // for PCH/E_PCH/Serving BCCH and All CCCH we use // PAGC algorithm. -#if (L1_FF_MULTIBAND == 0) +#if 1 /* FreeCalypso match TCS211 */ + + agc = Cust_get_agc_from_IL(rx_radio_freq, l1a_l1s_com.last_input_level[rx_radio_freq - l1_config.std.radio_freq_index_offset].input_level >> 1, MAX_ID); + lna_off = l1a_l1s_com.last_input_level[rx_radio_freq - l1_config.std.radio_freq_index_offset].lna_off; + + // Store input_level and lna_off fields used for current CTRL in order to be able + // to build IL from pm in READ phase. + l1a_l1s_com.Scell_used_IL = l1a_l1s_com.last_input_level[rx_radio_freq - l1_config.std.radio_freq_index_offset]; + +#elif (L1_FF_MULTIBAND == 0) input_level = l1a_l1s_com.last_input_level[rx_radio_freq - l1_config.std.radio_freq_index_offset].input_level ; lna_off = l1a_l1s_com.last_input_level[rx_radio_freq - l1_config.std.radio_freq_index_offset].lna_off; @@ -2615,7 +2626,7 @@ ,&saic_flag #endif ); - #endif //L!SAIC != 0 + #endif //L1_SAIC != 0 // ADC measurement // *************** @@ -2748,20 +2759,10 @@ if (burst_id == BURST_1) l1s.forbid_meas = TASK_ROM_MFTAB[task].size; - /* - * FreeCalypso Frankenstein: the following code can't be compiled - * using TCS211 L1 data structure definitions, as l1s structure - * field algo_change_synchro_active is newly added in the LoCosto - * version. We are adding a preprocessor conditional which we'll - * enable when we regain the ability to modify data structure - * definitions. - */ - - #if HAVE_ALGO_CHG_SYNC_ACT_FIELD if (new_offset >= 4) - l1s.algo_change_synchro_active = TRUE; - - if (l1s.algo_change_synchro_active) + algo_change_synchro_active = TRUE; + + if (algo_change_synchro_active) { // compute TPU offset for "current timeslot + 4 timeslot" new_synchro = l1s.tpu_offset + (4 * TN_WIDTH); @@ -2774,7 +2775,6 @@ } //no synchro change required, but new offset is computed else - #endif { new_synchro = l1s.tpu_offset; new_offset = (new_offset * TN_WIDTH) + new_synchro; @@ -2921,9 +2921,7 @@ (l1a_l1s_com.l1s_en_task[PDTCH] == TASK_ENABLED) || (l1a_l1s_com.l1s_en_task[SINGLE] == TASK_ENABLED))) { - /* FreeCalypso Frankenstein - see above */ - #if HAVE_ALGO_CHG_SYNC_ACT_FIELD - if((burst_id == BURST_4) && l1s.algo_change_synchro_active) + if((burst_id == BURST_4) && algo_change_synchro_active) { // Slide synchro back to mach current serving timeslot. @@ -2938,13 +2936,12 @@ l1s.tpu_ctrl_reg |= CTRL_SYCB; l1s.dsp_ctrl_reg |= CTRL_SYNC; l1s.ctrl_synch_before = FALSE; - l1s.algo_change_synchro_active = FALSE; + algo_change_synchro_active = FALSE; #if (TRACE_TYPE == 1) || (TRACE_TYPE == 4) trace_fct(CST_L1S_ADJUST_TIME, (UWORD32)(-1));//OMAPS00090550 #endif } - #endif } // in case of EBCCHS and NBCCHS in packet transfer a change synchro is performed