FreeCalypso > hg > tcs211-l1-reconst
changeset 138:aee61e6a8b8f
l1_sync.c: import of sensible changes from freecalypso-sw/gsm-fw version
author | Mychaela Falconia <falcon@ivan.Harhan.ORG> |
---|---|
date | Sat, 14 May 2016 23:22:11 +0000 |
parents | 8ed3fec03452 |
children | 44cd24bfe9d0 |
files | chipsetsw/layer1/cfile/l1_sync.c |
diffstat | 1 files changed, 72 insertions(+), 38 deletions(-) [+] |
line wrap: on
line diff
--- a/chipsetsw/layer1/cfile/l1_sync.c Sat May 14 23:17:13 2016 +0000 +++ b/chipsetsw/layer1/cfile/l1_sync.c Sat May 14 23:22:11 2016 +0000 @@ -174,7 +174,9 @@ #endif #endif -#include "sys_conf.h" +#if (CHIPSET >= 12) + #include "sys_conf.h" +#endif #if (OP_L1_STANDALONE != 1) && (WCP_PROF == 1) #include "prf/prf_api.h" @@ -185,7 +187,10 @@ #define TOTAL_NO_OF_BITS_IDLE_MEAS 625 extern UWORD32 qual_acc_idle1[2]; -#include "tpudrv61.h" +#if (RF_FAM == 61) + #include "tpudrv61.h" +#endif + #if W_A_DSP1 UWORD8 old_sacch_DSP_bug = FALSE; #endif @@ -368,11 +373,20 @@ (*( volatile unsigned short* )(0xFFFE4802)) |= (1 << 2); // GPIO-2=1 #endif +/* + * FreeCalypso change: the conditioned-out GPIO twiddling below appears in + * the LoCosto version of this L1 code without any conditionals around it. + * Checking the disassembly of the Leonardo binary object confirms that + * NO GPIO muck takes places in that version. Needless to say, I am + * disabling it for FreeCalypso - we don't want to wreak havoc on some + * target that uses GPIO 0 for something else. + */ +#if 0 // Configure GPIO0 pin as output - Reset Bit 0 i.e. set Bit 0 to 0 (*( volatile unsigned short* )(0xFFFE4804)) &= (~(1 << 0)); // GPIO-2=1 // write 1 in GPIO pin 0 (*( volatile unsigned short* )(0xFFFE4802)) |= (1 << 0); // GPIO-2=1 - +#endif // stop the gauging.This function must be called at the // begining of the HISR in order to have the IT_GAUGING @@ -509,7 +523,7 @@ l1_cpu_load_stop(); #endif - #if (TRACE_TYPE == 1) || (TRACE_TYPE == 4) + #if ((TRACE_TYPE == 1) || (TRACE_TYPE == 4)) && (DSP >= 38) // DSP CPU load for TRACE_TYPE == 1 and 4 only if(trace_info.current_config->l1_dyn_trace & 1<<L1_DYN_TRACE_DSP_CPU_LOAD) { @@ -518,9 +532,10 @@ } #endif +#if 0 // write 0 in GPIO pin 0 (*( volatile unsigned short* )(0xFFFE4802)) &= (~(1 << 0)); // GPIO-2=1 - +#endif } @@ -1010,7 +1025,9 @@ l1s_audio_manager(); #endif #else - l1s.gsm_idle_ram_ctl.l1s_full_exec = FALSE; + #if (GSM_IDLE_RAM != 0) + l1s.gsm_idle_ram_ctl.l1s_full_exec = FALSE; + #endif #endif // Triton Audio ON/OFF Changes @@ -6061,7 +6078,7 @@ // Accumulate the new measurement with the partial result. // Compensate AGC for current measurement value. l1a_l1s_com.Scell_info.meas.acc += l1a_l1s_com.Scell_IL_for_rxlev; - static_s_rxlev_cntr++; + static_s_rxlev_cntr++; // ********** // Reporting @@ -6125,7 +6142,7 @@ // Reset pointer for debugg. pch_msg = NULL; - static_s_rxlev_cntr = 0; + static_s_rxlev_cntr = 0; } }// end of READ @@ -7501,6 +7518,12 @@ { l1a_l1s_com.dedic_set.stop_tch = TRUE; + /* + * FreeCalypso change: this module was failing to compile without + * AUDIO_TASK enabled because of the following code; + * conditional has been added. + */ + #if AUDIO_TASK // If audio enabling was forced by L1S because of a HO failure, do not force it anymore. // Restore it in the state required by the MMI if the feature is compiled. if (l1a_l1s_com.audio_forced_by_l1s == TRUE) @@ -7515,6 +7538,7 @@ #endif // L1_EXTERNAL_AUDIO_VOICE_ONOFF l1a_l1s_com.audio_forced_by_l1s = FALSE; } + #endif } // The new channel becomes the ACTIVE one. @@ -7802,6 +7826,8 @@ { l1a_l1s_com.dedic_set.stop_tch = TRUE; + /* FreeCalypso change: same situation as earlier in this function */ + #if AUDIO_TASK // If audio enabling was forced by L1S because of a HO failure, do not force it anymore. // Restore it in the state required by the MMI if the feature is compiled. if (l1a_l1s_com.audio_forced_by_l1s == TRUE) @@ -7816,6 +7842,7 @@ #endif // L1_EXTERNAL_AUDIO_VOICE_ONOFF l1a_l1s_com.audio_forced_by_l1s = FALSE; } + #endif #if (AMR == 1) // Reset DTX AMR status @@ -7839,36 +7866,38 @@ l1a_l1s_com.l1s_en_task[TCHA] = TASK_DISABLED; - // Reset active dedicated set. - l1a_l1s_com.dedic_set.aset = NULL; - - } - else - { - if (l1a_l1s_com.audio_forced_by_l1s == TRUE) - { - #if (L1_EXTERNAL_AUDIO_VOICE_ONOFF == 1) - if (l1a_l1s_com.audio_onoff_task.parameters.onoff_value == FALSE) - { - l1s_dsp_com.dsp_ndb_ptr->d_toneskb_init |= (API) B_AUDIO_OFF_STOP; - } - #else // L1_EXTERNAL_AUDIO_VOICE_ONOFF - l1s_dsp_com.dsp_ndb_ptr->d_toneskb_init |= (API) B_AUDIO_OFF_STOP; - #endif // L1_EXTERNAL_AUDIO_VOICE_ONOFF - l1a_l1s_com.audio_forced_by_l1s = FALSE; - } - #if (AMR == 1) - // Reset DTX AMR status - l1s.dtx_amr_dl_on=FALSE; - #endif - - } - - // Clear d_ra_conf => default value - l1s_dsp_com.dsp_ndb_ptr->d_ra_conf = 0; - - // Reset input msg. - l1a_l1s_com.dedic_set.SignalCode = NULL; + // Reset active dedicated set. + l1a_l1s_com.dedic_set.aset = NULL; + + } + else + { + /* FreeCalypso change: same AUDIO_TASK situation as earlier */ + #if AUDIO_TASK + if (l1a_l1s_com.audio_forced_by_l1s == TRUE) + { + #if (L1_EXTERNAL_AUDIO_VOICE_ONOFF == 1) + if (l1a_l1s_com.audio_onoff_task.parameters.onoff_value == FALSE) + { + l1s_dsp_com.dsp_ndb_ptr->d_toneskb_init |= (API) B_AUDIO_OFF_STOP; + } + #else // L1_EXTERNAL_AUDIO_VOICE_ONOFF + l1s_dsp_com.dsp_ndb_ptr->d_toneskb_init |= (API) B_AUDIO_OFF_STOP; + #endif // L1_EXTERNAL_AUDIO_VOICE_ONOFF + l1a_l1s_com.audio_forced_by_l1s = FALSE; + } + #endif + #if (AMR == 1) + // Reset DTX AMR status + l1s.dtx_amr_dl_on=FALSE; + #endif + } + + // Clear d_ra_conf => default value + l1s_dsp_com.dsp_ndb_ptr->d_ra_conf = 0; + + // Reset input msg. + l1a_l1s_com.dedic_set.SignalCode = NULL; #if ((REL99 == 1) && (FF_BHO == 1)) // this is required in BHO as you need to retain the previous channel info. //This is checked in HO_REQ to L1S.....In normal handover this does not happen @@ -8162,11 +8191,16 @@ { l1a_l1s_com.dedic_set.stop_tch = TRUE; + /* + * FreeCalypso change: same AUDIO_TASK conditional issue as earlier. + */ + #if AUDIO_TASK // CQ: Force the Audio ON to avoid having the DSP reseting the VDLON and producing a pop noise // on single ended outputs. l1s_dsp_com.dsp_ndb_ptr->d_toneskb_init |= (API) B_AUDIO_ON_START; l1s.l1_audio_it_com = TRUE; l1a_l1s_com.audio_forced_by_l1s = TRUE; + #endif } // Clear ciphering setting in MCU-DSP com.