# HG changeset patch # User Mychaela Falconia # Date 1463268131 0 # Node ID aee61e6a8b8fb491d774ae3a43425658eba15b70 # Parent 8ed3fec034523bf7c99db70014bcdf40db71dc7c l1_sync.c: import of sensible changes from freecalypso-sw/gsm-fw version diff -r 8ed3fec03452 -r aee61e6a8b8f chipsetsw/layer1/cfile/l1_sync.c --- 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<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.