FreeCalypso > hg > tcs211-l1-reconst
changeset 154:f9d2c65905f5
l1_trace.c: binary trace code excised
author | Mychaela Falconia <falcon@ivan.Harhan.ORG> |
---|---|
date | Sat, 21 May 2016 04:03:40 +0000 |
parents | ac77167940a3 |
children | c11f6d8d8fbd |
files | chipsetsw/layer1/cfile/l1_trace.c |
diffstat | 1 files changed, 5 insertions(+), 5524 deletions(-) [+] |
line wrap: on
line diff
--- a/chipsetsw/layer1/cfile/l1_trace.c Mon May 16 20:02:59 2016 +0000 +++ b/chipsetsw/layer1/cfile/l1_trace.c Sat May 21 04:03:40 2016 +0000 @@ -633,5530 +633,11 @@ #if L1_BINARY_TRACE -/*************************************************************************/ -/* Classic trace output */ -/*************************************************************************/ - -/*-------------------------------------------------------*/ -/* l1_trace_message() */ -/*-------------------------------------------------------*/ -/* Parameters : */ -/* Return : */ -/* Description: L1 Trace formatting. */ -/*-------------------------------------------------------*/ -void l1_trace_message(xSignalHeaderRec *msg) -{ - - /***********************************************************************/ - /* Trace configuration */ - /***********************************************************************/ - - if (msg->SignalCode == TRACE_CONFIG) - { - char *ptr; - T_TRACE_CONFIG *save; - - - // Download values - //---------------- - - // Note: RTT values are used in L1S but partial download of these values have no - // negative influence on L1 or Trace behavior - - // First UWORD32 is the classic L1 dynamic trace - trace_info.pending_config->l1_dyn_trace = ((T_TRACE_CONFIG_CHANGE *)(msg->SigP))->trace_config; - - // The eight following UWORD32 define the RTT cell configuration - trace_info.pending_config->rttl1_cell_enable[0] = ((T_TRACE_CONFIG_CHANGE *)(msg->SigP))->rtt_cell_enable[0]; - trace_info.pending_config->rttl1_cell_enable[1] = ((T_TRACE_CONFIG_CHANGE *)(msg->SigP))->rtt_cell_enable[1]; - trace_info.pending_config->rttl1_cell_enable[2] = ((T_TRACE_CONFIG_CHANGE *)(msg->SigP))->rtt_cell_enable[2]; - trace_info.pending_config->rttl1_cell_enable[3] = ((T_TRACE_CONFIG_CHANGE *)(msg->SigP))->rtt_cell_enable[3]; - trace_info.pending_config->rttl1_cell_enable[4] = ((T_TRACE_CONFIG_CHANGE *)(msg->SigP))->rtt_cell_enable[4]; - trace_info.pending_config->rttl1_cell_enable[5] = ((T_TRACE_CONFIG_CHANGE *)(msg->SigP))->rtt_cell_enable[5]; - trace_info.pending_config->rttl1_cell_enable[6] = ((T_TRACE_CONFIG_CHANGE *)(msg->SigP))->rtt_cell_enable[6]; - trace_info.pending_config->rttl1_cell_enable[7] = ((T_TRACE_CONFIG_CHANGE *)(msg->SigP))->rtt_cell_enable[7]; - - // Last UWORD32 define the RTT event - trace_info.pending_config->rttl1_event_enable = ((T_TRACE_CONFIG_CHANGE *)(msg->SigP))->rtt_event; - - // Re-initialize global variables - l1_init_trace_var(); - - // Switch pointers - save = trace_info.current_config; - trace_info.current_config = trace_info.pending_config; - trace_info.pending_config = save; - - // Trace the configuration change - //------------------------------- - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_TRACE_CONFIG_CHANGE), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_TRACE_CONFIG_CHANGE *)(ptr))->header = TRL1_TRACE_CONFIG_CHANGE | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_TRACE_CONFIG_CHANGE *)(ptr))->trace_config = trace_info.current_config->l1_dyn_trace ; - ((T_TR_TRACE_CONFIG_CHANGE *)(ptr))->rtt_cell_enable[0] = trace_info.current_config->rttl1_cell_enable[0]; - ((T_TR_TRACE_CONFIG_CHANGE *)(ptr))->rtt_cell_enable[1] = trace_info.current_config->rttl1_cell_enable[1]; - ((T_TR_TRACE_CONFIG_CHANGE *)(ptr))->rtt_cell_enable[2] = trace_info.current_config->rttl1_cell_enable[2]; - ((T_TR_TRACE_CONFIG_CHANGE *)(ptr))->rtt_cell_enable[3] = trace_info.current_config->rttl1_cell_enable[3]; - ((T_TR_TRACE_CONFIG_CHANGE *)(ptr))->rtt_cell_enable[4] = trace_info.current_config->rttl1_cell_enable[4]; - ((T_TR_TRACE_CONFIG_CHANGE *)(ptr))->rtt_cell_enable[5] = trace_info.current_config->rttl1_cell_enable[5]; - ((T_TR_TRACE_CONFIG_CHANGE *)(ptr))->rtt_cell_enable[6] = trace_info.current_config->rttl1_cell_enable[6]; - ((T_TR_TRACE_CONFIG_CHANGE *)(ptr))->rtt_cell_enable[7] = trace_info.current_config->rttl1_cell_enable[7]; - ((T_TR_TRACE_CONFIG_CHANGE *)(ptr))->rtt_event = trace_info.current_config->rttl1_event_enable; - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_TRACE_CONFIG_CHANGE)); - - return; - } - - } - - /***********************************************************************/ - /* Traces coming from L1S */ - /***********************************************************************/ - - switch(msg->SignalCode) - { - #if (DSP_DEBUG_TRACE_ENABLE == 1) - - ////////////////////// - // DSP debug buffer // - ////////////////////// - - case TRACE_DSP_DEBUG: - { - WORD16 size = ((T_DSP_DEBUG_INFO *)(msg->SigP))->size; - char *ptr; - UWORD8 index = 0; - - // DSP debug header trace: L1 indication to associate with the buffer - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_DSP_DEBUG_HEADER), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - ((T_TR_DSP_DEBUG_HEADER *)(ptr))->header = TRL1_DSP_DEBUG_HEADER | (((T_DSP_DEBUG_INFO *)(msg->SigP))->fn << TR_HEADER_FN_DELAY); - ((T_TR_DSP_DEBUG_HEADER *)(ptr))->debug_time = ((T_DSP_DEBUG_INFO *)(msg->SigP))->debug_time; - ((T_TR_DSP_DEBUG_HEADER *)(ptr))->patch_version = ((T_DSP_DEBUG_INFO *)(msg->SigP))->patch_version; - ((T_TR_DSP_DEBUG_HEADER *)(ptr))->trace_level = ((T_DSP_DEBUG_INFO *)(msg->SigP))->trace_level; - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_DSP_DEBUG_HEADER)); - } - - // DSP debug buffer trace - while (size > 0) - { - UWORD8 item_size = size; - - // Split buffer in several buffers with size inferior to 240 (RVT limitation to 255) - // Header not included (+8b) - if (item_size > 240) item_size = 240; - - // Buffer size -> add header - if (rvt_mem_alloc(trace_info.l1_trace_user_id, item_size + sizeof(T_TR_DSP_DEBUG_BUFFER) - sizeof(UWORD16), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - UWORD8 i; - - ((T_TR_DSP_DEBUG_BUFFER *)(ptr))->header = TRL1_DSP_DEBUG_BUFFER | (((T_DSP_DEBUG_INFO *)(msg->SigP))->fn << TR_HEADER_FN_DELAY); - ((T_TR_DSP_DEBUG_BUFFER *)(ptr))->size = (item_size >> 1); - // First element tells if it's the last msg - ((T_TR_DSP_DEBUG_BUFFER *)(ptr))->content[0] = 0; - - for (i = 1; i < (item_size >> 1); i++) - { - ((T_TR_DSP_DEBUG_BUFFER *)(ptr))->content[i] = ((T_DSP_DEBUG_INFO *)(msg->SigP))->buffer[index++]; - } - - size -= (item_size - 2); // (item_size - 2) bytes of the buffer transmitted - // -2 because of the first word used for status - - // Indicates it's the last buffer - if (size <= 0) - ((T_TR_DSP_DEBUG_BUFFER *)(ptr))->content[0] = 1; - - L1_send_trace_no_cpy(ptr,item_size + sizeof(T_TR_DSP_DEBUG_BUFFER) - sizeof(UWORD16)); - } - - // No trace buffer available -> cancel trace ! - else - { - break; - } - } - } - break; - - #endif // DSP_DEBUG_TRACE_ENABLE - - #if (L1_GPRS) - - /////////////////////////// - // PDTCH condensed trace // - /////////////////////////// - - case TRACE_CONDENSED_PDTCH: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_CONDENSED_PDTCH), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - UWORD8 i,j; - - ((T_TR_CONDENSED_PDTCH *)(ptr))->header = TRL1_CONDENSED_PDTCH | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_CONDENSED_PDTCH *)(ptr))->rx_allocation = ((T_CONDENSED_PDTCH_INFO *)(msg->SigP))->rx_allocation; - ((T_TR_CONDENSED_PDTCH *)(ptr))->tx_allocation = ((T_CONDENSED_PDTCH_INFO *)(msg->SigP))->tx_allocation; - ((T_TR_CONDENSED_PDTCH *)(ptr))->blk_status = ((T_CONDENSED_PDTCH_INFO *)(msg->SigP))->blk_status; - ((T_TR_CONDENSED_PDTCH *)(ptr))->dl_cs_type = ((T_CONDENSED_PDTCH_INFO *)(msg->SigP))->dl_cs_type; - ((T_TR_CONDENSED_PDTCH *)(ptr))->dl_status[0] = ((T_CONDENSED_PDTCH_INFO *)(msg->SigP))->dl_status[0]; - ((T_TR_CONDENSED_PDTCH *)(ptr))->dl_status[1] = ((T_CONDENSED_PDTCH_INFO *)(msg->SigP))->dl_status[1]; - ((T_TR_CONDENSED_PDTCH *)(ptr))->dl_status[2] = ((T_CONDENSED_PDTCH_INFO *)(msg->SigP))->dl_status[2]; - ((T_TR_CONDENSED_PDTCH *)(ptr))->dl_status[3] = ((T_CONDENSED_PDTCH_INFO *)(msg->SigP))->dl_status[3]; - - for (i=0, j=0; (i<8)&&(j<4); i++) - if (((T_CONDENSED_PDTCH_INFO *)(msg->SigP))->ul_status[i] != 0) - { - ((T_TR_CONDENSED_PDTCH *)(ptr))->ul_status[j++] = ((T_CONDENSED_PDTCH_INFO *)(msg->SigP))->ul_status[i]; - } - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_CONDENSED_PDTCH)); - } - } - break; - - #endif // L1_GPRS - - ///////////////// - // Quick trace // - ///////////////// - - case QUICK_TRACE: - { - UWORD8 debug_code = ((T_QUICK_TRACE *)(msg->SigP))->debug_code; - char ptr[200]; - char *str = ((T_TR_ASCII *)(ptr))->str; - UWORD32 *param = ((T_QUICK_TRACE *)(msg->SigP))->tab; - - // Fill string in 'str' variable - // Parameters included in param[n] - switch (debug_code) - { - case 0: - { - sprintf(str, "Quick trace example %d", param[0]); - } - break; - - } - - // Send trace - ((T_TR_ASCII *)(ptr))->header = TRL1_ASCII | (((T_QUICK_TRACE *)(msg->SigP))->fn << TR_HEADER_FN_DELAY); - ((T_TR_ASCII *)(ptr))->size = strlen(((T_TR_ASCII *)(ptr))->str); - L1_send_trace_cpy(ptr,((T_TR_ASCII *)(ptr))->size + 8); - } - break; - - //////////////// - // Debug info // - //////////////// - - case TRACE_INFO: - { - // Read cell ID in the header (first UWORD32) - UWORD16 trace_id = *((UWORD32 *)(msg->SigP)) & TR_HEADER_ID_MASK; - - switch(trace_id) - { - case TRL1_PM_EQUAL_0: - { - L1_send_trace_cpy(msg->SigP,sizeof(T_TR_PM_EQUAL_0)); - } - break; - - case TRL1_MCU_DSP_MISMATCH: - { - L1_send_trace_cpy(msg->SigP,sizeof(T_TR_MCU_DSP_MISMATCH)); - } - break; - - case TRL1_L1S_ABORT: - { - L1_send_trace_cpy(msg->SigP,sizeof(T_TR_L1S_ABORT)); - } - break; - - #if (D_ERROR_STATUS_TRACE_ENABLE) - case TRL1_D_ERROR_STATUS: - { - L1_send_trace_cpy(msg->SigP,sizeof(T_TR_D_ERROR_STATUS)); - } - break; - #endif - - #if L1_GPRS - - case TRL1_RLC_UL_PARAM: - { - L1_send_trace_cpy(msg->SigP,sizeof(T_TR_RLC_UL_PARAM)); - } - break; - - case TRL1_RLC_DL_PARAM: - { - L1_send_trace_cpy(msg->SigP,sizeof(T_TR_RLC_DL_PARAM)); - } - break; - - case TRL1_FORBIDDEN_UPLINK: - { - L1_send_trace_cpy(msg->SigP,sizeof(T_TR_FORBIDDEN_UPLINK)); - } - break; - - case TRL1_DL_PTCCH: - { - L1_send_trace_cpy(msg->SigP,sizeof(T_TR_DL_PTCCH)); - } - break; - - case TRL1_IT_DSP_ERROR: - { - L1_send_trace_cpy(msg->SigP,sizeof(T_TR_IT_DSP_ERROR)); - } - break; - - #endif // L1_GPRS - - case TRL1_ADC: - { - L1_send_trace_cpy(msg->SigP,sizeof(T_TR_ADC)); - } - break; - - case TRL1_NEW_TOA: - { - L1_send_trace_cpy(msg->SigP,sizeof(T_TR_NEW_TOA)); - } - break; - - case TRL1_SAIC_DEBUG: - { - L1_send_trace_cpy(msg->SigP,sizeof(T_TR_SAIC_DEBUG)); - } - break; - - case TRL1_BURST_PARAM: - { - L1_send_trace_cpy(msg->SigP,sizeof(T_TR_BURST_PARAM)); - } - break; - - case TRL1_SLEEP: - { - L1_send_trace_cpy(msg->SigP,sizeof(T_TR_SLEEP)); - } - break; - - case TRL1_GAUGING: - { - L1_send_trace_cpy(msg->SigP,sizeof(T_TR_GAUGING)); - } - break; - - case TRL1_PTCCH_DISABLE: - { - L1_send_trace_cpy(msg->SigP,sizeof(T_TR_PTCCH_DISABLE)); - } - break; - - default: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_UNKNOWN_L1S_TRACE), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_UNKNOWN_L1S_TRACE *)(ptr))->header = TRL1_UNKNOWN_L1S_TRACE | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_UNKNOWN_L1S_TRACE *)(ptr))->id = trace_id; - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_UNKNOWN_L1S_TRACE)); - } - } - } // End switch - } // End case "TRACE_INFO" - } - - /***********************************************************************/ - /* L1S CPU load */ - /***********************************************************************/ - - if (trace_info.current_config->l1_dyn_trace & 1<<L1_DYN_TRACE_L1S_CPU_LOAD) - { - if(max_cpu_flag) - { - char *ptr; - - max_cpu_flag = 0; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_L1S_CPU_PEAK), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_L1S_CPU_PEAK *)(ptr))->header = TRL1_L1S_CPU_PEAK | (fn_max_cpu << TR_HEADER_FN_DELAY); - ((T_TR_L1S_CPU_PEAK *)(ptr))->max_cpu = (UWORD8)max_cpu; - - L1_send_trace_no_cpy(ptr, sizeof(T_TR_L1S_CPU_PEAK)); - } - } - } - - /***********************************************************************/ - /* L1A messages */ - /***********************************************************************/ - - if (trace_info.current_config->l1_dyn_trace & 1<<L1_DYN_TRACE_L1A_MESSAGES) - { - - switch(msg->SignalCode) - { - - /********************************************************************************/ - /* CIRCUIT SWITCHED */ - /********************************************************************************/ - - ///////////////////////////////////////// - // Message to set the right radio band // - ///////////////////////////////////////// - case MPHC_INIT_L1_REQ: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MPHC_INIT_L1_REQ), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MPHC_INIT_L1_REQ *)(ptr))->header = TRL1_MPHC_INIT_L1_REQ | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_MPHC_INIT_L1_REQ *)(ptr))->radio_band_config = ((T_MPHC_INIT_L1_REQ *)(msg->SigP))->radio_band_config; - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MPHC_NEW_SCELL_REQ)); - } - } - break; - - case MPHC_INIT_L1_CON: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MPHC_INIT_L1_CON), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - ((T_TR_MPHC_INIT_L1_CON *)(ptr))->header = TRL1_MPHC_INIT_L1_CON | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MPHC_NEW_SCELL_REQ)); - } - } - break; - - //////////////////////////// - // Serving Cell selection // - //////////////////////////// - - case MPHC_NEW_SCELL_REQ: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MPHC_NEW_SCELL_REQ), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MPHC_NEW_SCELL_REQ *)(ptr))->header = TRL1_MPHC_NEW_SCELL_REQ | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_MPHC_NEW_SCELL_REQ *)(ptr))->radio_freq = ((T_MPHC_NEW_SCELL_REQ *)(msg->SigP))->radio_freq; - ((T_TR_MPHC_NEW_SCELL_REQ *)(ptr))->fn_offset = ((T_MPHC_NEW_SCELL_REQ *)(msg->SigP))->fn_offset; - ((T_TR_MPHC_NEW_SCELL_REQ *)(ptr))->time_alignmt = ((T_MPHC_NEW_SCELL_REQ *)(msg->SigP))->time_alignmt; - ((T_TR_MPHC_NEW_SCELL_REQ *)(ptr))->bsic = ((T_MPHC_NEW_SCELL_REQ *)(msg->SigP))->bsic; - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MPHC_NEW_SCELL_REQ)); - } - } - break; - - ////////////////////////////// - // Neighbor cell monitoring // - ////////////////////////////// - - case MPHC_NETWORK_LOST_IND: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MPHC_NETWORK_LOST_IND), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MPHC_NETWORK_LOST_IND *)(ptr))->header = TRL1_MPHC_NETWORK_LOST_IND | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MPHC_NETWORK_LOST_IND)); - } - } - break; - - // Idle mode neighbor cell synchronization - - case MPHC_NETWORK_SYNC_REQ: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MPHC_NETWORK_SYNC_REQ), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MPHC_NETWORK_SYNC_REQ *)(ptr))->header = TRL1_MPHC_NETWORK_SYNC_REQ | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_MPHC_NETWORK_SYNC_REQ *)(ptr))->radio_freq = ((T_MPHC_NETWORK_SYNC_REQ *)(msg->SigP))->radio_freq; - ((T_TR_MPHC_NETWORK_SYNC_REQ *)(ptr))->fn_offset = ((T_MPHC_NETWORK_SYNC_REQ *)(msg->SigP))->fn_offset; - ((T_TR_MPHC_NETWORK_SYNC_REQ *)(ptr))->time_alignmt = ((T_MPHC_NETWORK_SYNC_REQ *)(msg->SigP))->time_alignmt; - ((T_TR_MPHC_NETWORK_SYNC_REQ *)(ptr))->timing_validity = ((T_MPHC_NETWORK_SYNC_REQ *)(msg->SigP))->timing_validity; - ((T_TR_MPHC_NETWORK_SYNC_REQ *)(ptr))->search_mode = ((T_MPHC_NETWORK_SYNC_REQ *)(msg->SigP))->search_mode; - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MPHC_NETWORK_SYNC_REQ)); - } - } - break; - - case MPHC_STOP_NETWORK_SYNC_REQ: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MPHC_STOP_NETWORK_SYNC_REQ), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MPHC_STOP_NETWORK_SYNC_REQ *)(ptr))->header = TRL1_MPHC_STOP_NETWORK_SYNC_REQ | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MPHC_STOP_NETWORK_SYNC_REQ)); - } - } - break; - - case MPHC_NCELL_SYNC_REQ: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MPHC_NCELL_SYNC_REQ), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MPHC_NCELL_SYNC_REQ *)(ptr))->header = TRL1_MPHC_NCELL_SYNC_REQ | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_MPHC_NCELL_SYNC_REQ *)(ptr))->radio_freq = ((T_MPHC_NCELL_SYNC_REQ *)(msg->SigP))->radio_freq; - ((T_TR_MPHC_NCELL_SYNC_REQ *)(ptr))->fn_offset = ((T_MPHC_NCELL_SYNC_REQ *)(msg->SigP))->fn_offset; - ((T_TR_MPHC_NCELL_SYNC_REQ *)(ptr))->time_alignmt = ((T_MPHC_NCELL_SYNC_REQ *)(msg->SigP))->time_alignmt; - ((T_TR_MPHC_NCELL_SYNC_REQ *)(ptr))->timing_validity = ((T_MPHC_NCELL_SYNC_REQ *)(msg->SigP))->timing_validity; - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MPHC_NCELL_SYNC_REQ)); - } - } - break; - - case MPHC_NCELL_LIST_SYNC_REQ: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MPHC_NCELL_LIST_SYNC_REQ), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - UWORD8 i; - - ((T_TR_MPHC_NCELL_LIST_SYNC_REQ *)(ptr))->header = TRL1_MPHC_NCELL_LIST_SYNC_REQ | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_MPHC_NCELL_LIST_SYNC_REQ *)(ptr))->eotd = ((T_MPHC_NCELL_LIST_SYNC_REQ *)(msg->SigP))->eotd; - ((T_TR_MPHC_NCELL_LIST_SYNC_REQ *)(ptr))->list_size = ((T_MPHC_NCELL_LIST_SYNC_REQ *)(msg->SigP))->list_size; - - - for (i=0; i<((T_MPHC_NCELL_LIST_SYNC_REQ *)(msg->SigP))->list_size; i++) - { - ((T_TR_MPHC_NCELL_LIST_SYNC_REQ *)(ptr))->radio_freq[i] = ((T_MPHC_NCELL_LIST_SYNC_REQ *)(msg->SigP))->ncell_list[i].timing_validity; - ((T_TR_MPHC_NCELL_LIST_SYNC_REQ *)(ptr))->fn_offset[i] = ((T_MPHC_NCELL_LIST_SYNC_REQ *)(msg->SigP))->ncell_list[i].time_alignmt; - ((T_TR_MPHC_NCELL_LIST_SYNC_REQ *)(ptr))->time_alignmt[i] = ((T_MPHC_NCELL_LIST_SYNC_REQ *)(msg->SigP))->ncell_list[i].fn_offset; - ((T_TR_MPHC_NCELL_LIST_SYNC_REQ *)(ptr))->timing_validity[i] = ((T_MPHC_NCELL_LIST_SYNC_REQ *)(msg->SigP))->ncell_list[i].radio_freq; - } - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MPHC_NCELL_LIST_SYNC_REQ)); - } - } - break; - - case MPHC_STOP_NCELL_SYNC_REQ: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MPHC_STOP_NCELL_SYNC_REQ), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MPHC_STOP_NCELL_SYNC_REQ *)(ptr))->header = TRL1_MPHC_STOP_NCELL_SYNC_REQ | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_MPHC_STOP_NCELL_SYNC_REQ *)(ptr))->radio_freq_array_size = ((T_MPHC_STOP_NCELL_SYNC_REQ *)(msg->SigP))->radio_freq_array_size; - ((T_TR_MPHC_STOP_NCELL_SYNC_REQ *)(ptr))->radio_freq_array[0] = ((T_MPHC_STOP_NCELL_SYNC_REQ *)(msg->SigP))->radio_freq_array[0]; - ((T_TR_MPHC_STOP_NCELL_SYNC_REQ *)(ptr))->radio_freq_array[1] = ((T_MPHC_STOP_NCELL_SYNC_REQ *)(msg->SigP))->radio_freq_array[1]; - ((T_TR_MPHC_STOP_NCELL_SYNC_REQ *)(ptr))->radio_freq_array[2] = ((T_MPHC_STOP_NCELL_SYNC_REQ *)(msg->SigP))->radio_freq_array[2]; - ((T_TR_MPHC_STOP_NCELL_SYNC_REQ *)(ptr))->radio_freq_array[3] = ((T_MPHC_STOP_NCELL_SYNC_REQ *)(msg->SigP))->radio_freq_array[3]; - ((T_TR_MPHC_STOP_NCELL_SYNC_REQ *)(ptr))->radio_freq_array[4] = ((T_MPHC_STOP_NCELL_SYNC_REQ *)(msg->SigP))->radio_freq_array[4]; - ((T_TR_MPHC_STOP_NCELL_SYNC_REQ *)(ptr))->radio_freq_array[5] = ((T_MPHC_STOP_NCELL_SYNC_REQ *)(msg->SigP))->radio_freq_array[5]; - ((T_TR_MPHC_STOP_NCELL_SYNC_REQ *)(ptr))->radio_freq_array[6] = ((T_MPHC_STOP_NCELL_SYNC_REQ *)(msg->SigP))->radio_freq_array[0]; - ((T_TR_MPHC_STOP_NCELL_SYNC_REQ *)(ptr))->radio_freq_array[7] = ((T_MPHC_STOP_NCELL_SYNC_REQ *)(msg->SigP))->radio_freq_array[1]; - ((T_TR_MPHC_STOP_NCELL_SYNC_REQ *)(ptr))->radio_freq_array[8] = ((T_MPHC_STOP_NCELL_SYNC_REQ *)(msg->SigP))->radio_freq_array[2]; - ((T_TR_MPHC_STOP_NCELL_SYNC_REQ *)(ptr))->radio_freq_array[9] = ((T_MPHC_STOP_NCELL_SYNC_REQ *)(msg->SigP))->radio_freq_array[3]; - ((T_TR_MPHC_STOP_NCELL_SYNC_REQ *)(ptr))->radio_freq_array[10] = ((T_MPHC_STOP_NCELL_SYNC_REQ *)(msg->SigP))->radio_freq_array[4]; - ((T_TR_MPHC_STOP_NCELL_SYNC_REQ *)(ptr))->radio_freq_array[11] = ((T_MPHC_STOP_NCELL_SYNC_REQ *)(msg->SigP))->radio_freq_array[5]; - - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MPHC_STOP_NCELL_SYNC_REQ)); - } - } - break; - - // Dedicated mode neigbor cell synchronization - - case MPHC_NCELL_FB_SB_READ: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MPHC_NCELL_FB_SB_READ), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MPHC_NCELL_FB_SB_READ *)(ptr))->header = TRL1_MPHC_NCELL_FB_SB_READ | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_MPHC_NCELL_FB_SB_READ *)(ptr))->radio_freq = ((T_MPHC_NCELL_FB_SB_READ *)(msg->SigP))->radio_freq; - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MPHC_NCELL_FB_SB_READ)); - } - } - break; - - case MPHC_NCELL_SB_READ: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MPHC_NCELL_SB_READ), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MPHC_NCELL_SB_READ *)(ptr))->header = TRL1_MPHC_NCELL_SB_READ | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_MPHC_NCELL_SB_READ *)(ptr))->radio_freq = ((T_MPHC_NCELL_SB_READ *)(msg->SigP))->radio_freq; - ((T_TR_MPHC_NCELL_SB_READ *)(ptr))->fn_offset = ((T_MPHC_NCELL_SB_READ *)(msg->SigP))->fn_offset; - ((T_TR_MPHC_NCELL_SB_READ *)(ptr))->time_alignmt = ((T_MPHC_NCELL_SB_READ *)(msg->SigP))->time_alignmt; - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MPHC_NCELL_SB_READ)); - } - } - break; - - case L1C_FB_INFO: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_L1C_FB_INFO), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_L1C_FB_INFO *)(ptr))->header = TRL1_L1C_FB_INFO | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_L1C_FB_INFO *)(ptr))->fb_flag = ((T_L1C_FB_INFO*)(msg->SigP))->fb_flag; - ((T_TR_L1C_FB_INFO *)(ptr))->radio_freq = ((T_L1C_FB_INFO*)(msg->SigP))->radio_freq; - ((T_TR_L1C_FB_INFO *)(ptr))->pm = ((T_L1C_FB_INFO*)(msg->SigP))->pm; - ((T_TR_L1C_FB_INFO *)(ptr))->toa = ((T_L1C_FB_INFO*)(msg->SigP))->toa; - ((T_TR_L1C_FB_INFO *)(ptr))->angle = ((T_L1C_FB_INFO*)(msg->SigP))->angle; - ((T_TR_L1C_FB_INFO *)(ptr))->snr = ((T_L1C_FB_INFO*)(msg->SigP))->snr; - ((T_TR_L1C_FB_INFO *)(ptr))->input_level = l1a_l1s_com.last_input_level[((T_L1C_FB_INFO*)(msg->SigP))->radio_freq - - l1_config.std.radio_freq_index_offset].input_level; - ((T_TR_L1C_FB_INFO *)(ptr))->tpu_offset = l1s.tpu_offset; - ((T_TR_L1C_FB_INFO *)(ptr))->afc = l1s.afc; - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_L1C_FB_INFO)); - } - } - break; - - case L1C_SB_INFO: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_L1C_SB_INFO), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_L1C_SB_INFO *)(ptr))->header = TRL1_L1C_SB_INFO | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_L1C_SB_INFO *)(ptr))->radio_freq = ((T_L1C_SB_INFO *)(msg->SigP))->radio_freq; - ((T_TR_L1C_SB_INFO *)(ptr))->sb_flag = ((T_L1C_SB_INFO *)(msg->SigP))->sb_flag; - ((T_TR_L1C_SB_INFO *)(ptr))->fn_offset = ((T_L1C_SB_INFO *)(msg->SigP))->fn_offset; - ((T_TR_L1C_SB_INFO *)(ptr))->time_alignmt = ((T_L1C_SB_INFO *)(msg->SigP))->time_alignmt; - ((T_TR_L1C_SB_INFO *)(ptr))->bsic = ((T_L1C_SB_INFO *)(msg->SigP))->bsic; - ((T_TR_L1C_SB_INFO *)(ptr))->pm = ((T_L1C_SB_INFO *)(msg->SigP))->pm; - ((T_TR_L1C_SB_INFO *)(ptr))->toa = ((T_L1C_SB_INFO *)(msg->SigP))->toa; - ((T_TR_L1C_SB_INFO *)(ptr))->angle = ((T_L1C_SB_INFO *)(msg->SigP))->angle; - ((T_TR_L1C_SB_INFO *)(ptr))->snr = ((T_L1C_SB_INFO *)(msg->SigP))->snr; - ((T_TR_L1C_SB_INFO *)(ptr))->input_level = l1a_l1s_com.last_input_level[((T_L1C_SB_INFO *)(msg->SigP))->radio_freq - l1_config.std.radio_freq_index_offset].input_level; - ((T_TR_L1C_SB_INFO *)(ptr))->tpu_offset = l1s.tpu_offset; - ((T_TR_L1C_SB_INFO *)(ptr))->afc = l1s.afc; - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_L1C_SB_INFO)); - } - } - break; - - case L1C_SBCONF_INFO: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_L1C_SBCONF_INFO), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_L1C_SBCONF_INFO *)(ptr))->header = TRL1_L1C_SBCONF_INFO | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_L1C_SBCONF_INFO *)(ptr))->radio_freq = ((T_L1C_SBCONF_INFO *)(msg->SigP))->radio_freq; - ((T_TR_L1C_SBCONF_INFO *)(ptr))->sb_flag = ((T_L1C_SBCONF_INFO *)(msg->SigP))->sb_flag; - ((T_TR_L1C_SBCONF_INFO *)(ptr))->fn_offset = ((T_L1C_SBCONF_INFO *)(msg->SigP))->fn_offset; - ((T_TR_L1C_SBCONF_INFO *)(ptr))->time_alignmt = ((T_L1C_SBCONF_INFO *)(msg->SigP))->time_alignmt; - ((T_TR_L1C_SBCONF_INFO *)(ptr))->bsic = ((T_L1C_SBCONF_INFO *)(msg->SigP))->bsic; - ((T_TR_L1C_SBCONF_INFO *)(ptr))->pm = ((T_L1C_SBCONF_INFO *)(msg->SigP))->pm; - ((T_TR_L1C_SBCONF_INFO *)(ptr))->toa = ((T_L1C_SBCONF_INFO *)(msg->SigP))->toa; - ((T_TR_L1C_SBCONF_INFO *)(ptr))->angle = ((T_L1C_SBCONF_INFO *)(msg->SigP))->angle; - ((T_TR_L1C_SBCONF_INFO *)(ptr))->snr = ((T_L1C_SBCONF_INFO *)(msg->SigP))->snr; - ((T_TR_L1C_SBCONF_INFO *)(ptr))->input_level = l1a_l1s_com.last_input_level[((T_L1C_SBCONF_INFO *)(msg->SigP))->radio_freq - l1_config.std.radio_freq_index_offset].input_level; - ((T_TR_L1C_SBCONF_INFO *)(ptr))->tpu_offset = l1s.tpu_offset; - ((T_TR_L1C_SBCONF_INFO *)(ptr))->afc = l1s.afc; - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_L1C_SBCONF_INFO)); - } - } - break; - - case MPHC_NETWORK_SYNC_IND: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MPHC_NETWORK_SYNC_IND), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MPHC_NETWORK_SYNC_IND *)(ptr))->header = TRL1_MPHC_NETWORK_SYNC_IND | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_MPHC_NETWORK_SYNC_IND *)(ptr))->sb_flag = ((T_MPHC_NETWORK_SYNC_IND*)(msg->SigP))->sb_flag; - ((T_TR_MPHC_NETWORK_SYNC_IND *)(ptr))->radio_freq = ((T_MPHC_NETWORK_SYNC_IND*)(msg->SigP))->radio_freq; - ((T_TR_MPHC_NETWORK_SYNC_IND *)(ptr))->fn_offset = ((T_MPHC_NETWORK_SYNC_IND*)(msg->SigP))->fn_offset; - ((T_TR_MPHC_NETWORK_SYNC_IND *)(ptr))->time_alignmt = ((T_MPHC_NETWORK_SYNC_IND*)(msg->SigP))->time_alignmt; - ((T_TR_MPHC_NETWORK_SYNC_IND *)(ptr))->bsic = ((T_MPHC_NETWORK_SYNC_IND*)(msg->SigP))->bsic; - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MPHC_NETWORK_SYNC_IND)); - } - } - break; - - case MPHC_NCELL_SYNC_IND: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MPHC_NCELL_SYNC_IND), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MPHC_NCELL_SYNC_IND *)(ptr))->header = TRL1_MPHC_NCELL_SYNC_IND | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_MPHC_NCELL_SYNC_IND *)(ptr))->radio_freq = ((T_MPHC_NCELL_SYNC_IND*)(msg->SigP))->radio_freq; - ((T_TR_MPHC_NCELL_SYNC_IND *)(ptr))->sb_flag = ((T_MPHC_NCELL_SYNC_IND*)(msg->SigP))->sb_flag; - ((T_TR_MPHC_NCELL_SYNC_IND *)(ptr))->fn_offset = ((T_MPHC_NCELL_SYNC_IND*)(msg->SigP))->fn_offset; - ((T_TR_MPHC_NCELL_SYNC_IND *)(ptr))->time_alignmt = ((T_MPHC_NCELL_SYNC_IND*)(msg->SigP))->time_alignmt; - ((T_TR_MPHC_NCELL_SYNC_IND *)(ptr))->bsic = ((T_MPHC_NCELL_SYNC_IND*)(msg->SigP))->bsic; - ((T_TR_MPHC_NCELL_SYNC_IND *)(ptr))->neigh_id = ((T_MPHC_NCELL_SYNC_IND*)(msg->SigP))->neigh_id; - ((T_TR_MPHC_NCELL_SYNC_IND *)(ptr))->list_size = l1a_l1s_com.nsync.current_list_size; - #if (L1_EOTD) - ((T_TR_MPHC_NCELL_SYNC_IND *)(ptr))->eotd_data_valid = ((T_MPHC_NCELL_SYNC_IND*)(msg->SigP))->eotd_data_valid; - ((T_TR_MPHC_NCELL_SYNC_IND *)(ptr))->mode = ((T_MPHC_NCELL_SYNC_IND*)(msg->SigP))->mode; - ((T_TR_MPHC_NCELL_SYNC_IND *)(ptr))->fn_sb_neigh = ((T_MPHC_NCELL_SYNC_IND*)(msg->SigP))->fn_sb_neigh; - ((T_TR_MPHC_NCELL_SYNC_IND *)(ptr))->fn_in_SB = ((T_MPHC_NCELL_SYNC_IND*)(msg->SigP))->fn_in_SB; - ((T_TR_MPHC_NCELL_SYNC_IND *)(ptr))->toa_correction = ((T_MPHC_NCELL_SYNC_IND*)(msg->SigP))->toa_correction; - ((T_TR_MPHC_NCELL_SYNC_IND *)(ptr))->delta_fn = ((T_MPHC_NCELL_SYNC_IND*)(msg->SigP))->delta_fn; - ((T_TR_MPHC_NCELL_SYNC_IND *)(ptr))->delta_qbit = ((T_MPHC_NCELL_SYNC_IND*)(msg->SigP))->delta_qbit; - #endif - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MPHC_NCELL_SYNC_IND)); - } - } - break; - - // Neighbor cell BCCH reading - - case MPHC_NCELL_BCCH_REQ: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MPHC_NCELL_BCCH_REQ), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MPHC_NCELL_BCCH_REQ *)(ptr))->header = TRL1_MPHC_NCELL_BCCH_REQ | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_MPHC_NCELL_BCCH_REQ *)(ptr))->radio_freq = ((T_MPHC_NCELL_BCCH_REQ *)(msg->SigP))->radio_freq; - ((T_TR_MPHC_NCELL_BCCH_REQ *)(ptr))->fn_offset = ((T_MPHC_NCELL_BCCH_REQ *)(msg->SigP))->fn_offset; - ((T_TR_MPHC_NCELL_BCCH_REQ *)(ptr))->time_alignmt = ((T_MPHC_NCELL_BCCH_REQ *)(msg->SigP))->time_alignmt; - ((T_TR_MPHC_NCELL_BCCH_REQ *)(ptr))->tsc = ((T_MPHC_NCELL_BCCH_REQ *)(msg->SigP))->tsc; - ((T_TR_MPHC_NCELL_BCCH_REQ *)(ptr))->bcch_blks_req = ((T_MPHC_NCELL_BCCH_REQ *)(msg->SigP))->bcch_blks_req; - #if L1_GPRS - ((T_TR_MPHC_NCELL_BCCH_REQ *)(ptr))->gprs_priority = ((T_MPHC_NCELL_BCCH_REQ *)(msg->SigP))->gprs_priority; - #endif - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MPHC_NCELL_BCCH_REQ)); - } - } - break; - - case MPHC_STOP_NCELL_BCCH_REQ: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MPHC_STOP_NCELL_BCCH_REQ), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MPHC_STOP_NCELL_BCCH_REQ *)(ptr))->header = TRL1_MPHC_STOP_NCELL_BCCH_REQ | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_MPHC_STOP_NCELL_BCCH_REQ *)(ptr))->radio_freq_array_size = ((T_MPHC_STOP_NCELL_BCCH_REQ *)(msg->SigP))->radio_freq_array_size; - ((T_TR_MPHC_STOP_NCELL_BCCH_REQ *)(ptr))->radio_freq_array[0] = ((T_MPHC_STOP_NCELL_BCCH_REQ *)(msg->SigP))->radio_freq_array[0]; - ((T_TR_MPHC_STOP_NCELL_BCCH_REQ *)(ptr))->radio_freq_array[1] = ((T_MPHC_STOP_NCELL_BCCH_REQ *)(msg->SigP))->radio_freq_array[1]; - ((T_TR_MPHC_STOP_NCELL_BCCH_REQ *)(ptr))->radio_freq_array[2] = ((T_MPHC_STOP_NCELL_BCCH_REQ *)(msg->SigP))->radio_freq_array[2]; - ((T_TR_MPHC_STOP_NCELL_BCCH_REQ *)(ptr))->radio_freq_array[3] = ((T_MPHC_STOP_NCELL_BCCH_REQ *)(msg->SigP))->radio_freq_array[3]; - ((T_TR_MPHC_STOP_NCELL_BCCH_REQ *)(ptr))->radio_freq_array[4] = ((T_MPHC_STOP_NCELL_BCCH_REQ *)(msg->SigP))->radio_freq_array[4]; - ((T_TR_MPHC_STOP_NCELL_BCCH_REQ *)(ptr))->radio_freq_array[5] = ((T_MPHC_STOP_NCELL_BCCH_REQ *)(msg->SigP))->radio_freq_array[5]; - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MPHC_STOP_NCELL_BCCH_REQ)); - } - } - break; - - case L1C_BCCHN_INFO: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_L1C_BCCHN_INFO), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_L1C_BCCHN_INFO *)(ptr))->header = TRL1_L1C_BCCHN_INFO | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_L1C_BCCHN_INFO *)(ptr))->error_flag = ((T_MPHC_DATA_IND *)(msg->SigP))->error_flag; - ((T_TR_L1C_BCCHN_INFO *)(ptr))->radio_freq = ((T_MPHC_DATA_IND *)(msg->SigP))->radio_freq; - ((T_TR_L1C_BCCHN_INFO *)(ptr))->input_level = l1a_l1s_com.last_input_level[((T_MPHC_DATA_IND *)(msg->SigP))->radio_freq - - l1_config.std.radio_freq_index_offset].input_level; - ((T_TR_L1C_BCCHN_INFO *)(ptr))->tpu_offset = l1s.tpu_offset; - ((T_TR_L1C_BCCHN_INFO *)(ptr))->afc = l1s.afc; - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_L1C_BCCHN_INFO)); - } - } - break; - - /////////////////////////////////////// - // Serving cell normal burst reading // - /////////////////////////////////////// - - // CCCH reading - - case MPHC_START_CCCH_REQ: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MPHC_START_CCCH_REQ), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MPHC_START_CCCH_REQ *)(ptr))->header = TRL1_MPHC_START_CCCH_REQ | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_MPHC_START_CCCH_REQ *)(ptr))->bs_pa_mfrms = ((T_MPHC_START_CCCH_REQ *)(msg->SigP))->bs_pa_mfrms; - ((T_TR_MPHC_START_CCCH_REQ *)(ptr))->bs_ag_blks_res = ((T_MPHC_START_CCCH_REQ *)(msg->SigP))->bs_ag_blks_res; - ((T_TR_MPHC_START_CCCH_REQ *)(ptr))->bcch_combined = ((T_MPHC_START_CCCH_REQ *)(msg->SigP))->bcch_combined; - ((T_TR_MPHC_START_CCCH_REQ *)(ptr))->ccch_group = ((T_MPHC_START_CCCH_REQ *)(msg->SigP))->ccch_group; - ((T_TR_MPHC_START_CCCH_REQ *)(ptr))->page_group = ((T_MPHC_START_CCCH_REQ *)(msg->SigP))->page_group; - ((T_TR_MPHC_START_CCCH_REQ *)(ptr))->page_block_index = ((T_MPHC_START_CCCH_REQ *)(msg->SigP))->page_block_index; - ((T_TR_MPHC_START_CCCH_REQ *)(ptr))->page_mode = ((T_MPHC_START_CCCH_REQ *)(msg->SigP))->page_mode; - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MPHC_START_CCCH_REQ)); - } - } - break; - - case MPHC_STOP_CCCH_REQ: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MPHC_STOP_CCCH_REQ), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MPHC_STOP_CCCH_REQ *)(ptr))->header = TRL1_MPHC_STOP_CCCH_REQ | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MPHC_STOP_CCCH_REQ)); - } - } - break; - - case L1C_NP_INFO: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_L1C_NP_INFO), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_L1C_NP_INFO *)(ptr))->header = TRL1_L1C_NP_INFO | (((T_MPHC_DATA_IND *)(msg->SigP))->fn << TR_HEADER_FN_DELAY); - ((T_TR_L1C_NP_INFO *)(ptr))->error_flag = ((T_MPHC_DATA_IND *)(msg->SigP))->error_flag; - ((T_TR_L1C_NP_INFO *)(ptr))->radio_freq = ((T_MPHC_DATA_IND *)(msg->SigP))->radio_freq; - ((T_TR_L1C_NP_INFO *)(ptr))->input_level = l1a_l1s_com.Scell_IL_for_rxlev; - ((T_TR_L1C_NP_INFO *)(ptr))->tpu_offset = l1s.tpu_offset; - ((T_TR_L1C_NP_INFO *)(ptr))->afc = l1s.afc; - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_L1C_NP_INFO)); - } - } - break; - - case L1C_EP_INFO: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_L1C_EP_INFO), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_L1C_EP_INFO *)(ptr))->header = TRL1_L1C_EP_INFO | (((T_MPHC_DATA_IND *)(msg->SigP))->fn << TR_HEADER_FN_DELAY); - ((T_TR_L1C_EP_INFO *)(ptr))->error_flag = ((T_MPHC_DATA_IND *)(msg->SigP))->error_flag; - ((T_TR_L1C_EP_INFO *)(ptr))->radio_freq = ((T_MPHC_DATA_IND *)(msg->SigP))->radio_freq; - ((T_TR_L1C_EP_INFO *)(ptr))->input_level = l1a_l1s_com.Scell_IL_for_rxlev; - ((T_TR_L1C_EP_INFO *)(ptr))->tpu_offset = l1s.tpu_offset; - ((T_TR_L1C_EP_INFO *)(ptr))->afc = l1s.afc; - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_L1C_EP_INFO)); - } - } - break; - - case L1C_ALLC_INFO: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_L1C_ALLC_INFO), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_L1C_ALLC_INFO *)(ptr))->header = TRL1_L1C_ALLC_INFO | (((T_MPHC_DATA_IND *)(msg->SigP))->fn << TR_HEADER_FN_DELAY); - ((T_TR_L1C_ALLC_INFO *)(ptr))->error_flag = ((T_MPHC_DATA_IND *)(msg->SigP))->error_flag; - ((T_TR_L1C_ALLC_INFO *)(ptr))->radio_freq = ((T_MPHC_DATA_IND *)(msg->SigP))->radio_freq; - ((T_TR_L1C_ALLC_INFO *)(ptr))->input_level = l1a_l1s_com.Scell_IL_for_rxlev; - ((T_TR_L1C_ALLC_INFO *)(ptr))->tpu_offset = l1s.tpu_offset; - ((T_TR_L1C_ALLC_INFO *)(ptr))->afc = l1s.afc; - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_L1C_ALLC_INFO)); - } - } - break; - - // BCCH reading - - case MPHC_SCELL_NBCCH_REQ: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MPHC_SCELL_NBCCH_REQ), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MPHC_SCELL_NBCCH_REQ *)(ptr))->header = TRL1_MPHC_SCELL_NBCCH_REQ | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_MPHC_SCELL_NBCCH_REQ *)(ptr))->schedule_array_size = ((T_MPHC_SCELL_NBCCH_REQ *)(msg->SigP))->schedule_array_size; - ((T_TR_MPHC_SCELL_NBCCH_REQ *)(ptr))->modulus[0] = ((T_MPHC_SCELL_NBCCH_REQ *)(msg->SigP))->schedule_array[0].modulus; - ((T_TR_MPHC_SCELL_NBCCH_REQ *)(ptr))->modulus[1] = ((T_MPHC_SCELL_NBCCH_REQ *)(msg->SigP))->schedule_array[1].modulus; - ((T_TR_MPHC_SCELL_NBCCH_REQ *)(ptr))->modulus[2] = ((T_MPHC_SCELL_NBCCH_REQ *)(msg->SigP))->schedule_array[2].modulus; - ((T_TR_MPHC_SCELL_NBCCH_REQ *)(ptr))->modulus[3] = ((T_MPHC_SCELL_NBCCH_REQ *)(msg->SigP))->schedule_array[3].modulus; - ((T_TR_MPHC_SCELL_NBCCH_REQ *)(ptr))->modulus[4] = ((T_MPHC_SCELL_NBCCH_REQ *)(msg->SigP))->schedule_array[4].modulus; - ((T_TR_MPHC_SCELL_NBCCH_REQ *)(ptr))->modulus[5] = ((T_MPHC_SCELL_NBCCH_REQ *)(msg->SigP))->schedule_array[5].modulus; - ((T_TR_MPHC_SCELL_NBCCH_REQ *)(ptr))->modulus[6] = ((T_MPHC_SCELL_NBCCH_REQ *)(msg->SigP))->schedule_array[6].modulus; - ((T_TR_MPHC_SCELL_NBCCH_REQ *)(ptr))->modulus[7] = ((T_MPHC_SCELL_NBCCH_REQ *)(msg->SigP))->schedule_array[7].modulus; - ((T_TR_MPHC_SCELL_NBCCH_REQ *)(ptr))->modulus[8] = ((T_MPHC_SCELL_NBCCH_REQ *)(msg->SigP))->schedule_array[8].modulus; - ((T_TR_MPHC_SCELL_NBCCH_REQ *)(ptr))->modulus[9] = ((T_MPHC_SCELL_NBCCH_REQ *)(msg->SigP))->schedule_array[9].modulus; - ((T_TR_MPHC_SCELL_NBCCH_REQ *)(ptr))->relative_position[0] = ((T_MPHC_SCELL_NBCCH_REQ *)(msg->SigP))->schedule_array[0].relative_position; - ((T_TR_MPHC_SCELL_NBCCH_REQ *)(ptr))->relative_position[1] = ((T_MPHC_SCELL_NBCCH_REQ *)(msg->SigP))->schedule_array[1].relative_position; - ((T_TR_MPHC_SCELL_NBCCH_REQ *)(ptr))->relative_position[2] = ((T_MPHC_SCELL_NBCCH_REQ *)(msg->SigP))->schedule_array[2].relative_position; - ((T_TR_MPHC_SCELL_NBCCH_REQ *)(ptr))->relative_position[3] = ((T_MPHC_SCELL_NBCCH_REQ *)(msg->SigP))->schedule_array[3].relative_position; - ((T_TR_MPHC_SCELL_NBCCH_REQ *)(ptr))->relative_position[4] = ((T_MPHC_SCELL_NBCCH_REQ *)(msg->SigP))->schedule_array[4].relative_position; - ((T_TR_MPHC_SCELL_NBCCH_REQ *)(ptr))->relative_position[5] = ((T_MPHC_SCELL_NBCCH_REQ *)(msg->SigP))->schedule_array[5].relative_position; - ((T_TR_MPHC_SCELL_NBCCH_REQ *)(ptr))->relative_position[6] = ((T_MPHC_SCELL_NBCCH_REQ *)(msg->SigP))->schedule_array[6].relative_position; - ((T_TR_MPHC_SCELL_NBCCH_REQ *)(ptr))->relative_position[7] = ((T_MPHC_SCELL_NBCCH_REQ *)(msg->SigP))->schedule_array[7].relative_position; - ((T_TR_MPHC_SCELL_NBCCH_REQ *)(ptr))->relative_position[8] = ((T_MPHC_SCELL_NBCCH_REQ *)(msg->SigP))->schedule_array[8].relative_position; - ((T_TR_MPHC_SCELL_NBCCH_REQ *)(ptr))->relative_position[9] = ((T_MPHC_SCELL_NBCCH_REQ *)(msg->SigP))->schedule_array[9].relative_position; - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MPHC_SCELL_NBCCH_REQ)); - } - } - break; - - case MPHC_SCELL_EBCCH_REQ: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MPHC_SCELL_EBCCH_REQ), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MPHC_SCELL_EBCCH_REQ *)(ptr))->header = TRL1_MPHC_SCELL_EBCCH_REQ | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_MPHC_SCELL_EBCCH_REQ *)(ptr))->schedule_array_size = ((T_MPHC_SCELL_EBCCH_REQ *)(msg->SigP))->schedule_array_size; - ((T_TR_MPHC_SCELL_EBCCH_REQ *)(ptr))->modulus[0] = ((T_MPHC_SCELL_EBCCH_REQ *)(msg->SigP))->schedule_array[0].modulus; - ((T_TR_MPHC_SCELL_EBCCH_REQ *)(ptr))->modulus[1] = ((T_MPHC_SCELL_EBCCH_REQ *)(msg->SigP))->schedule_array[1].modulus; - ((T_TR_MPHC_SCELL_EBCCH_REQ *)(ptr))->modulus[2] = ((T_MPHC_SCELL_EBCCH_REQ *)(msg->SigP))->schedule_array[2].modulus; - ((T_TR_MPHC_SCELL_EBCCH_REQ *)(ptr))->modulus[3] = ((T_MPHC_SCELL_EBCCH_REQ *)(msg->SigP))->schedule_array[3].modulus; - ((T_TR_MPHC_SCELL_EBCCH_REQ *)(ptr))->modulus[4] = ((T_MPHC_SCELL_EBCCH_REQ *)(msg->SigP))->schedule_array[4].modulus; - ((T_TR_MPHC_SCELL_EBCCH_REQ *)(ptr))->modulus[5] = ((T_MPHC_SCELL_EBCCH_REQ *)(msg->SigP))->schedule_array[5].modulus; - ((T_TR_MPHC_SCELL_EBCCH_REQ *)(ptr))->modulus[6] = ((T_MPHC_SCELL_EBCCH_REQ *)(msg->SigP))->schedule_array[6].modulus; - ((T_TR_MPHC_SCELL_EBCCH_REQ *)(ptr))->modulus[7] = ((T_MPHC_SCELL_EBCCH_REQ *)(msg->SigP))->schedule_array[7].modulus; - ((T_TR_MPHC_SCELL_EBCCH_REQ *)(ptr))->modulus[8] = ((T_MPHC_SCELL_EBCCH_REQ *)(msg->SigP))->schedule_array[8].modulus; - ((T_TR_MPHC_SCELL_EBCCH_REQ *)(ptr))->modulus[9] = ((T_MPHC_SCELL_EBCCH_REQ *)(msg->SigP))->schedule_array[9].modulus; - ((T_TR_MPHC_SCELL_EBCCH_REQ *)(ptr))->relative_position[0] = ((T_MPHC_SCELL_EBCCH_REQ *)(msg->SigP))->schedule_array[0].relative_position; - ((T_TR_MPHC_SCELL_EBCCH_REQ *)(ptr))->relative_position[1] = ((T_MPHC_SCELL_EBCCH_REQ *)(msg->SigP))->schedule_array[1].relative_position; - ((T_TR_MPHC_SCELL_EBCCH_REQ *)(ptr))->relative_position[2] = ((T_MPHC_SCELL_EBCCH_REQ *)(msg->SigP))->schedule_array[2].relative_position; - ((T_TR_MPHC_SCELL_EBCCH_REQ *)(ptr))->relative_position[3] = ((T_MPHC_SCELL_EBCCH_REQ *)(msg->SigP))->schedule_array[3].relative_position; - ((T_TR_MPHC_SCELL_EBCCH_REQ *)(ptr))->relative_position[4] = ((T_MPHC_SCELL_EBCCH_REQ *)(msg->SigP))->schedule_array[4].relative_position; - ((T_TR_MPHC_SCELL_EBCCH_REQ *)(ptr))->relative_position[5] = ((T_MPHC_SCELL_EBCCH_REQ *)(msg->SigP))->schedule_array[5].relative_position; - ((T_TR_MPHC_SCELL_EBCCH_REQ *)(ptr))->relative_position[6] = ((T_MPHC_SCELL_EBCCH_REQ *)(msg->SigP))->schedule_array[6].relative_position; - ((T_TR_MPHC_SCELL_EBCCH_REQ *)(ptr))->relative_position[7] = ((T_MPHC_SCELL_EBCCH_REQ *)(msg->SigP))->schedule_array[7].relative_position; - ((T_TR_MPHC_SCELL_EBCCH_REQ *)(ptr))->relative_position[8] = ((T_MPHC_SCELL_EBCCH_REQ *)(msg->SigP))->schedule_array[8].relative_position; - ((T_TR_MPHC_SCELL_EBCCH_REQ *)(ptr))->relative_position[9] = ((T_MPHC_SCELL_EBCCH_REQ *)(msg->SigP))->schedule_array[9].relative_position; - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MPHC_SCELL_EBCCH_REQ)); - } - } - break; - - case MPHC_STOP_SCELL_BCCH_REQ: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MPHC_STOP_SCELL_BCCH_REQ), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MPHC_STOP_SCELL_BCCH_REQ *)(ptr))->header = TRL1_MPHC_STOP_SCELL_BCCH_REQ | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MPHC_STOP_SCELL_BCCH_REQ)); - } - } - break; - - case L1C_BCCHS_INFO: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_L1C_BCCHS_INFO), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_L1C_BCCHS_INFO *)(ptr))->header = TRL1_L1C_BCCHS_INFO | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_L1C_BCCHS_INFO *)(ptr))->error_flag = ((T_MPHC_DATA_IND *)(msg->SigP))->error_flag; - ((T_TR_L1C_BCCHS_INFO *)(ptr))->radio_freq = ((T_MPHC_DATA_IND *)(msg->SigP))->radio_freq; - ((T_TR_L1C_BCCHS_INFO *)(ptr))->input_level = l1a_l1s_com.Scell_IL_for_rxlev; - ((T_TR_L1C_BCCHS_INFO *)(ptr))->tpu_offset = l1s.tpu_offset; - ((T_TR_L1C_BCCHS_INFO *)(ptr))->afc = l1s.afc; - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_L1C_BCCHS_INFO)); - } - } - break; - - ////////// - // CBCH // - ////////// - - case MPHC_CONFIG_CBCH_REQ: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MPHC_CONFIG_CBCH_REQ), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MPHC_CONFIG_CBCH_REQ *)(ptr))->header = TRL1_MPHC_CONFIG_CBCH_REQ | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_MPHC_CONFIG_CBCH_REQ *)(ptr))->h = ((T_MPHC_CONFIG_CBCH_REQ *)(msg->SigP))->cbch_desc.chan_sel.h; - ((T_TR_MPHC_CONFIG_CBCH_REQ *)(ptr))->radio_freq = ((T_MPHC_CONFIG_CBCH_REQ *)(msg->SigP))->cbch_desc.chan_sel.rf_channel.single_rf.radio_freq; - ((T_TR_MPHC_CONFIG_CBCH_REQ *)(ptr))->timeslot_no = ((T_MPHC_CONFIG_CBCH_REQ *)(msg->SigP))->cbch_desc.timeslot_no; - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MPHC_CONFIG_CBCH_REQ)); - } - } - break; - - case MPHC_CBCH_SCHEDULE_REQ: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MPHC_CBCH_SCHEDULE_REQ), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MPHC_CBCH_SCHEDULE_REQ *)(ptr))->header = TRL1_MPHC_CBCH_SCHEDULE_REQ | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_MPHC_CBCH_SCHEDULE_REQ *)(ptr))->extended_cbch = ((T_MPHC_CBCH_SCHEDULE_REQ *)(msg->SigP))->extended_cbch; - ((T_TR_MPHC_CBCH_SCHEDULE_REQ *)(ptr))->schedule_length = ((T_MPHC_CBCH_SCHEDULE_REQ *)(msg->SigP))->schedule_length; - ((T_TR_MPHC_CBCH_SCHEDULE_REQ *)(ptr))->first_block_0 = ((T_MPHC_CBCH_SCHEDULE_REQ *)(msg->SigP))->first_block_0; - ((T_TR_MPHC_CBCH_SCHEDULE_REQ *)(ptr))->first_block_1 = ((T_MPHC_CBCH_SCHEDULE_REQ *)(msg->SigP))->first_block_1; - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MPHC_CBCH_SCHEDULE_REQ)); - } - } - break; - - case MPHC_CBCH_INFO_REQ: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MPHC_CBCH_INFO_REQ), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MPHC_CBCH_INFO_REQ *)(ptr))->header = TRL1_MPHC_CBCH_INFO_REQ | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_MPHC_CBCH_INFO_REQ *)(ptr))->tb_bitmap = ((T_MPHC_CBCH_INFO_REQ *)(msg->SigP))->tb_bitmap; - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MPHC_CBCH_INFO_REQ)); - } - } - break; - - case MPHC_CBCH_UPDATE_REQ: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MPHC_CBCH_UPDATE_REQ), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MPHC_CBCH_UPDATE_REQ *)(ptr))->header = TRL1_MPHC_CBCH_UPDATE_REQ | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_MPHC_CBCH_UPDATE_REQ *)(ptr))->extended_cbch = ((T_MPHC_CBCH_UPDATE_REQ*)(msg->SigP))->extended_cbch; - ((T_TR_MPHC_CBCH_UPDATE_REQ *)(ptr))->first_block_0 = ((T_MPHC_CBCH_UPDATE_REQ*)(msg->SigP))->first_block_0; - ((T_TR_MPHC_CBCH_UPDATE_REQ *)(ptr))->first_block_1 = ((T_MPHC_CBCH_UPDATE_REQ*)(msg->SigP))->first_block_1; - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MPHC_CBCH_UPDATE_REQ)); - } - } - break; - - case L1C_CB_INFO: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_L1C_CB_INFO), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_L1C_CB_INFO *)(ptr))->header = TRL1_L1C_CB_INFO | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_L1C_CB_INFO *)(ptr))->error_flag = ((T_MPHC_DATA_IND *)(msg->SigP))->error_flag; - ((T_TR_L1C_CB_INFO *)(ptr))->radio_freq = ((T_MPHC_DATA_IND *)(msg->SigP))->radio_freq; - ((T_TR_L1C_CB_INFO *)(ptr))->input_level = l1a_l1s_com.Scell_IL_for_rxlev; - ((T_TR_L1C_CB_INFO *)(ptr))->tpu_offset = l1s.tpu_offset; - ((T_TR_L1C_CB_INFO *)(ptr))->afc = l1s.afc; - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_L1C_CB_INFO)); - } - } - break; - - // Stop CBCH - - case MPHC_STOP_CBCH_REQ: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MPHC_STOP_CBCH_REQ), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MPHC_STOP_CBCH_REQ *)(ptr))->header = TRL1_MPHC_STOP_CBCH_REQ | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_MPHC_STOP_CBCH_REQ *)(ptr))->normal_cbch = ((T_MPHC_STOP_CBCH_REQ *)(msg->SigP))->normal_cbch; - ((T_TR_MPHC_STOP_CBCH_REQ *)(ptr))->extended_cbch = ((T_MPHC_STOP_CBCH_REQ *)(msg->SigP))->extended_cbch; - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MPHC_STOP_CBCH_REQ)); - } - } - break; - - case MPHC_STOP_CBCH_CON: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MPHC_STOP_CBCH_CON), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MPHC_STOP_CBCH_CON *)(ptr))->header = TRL1_MPHC_STOP_CBCH_CON | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MPHC_STOP_CBCH_CON)); - } - } - break; - - /////////////////// - // Random Access // - /////////////////// - - case MPHC_RA_REQ: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MPHC_RA_REQ), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MPHC_RA_REQ *)(ptr))->header = TRL1_MPHC_RA_REQ | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_MPHC_RA_REQ *)(ptr))->txpwr = ((T_MPHC_RA_REQ *)(msg->SigP))->txpwr; - ((T_TR_MPHC_RA_REQ *)(ptr))->rand = ((T_MPHC_RA_REQ *)(msg->SigP))->rand; - ((T_TR_MPHC_RA_REQ *)(ptr))->channel_request = ((T_MPHC_RA_REQ *)(msg->SigP))->channel_request; - ((T_TR_MPHC_RA_REQ *)(ptr))->powerclass_band1 = ((T_MPHC_RA_REQ *)(msg->SigP))->powerclass_band1; - ((T_TR_MPHC_RA_REQ *)(ptr))->powerclass_band2 = ((T_MPHC_RA_REQ *)(msg->SigP))->powerclass_band2; - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MPHC_RA_REQ)); - } - } - break; - - case MPHC_STOP_RA_REQ: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MPHC_STOP_RA_REQ), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MPHC_STOP_RA_REQ *)(ptr))->header = TRL1_MPHC_STOP_RA_REQ | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MPHC_STOP_RA_REQ)); - } - } - break; - - case L1C_RA_DONE: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_L1C_RA_DONE), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_L1C_RA_DONE *)(ptr))->header = TRL1_L1C_RA_DONE | (((T_MPHC_RA_CON *)(msg->SigP))->fn << TR_HEADER_FN_DELAY); - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_L1C_RA_DONE)); - } - } - break; - - ///////////////////////////// - // Dedicated mode channels // - ///////////////////////////// - - // Immediate assignment - - case MPHC_IMMED_ASSIGN_REQ: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MPHC_IMMED_ASSIGN_REQ), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MPHC_IMMED_ASSIGN_REQ *)(ptr))->header = TRL1_MPHC_IMMED_ASSIGN_REQ | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_MPHC_IMMED_ASSIGN_REQ *)(ptr))->h = ((T_MPHC_IMMED_ASSIGN_REQ *)(msg->SigP))->channel_desc.chan_sel.h; - ((T_TR_MPHC_IMMED_ASSIGN_REQ *)(ptr))->radio_freq = ((T_MPHC_IMMED_ASSIGN_REQ *)(msg->SigP))->channel_desc.chan_sel.rf_channel.single_rf.radio_freq; - ((T_TR_MPHC_IMMED_ASSIGN_REQ *)(ptr))->channel_type = ((T_MPHC_IMMED_ASSIGN_REQ *)(msg->SigP))->channel_desc.channel_type; - ((T_TR_MPHC_IMMED_ASSIGN_REQ *)(ptr))->subchannel = ((T_MPHC_IMMED_ASSIGN_REQ *)(msg->SigP))->channel_desc.subchannel; - ((T_TR_MPHC_IMMED_ASSIGN_REQ *)(ptr))->timeslot_no = ((T_MPHC_IMMED_ASSIGN_REQ *)(msg->SigP))->channel_desc.timeslot_no; - ((T_TR_MPHC_IMMED_ASSIGN_REQ *)(ptr))->tsc = ((T_MPHC_IMMED_ASSIGN_REQ *)(msg->SigP))->channel_desc.tsc; - ((T_TR_MPHC_IMMED_ASSIGN_REQ *)(ptr))->timing_advance = ((T_MPHC_IMMED_ASSIGN_REQ *)(msg->SigP))->timing_advance; - ((T_TR_MPHC_IMMED_ASSIGN_REQ *)(ptr))->rf_chan_cnt = ((T_MPHC_IMMED_ASSIGN_REQ *)(msg->SigP))->frequency_list.rf_chan_cnt; - ((T_TR_MPHC_IMMED_ASSIGN_REQ *)(ptr))->starting_time_present = ((T_MPHC_IMMED_ASSIGN_REQ *)(msg->SigP))->starting_time.start_time_present; - ((T_TR_MPHC_IMMED_ASSIGN_REQ *)(ptr))->n32 = ((T_MPHC_IMMED_ASSIGN_REQ *)(msg->SigP))->starting_time.start_time.n32; - ((T_TR_MPHC_IMMED_ASSIGN_REQ *)(ptr))->n51 = ((T_MPHC_IMMED_ASSIGN_REQ *)(msg->SigP))->starting_time.start_time.n51; - ((T_TR_MPHC_IMMED_ASSIGN_REQ *)(ptr))->n26 = ((T_MPHC_IMMED_ASSIGN_REQ *)(msg->SigP))->starting_time.start_time.n26; - ((T_TR_MPHC_IMMED_ASSIGN_REQ *)(ptr))->bef_sti_rf_chan_cnt = ((T_MPHC_IMMED_ASSIGN_REQ *)(msg->SigP))->frequency_list_bef_sti.rf_chan_cnt; - ((T_TR_MPHC_IMMED_ASSIGN_REQ *)(ptr))->dtx_allowed = ((T_MPHC_IMMED_ASSIGN_REQ *)(msg->SigP))->dtx_allowed; - ((T_TR_MPHC_IMMED_ASSIGN_REQ *)(ptr))->pwrc = ((T_MPHC_IMMED_ASSIGN_REQ *)(msg->SigP))->pwrc; - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MPHC_IMMED_ASSIGN_REQ)); - } - } - break; - - case MPHC_IMMED_ASSIGN_CON: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MPHC_IMMED_ASSIGN_CON), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MPHC_IMMED_ASSIGN_CON *)(ptr))->header = TRL1_MPHC_IMMED_ASSIGN_CON | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MPHC_IMMED_ASSIGN_CON)); - } - } - break; - - // Channel assignment - - case MPHC_CHANNEL_ASSIGN_REQ: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MPHC_CHANNEL_ASSIGN_REQ), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - ((T_TR_MPHC_CHANNEL_ASSIGN_REQ *)(ptr))->header = TRL1_MPHC_CHANNEL_ASSIGN_REQ | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_MPHC_CHANNEL_ASSIGN_REQ *)(ptr))->h = ((T_MPHC_CHANNEL_ASSIGN_REQ *)(msg->SigP))->channel_desc_1.chan_sel.h; - ((T_TR_MPHC_CHANNEL_ASSIGN_REQ *)(ptr))->radio_freq = ((T_MPHC_CHANNEL_ASSIGN_REQ *)(msg->SigP))->channel_desc_1.chan_sel.rf_channel.single_rf.radio_freq; - ((T_TR_MPHC_CHANNEL_ASSIGN_REQ *)(ptr))->channel_type = ((T_MPHC_CHANNEL_ASSIGN_REQ *)(msg->SigP))->channel_desc_1.channel_type; - ((T_TR_MPHC_CHANNEL_ASSIGN_REQ *)(ptr))->subchannel = ((T_MPHC_CHANNEL_ASSIGN_REQ *)(msg->SigP))->channel_desc_1.subchannel; - ((T_TR_MPHC_CHANNEL_ASSIGN_REQ *)(ptr))->timeslot_no = ((T_MPHC_CHANNEL_ASSIGN_REQ *)(msg->SigP))->channel_desc_1.timeslot_no; - ((T_TR_MPHC_CHANNEL_ASSIGN_REQ *)(ptr))->tsc = ((T_MPHC_CHANNEL_ASSIGN_REQ *)(msg->SigP))->channel_desc_1.tsc; - ((T_TR_MPHC_CHANNEL_ASSIGN_REQ *)(ptr))->channel_mode_1 = ((T_MPHC_CHANNEL_ASSIGN_REQ *)(msg->SigP))->channel_mode_1; - ((T_TR_MPHC_CHANNEL_ASSIGN_REQ *)(ptr))->txpwr = ((T_MPHC_CHANNEL_ASSIGN_REQ *)(msg->SigP))->txpwr; - ((T_TR_MPHC_CHANNEL_ASSIGN_REQ *)(ptr))->rf_chan_cnt = ((T_MPHC_CHANNEL_ASSIGN_REQ *)(msg->SigP))->frequency_list.rf_chan_cnt; - ((T_TR_MPHC_CHANNEL_ASSIGN_REQ *)(ptr))->starting_time_present = ((T_MPHC_CHANNEL_ASSIGN_REQ *)(msg->SigP))->starting_time.start_time_present; - ((T_TR_MPHC_CHANNEL_ASSIGN_REQ *)(ptr))->n32 = ((T_MPHC_CHANNEL_ASSIGN_REQ *)(msg->SigP))->starting_time.start_time.n32; - ((T_TR_MPHC_CHANNEL_ASSIGN_REQ *)(ptr))->n51 = ((T_MPHC_CHANNEL_ASSIGN_REQ *)(msg->SigP))->starting_time.start_time.n51; - ((T_TR_MPHC_CHANNEL_ASSIGN_REQ *)(ptr))->n26 = ((T_MPHC_CHANNEL_ASSIGN_REQ *)(msg->SigP))->starting_time.start_time.n26; - ((T_TR_MPHC_CHANNEL_ASSIGN_REQ *)(ptr))->bef_sti_rf_chan_cnt = ((T_MPHC_CHANNEL_ASSIGN_REQ *)(msg->SigP))->frequency_list_bef_sti.rf_chan_cnt; - ((T_TR_MPHC_CHANNEL_ASSIGN_REQ *)(ptr))->cipher_mode = ((T_MPHC_CHANNEL_ASSIGN_REQ *)(msg->SigP))->cipher_mode; - ((T_TR_MPHC_CHANNEL_ASSIGN_REQ *)(ptr))->a5_algorithm = ((T_MPHC_CHANNEL_ASSIGN_REQ *)(msg->SigP))->a5_algorithm; - ((T_TR_MPHC_CHANNEL_ASSIGN_REQ *)(ptr))->dtx_allowed = ((T_MPHC_CHANNEL_ASSIGN_REQ *)(msg->SigP))->dtx_allowed; - - #if (AMR == 1) - ((T_TR_MPHC_CHANNEL_ASSIGN_REQ *)(ptr))->noise_suppression_bit = ((T_MPHC_CHANNEL_ASSIGN_REQ *)(msg->SigP))->amr_configuration.noise_suppression_bit; - ((T_TR_MPHC_CHANNEL_ASSIGN_REQ *)(ptr))->initial_codec_mode_indicator = ((T_MPHC_CHANNEL_ASSIGN_REQ *)(msg->SigP))->amr_configuration.initial_codec_mode_indicator; - ((T_TR_MPHC_CHANNEL_ASSIGN_REQ *)(ptr))->initial_codec_mode = ((T_MPHC_CHANNEL_ASSIGN_REQ *)(msg->SigP))->amr_configuration.initial_codec_mode; - ((T_TR_MPHC_CHANNEL_ASSIGN_REQ *)(ptr))->active_codec_set = ((T_MPHC_CHANNEL_ASSIGN_REQ *)(msg->SigP))->amr_configuration.active_codec_set; - ((T_TR_MPHC_CHANNEL_ASSIGN_REQ *)(ptr))->threshold[0] = ((T_MPHC_CHANNEL_ASSIGN_REQ *)(msg->SigP))->amr_configuration.threshold[0]; - ((T_TR_MPHC_CHANNEL_ASSIGN_REQ *)(ptr))->threshold[1] = ((T_MPHC_CHANNEL_ASSIGN_REQ *)(msg->SigP))->amr_configuration.threshold[1]; - ((T_TR_MPHC_CHANNEL_ASSIGN_REQ *)(ptr))->threshold[2] = ((T_MPHC_CHANNEL_ASSIGN_REQ *)(msg->SigP))->amr_configuration.threshold[2]; - ((T_TR_MPHC_CHANNEL_ASSIGN_REQ *)(ptr))->hysteresis[0] = ((T_MPHC_CHANNEL_ASSIGN_REQ *)(msg->SigP))->amr_configuration.hysteresis[0]; - ((T_TR_MPHC_CHANNEL_ASSIGN_REQ *)(ptr))->hysteresis[1] = ((T_MPHC_CHANNEL_ASSIGN_REQ *)(msg->SigP))->amr_configuration.hysteresis[1]; - ((T_TR_MPHC_CHANNEL_ASSIGN_REQ *)(ptr))->hysteresis[2] = ((T_MPHC_CHANNEL_ASSIGN_REQ *)(msg->SigP))->amr_configuration.hysteresis[2]; - #endif - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MPHC_CHANNEL_ASSIGN_REQ)); - } - } - break; - - case MPHC_CHANNEL_ASSIGN_CON: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MPHC_CHANNEL_ASSIGN_CON), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MPHC_CHANNEL_ASSIGN_CON *)(ptr))->header = TRL1_MPHC_CHANNEL_ASSIGN_CON | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MPHC_CHANNEL_ASSIGN_CON)); - } - } - break; - - // SACCH reception - - case L1C_SACCH_INFO: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_L1C_SACCH_INFO), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_L1C_SACCH_INFO *)(ptr))->header = TRL1_L1C_SACCH_INFO | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_L1C_SACCH_INFO *)(ptr))->error_cause = ((T_PH_DATA_IND *)(msg->SigP))->error_cause; - ((T_TR_L1C_SACCH_INFO *)(ptr))->rf_chan_num = ((T_PH_DATA_IND *)(msg->SigP))->rf_chan_num; - ((T_TR_L1C_SACCH_INFO *)(ptr))->beacon_input_level = l1a_l1s_com.Scell_info.traffic_meas_beacon.input_level; - ((T_TR_L1C_SACCH_INFO *)(ptr))->input_level = l1a_l1s_com.Scell_info.traffic_meas.input_level; - ((T_TR_L1C_SACCH_INFO *)(ptr))->tpu_offset = l1s.tpu_offset; - ((T_TR_L1C_SACCH_INFO *)(ptr))->afc = l1s.afc; - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_L1C_SACCH_INFO)); - } - } - break; - - // Channel modification - - case MPHC_CHANGE_FREQUENCY: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MPHC_CHANGE_FREQUENCY), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MPHC_CHANGE_FREQUENCY *)(ptr))->header = TRL1_MPHC_CHANGE_FREQUENCY | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_MPHC_CHANGE_FREQUENCY *)(ptr))->h = ((T_MPHC_CHANGE_FREQUENCY *)(msg->SigP))->channel_desc.chan_sel.h; - ((T_TR_MPHC_CHANGE_FREQUENCY *)(ptr))->radio_freq = ((T_MPHC_CHANGE_FREQUENCY *)(msg->SigP))->channel_desc.chan_sel.rf_channel.single_rf.radio_freq; - ((T_TR_MPHC_CHANGE_FREQUENCY *)(ptr))->channel_type = ((T_MPHC_CHANGE_FREQUENCY *)(msg->SigP))->channel_desc.channel_type; - ((T_TR_MPHC_CHANGE_FREQUENCY *)(ptr))->subchannel = ((T_MPHC_CHANGE_FREQUENCY *)(msg->SigP))->channel_desc.subchannel; - ((T_TR_MPHC_CHANGE_FREQUENCY *)(ptr))->timeslot_no = ((T_MPHC_CHANGE_FREQUENCY *)(msg->SigP))->channel_desc.timeslot_no; - ((T_TR_MPHC_CHANGE_FREQUENCY *)(ptr))->tsc = ((T_MPHC_CHANGE_FREQUENCY *)(msg->SigP))->channel_desc.tsc; - ((T_TR_MPHC_CHANGE_FREQUENCY *)(ptr))->rf_chan_cnt = ((T_MPHC_CHANGE_FREQUENCY *)(msg->SigP))->frequency_list.rf_chan_cnt; - ((T_TR_MPHC_CHANGE_FREQUENCY *)(ptr))->start_time_present = ((T_MPHC_CHANGE_FREQUENCY *)(msg->SigP))->starting_time.start_time_present; - ((T_TR_MPHC_CHANGE_FREQUENCY *)(ptr))->n32 = ((T_MPHC_CHANGE_FREQUENCY *)(msg->SigP))->starting_time.start_time.n32; - ((T_TR_MPHC_CHANGE_FREQUENCY *)(ptr))->n51 = ((T_MPHC_CHANGE_FREQUENCY *)(msg->SigP))->starting_time.start_time.n51; - ((T_TR_MPHC_CHANGE_FREQUENCY *)(ptr))->n26 = ((T_MPHC_CHANGE_FREQUENCY *)(msg->SigP))->starting_time.start_time.n26; - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MPHC_CHANGE_FREQUENCY)); - } - } - break; - - case L1C_REDEF_DONE: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_L1C_REDEF_DONE), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_L1C_REDEF_DONE *)(ptr))->header = TRL1_L1C_REDEF_DONE | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_L1C_REDEF_DONE)); - } - } - break; - - case MPHC_CHANNEL_MODE_MODIFY_REQ: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MPHC_CHANNEL_MODE_MODIFY_REQ), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - ((T_TR_MPHC_CHANNEL_MODE_MODIFY_REQ *)(ptr))->header = TRL1_MPHC_CHANNEL_MODE_MODIFY_REQ | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_MPHC_CHANNEL_MODE_MODIFY_REQ *)(ptr))->subchannel = ((T_MPHC_CHANNEL_MODE_MODIFY_REQ *)(msg->SigP))->subchannel; - ((T_TR_MPHC_CHANNEL_MODE_MODIFY_REQ *)(ptr))->channel_mode = ((T_MPHC_CHANNEL_MODE_MODIFY_REQ *)(msg->SigP))->channel_mode; - - #if (AMR == 1) - ((T_TR_MPHC_CHANNEL_MODE_MODIFY_REQ *)(ptr))->noise_suppression_bit = ((T_MPHC_CHANNEL_MODE_MODIFY_REQ *)(msg->SigP))->amr_configuration.noise_suppression_bit; - ((T_TR_MPHC_CHANNEL_MODE_MODIFY_REQ *)(ptr))->initial_codec_mode_indicator = ((T_MPHC_CHANNEL_MODE_MODIFY_REQ *)(msg->SigP))->amr_configuration.initial_codec_mode_indicator; - ((T_TR_MPHC_CHANNEL_MODE_MODIFY_REQ *)(ptr))->initial_codec_mode = ((T_MPHC_CHANNEL_MODE_MODIFY_REQ *)(msg->SigP))->amr_configuration.initial_codec_mode; - ((T_TR_MPHC_CHANNEL_MODE_MODIFY_REQ *)(ptr))->active_codec_set = ((T_MPHC_CHANNEL_MODE_MODIFY_REQ *)(msg->SigP))->amr_configuration.active_codec_set; - ((T_TR_MPHC_CHANNEL_MODE_MODIFY_REQ *)(ptr))->threshold[0] = ((T_MPHC_CHANNEL_MODE_MODIFY_REQ *)(msg->SigP))->amr_configuration.threshold[0]; - ((T_TR_MPHC_CHANNEL_MODE_MODIFY_REQ *)(ptr))->threshold[1] = ((T_MPHC_CHANNEL_MODE_MODIFY_REQ *)(msg->SigP))->amr_configuration.threshold[1]; - ((T_TR_MPHC_CHANNEL_MODE_MODIFY_REQ *)(ptr))->threshold[2] = ((T_MPHC_CHANNEL_MODE_MODIFY_REQ *)(msg->SigP))->amr_configuration.threshold[2]; - ((T_TR_MPHC_CHANNEL_MODE_MODIFY_REQ *)(ptr))->hysteresis[0] = ((T_MPHC_CHANNEL_MODE_MODIFY_REQ *)(msg->SigP))->amr_configuration.hysteresis[0]; - ((T_TR_MPHC_CHANNEL_MODE_MODIFY_REQ *)(ptr))->hysteresis[1] = ((T_MPHC_CHANNEL_MODE_MODIFY_REQ *)(msg->SigP))->amr_configuration.hysteresis[1]; - ((T_TR_MPHC_CHANNEL_MODE_MODIFY_REQ *)(ptr))->hysteresis[2] = ((T_MPHC_CHANNEL_MODE_MODIFY_REQ *)(msg->SigP))->amr_configuration.hysteresis[2]; - #endif - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MPHC_CHANNEL_MODE_MODIFY_REQ)); - } - } - break; - - // Ciphering - - case MPHC_SET_CIPHERING_REQ: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MPHC_SET_CIPHERING_REQ), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MPHC_SET_CIPHERING_REQ *)(ptr))->header = TRL1_MPHC_SET_CIPHERING_REQ | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_MPHC_SET_CIPHERING_REQ *)(ptr))->cipher_mode = ((T_MPHC_SET_CIPHERING_REQ *)(msg->SigP))->cipher_mode; - ((T_TR_MPHC_SET_CIPHERING_REQ *)(ptr))->a5_algorithm = ((T_MPHC_SET_CIPHERING_REQ *)(msg->SigP))->a5_algorithm; - ((T_TR_MPHC_SET_CIPHERING_REQ *)(ptr))->A[0] = ((T_MPHC_SET_CIPHERING_REQ *)(msg->SigP))->new_ciph_param.A[0]; - ((T_TR_MPHC_SET_CIPHERING_REQ *)(ptr))->A[1] = ((T_MPHC_SET_CIPHERING_REQ *)(msg->SigP))->new_ciph_param.A[1]; - ((T_TR_MPHC_SET_CIPHERING_REQ *)(ptr))->A[2] = ((T_MPHC_SET_CIPHERING_REQ *)(msg->SigP))->new_ciph_param.A[2]; - ((T_TR_MPHC_SET_CIPHERING_REQ *)(ptr))->A[3] = ((T_MPHC_SET_CIPHERING_REQ *)(msg->SigP))->new_ciph_param.A[3]; - ((T_TR_MPHC_SET_CIPHERING_REQ *)(ptr))->A[4] = ((T_MPHC_SET_CIPHERING_REQ *)(msg->SigP))->new_ciph_param.A[4]; - ((T_TR_MPHC_SET_CIPHERING_REQ *)(ptr))->A[5] = ((T_MPHC_SET_CIPHERING_REQ *)(msg->SigP))->new_ciph_param.A[5]; - ((T_TR_MPHC_SET_CIPHERING_REQ *)(ptr))->A[6] = ((T_MPHC_SET_CIPHERING_REQ *)(msg->SigP))->new_ciph_param.A[6]; - ((T_TR_MPHC_SET_CIPHERING_REQ *)(ptr))->A[7] = ((T_MPHC_SET_CIPHERING_REQ *)(msg->SigP))->new_ciph_param.A[7]; - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MPHC_SET_CIPHERING_REQ)); - } - } - break; - - // Generic stop - - case MPHC_STOP_DEDICATED_REQ: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MPHC_STOP_DEDICATED_REQ), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MPHC_STOP_DEDICATED_REQ *)(ptr))->header = TRL1_MPHC_STOP_DEDICATED_REQ | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MPHC_STOP_DEDICATED_REQ)); - } - } - break; - - case MPHC_STOP_DEDICATED_CON: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MPHC_STOP_DEDICATED_CON), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MPHC_STOP_DEDICATED_CON *)(ptr))->header = TRL1_MPHC_STOP_DEDICATED_CON | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MPHC_STOP_DEDICATED_CON)); - } - } - break; - - case L1C_STOP_DEDICATED_DONE: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_L1C_STOP_DEDICATED_DONE), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_L1C_STOP_DEDICATED_DONE *)(ptr))->header = TRL1_L1C_STOP_DEDICATED_DONE | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_L1C_STOP_DEDICATED_DONE)); - } - } - break; - - ////////////// - // HANDOVER // - ////////////// - - // Asynchronous handover request - - case MPHC_ASYNC_HO_REQ: - { - #define msg_aho ((T_MPHC_ASYNC_HO_REQ *)(msg->SigP)) - - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MPHC_ASYNC_HO_REQ), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - ((T_TR_MPHC_ASYNC_HO_REQ *)(ptr))->header = TRL1_MPHC_ASYNC_HO_REQ | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_MPHC_ASYNC_HO_REQ *)(ptr))->ncc = msg_aho->handover_command.cell_description.ncc; - ((T_TR_MPHC_ASYNC_HO_REQ *)(ptr))->bcc = msg_aho->handover_command.cell_description.bcc; - ((T_TR_MPHC_ASYNC_HO_REQ *)(ptr))->bcch_carrier = msg_aho->handover_command.cell_description.bcch_carrier; - ((T_TR_MPHC_ASYNC_HO_REQ *)(ptr))->h = msg_aho->handover_command.channel_desc_1.chan_sel.h; - ((T_TR_MPHC_ASYNC_HO_REQ *)(ptr))->radio_freq = msg_aho->handover_command.channel_desc_1.chan_sel.rf_channel.single_rf.radio_freq; - ((T_TR_MPHC_ASYNC_HO_REQ *)(ptr))->channel_type = msg_aho->handover_command.channel_desc_1.channel_type; - ((T_TR_MPHC_ASYNC_HO_REQ *)(ptr))->subchannel = msg_aho->handover_command.channel_desc_1.subchannel; - ((T_TR_MPHC_ASYNC_HO_REQ *)(ptr))->timeslot_no = msg_aho->handover_command.channel_desc_1.timeslot_no; - ((T_TR_MPHC_ASYNC_HO_REQ *)(ptr))->tsc = msg_aho->handover_command.channel_desc_1.tsc; - ((T_TR_MPHC_ASYNC_HO_REQ *)(ptr))->channel_mode_1 = msg_aho->handover_command.channel_mode_1; - ((T_TR_MPHC_ASYNC_HO_REQ *)(ptr))->txpwr = msg_aho->handover_command.txpwr; - ((T_TR_MPHC_ASYNC_HO_REQ *)(ptr))->rf_chan_cnt = msg_aho->handover_command.frequency_list.rf_chan_cnt; - ((T_TR_MPHC_ASYNC_HO_REQ *)(ptr))->starting_time_present = msg_aho->handover_command.starting_time.start_time_present; - ((T_TR_MPHC_ASYNC_HO_REQ *)(ptr))->n32 = msg_aho->handover_command.starting_time.start_time.n32; - ((T_TR_MPHC_ASYNC_HO_REQ *)(ptr))->n51 = msg_aho->handover_command.starting_time.start_time.n51; - ((T_TR_MPHC_ASYNC_HO_REQ *)(ptr))->n26 = msg_aho->handover_command.starting_time.start_time.n26; - ((T_TR_MPHC_ASYNC_HO_REQ *)(ptr))->ho_acc = msg_aho->handover_command.ho_acc; - ((T_TR_MPHC_ASYNC_HO_REQ *)(ptr))->report_time_diff = msg_aho->handover_command.report_time_diff; - ((T_TR_MPHC_ASYNC_HO_REQ *)(ptr))->bef_sti_rf_chan_cnt = msg_aho->handover_command.frequency_list_bef_sti.rf_chan_cnt; - ((T_TR_MPHC_ASYNC_HO_REQ *)(ptr))->cipher_mode = msg_aho->handover_command.cipher_mode; - ((T_TR_MPHC_ASYNC_HO_REQ *)(ptr))->a5_algorithm = msg_aho->handover_command.a5_algorithm; - ((T_TR_MPHC_ASYNC_HO_REQ *)(ptr))->fn_offset = msg_aho->fn_offset; - ((T_TR_MPHC_ASYNC_HO_REQ *)(ptr))->time_alignmt = msg_aho->time_alignmt; - - #if (AMR == 1) - ((T_TR_MPHC_ASYNC_HO_REQ *)(ptr))->noise_suppression_bit = msg_aho->amr_configuration.noise_suppression_bit; - ((T_TR_MPHC_ASYNC_HO_REQ *)(ptr))->initial_codec_mode_indicator = msg_aho->amr_configuration.initial_codec_mode_indicator; - ((T_TR_MPHC_ASYNC_HO_REQ *)(ptr))->initial_codec_mode = msg_aho->amr_configuration.initial_codec_mode; - ((T_TR_MPHC_ASYNC_HO_REQ *)(ptr))->active_codec_set = msg_aho->amr_configuration.active_codec_set; - ((T_TR_MPHC_ASYNC_HO_REQ *)(ptr))->threshold[0] = msg_aho->amr_configuration.threshold[0]; - ((T_TR_MPHC_ASYNC_HO_REQ *)(ptr))->threshold[1] = msg_aho->amr_configuration.threshold[1]; - ((T_TR_MPHC_ASYNC_HO_REQ *)(ptr))->threshold[2] = msg_aho->amr_configuration.threshold[2]; - ((T_TR_MPHC_ASYNC_HO_REQ *)(ptr))->hysteresis[0] = msg_aho->amr_configuration.hysteresis[0]; - ((T_TR_MPHC_ASYNC_HO_REQ *)(ptr))->hysteresis[1] = msg_aho->amr_configuration.hysteresis[1]; - ((T_TR_MPHC_ASYNC_HO_REQ *)(ptr))->hysteresis[2] = msg_aho->amr_configuration.hysteresis[2]; - #endif - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MPHC_ASYNC_HO_REQ)); - } - } - break; - - case MPHC_ASYNC_HO_CON: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MPHC_ASYNC_HO_CON), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MPHC_ASYNC_HO_CON *)(ptr))->header = TRL1_MPHC_ASYNC_HO_CON | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MPHC_ASYNC_HO_CON)); - } - } - break; - - // Synchronous handover request - - case MPHC_SYNC_HO_REQ: - case MPHC_PRE_SYNC_HO_REQ: - case MPHC_PSEUDO_SYNC_HO_REQ: - { - #define msg_sho ((T_MPHC_SYNC_HO_REQ *)(msg->SigP)) - - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MPHC_SYNC_HO_REQ), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - ((T_TR_MPHC_SYNC_HO_REQ *)(ptr))->header = TRL1_MPHC_SYNC_HO_REQ | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_MPHC_SYNC_HO_REQ *)(ptr))->ncc = msg_sho->handover_command.cell_description.ncc; - ((T_TR_MPHC_SYNC_HO_REQ *)(ptr))->bcc = msg_sho->handover_command.cell_description.bcc; - ((T_TR_MPHC_SYNC_HO_REQ *)(ptr))->bcch_carrier = msg_sho->handover_command.cell_description.bcch_carrier; - ((T_TR_MPHC_SYNC_HO_REQ *)(ptr))->h = msg_sho->handover_command.channel_desc_1.chan_sel.h; - ((T_TR_MPHC_SYNC_HO_REQ *)(ptr))->radio_freq = msg_sho->handover_command.channel_desc_1.chan_sel.rf_channel.single_rf.radio_freq; - ((T_TR_MPHC_SYNC_HO_REQ *)(ptr))->channel_type = msg_sho->handover_command.channel_desc_1.channel_type; - ((T_TR_MPHC_SYNC_HO_REQ *)(ptr))->subchannel = msg_sho->handover_command.channel_desc_1.subchannel; - ((T_TR_MPHC_SYNC_HO_REQ *)(ptr))->timeslot_no = msg_sho->handover_command.channel_desc_1.timeslot_no; - ((T_TR_MPHC_SYNC_HO_REQ *)(ptr))->tsc = msg_sho->handover_command.channel_desc_1.tsc; - ((T_TR_MPHC_SYNC_HO_REQ *)(ptr))->channel_mode_1 = msg_sho->handover_command.channel_mode_1; - ((T_TR_MPHC_SYNC_HO_REQ *)(ptr))->txpwr = msg_sho->handover_command.txpwr; - ((T_TR_MPHC_SYNC_HO_REQ *)(ptr))->rf_chan_cnt = msg_sho->handover_command.frequency_list.rf_chan_cnt; - ((T_TR_MPHC_SYNC_HO_REQ *)(ptr))->starting_time_present = msg_sho->handover_command.starting_time.start_time_present; - ((T_TR_MPHC_SYNC_HO_REQ *)(ptr))->n32 = msg_sho->handover_command.starting_time.start_time.n32; - ((T_TR_MPHC_SYNC_HO_REQ *)(ptr))->n51 = msg_sho->handover_command.starting_time.start_time.n51; - ((T_TR_MPHC_SYNC_HO_REQ *)(ptr))->n26 = msg_sho->handover_command.starting_time.start_time.n26; - ((T_TR_MPHC_SYNC_HO_REQ *)(ptr))->ho_acc = msg_sho->handover_command.ho_acc; - ((T_TR_MPHC_SYNC_HO_REQ *)(ptr))->report_time_diff = msg_sho->handover_command.report_time_diff; - ((T_TR_MPHC_SYNC_HO_REQ *)(ptr))->bef_sti_rf_chan_cnt = msg_sho->handover_command.frequency_list_bef_sti.rf_chan_cnt; - ((T_TR_MPHC_SYNC_HO_REQ *)(ptr))->cipher_mode = msg_sho->handover_command.cipher_mode; - ((T_TR_MPHC_SYNC_HO_REQ *)(ptr))->a5_algorithm = msg_sho->handover_command.a5_algorithm; - ((T_TR_MPHC_SYNC_HO_REQ *)(ptr))->fn_offset = msg_sho->fn_offset; - ((T_TR_MPHC_SYNC_HO_REQ *)(ptr))->time_alignmt = msg_sho->time_alignmt; - - #if (AMR == 1) - ((T_TR_MPHC_SYNC_HO_REQ *)(ptr))->noise_suppression_bit = msg_sho->amr_configuration.noise_suppression_bit; - ((T_TR_MPHC_SYNC_HO_REQ *)(ptr))->initial_codec_mode_indicator = msg_sho->amr_configuration.initial_codec_mode_indicator; - ((T_TR_MPHC_SYNC_HO_REQ *)(ptr))->initial_codec_mode = msg_sho->amr_configuration.initial_codec_mode; - ((T_TR_MPHC_SYNC_HO_REQ *)(ptr))->active_codec_set = msg_sho->amr_configuration.active_codec_set; - ((T_TR_MPHC_SYNC_HO_REQ *)(ptr))->threshold[0] = msg_sho->amr_configuration.threshold[0]; - ((T_TR_MPHC_SYNC_HO_REQ *)(ptr))->threshold[1] = msg_sho->amr_configuration.threshold[1]; - ((T_TR_MPHC_SYNC_HO_REQ *)(ptr))->threshold[2] = msg_sho->amr_configuration.threshold[2]; - ((T_TR_MPHC_SYNC_HO_REQ *)(ptr))->hysteresis[0] = msg_sho->amr_configuration.hysteresis[0]; - ((T_TR_MPHC_SYNC_HO_REQ *)(ptr))->hysteresis[1] = msg_sho->amr_configuration.hysteresis[1]; - ((T_TR_MPHC_SYNC_HO_REQ *)(ptr))->hysteresis[2] = msg_sho->amr_configuration.hysteresis[2]; - #endif - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MPHC_SYNC_HO_REQ)); - } - } - break; - - case MPHC_SYNC_HO_CON: - case MPHC_PRE_SYNC_HO_CON: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MPHC_SYNC_HO_CON), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MPHC_SYNC_HO_CON *)(ptr))->header = TRL1_MPHC_SYNC_HO_CON | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MPHC_SYNC_HO_CON)); - } - } - break; - - case L1C_HANDOVER_FINISHED: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_L1C_HANDOVER_FINISHED), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_L1C_HANDOVER_FINISHED *)(ptr))->header = TRL1_L1C_HANDOVER_FINISHED | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_L1C_HANDOVER_FINISHED *)(ptr))->cause = ((T_MPHC_HANDOVER_FINISHED *)(msg->SigP))->cause; -#if ((REL99 == 1) && (FF_BHO == 1)) - ((T_TR_L1C_HANDOVER_FINISHED *)(ptr))->fn_offset = ((T_MPHC_HANDOVER_FINISHED *)(msg->SigP))->fn_offset; - ((T_TR_L1C_HANDOVER_FINISHED *)(ptr))->time_alignment = ((T_MPHC_HANDOVER_FINISHED *)(msg->SigP))->time_alignment; -#endif - L1_send_trace_no_cpy(ptr,sizeof(T_TR_L1C_HANDOVER_FINISHED)); - } - } - break; - - case MPHC_TA_FAIL_IND: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MPHC_TA_FAIL_IND), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MPHC_TA_FAIL_IND *)(ptr))->header = TRL1_MPHC_TA_FAIL_IND | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MPHC_TA_FAIL_IND)); - } - } - break; - - // Handover failure - - case MPHC_HANDOVER_FAIL_REQ: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MPHC_HANDOVER_FAIL_REQ), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MPHC_HANDOVER_FAIL_REQ *)(ptr))->header = TRL1_MPHC_HANDOVER_FAIL_REQ | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MPHC_HANDOVER_FAIL_REQ)); - } - } - break; - - case MPHC_HANDOVER_FAIL_CON: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MPHC_HANDOVER_FAIL_CON), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MPHC_HANDOVER_FAIL_CON *)(ptr))->header = TRL1_MPHC_HANDOVER_FAIL_CON | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MPHC_HANDOVER_FAIL_CON)); - } - } - break; - - ////////////////// - // Measurements // - ////////////////// - - // Cell selection / PLMN selection / Extended measurements - - case MPHC_RXLEV_REQ: - { - char *ptr; - - trace_info.rxlev_req_count ++; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MPHC_RXLEV_REQ), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MPHC_RXLEV_REQ *)(ptr))->header = TRL1_MPHC_RXLEV_REQ | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_MPHC_RXLEV_REQ *)(ptr))->power_array_size = ((T_MPHC_RXLEV_REQ *)(msg->SigP))->power_array_size; - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MPHC_RXLEV_REQ)); - } - } - break; - - case MPHC_STOP_RXLEV_REQ: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MPHC_STOP_RXLEV_REQ), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MPHC_STOP_RXLEV_REQ *)(ptr))->header = TRL1_MPHC_STOP_RXLEV_REQ | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MPHC_STOP_RXLEV_REQ)); - } - } - break; - - case L1C_VALID_MEAS_INFO: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_L1C_VALID_MEAS_INFO), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - ((T_TR_L1C_VALID_MEAS_INFO *)(ptr))->header = TRL1_L1C_VALID_MEAS_INFO | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_L1C_VALID_MEAS_INFO *)(ptr))->power_array_size = l1a_l1s_com.full_list_ptr->power_array_size; - ((T_TR_L1C_VALID_MEAS_INFO *)(ptr))->rxlev_req_count = trace_info.rxlev_req_count; - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_L1C_VALID_MEAS_INFO)); - } - - if (trace_info.rxlev_req_count == 5) - { - trace_info.rxlev_req_count = 0; - - if (trace_info.current_config->l1_dyn_trace & 1<<L1_DYN_TRACE_FULL_LIST_REPORT) - { - UWORD16 index = 0; - UWORD16 size = l1a_l1s_com.full_list_ptr->power_array_size * 4; - UWORD8 i; - - while (size > 0) - { - UWORD16 item_size = size; - - // Split buffer in several buffers with size inferior to 240 (RVT limitation to 255) - // Header not inluded (+8b) - if (item_size > 240) item_size = 240; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, item_size + sizeof(T_TR_FULL_LIST_REPORT) - sizeof(UWORD32), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - ((T_TR_FULL_LIST_REPORT *)(ptr))->header = TRL1_FULL_LIST_REPORT | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_FULL_LIST_REPORT *)(ptr))->size = (item_size >> 2); - - for (i=0; i<(item_size >> 2); i++) - { - ((T_TR_FULL_LIST_REPORT *)(ptr))->content[i] = l1a_l1s_com.full_list_ptr->power_array[index].radio_freq; - ((T_TR_FULL_LIST_REPORT *)(ptr))->content[i] |= l1a_l1s_com.full_list_ptr->power_array[index].accum_power_result << 16; - index++; - } - - size -= item_size; - - L1_send_trace_no_cpy(ptr,item_size + sizeof(T_TR_FULL_LIST_REPORT) - sizeof(UWORD32)); - } - else - break; - } - } - } // 5th attempt - } - break; - - // Idle mode BA list - - case MPHC_RXLEV_PERIODIC_REQ: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MPHC_RXLEV_PERIODIC_REQ), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MPHC_RXLEV_PERIODIC_REQ *)(ptr))->header = TRL1_MPHC_RXLEV_PERIODIC_REQ | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_MPHC_RXLEV_PERIODIC_REQ *)(ptr))->num_of_chans = ((T_MPHC_RXLEV_PERIODIC_REQ *)(msg->SigP))->num_of_chans; - ((T_TR_MPHC_RXLEV_PERIODIC_REQ *)(ptr))->ba_id = ((T_MPHC_RXLEV_PERIODIC_REQ *)(msg->SigP))->ba_id; - ((T_TR_MPHC_RXLEV_PERIODIC_REQ *)(ptr))->next_radio_freq_measured = ((T_MPHC_RXLEV_PERIODIC_REQ *)(msg->SigP))->next_radio_freq_measured; - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MPHC_RXLEV_PERIODIC_REQ)); - } - } - break; - - case MPHC_STOP_RXLEV_PERIODIC_REQ: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MPHC_STOP_RXLEV_PERIODIC_REQ), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MPHC_STOP_RXLEV_PERIODIC_REQ *)(ptr))->header = TRL1_MPHC_STOP_RXLEV_PERIODIC_REQ | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MPHC_STOP_RXLEV_PERIODIC_REQ)); - } - } - break; - - case L1C_RXLEV_PERIODIC_DONE: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_L1C_RXLEV_PERIODIC_DONE), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_L1C_RXLEV_PERIODIC_DONE *)(ptr))->header = TRL1_L1C_RXLEV_PERIODIC_DONE | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_L1C_RXLEV_PERIODIC_DONE *)(ptr))->ba_id = ((T_MPHC_RXLEV_PERIODIC_IND *)(msg->SigP))->ba_id; - ((T_TR_L1C_RXLEV_PERIODIC_DONE *)(ptr))->s_rxlev = ((T_MPHC_RXLEV_PERIODIC_IND *)(msg->SigP))->s_rxlev; - ((T_TR_L1C_RXLEV_PERIODIC_DONE *)(ptr))->radio_freq_no[0] = ((T_MPHC_RXLEV_PERIODIC_IND *)(msg->SigP))->A[0].radio_freq_no; - ((T_TR_L1C_RXLEV_PERIODIC_DONE *)(ptr))->radio_freq_no[1] = ((T_MPHC_RXLEV_PERIODIC_IND *)(msg->SigP))->A[1].radio_freq_no; - ((T_TR_L1C_RXLEV_PERIODIC_DONE *)(ptr))->radio_freq_no[2] = ((T_MPHC_RXLEV_PERIODIC_IND *)(msg->SigP))->A[2].radio_freq_no; - ((T_TR_L1C_RXLEV_PERIODIC_DONE *)(ptr))->radio_freq_no[3] = ((T_MPHC_RXLEV_PERIODIC_IND *)(msg->SigP))->A[3].radio_freq_no; - ((T_TR_L1C_RXLEV_PERIODIC_DONE *)(ptr))->radio_freq_no[4] = ((T_MPHC_RXLEV_PERIODIC_IND *)(msg->SigP))->A[4].radio_freq_no; - ((T_TR_L1C_RXLEV_PERIODIC_DONE *)(ptr))->radio_freq_no[5] = ((T_MPHC_RXLEV_PERIODIC_IND *)(msg->SigP))->A[5].radio_freq_no; - ((T_TR_L1C_RXLEV_PERIODIC_DONE *)(ptr))->radio_freq_no[6] = ((T_MPHC_RXLEV_PERIODIC_IND *)(msg->SigP))->A[6].radio_freq_no; - ((T_TR_L1C_RXLEV_PERIODIC_DONE *)(ptr))->radio_freq_no[7] = ((T_MPHC_RXLEV_PERIODIC_IND *)(msg->SigP))->A[7].radio_freq_no; - ((T_TR_L1C_RXLEV_PERIODIC_DONE *)(ptr))->rxlev[0] = ((T_MPHC_RXLEV_PERIODIC_IND *)(msg->SigP))->A[0].rxlev; - ((T_TR_L1C_RXLEV_PERIODIC_DONE *)(ptr))->rxlev[1] = ((T_MPHC_RXLEV_PERIODIC_IND *)(msg->SigP))->A[1].rxlev; - ((T_TR_L1C_RXLEV_PERIODIC_DONE *)(ptr))->rxlev[2] = ((T_MPHC_RXLEV_PERIODIC_IND *)(msg->SigP))->A[2].rxlev; - ((T_TR_L1C_RXLEV_PERIODIC_DONE *)(ptr))->rxlev[3] = ((T_MPHC_RXLEV_PERIODIC_IND *)(msg->SigP))->A[3].rxlev; - ((T_TR_L1C_RXLEV_PERIODIC_DONE *)(ptr))->rxlev[4] = ((T_MPHC_RXLEV_PERIODIC_IND *)(msg->SigP))->A[4].rxlev; - ((T_TR_L1C_RXLEV_PERIODIC_DONE *)(ptr))->rxlev[5] = ((T_MPHC_RXLEV_PERIODIC_IND *)(msg->SigP))->A[5].rxlev; - ((T_TR_L1C_RXLEV_PERIODIC_DONE *)(ptr))->rxlev[6] = ((T_MPHC_RXLEV_PERIODIC_IND *)(msg->SigP))->A[6].rxlev; - ((T_TR_L1C_RXLEV_PERIODIC_DONE *)(ptr))->rxlev[7] = ((T_MPHC_RXLEV_PERIODIC_IND *)(msg->SigP))->A[7].rxlev; -((T_TR_L1C_RXLEV_PERIODIC_DONE *)(ptr))->qual_acc_idle = ((T_MPHC_RXLEV_PERIODIC_IND *)(msg->SigP))->qual_acc_idle; - ((T_TR_L1C_RXLEV_PERIODIC_DONE *)(ptr))->qual_nbr_meas_idle = ((T_MPHC_RXLEV_PERIODIC_IND *)(msg->SigP))->qual_nbr_meas_idle; - - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_L1C_RXLEV_PERIODIC_DONE)); - } - } - break; - - - // Dedicated mode BA list - - case MPHC_MEAS_REPORT: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_L1C_MEAS_DONE), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_L1C_MEAS_DONE *)(ptr))->header = TRL1_L1C_MEAS_DONE | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_L1C_MEAS_DONE *)(ptr))->meas_valid = ((T_MPHC_MEAS_REPORT *)(msg->SigP))->meas_valid; - ((T_TR_L1C_MEAS_DONE *)(ptr))->txpwr_used = ((T_MPHC_MEAS_REPORT *)(msg->SigP))->txpwr_used; - ((T_TR_L1C_MEAS_DONE *)(ptr))->timing_advance = ((T_MPHC_MEAS_REPORT *)(msg->SigP))->timing_advance; - ((T_TR_L1C_MEAS_DONE *)(ptr))->rxlev_full_acc = ((T_MPHC_MEAS_REPORT *)(msg->SigP))->rxlev_full_acc; - ((T_TR_L1C_MEAS_DONE *)(ptr))->rxlev_full_nbr_meas = ((T_MPHC_MEAS_REPORT *)(msg->SigP))->rxlev_full_nbr_meas; - ((T_TR_L1C_MEAS_DONE *)(ptr))->rxlev_sub_acc = ((T_MPHC_MEAS_REPORT *)(msg->SigP))->rxlev_sub_acc; - ((T_TR_L1C_MEAS_DONE *)(ptr))->rxlev_sub_nbr_meas = ((T_MPHC_MEAS_REPORT *)(msg->SigP))->rxlev_sub_nbr_meas; - ((T_TR_L1C_MEAS_DONE *)(ptr))->rxqual_full_acc_errors = ((T_MPHC_MEAS_REPORT *)(msg->SigP))->rxqual_full_acc_errors; - ((T_TR_L1C_MEAS_DONE *)(ptr))->rxqual_full_nbr_bits = ((T_MPHC_MEAS_REPORT *)(msg->SigP))->rxqual_full_nbr_bits; - ((T_TR_L1C_MEAS_DONE *)(ptr))->rxqual_sub_acc_errors = ((T_MPHC_MEAS_REPORT *)(msg->SigP))->rxqual_sub_acc_errors; - ((T_TR_L1C_MEAS_DONE *)(ptr))->rxqual_sub_nbr_bits = ((T_MPHC_MEAS_REPORT *)(msg->SigP))->rxqual_sub_nbr_bits; - #if(REL99) - #if(FF_EMR) - ((T_TR_L1C_MEAS_DONE *)(ptr))->rxlev_val_acc; = ((T_MPHC_MEAS_REPORT *)(msg->SigP))->rxlev_val_acc; - ((T_TR_L1C_MEAS_DONE *)(ptr))->rxlev_val_nbr_meas; = ((T_MPHC_MEAS_REPORT *)(msg->SigP))->rxlev_val_nbr_meas; - ((T_TR_L1C_MEAS_DONE *)(ptr))->mean_bep_block_acc; = ((T_MPHC_MEAS_REPORT *)(msg->SigP))->mean_bep_block_acc; - ((T_TR_L1C_MEAS_DONE *)(ptr))->cv_bep_block_acc; = ((T_MPHC_MEAS_REPORT *)(msg->SigP))->cv_bep_block_acc; - ((T_TR_L1C_MEAS_DONE *)(ptr))->mean_bep_block_num; = ((T_MPHC_MEAS_REPORT *)(msg->SigP))->mean_bep_block_num; - ((T_TR_L1C_MEAS_DONE *)(ptr))->cv_bep_block_num; = ((T_MPHC_MEAS_REPORT *)(msg->SigP))->cv_bep_block_num; - ((T_TR_L1C_MEAS_DONE *)(ptr))->nbr_rcvd_blocks; = ((T_MPHC_MEAS_REPORT *)(msg->SigP))->nbr_rcvd_blocks; - #endif - #endif - ((T_TR_L1C_MEAS_DONE *)(ptr))->facch_ul_count = ((T_MPHC_MEAS_REPORT *)(msg->SigP))->facch_ul_count; - ((T_TR_L1C_MEAS_DONE *)(ptr))->facch_dl_count = ((T_MPHC_MEAS_REPORT *)(msg->SigP))->facch_dl_count; - ((T_TR_L1C_MEAS_DONE *)(ptr))->bcch_freq[0] = ((T_MPHC_MEAS_REPORT *)(msg->SigP))->ncell_meas.A[0].bcch_freq; - ((T_TR_L1C_MEAS_DONE *)(ptr))->bcch_freq[1] = ((T_MPHC_MEAS_REPORT *)(msg->SigP))->ncell_meas.A[1].bcch_freq; - ((T_TR_L1C_MEAS_DONE *)(ptr))->bcch_freq[2] = ((T_MPHC_MEAS_REPORT *)(msg->SigP))->ncell_meas.A[2].bcch_freq; - ((T_TR_L1C_MEAS_DONE *)(ptr))->bcch_freq[3] = ((T_MPHC_MEAS_REPORT *)(msg->SigP))->ncell_meas.A[3].bcch_freq; - ((T_TR_L1C_MEAS_DONE *)(ptr))->bcch_freq[4] = ((T_MPHC_MEAS_REPORT *)(msg->SigP))->ncell_meas.A[4].bcch_freq; - ((T_TR_L1C_MEAS_DONE *)(ptr))->bcch_freq[5] = ((T_MPHC_MEAS_REPORT *)(msg->SigP))->ncell_meas.A[5].bcch_freq; - ((T_TR_L1C_MEAS_DONE *)(ptr))->rxlev_acc[0] = ((T_MPHC_MEAS_REPORT *)(msg->SigP))->ncell_meas.A[0].rxlev_acc; - ((T_TR_L1C_MEAS_DONE *)(ptr))->rxlev_acc[1] = ((T_MPHC_MEAS_REPORT *)(msg->SigP))->ncell_meas.A[1].rxlev_acc; - ((T_TR_L1C_MEAS_DONE *)(ptr))->rxlev_acc[2] = ((T_MPHC_MEAS_REPORT *)(msg->SigP))->ncell_meas.A[2].rxlev_acc; - ((T_TR_L1C_MEAS_DONE *)(ptr))->rxlev_acc[3] = ((T_MPHC_MEAS_REPORT *)(msg->SigP))->ncell_meas.A[3].rxlev_acc; - ((T_TR_L1C_MEAS_DONE *)(ptr))->rxlev_acc[4] = ((T_MPHC_MEAS_REPORT *)(msg->SigP))->ncell_meas.A[4].rxlev_acc; - ((T_TR_L1C_MEAS_DONE *)(ptr))->rxlev_acc[5] = ((T_MPHC_MEAS_REPORT *)(msg->SigP))->ncell_meas.A[5].rxlev_acc; - ((T_TR_L1C_MEAS_DONE *)(ptr))->rxlev_nbr_meas[0] = ((T_MPHC_MEAS_REPORT *)(msg->SigP))->ncell_meas.A[0].rxlev_nbr_meas; - ((T_TR_L1C_MEAS_DONE *)(ptr))->rxlev_nbr_meas[1] = ((T_MPHC_MEAS_REPORT *)(msg->SigP))->ncell_meas.A[1].rxlev_nbr_meas; - ((T_TR_L1C_MEAS_DONE *)(ptr))->rxlev_nbr_meas[2] = ((T_MPHC_MEAS_REPORT *)(msg->SigP))->ncell_meas.A[2].rxlev_nbr_meas; - ((T_TR_L1C_MEAS_DONE *)(ptr))->rxlev_nbr_meas[3] = ((T_MPHC_MEAS_REPORT *)(msg->SigP))->ncell_meas.A[3].rxlev_nbr_meas; - ((T_TR_L1C_MEAS_DONE *)(ptr))->rxlev_nbr_meas[4] = ((T_MPHC_MEAS_REPORT *)(msg->SigP))->ncell_meas.A[4].rxlev_nbr_meas; - ((T_TR_L1C_MEAS_DONE *)(ptr))->rxlev_nbr_meas[5] = ((T_MPHC_MEAS_REPORT *)(msg->SigP))->ncell_meas.A[5].rxlev_nbr_meas; - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_L1C_MEAS_DONE)); - } - } - break; - - // Update BA list - - case MPHC_UPDATE_BA_LIST: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MPHC_UPDATE_BA_LIST), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MPHC_UPDATE_BA_LIST *)(ptr))->header = TRL1_MPHC_UPDATE_BA_LIST | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_MPHC_UPDATE_BA_LIST *)(ptr))->num_of_chans = ((T_MPHC_UPDATE_BA_LIST *)(msg->SigP))->num_of_chans; - ((T_TR_MPHC_UPDATE_BA_LIST *)(ptr))->pwrc = ((T_MPHC_UPDATE_BA_LIST *)(msg->SigP))->pwrc; - ((T_TR_MPHC_UPDATE_BA_LIST *)(ptr))->dtx_allowed = ((T_MPHC_UPDATE_BA_LIST *)(msg->SigP))->dtx_allowed; - ((T_TR_MPHC_UPDATE_BA_LIST *)(ptr))->ba_id = ((T_MPHC_UPDATE_BA_LIST *)(msg->SigP))->ba_id; - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MPHC_UPDATE_BA_LIST)); - } - } - break; - - #if L1_GPRS - - /********************************************************************************/ - /* PACKET SWITCHED */ - /********************************************************************************/ - - ////////////////////////////// - // Neighbor cell monitoring // - ////////////////////////////// - - // Neighbor PBCCH reading - - case MPHP_NCELL_PBCCH_REQ: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MPHP_NCELL_PBCCH_REQ), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MPHP_NCELL_PBCCH_REQ *)(ptr))->header = TRL1_MPHP_NCELL_PBCCH_REQ | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_MPHP_NCELL_PBCCH_REQ *)(ptr))->bs_pbcch_blks = ((T_MPHP_NCELL_PBCCH_REQ *)(msg->SigP))->bs_pbcch_blks; - ((T_TR_MPHP_NCELL_PBCCH_REQ *)(ptr))->pb = ((T_MPHP_NCELL_PBCCH_REQ *)(msg->SigP))->pb; - ((T_TR_MPHP_NCELL_PBCCH_REQ *)(ptr))->psi1_repeat_period = ((T_MPHP_NCELL_PBCCH_REQ *)(msg->SigP))->psi1_repeat_period; - ((T_TR_MPHP_NCELL_PBCCH_REQ *)(ptr))->relative_position = ((T_MPHP_NCELL_PBCCH_REQ *)(msg->SigP))->relative_position; - ((T_TR_MPHP_NCELL_PBCCH_REQ *)(ptr))->h = ((T_MPHP_NCELL_PBCCH_REQ *)(msg->SigP))->packet_chn_desc.chan_sel.h; - ((T_TR_MPHP_NCELL_PBCCH_REQ *)(ptr))->radio_freq = ((T_MPHP_NCELL_PBCCH_REQ *)(msg->SigP))->packet_chn_desc.chan_sel.rf_channel.single_rf.radio_freq; - ((T_TR_MPHP_NCELL_PBCCH_REQ *)(ptr))->timeslot_no = ((T_MPHP_NCELL_PBCCH_REQ *)(msg->SigP))->packet_chn_desc.timeslot_no; - ((T_TR_MPHP_NCELL_PBCCH_REQ *)(ptr))->tsc = ((T_MPHP_NCELL_PBCCH_REQ *)(msg->SigP))->packet_chn_desc.tsc; - ((T_TR_MPHP_NCELL_PBCCH_REQ *)(ptr))->rf_chan_cnt = ((T_MPHP_NCELL_PBCCH_REQ *)(msg->SigP))->frequency_list.rf_chan_cnt; - ((T_TR_MPHP_NCELL_PBCCH_REQ *)(ptr))->bcch_carrier = ((T_MPHP_NCELL_PBCCH_REQ *)(msg->SigP))->bcch_carrier; - ((T_TR_MPHP_NCELL_PBCCH_REQ *)(ptr))->fn_offset = ((T_MPHP_NCELL_PBCCH_REQ *)(msg->SigP))->fn_offset; - ((T_TR_MPHP_NCELL_PBCCH_REQ *)(ptr))->time_alignment = ((T_MPHP_NCELL_PBCCH_REQ *)(msg->SigP))->time_alignment; - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MPHP_NCELL_PBCCH_REQ)); - } - } - break; - - case MPHP_NCELL_PBCCH_STOP_REQ: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MPHP_NCELL_PBCCH_STOP_REQ), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MPHP_NCELL_PBCCH_STOP_REQ *)(ptr))->header = TRL1_MPHP_NCELL_PBCCH_STOP_REQ | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MPHP_NCELL_PBCCH_STOP_REQ)); - } - } - break; - - case L1P_PBCCHN_INFO: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_L1P_PBCCHN_INFO), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_L1P_PBCCHN_INFO *)(ptr))->header = TRL1_L1P_PBCCHN_INFO | (((T_MPHP_DATA_IND *)(msg->SigP))->fn << TR_HEADER_FN_DELAY); - ((T_TR_L1P_PBCCHN_INFO *)(ptr))->error_flag = ((T_MPHP_DATA_IND *)(msg->SigP))->error_flag; - ((T_TR_L1P_PBCCHN_INFO *)(ptr))->radio_freq = ((T_MPHP_DATA_IND *)(msg->SigP))->radio_freq; - ((T_TR_L1P_PBCCHN_INFO *)(ptr))->relative_position = ((T_MPHP_DATA_IND *)(msg->SigP))->relative_position; - ((T_TR_L1P_PBCCHN_INFO *)(ptr))->input_level = l1a_l1s_com.last_input_level[l1pa_l1ps_com.pbcchn.bcch_carrier - - l1_config.std.radio_freq_index_offset].input_level; - ((T_TR_L1P_PBCCHN_INFO *)(ptr))->tpu_offset = l1s.tpu_offset; - ((T_TR_L1P_PBCCHN_INFO *)(ptr))->afc = l1s.afc; - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_L1P_PBCCHN_INFO)); - } - } - break; - - ////////////////////////////////////////////////////// - // Serving cell normal burst reading in packet idle // - ////////////////////////////////////////////////////// - - // PCCCH reading - - case MPHP_START_PCCCH_REQ: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MPHP_START_PCCCH_REQ), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MPHP_START_PCCCH_REQ *)(ptr))->header = TRL1_MPHP_START_PCCCH_REQ | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_MPHP_START_PCCCH_REQ *)(ptr))->imsimod = ((T_MPHP_START_PCCCH_REQ *)(msg->SigP))->imsimod; - ((T_TR_MPHP_START_PCCCH_REQ *)(ptr))->kcn = ((T_MPHP_START_PCCCH_REQ *)(msg->SigP))->kcn; - ((T_TR_MPHP_START_PCCCH_REQ *)(ptr))->split_pg_cycle = ((T_MPHP_START_PCCCH_REQ *)(msg->SigP))->split_pg_cycle; - ((T_TR_MPHP_START_PCCCH_REQ *)(ptr))->bs_pag_blks_res = ((T_MPHP_START_PCCCH_REQ *)(msg->SigP))->bs_pag_blks_res; - ((T_TR_MPHP_START_PCCCH_REQ *)(ptr))->bs_pbcch_blks = ((T_MPHP_START_PCCCH_REQ *)(msg->SigP))->bs_pbcch_blks; - ((T_TR_MPHP_START_PCCCH_REQ *)(ptr))->pb = ((T_MPHP_START_PCCCH_REQ *)(msg->SigP))->pb; - ((T_TR_MPHP_START_PCCCH_REQ *)(ptr))->page_mode = ((T_MPHP_START_PCCCH_REQ *)(msg->SigP))->page_mode; - ((T_TR_MPHP_START_PCCCH_REQ *)(ptr))->h = ((T_MPHP_START_PCCCH_REQ *)(msg->SigP))->packet_chn_desc.chan_sel.h; - ((T_TR_MPHP_START_PCCCH_REQ *)(ptr))->radio_freq = ((T_MPHP_START_PCCCH_REQ *)(msg->SigP))->packet_chn_desc.chan_sel.rf_channel.single_rf.radio_freq; - ((T_TR_MPHP_START_PCCCH_REQ *)(ptr))->timeslot_no = ((T_MPHP_START_PCCCH_REQ *)(msg->SigP))->packet_chn_desc.timeslot_no; - ((T_TR_MPHP_START_PCCCH_REQ *)(ptr))->tsc = ((T_MPHP_START_PCCCH_REQ *)(msg->SigP))->packet_chn_desc.tsc; - ((T_TR_MPHP_START_PCCCH_REQ *)(ptr))->rf_chan_cnt = ((T_MPHP_START_PCCCH_REQ *)(msg->SigP))->frequency_list.rf_chan_cnt; - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MPHP_START_PCCCH_REQ)); - } - } - break; - - case MPHP_STOP_PCCCH_REQ: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MPHP_STOP_PCCCH_REQ), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MPHP_STOP_PCCCH_REQ *)(ptr))->header = TRL1_MPHP_STOP_PCCCH_REQ; - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MPHP_STOP_PCCCH_REQ)); - } - } - break; - - case L1P_PNP_INFO: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_L1P_PNP_INFO), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_L1P_PNP_INFO *)(ptr))->header = TRL1_L1P_PNP_INFO | (((T_MPHP_DATA_IND *)(msg->SigP))->fn << TR_HEADER_FN_DELAY); - ((T_TR_L1P_PNP_INFO *)(ptr))->error_flag = ((T_MPHP_DATA_IND *)(msg->SigP))->error_flag; - ((T_TR_L1P_PNP_INFO *)(ptr))->radio_freq = ((T_MPHP_DATA_IND *)(msg->SigP))->radio_freq; - ((T_TR_L1P_PNP_INFO *)(ptr))->relative_position = ((T_MPHP_DATA_IND *)(msg->SigP))->relative_position; - ((T_TR_L1P_PNP_INFO *)(ptr))->input_level = l1a_l1s_com.Scell_IL_for_rxlev; - ((T_TR_L1P_PNP_INFO *)(ptr))->tpu_offset = l1s.tpu_offset; - ((T_TR_L1P_PNP_INFO *)(ptr))->afc = l1s.afc; - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_L1P_PNP_INFO)); - } - } - break; - - case L1P_PEP_INFO: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_L1P_PEP_INFO), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_L1P_PEP_INFO *)(ptr))->header = TRL1_L1P_PEP_INFO | (((T_MPHP_DATA_IND *)(msg->SigP))->fn << TR_HEADER_FN_DELAY); - ((T_TR_L1P_PEP_INFO *)(ptr))->error_flag = ((T_MPHP_DATA_IND *)(msg->SigP))->error_flag; - ((T_TR_L1P_PEP_INFO *)(ptr))->radio_freq = ((T_MPHP_DATA_IND *)(msg->SigP))->radio_freq; - ((T_TR_L1P_PEP_INFO *)(ptr))->relative_position = ((T_MPHP_DATA_IND *)(msg->SigP))->relative_position; - ((T_TR_L1P_PEP_INFO *)(ptr))->input_level = l1a_l1s_com.Scell_IL_for_rxlev; - ((T_TR_L1P_PEP_INFO *)(ptr))->tpu_offset = l1s.tpu_offset; - ((T_TR_L1P_PEP_INFO *)(ptr))->afc = l1s.afc; - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_L1P_PEP_INFO)); - } - } - break; - - case L1P_PALLC_INFO: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_L1P_PALLC_INFO), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_L1P_PALLC_INFO *)(ptr))->header = TRL1_L1P_PALLC_INFO | (((T_MPHP_DATA_IND *)(msg->SigP))->fn << TR_HEADER_FN_DELAY); - ((T_TR_L1P_PALLC_INFO *)(ptr))->error_flag = ((T_MPHP_DATA_IND *)(msg->SigP))->error_flag; - ((T_TR_L1P_PALLC_INFO *)(ptr))->radio_freq = ((T_MPHP_DATA_IND *)(msg->SigP))->radio_freq; - ((T_TR_L1P_PALLC_INFO *)(ptr))->relative_position = ((T_MPHP_DATA_IND *)(msg->SigP))->relative_position; - ((T_TR_L1P_PALLC_INFO *)(ptr))->input_level = l1a_l1s_com.Scell_IL_for_rxlev; - ((T_TR_L1P_PALLC_INFO *)(ptr))->tpu_offset = l1s.tpu_offset; - ((T_TR_L1P_PALLC_INFO *)(ptr))->afc = l1s.afc; - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_L1P_PALLC_INFO)); - } - } - break; - - // PBCCH reading - - case MPHP_SCELL_PBCCH_REQ: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MPHP_SCELL_PBCCH_REQ), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MPHP_SCELL_PBCCH_REQ *)(ptr))->header = TRL1_MPHP_SCELL_PBCCH_REQ | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_MPHP_SCELL_PBCCH_REQ *)(ptr))->nbr_psi = ((T_MPHP_SCELL_PBCCH_REQ *)(msg->SigP))->nbr_psi; - ((T_TR_MPHP_SCELL_PBCCH_REQ *)(ptr))->bs_pbcch_blks = ((T_MPHP_SCELL_PBCCH_REQ *)(msg->SigP))->bs_pbcch_blks; - ((T_TR_MPHP_SCELL_PBCCH_REQ *)(ptr))->pb = ((T_MPHP_SCELL_PBCCH_REQ *)(msg->SigP))->pb; - ((T_TR_MPHP_SCELL_PBCCH_REQ *)(ptr))->psi1_repeat_period = ((T_MPHP_SCELL_PBCCH_REQ *)(msg->SigP))->psi1_repeat_period; - ((T_TR_MPHP_SCELL_PBCCH_REQ *)(ptr))->h = ((T_MPHP_SCELL_PBCCH_REQ *)(msg->SigP))->packet_chn_desc.chan_sel.h; - ((T_TR_MPHP_SCELL_PBCCH_REQ *)(ptr))->radio_freq = ((T_MPHP_SCELL_PBCCH_REQ *)(msg->SigP))->packet_chn_desc.chan_sel.rf_channel.single_rf.radio_freq; - ((T_TR_MPHP_SCELL_PBCCH_REQ *)(ptr))->timeslot_no = ((T_MPHP_SCELL_PBCCH_REQ *)(msg->SigP))->packet_chn_desc.timeslot_no; - ((T_TR_MPHP_SCELL_PBCCH_REQ *)(ptr))->tsc = ((T_MPHP_SCELL_PBCCH_REQ *)(msg->SigP))->packet_chn_desc.tsc; - ((T_TR_MPHP_SCELL_PBCCH_REQ *)(ptr))->rf_chan_cnt = ((T_MPHP_SCELL_PBCCH_REQ *)(msg->SigP))->frequency_list.rf_chan_cnt; - ((T_TR_MPHP_SCELL_PBCCH_REQ *)(ptr))->relative_position_array[0] = ((T_MPHP_SCELL_PBCCH_REQ *)(msg->SigP))->relative_position_array[0]; - ((T_TR_MPHP_SCELL_PBCCH_REQ *)(ptr))->relative_position_array[1] = ((T_MPHP_SCELL_PBCCH_REQ *)(msg->SigP))->relative_position_array[1]; - ((T_TR_MPHP_SCELL_PBCCH_REQ *)(ptr))->relative_position_array[2] = ((T_MPHP_SCELL_PBCCH_REQ *)(msg->SigP))->relative_position_array[2]; - ((T_TR_MPHP_SCELL_PBCCH_REQ *)(ptr))->relative_position_array[3] = ((T_MPHP_SCELL_PBCCH_REQ *)(msg->SigP))->relative_position_array[3]; - ((T_TR_MPHP_SCELL_PBCCH_REQ *)(ptr))->relative_position_array[4] = ((T_MPHP_SCELL_PBCCH_REQ *)(msg->SigP))->relative_position_array[4]; - ((T_TR_MPHP_SCELL_PBCCH_REQ *)(ptr))->relative_position_array[5] = ((T_MPHP_SCELL_PBCCH_REQ *)(msg->SigP))->relative_position_array[5]; - ((T_TR_MPHP_SCELL_PBCCH_REQ *)(ptr))->relative_position_array[6] = ((T_MPHP_SCELL_PBCCH_REQ *)(msg->SigP))->relative_position_array[6]; - ((T_TR_MPHP_SCELL_PBCCH_REQ *)(ptr))->relative_position_array[7] = ((T_MPHP_SCELL_PBCCH_REQ *)(msg->SigP))->relative_position_array[7]; - ((T_TR_MPHP_SCELL_PBCCH_REQ *)(ptr))->relative_position_array[8] = ((T_MPHP_SCELL_PBCCH_REQ *)(msg->SigP))->relative_position_array[8]; - ((T_TR_MPHP_SCELL_PBCCH_REQ *)(ptr))->relative_position_array[9] = ((T_MPHP_SCELL_PBCCH_REQ *)(msg->SigP))->relative_position_array[9]; - ((T_TR_MPHP_SCELL_PBCCH_REQ *)(ptr))->relative_position_array[10] = ((T_MPHP_SCELL_PBCCH_REQ *)(msg->SigP))->relative_position_array[10]; - ((T_TR_MPHP_SCELL_PBCCH_REQ *)(ptr))->relative_position_array[11] = ((T_MPHP_SCELL_PBCCH_REQ *)(msg->SigP))->relative_position_array[11]; - ((T_TR_MPHP_SCELL_PBCCH_REQ *)(ptr))->relative_position_array[12] = ((T_MPHP_SCELL_PBCCH_REQ *)(msg->SigP))->relative_position_array[12]; - ((T_TR_MPHP_SCELL_PBCCH_REQ *)(ptr))->relative_position_array[13] = ((T_MPHP_SCELL_PBCCH_REQ *)(msg->SigP))->relative_position_array[13]; - ((T_TR_MPHP_SCELL_PBCCH_REQ *)(ptr))->relative_position_array[14] = ((T_MPHP_SCELL_PBCCH_REQ *)(msg->SigP))->relative_position_array[14]; - ((T_TR_MPHP_SCELL_PBCCH_REQ *)(ptr))->relative_position_array[15] = ((T_MPHP_SCELL_PBCCH_REQ *)(msg->SigP))->relative_position_array[15]; - ((T_TR_MPHP_SCELL_PBCCH_REQ *)(ptr))->relative_position_array[16] = ((T_MPHP_SCELL_PBCCH_REQ *)(msg->SigP))->relative_position_array[16]; - ((T_TR_MPHP_SCELL_PBCCH_REQ *)(ptr))->relative_position_array[17] = ((T_MPHP_SCELL_PBCCH_REQ *)(msg->SigP))->relative_position_array[17]; - ((T_TR_MPHP_SCELL_PBCCH_REQ *)(ptr))->relative_position_array[18] = ((T_MPHP_SCELL_PBCCH_REQ *)(msg->SigP))->relative_position_array[18]; - ((T_TR_MPHP_SCELL_PBCCH_REQ *)(ptr))->relative_position_array[19] = ((T_MPHP_SCELL_PBCCH_REQ *)(msg->SigP))->relative_position_array[19]; - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MPHP_SCELL_PBCCH_REQ)); - } - } - break; - - case MPHP_SCELL_PBCCH_STOP_REQ: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MPHP_SCELL_PBCCH_STOP_REQ), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MPHP_SCELL_PBCCH_STOP_REQ *)(ptr))->header = TRL1_MPHP_SCELL_PBCCH_STOP_REQ | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MPHP_SCELL_PBCCH_STOP_REQ)); - } - } - break; - - case L1P_PBCCHS_INFO: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_L1P_PBCCHS_INFO), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_L1P_PBCCHS_INFO *)(ptr))->header = TRL1_L1P_PBCCHS_INFO | (((T_MPHP_DATA_IND *)(msg->SigP))->fn << TR_HEADER_FN_DELAY); - ((T_TR_L1P_PBCCHS_INFO *)(ptr))->error_flag = ((T_MPHP_DATA_IND *)(msg->SigP))->error_flag; - ((T_TR_L1P_PBCCHS_INFO *)(ptr))->radio_freq = ((T_MPHP_DATA_IND *)(msg->SigP))->radio_freq; - ((T_TR_L1P_PBCCHS_INFO *)(ptr))->relative_position = ((T_MPHP_DATA_IND *)(msg->SigP))->relative_position; - ((T_TR_L1P_PBCCHS_INFO *)(ptr))->input_level = l1a_l1s_com.Scell_IL_for_rxlev; - ((T_TR_L1P_PBCCHS_INFO *)(ptr))->tpu_offset = l1s.tpu_offset; - ((T_TR_L1P_PBCCHS_INFO *)(ptr))->afc = l1s.afc; - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_L1P_PBCCHS_INFO)); - } - } - break; - - /////////////////// - // Packet Access // - /////////////////// - - // Random access - - case MPHP_RA_REQ: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MPHP_RA_REQ), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MPHP_RA_REQ *)(ptr))->header = TRL1_MPHP_RA_REQ | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_MPHP_RA_REQ *)(ptr))->txpwr = ((T_MPHP_RA_REQ *)(msg->SigP))->txpwr; - ((T_TR_MPHP_RA_REQ *)(ptr))->rand = ((T_MPHP_RA_REQ *)(msg->SigP))->rand; - ((T_TR_MPHP_RA_REQ *)(ptr))->channel_request_data = ((T_MPHP_RA_REQ *)(msg->SigP))->channel_request_data; - ((T_TR_MPHP_RA_REQ *)(ptr))->bs_prach_blks = ((T_MPHP_RA_REQ *)(msg->SigP))->bs_prach_blks; - ((T_TR_MPHP_RA_REQ *)(ptr))->access_burst_type = ((T_MPHP_RA_REQ *)(msg->SigP))->access_burst_type; - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MPHP_RA_REQ)); - } - } - break; - - case MPHP_RA_STOP_REQ: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MPHP_RA_STOP_REQ), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MPHP_RA_STOP_REQ *)(ptr))->header = TRL1_MPHP_RA_STOP_REQ | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MPHP_RA_STOP_REQ)); - } - } - break; - - case L1P_RA_DONE: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_L1P_RA_DONE), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_L1P_RA_DONE *)(ptr))->header = TRL1_L1P_RA_DONE | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_L1P_RA_DONE *)(ptr))->channel_request_data = ((T_MPHP_RA_CON *)(msg->SigP))->channel_request_data; - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_L1P_RA_DONE)); - } - } - break; - - // Single block - - case MPHP_SINGLE_BLOCK_REQ: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MPHP_SINGLE_BLOCK_REQ), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - WORD32 sti; - - if (((T_MPHP_SINGLE_BLOCK_REQ *)(msg->SigP))->tbf_sti.present == 0) - sti = -1; - else - sti = (WORD32) ((T_MPHP_SINGLE_BLOCK_REQ *)(msg->SigP))->tbf_sti.absolute_fn; - - - ((T_TR_MPHP_SINGLE_BLOCK_REQ *)(ptr))->header = TRL1_MPHP_SINGLE_BLOCK_REQ | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_MPHP_SINGLE_BLOCK_REQ *)(ptr))->assignment_id = ((T_MPHP_SINGLE_BLOCK_REQ *)(msg->SigP))->assignment_id; - ((T_TR_MPHP_SINGLE_BLOCK_REQ *)(ptr))->purpose = ((T_MPHP_SINGLE_BLOCK_REQ *)(msg->SigP))->purpose; - ((T_TR_MPHP_SINGLE_BLOCK_REQ *)(ptr))->pc_meas_chan = ((T_MPHP_SINGLE_BLOCK_REQ *)(msg->SigP))->pc_meas_chan; - ((T_TR_MPHP_SINGLE_BLOCK_REQ *)(ptr))->access_burst_type = ((T_MPHP_SINGLE_BLOCK_REQ *)(msg->SigP))->access_burst_type; - ((T_TR_MPHP_SINGLE_BLOCK_REQ *)(ptr))->ta = ((T_MPHP_SINGLE_BLOCK_REQ *)(msg->SigP))->packet_ta.ta; - ((T_TR_MPHP_SINGLE_BLOCK_REQ *)(ptr))->p0 = ((T_MPHP_SINGLE_BLOCK_REQ *)(msg->SigP))->dl_pwr_ctl.p0; - ((T_TR_MPHP_SINGLE_BLOCK_REQ *)(ptr))->bts_pwr_ctl_mode = ((T_MPHP_SINGLE_BLOCK_REQ *)(msg->SigP))->dl_pwr_ctl.bts_pwr_ctl_mode; - ((T_TR_MPHP_SINGLE_BLOCK_REQ *)(ptr))->pr_mode = ((T_MPHP_SINGLE_BLOCK_REQ *)(msg->SigP))->dl_pwr_ctl.pr_mode; - ((T_TR_MPHP_SINGLE_BLOCK_REQ *)(ptr))->tsc = ((T_MPHP_SINGLE_BLOCK_REQ *)(msg->SigP))->tsc; - ((T_TR_MPHP_SINGLE_BLOCK_REQ *)(ptr))->h = ((T_MPHP_SINGLE_BLOCK_REQ *)(msg->SigP))->freq_param.chan_sel.h; - ((T_TR_MPHP_SINGLE_BLOCK_REQ *)(ptr))->radio_freq = ((T_MPHP_SINGLE_BLOCK_REQ *)(msg->SigP))->freq_param.chan_sel.rf_channel.single_rf.radio_freq; - ((T_TR_MPHP_SINGLE_BLOCK_REQ *)(ptr))->rf_chan_cnt = ((T_MPHP_SINGLE_BLOCK_REQ *)(msg->SigP))->freq_param.freq_list.rf_chan_cnt; - ((T_TR_MPHP_SINGLE_BLOCK_REQ *)(ptr))->tbf_sti = sti; - ((T_TR_MPHP_SINGLE_BLOCK_REQ *)(ptr))->timeslot_number = ((T_MPHP_SINGLE_BLOCK_REQ *)(msg->SigP))->timeslot_number; - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MPHP_SINGLE_BLOCK_REQ)); - } - } - break; - - case MPHP_STOP_SINGLE_BLOCK_REQ: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MPHP_STOP_SINGLE_BLOCK_REQ), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MPHP_STOP_SINGLE_BLOCK_REQ *)(ptr))->header = TRL1_MPHP_STOP_SINGLE_BLOCK_REQ | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MPHP_STOP_SINGLE_BLOCK_REQ)); - } - } - break; - - case L1P_PACCH_INFO: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_L1P_PACCH_INFO), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_L1P_PACCH_INFO *)(ptr))->header = TRL1_L1P_PACCH_INFO | (((T_MPHP_DATA_IND *)(msg->SigP))->fn << TR_HEADER_FN_DELAY); - ((T_TR_L1P_PACCH_INFO *)(ptr))->error_flag = ((T_MPHP_DATA_IND *)(msg->SigP))->error_flag; - ((T_TR_L1P_PACCH_INFO *)(ptr))->radio_freq = ((T_MPHP_DATA_IND *)(msg->SigP))->radio_freq; - ((T_TR_L1P_PACCH_INFO *)(ptr))->relative_position = ((T_MPHP_DATA_IND *)(msg->SigP))->relative_position; - ((T_TR_L1P_PACCH_INFO *)(ptr))->input_level = l1a_l1s_com.Scell_IL_for_rxlev; - ((T_TR_L1P_PACCH_INFO *)(ptr))->tpu_offset = l1s.tpu_offset; - ((T_TR_L1P_PACCH_INFO *)(ptr))->afc = l1s.afc; - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_L1P_PACCH_INFO)); - } - } - break; - - case L1P_SINGLE_BLOCK_CON: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_L1P_SINGLE_BLOCK_CON), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_L1P_SINGLE_BLOCK_CON *)(ptr))->header = TRL1_L1P_SINGLE_BLOCK_CON | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_L1P_SINGLE_BLOCK_CON *)(ptr))->assignment_id = ((T_MPHP_SINGLE_BLOCK_CON *)(msg->SigP))->assignment_id; - ((T_TR_L1P_SINGLE_BLOCK_CON *)(ptr))->purpose = ((T_MPHP_SINGLE_BLOCK_CON *)(msg->SigP))->purpose; - ((T_TR_L1P_SINGLE_BLOCK_CON *)(ptr))->status = ((T_MPHP_SINGLE_BLOCK_CON *)(msg->SigP))->status; - ((T_TR_L1P_SINGLE_BLOCK_CON *)(ptr))->dl_error_flag = ((T_MPHP_SINGLE_BLOCK_CON *)(msg->SigP))->dl_error_flag; - ((T_TR_L1P_SINGLE_BLOCK_CON *)(ptr))->txpwr[0] = l1pa_l1ps_com.transfer.dl_pwr_ctrl.txpwr[0]; - ((T_TR_L1P_SINGLE_BLOCK_CON *)(ptr))->txpwr[1] = l1pa_l1ps_com.transfer.dl_pwr_ctrl.txpwr[1]; - ((T_TR_L1P_SINGLE_BLOCK_CON *)(ptr))->txpwr[2] = l1pa_l1ps_com.transfer.dl_pwr_ctrl.txpwr[2]; - ((T_TR_L1P_SINGLE_BLOCK_CON *)(ptr))->txpwr[3] = l1pa_l1ps_com.transfer.dl_pwr_ctrl.txpwr[3]; - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_L1P_SINGLE_BLOCK_CON)); - } - } - break; - - // Idle mode polling - - case MPHP_POLLING_RESPONSE_REQ: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MPHP_POLLING_RESPONSE_REQ), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MPHP_POLLING_RESPONSE_REQ *)(ptr))->header = TRL1_MPHP_POLLING_RESPONSE_REQ | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_MPHP_POLLING_RESPONSE_REQ *)(ptr))->pol_resp_type = ((T_MPHP_POLLING_RESPONSE_REQ *)(msg->SigP))->pol_resp_type; - ((T_TR_MPHP_POLLING_RESPONSE_REQ *)(ptr))->fn_req = ((T_MPHP_POLLING_RESPONSE_REQ *)(msg->SigP))->fn; - ((T_TR_MPHP_POLLING_RESPONSE_REQ *)(ptr))->timing_advance = ((T_MPHP_POLLING_RESPONSE_REQ *)(msg->SigP))->timing_advance; - ((T_TR_MPHP_POLLING_RESPONSE_REQ *)(ptr))->txpwr = ((T_MPHP_POLLING_RESPONSE_REQ *)(msg->SigP))->txpwr; - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MPHP_POLLING_RESPONSE_REQ)); - } - } - break; - - case L1P_POLL_DONE: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_L1P_POLL_DONE), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_L1P_POLL_DONE *)(ptr))->header = TRL1_L1P_POLL_DONE | (((T_MPHP_POLLING_IND *)(msg->SigP))->fn << TR_HEADER_FN_DELAY); - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_L1P_POLL_DONE)); - } - } - break; - - ////////////////////////// - // Packet transfer mode // - ////////////////////////// - - // Temporary block flow assignment - - case MPHP_ASSIGNMENT_REQ: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MPHP_ASSIGNMENT_REQ), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - WORD32 sti; - - if (((T_MPHP_ASSIGNMENT_REQ *)(msg->SigP))->tbf_sti.present == 0) - sti = -1; - else - sti = (WORD32) ((T_MPHP_ASSIGNMENT_REQ *)(msg->SigP))->tbf_sti.absolute_fn; - - - ((T_TR_MPHP_ASSIGNMENT_REQ *)(ptr))->header = TRL1_MPHP_ASSIGNMENT_REQ | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_MPHP_ASSIGNMENT_REQ *)(ptr))->assignment_id = ((T_MPHP_ASSIGNMENT_REQ *)(msg->SigP))->assignment_id; - ((T_TR_MPHP_ASSIGNMENT_REQ *)(ptr))->assignment_command = ((T_MPHP_ASSIGNMENT_REQ *)(msg->SigP))->assignment_command; - ((T_TR_MPHP_ASSIGNMENT_REQ *)(ptr))->multislot_class = ((T_MPHP_ASSIGNMENT_REQ *)(msg->SigP))->multislot_class; - ((T_TR_MPHP_ASSIGNMENT_REQ *)(ptr))->interf_meas_enable = ((T_MPHP_ASSIGNMENT_REQ *)(msg->SigP))->interf_meas_enable; - ((T_TR_MPHP_ASSIGNMENT_REQ *)(ptr))->pc_meas_chan = ((T_MPHP_ASSIGNMENT_REQ *)(msg->SigP))->pc_meas_chan; - ((T_TR_MPHP_ASSIGNMENT_REQ *)(ptr))->access_burst_type = ((T_MPHP_ASSIGNMENT_REQ *)(msg->SigP))->access_burst_type; - ((T_TR_MPHP_ASSIGNMENT_REQ *)(ptr))->ta = ((T_MPHP_ASSIGNMENT_REQ *)(msg->SigP))->packet_ta.ta; - ((T_TR_MPHP_ASSIGNMENT_REQ *)(ptr))->ta_index = ((T_MPHP_ASSIGNMENT_REQ *)(msg->SigP))->packet_ta.ta_index; - ((T_TR_MPHP_ASSIGNMENT_REQ *)(ptr))->ta_tn = ((T_MPHP_ASSIGNMENT_REQ *)(msg->SigP))->packet_ta.ta_tn; - ((T_TR_MPHP_ASSIGNMENT_REQ *)(ptr))->p0 = ((T_MPHP_ASSIGNMENT_REQ *)(msg->SigP))->dl_pwr_ctl.p0; - ((T_TR_MPHP_ASSIGNMENT_REQ *)(ptr))->bts_pwr_ctl_mode = ((T_MPHP_ASSIGNMENT_REQ *)(msg->SigP))->dl_pwr_ctl.bts_pwr_ctl_mode; - ((T_TR_MPHP_ASSIGNMENT_REQ *)(ptr))->pr_mode = ((T_MPHP_ASSIGNMENT_REQ *)(msg->SigP))->dl_pwr_ctl.pr_mode; - ((T_TR_MPHP_ASSIGNMENT_REQ *)(ptr))->tsc = ((T_MPHP_ASSIGNMENT_REQ *)(msg->SigP))->tsc; - ((T_TR_MPHP_ASSIGNMENT_REQ *)(ptr))->h = ((T_MPHP_ASSIGNMENT_REQ *)(msg->SigP))->freq_param.chan_sel.h; - ((T_TR_MPHP_ASSIGNMENT_REQ *)(ptr))->radio_freq = ((T_MPHP_ASSIGNMENT_REQ *)(msg->SigP))->freq_param.chan_sel.rf_channel.single_rf.radio_freq; - ((T_TR_MPHP_ASSIGNMENT_REQ *)(ptr))->rf_chan_cnt = ((T_MPHP_ASSIGNMENT_REQ *)(msg->SigP))->freq_param.freq_list.rf_chan_cnt; - ((T_TR_MPHP_ASSIGNMENT_REQ *)(ptr))->tbf_sti = sti; - ((T_TR_MPHP_ASSIGNMENT_REQ *)(ptr))->mac_mode = ((T_MPHP_ASSIGNMENT_REQ *)(msg->SigP))->mac_mode; - ((T_TR_MPHP_ASSIGNMENT_REQ *)(ptr))->dl_ressource_alloc = ((T_MPHP_ASSIGNMENT_REQ *)(msg->SigP))->dl_ressource_alloc.timeslot_alloc; - ((T_TR_MPHP_ASSIGNMENT_REQ *)(ptr))->ul_ressource_alloc = ((T_MPHP_ASSIGNMENT_REQ *)(msg->SigP))->ul_ressource_alloc.timeslot_alloc; - ((T_TR_MPHP_ASSIGNMENT_REQ *)(ptr))->usf_granularity = ((T_MPHP_ASSIGNMENT_REQ *)(msg->SigP))->ul_ressource_alloc.dynamic_alloc.usf_granularity; - ((T_TR_MPHP_ASSIGNMENT_REQ *)(ptr))->ctrl_timeslot = ((T_MPHP_ASSIGNMENT_REQ *)(msg->SigP))->ul_ressource_alloc.fixed_alloc.ctrl_timeslot; - ((T_TR_MPHP_ASSIGNMENT_REQ *)(ptr))->bitmap_length = ((T_MPHP_ASSIGNMENT_REQ *)(msg->SigP))->ul_ressource_alloc.fixed_alloc.bitmap_length; - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MPHP_ASSIGNMENT_REQ)); - } - } - break; - - case MPHP_ASSIGNMENT_CON: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MPHP_ASSIGNMENT_CON), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MPHP_ASSIGNMENT_CON *)(ptr))->header = TRL1_MPHP_ASSIGNMENT_CON | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_MPHP_ASSIGNMENT_CON *)(ptr))->dl_tn = l1a_l1s_com.dl_tn; - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MPHP_ASSIGNMENT_CON)); - } - } - break; - - case MPHP_TBF_RELEASE_REQ: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MPHP_TBF_RELEASE_REQ), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MPHP_TBF_RELEASE_REQ *)(ptr))->header = TRL1_MPHP_TBF_RELEASE_REQ | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_MPHP_TBF_RELEASE_REQ *)(ptr))->tbf_type = ((T_MPHP_TBF_RELEASE_REQ *)(msg->SigP))->tbf_type; - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MPHP_TBF_RELEASE_REQ)); - } - } - break; - - case L1P_TBF_RELEASED: - { - char *ptr; - - if (((T_L1P_TBF_RELEASED *)(msg->SigP))->released_all == 1) - trace_info.new_tcr_list = 0; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_L1P_TBF_RELEASED), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_L1P_TBF_RELEASED *)(ptr))->header = TRL1_L1P_TBF_RELEASED | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_L1P_TBF_RELEASED *)(ptr))->released_all = ((T_L1P_TBF_RELEASED *)(msg->SigP))->released_all; - ((T_TR_L1P_TBF_RELEASED *)(ptr))->dl_tn = l1a_l1s_com.dl_tn; - ((T_TR_L1P_TBF_RELEASED *)(ptr))->tbf_type = ((T_L1P_TBF_RELEASED *)(msg->SigP))->tbf_type; - L1_send_trace_no_cpy(ptr,sizeof(T_TR_L1P_TBF_RELEASED)); - } - } - break; - - // PDCH release - - case MPHP_PDCH_RELEASE_REQ: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MPHP_PDCH_RELEASE_REQ), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MPHP_PDCH_RELEASE_REQ *)(ptr))->header = TRL1_MPHP_PDCH_RELEASE_REQ | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_MPHP_PDCH_RELEASE_REQ *)(ptr))->assignment_id = ((T_MPHP_PDCH_RELEASE_REQ *)(msg->SigP))->assignment_id; - ((T_TR_MPHP_PDCH_RELEASE_REQ *)(ptr))->timeslot_available = ((T_MPHP_PDCH_RELEASE_REQ *)(msg->SigP))->timeslot_available; - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MPHP_PDCH_RELEASE_REQ)); - } - } - break; - - case L1P_PDCH_RELEASED: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_L1P_PDCH_RELEASED), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_L1P_PDCH_RELEASED *)(ptr))->header = TRL1_L1P_PDCH_RELEASED | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_L1P_PDCH_RELEASED *)(ptr))->assignment_id = ((T_MPHP_PDCH_RELEASE_CON *)(msg->SigP))->assignment_id; - ((T_TR_L1P_PDCH_RELEASED *)(ptr))->dl_tn = l1a_l1s_com.dl_tn; - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_L1P_PDCH_RELEASED)); - } - } - break; - - // Timing advance update - - case MPHP_TIMING_ADVANCE_REQ: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MPHP_TIMING_ADVANCE_REQ), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MPHP_TIMING_ADVANCE_REQ *)(ptr))->header = TRL1_MPHP_TIMING_ADVANCE_REQ | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_MPHP_TIMING_ADVANCE_REQ *)(ptr))->assignment_id = ((T_MPHP_TIMING_ADVANCE_REQ *)(msg->SigP))->assignment_id; - ((T_TR_MPHP_TIMING_ADVANCE_REQ *)(ptr))->ta = ((T_MPHP_TIMING_ADVANCE_REQ *)(msg->SigP))->packet_ta.ta; - ((T_TR_MPHP_TIMING_ADVANCE_REQ *)(ptr))->ta_index = ((T_MPHP_TIMING_ADVANCE_REQ *)(msg->SigP))->packet_ta.ta_index; - ((T_TR_MPHP_TIMING_ADVANCE_REQ *)(ptr))->ta_tn = ((T_MPHP_TIMING_ADVANCE_REQ *)(msg->SigP))->packet_ta.ta_tn; - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MPHP_TIMING_ADVANCE_REQ)); - } - } - break; - - case L1P_TA_CONFIG_DONE: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_L1P_TA_CONFIG_DONE), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_L1P_TA_CONFIG_DONE *)(ptr))->header = TRL1_L1P_TA_CONFIG_DONE | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_L1P_TA_CONFIG_DONE)); - } - } - break; - - // Update PSI parameters - - case MPHP_UPDATE_PSI_PARAM_REQ: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MPHP_UPDATE_PSI_PARAM_REQ), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MPHP_UPDATE_PSI_PARAM_REQ *)(ptr))->header = TRL1_MPHP_UPDATE_PSI_PARAM_REQ | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_MPHP_UPDATE_PSI_PARAM_REQ *)(ptr))->pb = ((T_MPHP_UPDATE_PSI_PARAM_REQ *)(msg->SigP))->pb; - ((T_TR_MPHP_UPDATE_PSI_PARAM_REQ *)(ptr))->access_burst_type = ((T_MPHP_UPDATE_PSI_PARAM_REQ *)(msg->SigP))->access_burst_type; - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MPHP_UPDATE_PSI_PARAM_REQ)); - } - } - break; - - // Fixed mode repeat allocation - - case MPHP_REPEAT_UL_FIXED_ALLOC_REQ: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MPHP_REPEAT_UL_FIXED_ALLOC_REQ), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - WORD32 sti; - - if (((T_MPHP_REPEAT_UL_FIXED_ALLOC_REQ *)(msg->SigP))->tbf_sti.present == 0) - sti = -1; - else - sti = (WORD32) ((T_MPHP_REPEAT_UL_FIXED_ALLOC_REQ *)(msg->SigP))->tbf_sti.absolute_fn; - - - ((T_TR_MPHP_REPEAT_UL_FIXED_ALLOC_REQ *)(ptr))->header = TRL1_MPHP_REPEAT_UL_FIXED_ALLOC_REQ | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_MPHP_REPEAT_UL_FIXED_ALLOC_REQ *)(ptr))->repeat_allocation = ((T_MPHP_REPEAT_UL_FIXED_ALLOC_REQ *)(msg->SigP))->repeat_allocation; - ((T_TR_MPHP_REPEAT_UL_FIXED_ALLOC_REQ *)(ptr))->ts_override = ((T_MPHP_REPEAT_UL_FIXED_ALLOC_REQ *)(msg->SigP))->ts_override; - ((T_TR_MPHP_REPEAT_UL_FIXED_ALLOC_REQ *)(ptr))->tbf_sti = sti; - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MPHP_REPEAT_UL_FIXED_ALLOC_REQ)); - } - } - break; - - case L1P_REPEAT_ALLOC_DONE: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_L1P_REPEAT_ALLOC_DONE), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_L1P_REPEAT_ALLOC_DONE *)(ptr))->header = TRL1_L1P_REPEAT_ALLOC_DONE | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_L1P_REPEAT_ALLOC_DONE *)(ptr))->dl_tn = l1a_l1s_com.dl_tn; - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_L1P_REPEAT_ALLOC_DONE)); - } - } - break; - - // Fixed mode allocation exhaustion - - case L1P_ALLOC_EXHAUST_DONE: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_L1P_ALLOC_EXHAUST_DONE), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_L1P_ALLOC_EXHAUST_DONE *)(ptr))->header = TRL1_L1P_ALLOC_EXHAUST_DONE | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_L1P_ALLOC_EXHAUST_DONE *)(ptr))->dl_tn = l1a_l1s_com.dl_tn; - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_L1P_ALLOC_EXHAUST_DONE)); - } - } - break; - - ////////////////////////////// - // Packet mode measurements // - ////////////////////////////// - - // BA list measurements in packet idle - - case MPHP_CR_MEAS_REQ: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MPHP_CR_MEAS_REQ), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MPHP_CR_MEAS_REQ *)(ptr))->header = TRL1_MPHP_CR_MEAS_REQ | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_MPHP_CR_MEAS_REQ *)(ptr))->nb_carrier = ((T_MPHP_CR_MEAS_REQ *)(msg->SigP))->nb_carrier; - ((T_TR_MPHP_CR_MEAS_REQ *)(ptr))->list_id = ((T_MPHP_CR_MEAS_REQ *)(msg->SigP))->list_id; - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MPHP_CR_MEAS_REQ)); - } - } - break; - - case MPHP_CR_MEAS_STOP_REQ: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MPHP_CR_MEAS_STOP_REQ), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MPHP_CR_MEAS_STOP_REQ *)(ptr))->header = TRL1_MPHP_CR_MEAS_STOP_REQ | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MPHP_CR_MEAS_STOP_REQ)); - } - } - break; - - case L1P_CR_MEAS_DONE: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_L1P_CR_MEAS_DONE), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - UWORD8 i,nmeas; - - - ((T_TR_L1P_CR_MEAS_DONE *)(ptr))->header = TRL1_L1P_CR_MEAS_DONE | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_L1P_CR_MEAS_DONE *)(ptr))->nmeas = ((T_L1P_CR_MEAS_DONE *)(msg->SigP))->nmeas; - ((T_TR_L1P_CR_MEAS_DONE *)(ptr))->list_id = ((T_L1P_CR_MEAS_DONE *)(msg->SigP))->list_id; - ((T_TR_L1P_CR_MEAS_DONE *)(ptr))->reporting_period = ((T_L1P_CR_MEAS_DONE *)(msg->SigP))->reporting_period; - - nmeas = ((T_L1P_CR_MEAS_DONE *)(msg->SigP))->nmeas; - if (nmeas > MAX_CR) nmeas = MAX_CR; - - for (i=0;i<nmeas;i++) - { - ((T_TR_L1P_CR_MEAS_DONE *)(ptr))->freq[i] = l1pa_l1ps_com.cres_freq_list.alist->freq_list[i]; - ((T_TR_L1P_CR_MEAS_DONE *)(ptr))->rxlev[i] = ((T_L1P_CR_MEAS_DONE *)(msg->SigP))->ncell_meas[i].rxlev; - } - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_L1P_CR_MEAS_DONE)); - } - } - break; - - // BA list measurements in packet transfer - - case MPHP_TCR_MEAS_REQ: - { - char *ptr; - - trace_info.new_tcr_list = 1; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MPHP_TCR_MEAS_REQ), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MPHP_TCR_MEAS_REQ *)(ptr))->header = TRL1_MPHP_TCR_MEAS_REQ | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_MPHP_TCR_MEAS_REQ *)(ptr))->nb_carrier = ((T_MPHP_TCR_MEAS_REQ *)(msg->SigP))->nb_carrier; - ((T_TR_MPHP_TCR_MEAS_REQ *)(ptr))->list_id = ((T_MPHP_TCR_MEAS_REQ *)(msg->SigP))->list_id; - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MPHP_TCR_MEAS_REQ)); - } - } - break; - - case MPHP_TCR_MEAS_STOP_REQ: - { - char *ptr; - - trace_info.new_tcr_list = 0; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MPHP_TCR_MEAS_STOP_REQ), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MPHP_TCR_MEAS_STOP_REQ *)(ptr))->header = TRL1_MPHP_TCR_MEAS_STOP_REQ | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MPHP_TCR_MEAS_STOP_REQ)); - } - } - break; - - case L1P_TCR_MEAS_DONE: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_L1P_TCR_MEAS_DONE), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - UWORD8 i, nmeas; - T_CRES_LIST_PARAM *list_ptr; - - if (trace_info.new_tcr_list == 0) - // No TCR list update: keep the alist pointer - list_ptr = l1pa_l1ps_com.cres_freq_list.alist; - else - { - // In case of TCR list updating, the alist pointer has changed - if(l1pa_l1ps_com.cres_freq_list.alist == &(l1pa_l1ps_com.cres_freq_list.list[0])) - list_ptr = &(l1pa_l1ps_com.cres_freq_list.list[1]); - else - list_ptr = &(l1pa_l1ps_com.cres_freq_list.list[0]); - //Reset the variable new_tcr_list so that next time onwards the new list of - //frequencies will get printed. - trace_info.new_tcr_list = 0; - } - - - ((T_TR_L1P_TCR_MEAS_DONE *)(ptr))->header = TRL1_L1P_TCR_MEAS_DONE | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_L1P_TCR_MEAS_DONE *)(ptr))->list_id = ((T_L1P_TCR_MEAS_DONE *)(msg->SigP))->list_id; - ((T_TR_L1P_TCR_MEAS_DONE *)(ptr))->nb_carrier = list_ptr->nb_carrier; - - nmeas = list_ptr->nb_carrier; - if (nmeas > MAX_TCR) nmeas = MAX_TCR; - - for (i=0;i<nmeas;i++) - { - ((T_TR_L1P_TCR_MEAS_DONE *)(ptr))->radio_freq[i] = list_ptr->freq_list[i]; - ((T_TR_L1P_TCR_MEAS_DONE *)(ptr))->acc_level[i] = ((T_L1P_TCR_MEAS_DONE *)(msg->SigP))->acc_level[i]; - ((T_TR_L1P_TCR_MEAS_DONE *)(ptr))->acc_nbmeas[i] = ((T_L1P_TCR_MEAS_DONE *)(msg->SigP))->acc_nbmeas[i]; - } - - ((T_TR_L1P_TCR_MEAS_DONE *)(ptr))->tpu_offset = l1s.tpu_offset; - - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_L1P_TCR_MEAS_DONE)); - } - } - break; - - /////////////////////////////// - // Interference measurements // - /////////////////////////////// - - // Interference measurements in packet idle - - case MPHP_INT_MEAS_REQ: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MPHP_INT_MEAS_REQ), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MPHP_INT_MEAS_REQ *)(ptr))->header = TRL1_MPHP_INT_MEAS_REQ | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_MPHP_INT_MEAS_REQ *)(ptr))->h = ((T_MPHP_INT_MEAS_REQ *)(msg->SigP))->packet_intm_freq_param.chan_sel.h; - ((T_TR_MPHP_INT_MEAS_REQ *)(ptr))->radio_freq = ((T_MPHP_INT_MEAS_REQ *)(msg->SigP))->packet_intm_freq_param.chan_sel.rf_channel.single_rf.radio_freq; - ((T_TR_MPHP_INT_MEAS_REQ *)(ptr))->rf_chan_cnt = ((T_MPHP_INT_MEAS_REQ *)(msg->SigP))->packet_intm_freq_param.freq_list.rf_chan_cnt; - ((T_TR_MPHP_INT_MEAS_REQ *)(ptr))->tn = ((T_MPHP_INT_MEAS_REQ *)(msg->SigP))->tn; - ((T_TR_MPHP_INT_MEAS_REQ *)(ptr))->multislot_class = ((T_MPHP_INT_MEAS_REQ *)(msg->SigP))->multislot_class; - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MPHP_INT_MEAS_REQ)); - } - } - break; - - case MPHP_INT_MEAS_STOP_REQ: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MPHP_INT_MEAS_STOP_REQ), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MPHP_INT_MEAS_STOP_REQ *)(ptr))->header = TRL1_MPHP_INT_MEAS_STOP_REQ | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MPHP_INT_MEAS_STOP_REQ)); - } - } - break; - - case L1P_ITMEAS_IND: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_L1P_ITMEAS_IND), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_L1P_ITMEAS_IND *)(ptr))->header = TRL1_L1P_ITMEAS_IND | (((T_L1P_ITMEAS_IND *)(msg->SigP))->fn << TR_HEADER_FN_DELAY); - ((T_TR_L1P_ITMEAS_IND *)(ptr))->position = ((T_L1P_ITMEAS_IND *)(msg->SigP))->position; - ((T_TR_L1P_ITMEAS_IND *)(ptr))->meas_bitmap = ((T_L1P_ITMEAS_IND *)(msg->SigP))->meas_bitmap; - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_L1P_ITMEAS_IND)); - } - } - break; - - case MPHP_INT_MEAS_IND: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MPHP_INT_MEAS_IND), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MPHP_INT_MEAS_IND *)(ptr))->header = TRL1_MPHP_INT_MEAS_IND | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_MPHP_INT_MEAS_IND *)(ptr))->rxlev_0[0] = ((T_MPHP_INT_MEAS_IND *)(msg->SigP))->int_meas[0].rxlev[0]; - ((T_TR_MPHP_INT_MEAS_IND *)(ptr))->rxlev_0[1] = ((T_MPHP_INT_MEAS_IND *)(msg->SigP))->int_meas[1].rxlev[0]; - ((T_TR_MPHP_INT_MEAS_IND *)(ptr))->rxlev_0[2] = ((T_MPHP_INT_MEAS_IND *)(msg->SigP))->int_meas[2].rxlev[0]; - ((T_TR_MPHP_INT_MEAS_IND *)(ptr))->rxlev_0[3] = ((T_MPHP_INT_MEAS_IND *)(msg->SigP))->int_meas[3].rxlev[0]; - ((T_TR_MPHP_INT_MEAS_IND *)(ptr))->rxlev_0[4] = ((T_MPHP_INT_MEAS_IND *)(msg->SigP))->int_meas[4].rxlev[0]; - ((T_TR_MPHP_INT_MEAS_IND *)(ptr))->rxlev_0[5] = ((T_MPHP_INT_MEAS_IND *)(msg->SigP))->int_meas[5].rxlev[0]; - ((T_TR_MPHP_INT_MEAS_IND *)(ptr))->rxlev_0[6] = ((T_MPHP_INT_MEAS_IND *)(msg->SigP))->int_meas[6].rxlev[0]; - ((T_TR_MPHP_INT_MEAS_IND *)(ptr))->rxlev_0[7] = ((T_MPHP_INT_MEAS_IND *)(msg->SigP))->int_meas[7].rxlev[0]; - ((T_TR_MPHP_INT_MEAS_IND *)(ptr))->rxlev_1[0] = ((T_MPHP_INT_MEAS_IND *)(msg->SigP))->int_meas[0].rxlev[1]; - ((T_TR_MPHP_INT_MEAS_IND *)(ptr))->rxlev_1[1] = ((T_MPHP_INT_MEAS_IND *)(msg->SigP))->int_meas[1].rxlev[1]; - ((T_TR_MPHP_INT_MEAS_IND *)(ptr))->rxlev_1[2] = ((T_MPHP_INT_MEAS_IND *)(msg->SigP))->int_meas[2].rxlev[1]; - ((T_TR_MPHP_INT_MEAS_IND *)(ptr))->rxlev_1[3] = ((T_MPHP_INT_MEAS_IND *)(msg->SigP))->int_meas[3].rxlev[1]; - ((T_TR_MPHP_INT_MEAS_IND *)(ptr))->rxlev_1[4] = ((T_MPHP_INT_MEAS_IND *)(msg->SigP))->int_meas[4].rxlev[1]; - ((T_TR_MPHP_INT_MEAS_IND *)(ptr))->rxlev_1[5] = ((T_MPHP_INT_MEAS_IND *)(msg->SigP))->int_meas[5].rxlev[1]; - ((T_TR_MPHP_INT_MEAS_IND *)(ptr))->rxlev_1[6] = ((T_MPHP_INT_MEAS_IND *)(msg->SigP))->int_meas[6].rxlev[1]; - ((T_TR_MPHP_INT_MEAS_IND *)(ptr))->rxlev_1[7] = ((T_MPHP_INT_MEAS_IND *)(msg->SigP))->int_meas[7].rxlev[1]; - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MPHP_INT_MEAS_IND)); - } - } - break; - - // Interference measurements in packet transfer - - case MPHP_TINT_MEAS_IND: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MPHP_TINT_MEAS_IND), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MPHP_TINT_MEAS_IND *)(ptr))->header = TRL1_MPHP_TINT_MEAS_IND | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_MPHP_TINT_MEAS_IND *)(ptr))->rxlev_0[0] = ((T_MPHP_INT_MEAS_IND *)(msg->SigP))->int_meas[0].rxlev[0]; - ((T_TR_MPHP_TINT_MEAS_IND *)(ptr))->rxlev_0[1] = ((T_MPHP_INT_MEAS_IND *)(msg->SigP))->int_meas[1].rxlev[0]; - ((T_TR_MPHP_TINT_MEAS_IND *)(ptr))->rxlev_0[2] = ((T_MPHP_INT_MEAS_IND *)(msg->SigP))->int_meas[2].rxlev[0]; - ((T_TR_MPHP_TINT_MEAS_IND *)(ptr))->rxlev_0[3] = ((T_MPHP_INT_MEAS_IND *)(msg->SigP))->int_meas[3].rxlev[0]; - ((T_TR_MPHP_TINT_MEAS_IND *)(ptr))->rxlev_0[4] = ((T_MPHP_INT_MEAS_IND *)(msg->SigP))->int_meas[4].rxlev[0]; - ((T_TR_MPHP_TINT_MEAS_IND *)(ptr))->rxlev_0[5] = ((T_MPHP_INT_MEAS_IND *)(msg->SigP))->int_meas[5].rxlev[0]; - ((T_TR_MPHP_TINT_MEAS_IND *)(ptr))->rxlev_0[6] = ((T_MPHP_INT_MEAS_IND *)(msg->SigP))->int_meas[6].rxlev[0]; - ((T_TR_MPHP_TINT_MEAS_IND *)(ptr))->rxlev_0[7] = ((T_MPHP_INT_MEAS_IND *)(msg->SigP))->int_meas[7].rxlev[0]; - ((T_TR_MPHP_TINT_MEAS_IND *)(ptr))->rxlev_1[0] = ((T_MPHP_INT_MEAS_IND *)(msg->SigP))->int_meas[0].rxlev[1]; - ((T_TR_MPHP_TINT_MEAS_IND *)(ptr))->rxlev_1[1] = ((T_MPHP_INT_MEAS_IND *)(msg->SigP))->int_meas[1].rxlev[1]; - ((T_TR_MPHP_TINT_MEAS_IND *)(ptr))->rxlev_1[2] = ((T_MPHP_INT_MEAS_IND *)(msg->SigP))->int_meas[2].rxlev[1]; - ((T_TR_MPHP_TINT_MEAS_IND *)(ptr))->rxlev_1[3] = ((T_MPHP_INT_MEAS_IND *)(msg->SigP))->int_meas[3].rxlev[1]; - ((T_TR_MPHP_TINT_MEAS_IND *)(ptr))->rxlev_1[4] = ((T_MPHP_INT_MEAS_IND *)(msg->SigP))->int_meas[4].rxlev[1]; - ((T_TR_MPHP_TINT_MEAS_IND *)(ptr))->rxlev_1[5] = ((T_MPHP_INT_MEAS_IND *)(msg->SigP))->int_meas[5].rxlev[1]; - ((T_TR_MPHP_TINT_MEAS_IND *)(ptr))->rxlev_1[6] = ((T_MPHP_INT_MEAS_IND *)(msg->SigP))->int_meas[6].rxlev[1]; - ((T_TR_MPHP_TINT_MEAS_IND *)(ptr))->rxlev_1[7] = ((T_MPHP_INT_MEAS_IND *)(msg->SigP))->int_meas[7].rxlev[1]; - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MPHP_TINT_MEAS_IND)); - } - } - break; - - #endif - - #if (AUDIO_TASK == 1) - - /********************************************************************************/ - /* BACKGROUND TASKS */ - /********************************************************************************/ - - ////////////////// - // MMI messages // - ////////////////// - - #if (KEYBEEP) - // Keybeep - case MMI_KEYBEEP_START_REQ: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MMI_KEYBEEP_START_REQ), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MMI_KEYBEEP_START_REQ *)(ptr))->header = TRL1_MMI_KEYBEEP_START_REQ | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_MMI_KEYBEEP_START_REQ *)(ptr))->d_k_x1_kt0 = ((T_MMI_KEYBEEP_REQ *)(msg->SigP))->d_k_x1_kt0; - ((T_TR_MMI_KEYBEEP_START_REQ *)(ptr))->d_k_x1_kt1 = ((T_MMI_KEYBEEP_REQ *)(msg->SigP))->d_k_x1_kt1; - ((T_TR_MMI_KEYBEEP_START_REQ *)(ptr))->d_dur_kb = ((T_MMI_KEYBEEP_REQ *)(msg->SigP))->d_dur_kb; - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MMI_KEYBEEP_START_REQ)); - } - } - break; - - case MMI_KEYBEEP_START_CON: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MMI_KEYBEEP_START_CON), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MMI_KEYBEEP_START_CON *)(ptr))->header = TRL1_MMI_KEYBEEP_START_CON | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MMI_KEYBEEP_START_CON)); - } - } - break; - - case MMI_KEYBEEP_STOP_REQ: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MMI_KEYBEEP_STOP_REQ), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MMI_KEYBEEP_STOP_REQ *)(ptr))->header = TRL1_MMI_KEYBEEP_STOP_REQ | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MMI_KEYBEEP_STOP_REQ)); - } - } - break; - - case MMI_KEYBEEP_STOP_CON: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MMI_KEYBEEP_STOP_CON), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MMI_KEYBEEP_STOP_CON *)(ptr))->header = TRL1_MMI_KEYBEEP_STOP_CON | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MMI_KEYBEEP_STOP_CON)); - } - } - break; - #endif // KEYBEEP - - #if (TONE) - // Tone - case MMI_TONE_START_REQ: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MMI_TONE_START_REQ), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MMI_TONE_START_REQ *)(ptr))->header = TRL1_MMI_TONE_START_REQ | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_MMI_TONE_START_REQ *)(ptr))->d_k_x1_t0 = ((T_MMI_TONE_REQ *)(msg->SigP))->d_k_x1_t0; - ((T_TR_MMI_TONE_START_REQ *)(ptr))->d_k_x1_t1 = ((T_MMI_TONE_REQ *)(msg->SigP))->d_k_x1_t1; - ((T_TR_MMI_TONE_START_REQ *)(ptr))->d_k_x1_t2 = ((T_MMI_TONE_REQ *)(msg->SigP))->d_k_x1_t2; - ((T_TR_MMI_TONE_START_REQ *)(ptr))->d_pe_rep = ((T_MMI_TONE_REQ *)(msg->SigP))->d_pe_rep; - ((T_TR_MMI_TONE_START_REQ *)(ptr))->d_pe_off = ((T_MMI_TONE_REQ *)(msg->SigP))->d_pe_off; - ((T_TR_MMI_TONE_START_REQ *)(ptr))->d_se_off = ((T_MMI_TONE_REQ *)(msg->SigP))->d_se_off; - ((T_TR_MMI_TONE_START_REQ *)(ptr))->d_bu_off = ((T_MMI_TONE_REQ *)(msg->SigP))->d_bu_off; - ((T_TR_MMI_TONE_START_REQ *)(ptr))->d_t0_on = ((T_MMI_TONE_REQ *)(msg->SigP))->d_t0_on; - ((T_TR_MMI_TONE_START_REQ *)(ptr))->d_t0_off = ((T_MMI_TONE_REQ *)(msg->SigP))->d_t0_off; - ((T_TR_MMI_TONE_START_REQ *)(ptr))->d_t1_on = ((T_MMI_TONE_REQ *)(msg->SigP))->d_t1_on; - ((T_TR_MMI_TONE_START_REQ *)(ptr))->d_t1_off = ((T_MMI_TONE_REQ *)(msg->SigP))->d_t1_off; - ((T_TR_MMI_TONE_START_REQ *)(ptr))->d_t2_on = ((T_MMI_TONE_REQ *)(msg->SigP))->d_t2_on; - ((T_TR_MMI_TONE_START_REQ *)(ptr))->d_t2_off = ((T_MMI_TONE_REQ *)(msg->SigP))->d_t2_off; - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MMI_TONE_START_REQ)); - } - } - break; - - case MMI_TONE_START_CON: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MMI_TONE_START_CON), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MMI_TONE_START_CON *)(ptr))->header = TRL1_MMI_TONE_START_CON | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MMI_TONE_START_CON)); - } - } - break; - - case MMI_TONE_STOP_REQ: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MMI_TONE_STOP_REQ), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MMI_TONE_STOP_REQ *)(ptr))->header = TRL1_MMI_TONE_STOP_REQ | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MMI_TONE_STOP_REQ)); - } - } - break; - - case MMI_TONE_STOP_CON: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MMI_TONE_STOP_CON), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MMI_TONE_STOP_CON *)(ptr))->header = TRL1_MMI_TONE_STOP_CON | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MMI_TONE_STOP_CON)); - } - } - break; - #endif // TONE - - #if (MELODY_E1) - // Melody 0 - case MMI_MELODY0_START_REQ: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MMI_MELODY0_START_REQ), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MMI_MELODY0_START_REQ *)(ptr))->header = TRL1_MMI_MELODY0_START_REQ | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_MMI_MELODY0_START_REQ *)(ptr))->session_id = ((T_MMI_MELODY_REQ *)(msg->SigP))->session_id; - ((T_TR_MMI_MELODY0_START_REQ *)(ptr))->loopback = ((T_MMI_MELODY_REQ *)(msg->SigP))->loopback; - ((T_TR_MMI_MELODY0_START_REQ *)(ptr))->oscillator_used_bitmap = ((T_MMI_MELODY_REQ *)(msg->SigP))->oscillator_used_bitmap; - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MMI_MELODY0_START_REQ)); - } - } - break; - - case MMI_MELODY0_START_CON: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MMI_MELODY0_START_CON), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MMI_MELODY0_START_CON *)(ptr))->header = TRL1_MMI_MELODY0_START_CON | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MMI_MELODY0_START_CON)); - } - } - break; - - case MMI_MELODY0_STOP_REQ: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MMI_MELODY0_STOP_REQ), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MMI_MELODY0_STOP_REQ *)(ptr))->header = TRL1_MMI_MELODY0_STOP_REQ | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MMI_MELODY0_STOP_REQ)); - } - } - break; - - case MMI_MELODY0_STOP_CON: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MMI_MELODY0_STOP_CON), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MMI_MELODY0_STOP_CON *)(ptr))->header = TRL1_MMI_MELODY0_STOP_CON | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MMI_MELODY0_STOP_CON)); - } - } - break; - - // Melody 1 - case MMI_MELODY1_START_REQ: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MMI_MELODY1_START_REQ), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MMI_MELODY1_START_REQ *)(ptr))->header = TRL1_MMI_MELODY1_START_REQ | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_MMI_MELODY1_START_REQ *)(ptr))->session_id = ((T_MMI_MELODY_REQ *)(msg->SigP))->session_id; - ((T_TR_MMI_MELODY1_START_REQ *)(ptr))->loopback = ((T_MMI_MELODY_REQ *)(msg->SigP))->loopback; - ((T_TR_MMI_MELODY1_START_REQ *)(ptr))->oscillator_used_bitmap = ((T_MMI_MELODY_REQ *)(msg->SigP))->oscillator_used_bitmap; - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MMI_MELODY1_START_REQ)); - } - } - break; - - case MMI_MELODY1_START_CON: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MMI_MELODY1_START_CON), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MMI_MELODY1_START_CON *)(ptr))->header = TRL1_MMI_MELODY1_START_CON | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MMI_MELODY1_START_CON)); - } - } - break; - - case MMI_MELODY1_STOP_REQ: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MMI_MELODY1_STOP_REQ), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MMI_MELODY1_STOP_REQ *)(ptr))->header = TRL1_MMI_MELODY1_STOP_REQ | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MMI_MELODY1_STOP_REQ)); - } - } - break; - - case MMI_MELODY1_STOP_CON: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MMI_MELODY1_STOP_CON), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MMI_MELODY1_STOP_CON *)(ptr))->header = TRL1_MMI_MELODY1_STOP_CON | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MMI_MELODY1_STOP_CON)); - } - } - break; - #endif // MELODY_E1 - - #if (VOICE_MEMO) - // Voice memo recording - case MMI_VM_RECORD_START_REQ: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MMI_VM_RECORD_START_REQ), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MMI_VM_RECORD_START_REQ *)(ptr))->header = TRL1_MMI_VM_RECORD_START_REQ | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_MMI_VM_RECORD_START_REQ *)(ptr))->session_id = ((T_MMI_VM_RECORD_REQ *)(msg->SigP))->session_id; - ((T_TR_MMI_VM_RECORD_START_REQ *)(ptr))->maximum_size = ((T_MMI_VM_RECORD_REQ *)(msg->SigP))->maximum_size; - ((T_TR_MMI_VM_RECORD_START_REQ *)(ptr))->dtx_used = ((T_MMI_VM_RECORD_REQ *)(msg->SigP))->dtx_used; - ((T_TR_MMI_VM_RECORD_START_REQ *)(ptr))->record_coeff_dl = ((T_MMI_VM_RECORD_REQ *)(msg->SigP))->record_coeff_dl; - ((T_TR_MMI_VM_RECORD_START_REQ *)(ptr))->record_coeff_ul = ((T_MMI_VM_RECORD_REQ *)(msg->SigP))->record_coeff_ul; - ((T_TR_MMI_VM_RECORD_START_REQ *)(ptr))->d_k_x1_t0 = ((T_MMI_VM_RECORD_REQ *)(msg->SigP))->d_k_x1_t0; - ((T_TR_MMI_VM_RECORD_START_REQ *)(ptr))->d_k_x1_t1 = ((T_MMI_VM_RECORD_REQ *)(msg->SigP))->d_k_x1_t1; - ((T_TR_MMI_VM_RECORD_START_REQ *)(ptr))->d_k_x1_t2 = ((T_MMI_VM_RECORD_REQ *)(msg->SigP))->d_k_x1_t2; - ((T_TR_MMI_VM_RECORD_START_REQ *)(ptr))->d_pe_rep = ((T_MMI_VM_RECORD_REQ *)(msg->SigP))->d_pe_rep; - ((T_TR_MMI_VM_RECORD_START_REQ *)(ptr))->d_pe_off = ((T_MMI_VM_RECORD_REQ *)(msg->SigP))->d_pe_off; - ((T_TR_MMI_VM_RECORD_START_REQ *)(ptr))->d_se_off = ((T_MMI_VM_RECORD_REQ *)(msg->SigP))->d_se_off; - ((T_TR_MMI_VM_RECORD_START_REQ *)(ptr))->d_bu_off = ((T_MMI_VM_RECORD_REQ *)(msg->SigP))->d_bu_off; - ((T_TR_MMI_VM_RECORD_START_REQ *)(ptr))->d_t0_on = ((T_MMI_VM_RECORD_REQ *)(msg->SigP))->d_t0_on; - ((T_TR_MMI_VM_RECORD_START_REQ *)(ptr))->d_t0_off = ((T_MMI_VM_RECORD_REQ *)(msg->SigP))->d_t0_off; - ((T_TR_MMI_VM_RECORD_START_REQ *)(ptr))->d_t1_on = ((T_MMI_VM_RECORD_REQ *)(msg->SigP))->d_t1_on; - ((T_TR_MMI_VM_RECORD_START_REQ *)(ptr))->d_t1_off = ((T_MMI_VM_RECORD_REQ *)(msg->SigP))->d_t1_off; - ((T_TR_MMI_VM_RECORD_START_REQ *)(ptr))->d_t2_on = ((T_MMI_VM_RECORD_REQ *)(msg->SigP))->d_t2_on; - ((T_TR_MMI_VM_RECORD_START_REQ *)(ptr))->d_t2_off = ((T_MMI_VM_RECORD_REQ *)(msg->SigP))->d_t2_off; - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MMI_VM_RECORD_START_REQ)); - } - } - break; - - case MMI_VM_RECORD_START_CON: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MMI_VM_RECORD_START_CON), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MMI_VM_RECORD_START_CON *)(ptr))->header = TRL1_MMI_VM_RECORD_START_CON | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MMI_VM_RECORD_START_CON)); - } - } - break; - - case MMI_VM_RECORD_STOP_REQ: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MMI_VM_RECORD_STOP_REQ), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MMI_VM_RECORD_STOP_REQ *)(ptr))->header = TRL1_MMI_VM_RECORD_STOP_REQ | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MMI_VM_RECORD_STOP_REQ)); - } - } - break; - - case MMI_VM_RECORD_STOP_CON: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MMI_VM_RECORD_STOP_CON), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MMI_VM_RECORD_STOP_CON *)(ptr))->header = TRL1_MMI_VM_RECORD_STOP_CON | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MMI_VM_RECORD_STOP_CON)); - } - } - break; - - // Voice memo playing - case MMI_VM_PLAY_START_REQ: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MMI_VM_PLAY_START_REQ), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MMI_VM_PLAY_START_REQ *)(ptr))->header = TRL1_MMI_VM_PLAY_START_REQ | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_MMI_VM_PLAY_START_REQ *)(ptr))->session_id = ((T_MMI_VM_PLAY_REQ *)(msg->SigP))->session_id; - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MMI_VM_PLAY_START_REQ)); - } - } - break; - - case MMI_VM_PLAY_START_CON: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MMI_VM_PLAY_START_CON), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MMI_VM_PLAY_START_CON *)(ptr))->header = TRL1_MMI_VM_PLAY_START_CON | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MMI_VM_PLAY_START_CON)); - } - } - break; - - case MMI_VM_PLAY_STOP_REQ: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MMI_VM_PLAY_STOP_REQ), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MMI_VM_PLAY_STOP_REQ *)(ptr))->header = TRL1_MMI_VM_PLAY_STOP_REQ | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MMI_VM_PLAY_STOP_REQ)); - } - } - break; - - case MMI_VM_PLAY_STOP_CON: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MMI_VM_PLAY_STOP_CON), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MMI_VM_PLAY_STOP_CON *)(ptr))->header = TRL1_MMI_VM_PLAY_STOP_CON | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MMI_VM_PLAY_STOP_CON)); - } - } - break; - #endif // VOICE_MEMO - - #if (L1_VOICE_MEMO_AMR) - // Voice memo recording - case MMI_VM_AMR_RECORD_START_REQ: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MMI_VM_AMR_RECORD_START_REQ), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MMI_VM_AMR_RECORD_START_REQ *)(ptr))->header = TRL1_MMI_VM_AMR_RECORD_START_REQ | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_MMI_VM_AMR_RECORD_START_REQ *)(ptr))->session_id = ((T_MMI_VM_AMR_RECORD_REQ *)(msg->SigP))->session_id; - ((T_TR_MMI_VM_AMR_RECORD_START_REQ *)(ptr))->maximum_size = ((T_MMI_VM_AMR_RECORD_REQ *)(msg->SigP))->maximum_size; - ((T_TR_MMI_VM_AMR_RECORD_START_REQ *)(ptr))->dtx_used = ((T_MMI_VM_AMR_RECORD_REQ *)(msg->SigP))->dtx_used; - ((T_TR_MMI_VM_RECORD_START_REQ *)(ptr))->record_coeff_ul = ((T_MMI_VM_AMR_RECORD_REQ *)(msg->SigP))->record_coeff_ul; - ((T_TR_MMI_VM_AMR_RECORD_START_REQ *)(ptr))->amr_vocoder = ((T_MMI_VM_AMR_RECORD_REQ *)(msg->SigP))->amr_vocoder; - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MMI_VM_AMR_RECORD_START_REQ)); - } - } - break; - - case MMI_VM_AMR_RECORD_START_CON: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MMI_VM_AMR_RECORD_START_CON), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MMI_VM_AMR_RECORD_START_CON *)(ptr))->header = TRL1_MMI_VM_AMR_RECORD_START_CON | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MMI_VM_AMR_RECORD_START_CON)); - } - } - break; - - case MMI_VM_AMR_RECORD_STOP_REQ: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MMI_VM_AMR_RECORD_STOP_REQ), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MMI_VM_AMR_RECORD_STOP_REQ *)(ptr))->header = TRL1_MMI_VM_AMR_RECORD_STOP_REQ | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MMI_VM_AMR_RECORD_STOP_REQ)); - } - } - break; - - case MMI_VM_AMR_RECORD_STOP_CON: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MMI_VM_AMR_RECORD_STOP_CON), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MMI_VM_AMR_RECORD_STOP_CON *)(ptr))->header = TRL1_MMI_VM_AMR_RECORD_STOP_CON | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MMI_VM_AMR_RECORD_STOP_CON)); - } - } - break; - - // Voice memo playing - case MMI_VM_AMR_PLAY_START_REQ: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MMI_VM_AMR_PLAY_START_REQ), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MMI_VM_AMR_PLAY_START_REQ *)(ptr))->header = TRL1_MMI_VM_AMR_PLAY_START_REQ | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_MMI_VM_AMR_PLAY_START_REQ *)(ptr))->session_id = ((T_MMI_VM_AMR_PLAY_REQ *)(msg->SigP))->session_id; - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MMI_VM_AMR_PLAY_START_REQ)); - } - } - break; - - case MMI_VM_AMR_PLAY_START_CON: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MMI_VM_AMR_PLAY_START_CON), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MMI_VM_AMR_PLAY_START_CON *)(ptr))->header = TRL1_MMI_VM_AMR_PLAY_START_CON | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MMI_VM_AMR_PLAY_START_CON)); - } - } - break; - - case MMI_VM_AMR_PLAY_STOP_REQ: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MMI_VM_AMR_PLAY_STOP_REQ), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MMI_VM_AMR_PLAY_STOP_REQ *)(ptr))->header = TRL1_MMI_VM_AMR_PLAY_STOP_REQ | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MMI_VM_AMR_PLAY_STOP_REQ)); - } - } - break; - - case MMI_VM_AMR_PLAY_STOP_CON: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MMI_VM_AMR_PLAY_STOP_CON), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MMI_VM_AMR_PLAY_STOP_CON *)(ptr))->header = TRL1_MMI_VM_AMR_PLAY_STOP_CON | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MMI_VM_AMR_PLAY_STOP_CON)); - } - } - break; - case MMI_VM_AMR_PAUSE_REQ: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MMI_VM_AMR_PAUSE_REQ), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MMI_VM_AMR_PAUSE_REQ *)(ptr))->header = TRL1_MMI_VM_AMR_PAUSE_REQ | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MMI_VM_AMR_PAUSE_REQ)); - } - } - break; - case MMI_VM_AMR_RESUME_REQ: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MMI_VM_AMR_RESUME_REQ), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MMI_VM_AMR_RESUME_REQ *)(ptr))->header = TRL1_MMI_VM_AMR_RESUME_REQ | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - // ((T_TR_MMI_VM_AMR_RESUME_REQ *)(ptr))->session_id = ((T_MMI_VM_AMR_RESUME_REQ *)(msg->SigP))->session_id; - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MMI_VM_AMR_RESUME_REQ)); - } - } - break; - - case MMI_VM_AMR_PAUSE_CON: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MMI_VM_AMR_PAUSE_CON), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MMI_VM_AMR_PAUSE_CON *)(ptr))->header = TRL1_MMI_VM_AMR_PAUSE_CON | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MMI_VM_AMR_PAUSE_CON)); - } - } - break; - case MMI_VM_AMR_RESUME_CON: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MMI_VM_AMR_RESUME_CON), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MMI_VM_AMR_RESUME_CON *)(ptr))->header = TRL1_MMI_VM_AMR_RESUME_CON | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MMI_VM_AMR_RESUME_CON)); - } - } - break; - - - - - #endif // L1_VOICE_MEMO_AMR - - #if (SPEECH_RECO) - case MMI_SR_ENROLL_START_REQ: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MMI_SR_ENROLL_START_REQ), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MMI_SR_ENROLL_START_REQ *)(ptr))->header = TRL1_MMI_SR_ENROLL_START_REQ | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_MMI_SR_ENROLL_START_REQ *)(ptr))->database_id = ((T_MMI_SR_ENROLL_REQ *)(msg->SigP))->database_id; - ((T_TR_MMI_SR_ENROLL_START_REQ *)(ptr))->word_index = ((T_MMI_SR_ENROLL_REQ *)(msg->SigP))->word_index; - ((T_TR_MMI_SR_ENROLL_START_REQ *)(ptr))->speech = ((T_MMI_SR_ENROLL_REQ *)(msg->SigP))->speech; - ((T_TR_MMI_SR_ENROLL_START_REQ *)(ptr))->speech_address = (UWORD32) ((T_MMI_SR_ENROLL_REQ *)(msg->SigP))->speech_address; - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MMI_SR_ENROLL_START_REQ)); - } - } - break; - - case MMI_SR_ENROLL_STOP_REQ: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MMI_SR_ENROLL_STOP_REQ), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MMI_SR_ENROLL_STOP_REQ *)(ptr))->header = TRL1_MMI_SR_ENROLL_STOP_REQ | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MMI_SR_ENROLL_STOP_REQ)); - } - } - break; - - case MMI_SR_ENROLL_START_CON: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MMI_SR_ENROLL_START_CON), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MMI_SR_ENROLL_START_CON *)(ptr))->header = TRL1_MMI_SR_ENROLL_START_CON | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MMI_SR_ENROLL_START_CON)); - } - } - break; - - case MMI_SR_ENROLL_STOP_CON: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MMI_SR_ENROLL_STOP_CON), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MMI_SR_ENROLL_STOP_CON *)(ptr))->header = TRL1_MMI_SR_ENROLL_STOP_CON | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_MMI_SR_ENROLL_STOP_CON *)(ptr))->error_id = ((T_MMI_SR_ENROLL_STOP_CON *)(msg->SigP))->error_id; - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MMI_SR_ENROLL_STOP_CON)); - } - } - break; - - case MMI_SR_UPDATE_START_REQ: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MMI_SR_UPDATE_START_REQ), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MMI_SR_UPDATE_START_REQ *)(ptr))->header = TRL1_MMI_SR_UPDATE_START_REQ | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_MMI_SR_UPDATE_START_REQ *)(ptr))->database_id = ((T_MMI_SR_UPDATE_REQ *)(msg->SigP))->database_id; - ((T_TR_MMI_SR_UPDATE_START_REQ *)(ptr))->word_index = ((T_MMI_SR_UPDATE_REQ *)(msg->SigP))->word_index; - ((T_TR_MMI_SR_UPDATE_START_REQ *)(ptr))->speech = ((T_MMI_SR_UPDATE_REQ *)(msg->SigP))->speech; - ((T_TR_MMI_SR_UPDATE_START_REQ *)(ptr))->speech_address = ((T_MMI_SR_UPDATE_REQ *)(msg->SigP))->speech_address; - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MMI_SR_UPDATE_START_REQ)); - } - } - break; - - case MMI_SR_UPDATE_STOP_REQ: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MMI_SR_UPDATE_STOP_REQ), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MMI_SR_UPDATE_STOP_REQ *)(ptr))->header = TRL1_MMI_SR_UPDATE_STOP_REQ | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MMI_SR_UPDATE_STOP_REQ)); - } - } - break; - - case MMI_SR_UPDATE_START_CON: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MMI_SR_UPDATE_START_CON), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MMI_SR_UPDATE_START_CON *)(ptr))->header = TRL1_MMI_SR_UPDATE_START_CON | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MMI_SR_UPDATE_START_CON)); - } - } - break; - - case MMI_SR_UPDATE_STOP_CON: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MMI_SR_UPDATE_STOP_CON), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MMI_SR_UPDATE_STOP_CON *)(ptr))->header = TRL1_MMI_SR_UPDATE_STOP_CON | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_MMI_SR_UPDATE_STOP_CON *)(ptr))->error_id = ((T_MMI_SR_UPDATE_STOP_CON *)(msg->SigP))->error_id; - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MMI_SR_UPDATE_STOP_CON)); - } - } - break; - - case MMI_SR_RECO_START_REQ: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MMI_SR_RECO_START_REQ), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MMI_SR_RECO_START_REQ *)(ptr))->header = TRL1_MMI_SR_RECO_START_REQ | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_MMI_SR_RECO_START_REQ *)(ptr))->database_id = ((T_MMI_SR_RECO_REQ *)(msg->SigP))->database_id; - ((T_TR_MMI_SR_RECO_START_REQ *)(ptr))->vocabulary_size = ((T_MMI_SR_RECO_REQ *)(msg->SigP))->vocabulary_size; - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MMI_SR_RECO_START_REQ)); - } - } - break; - - case MMI_SR_RECO_STOP_REQ: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MMI_SR_RECO_STOP_REQ), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MMI_SR_RECO_STOP_REQ *)(ptr))->header = TRL1_MMI_SR_RECO_STOP_REQ | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MMI_SR_RECO_STOP_REQ)); - } - } - break; - - case MMI_SR_RECO_START_CON: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MMI_SR_RECO_START_CON), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MMI_SR_RECO_START_CON *)(ptr))->header = TRL1_MMI_SR_RECO_START_CON | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MMI_SR_RECO_START_CON)); - } - } - break; - - case MMI_SR_RECO_STOP_CON: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MMI_SR_RECO_STOP_CON), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MMI_SR_RECO_STOP_CON *)(ptr))->header = TRL1_MMI_SR_RECO_STOP_CON | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_MMI_SR_RECO_STOP_CON *)(ptr))->error_id = ((T_MMI_SR_RECO_STOP_CON *)(msg->SigP))->error_id; - ((T_TR_MMI_SR_RECO_STOP_CON *)(ptr))->best_word_index = ((T_MMI_SR_RECO_STOP_CON *)(msg->SigP))->best_word_index; - ((T_TR_MMI_SR_RECO_STOP_CON *)(ptr))->best_word_score = ((T_MMI_SR_RECO_STOP_CON *)(msg->SigP))->best_word_score; - ((T_TR_MMI_SR_RECO_STOP_CON *)(ptr))->second_best_word_index = ((T_MMI_SR_RECO_STOP_CON *)(msg->SigP))->second_best_word_index; - ((T_TR_MMI_SR_RECO_STOP_CON *)(ptr))->second_best_word_score = ((T_MMI_SR_RECO_STOP_CON *)(msg->SigP))->second_best_word_score; - ((T_TR_MMI_SR_RECO_STOP_CON *)(ptr))->third_best_word_index = ((T_MMI_SR_RECO_STOP_CON *)(msg->SigP))->third_best_word_index; - ((T_TR_MMI_SR_RECO_STOP_CON *)(ptr))->third_best_word_score = ((T_MMI_SR_RECO_STOP_CON *)(msg->SigP))->third_best_word_score; - ((T_TR_MMI_SR_RECO_STOP_CON *)(ptr))->fourth_best_word_index = ((T_MMI_SR_RECO_STOP_CON *)(msg->SigP))->fourth_best_word_index; - ((T_TR_MMI_SR_RECO_STOP_CON *)(ptr))->fourth_best_word_score = ((T_MMI_SR_RECO_STOP_CON *)(msg->SigP))->fourth_best_word_score; - ((T_TR_MMI_SR_RECO_STOP_CON *)(ptr))->d_sr_db_level = ((T_MMI_SR_RECO_STOP_CON *)(msg->SigP))->d_sr_db_level; - ((T_TR_MMI_SR_RECO_STOP_CON *)(ptr))->d_sr_db_noise = ((T_MMI_SR_RECO_STOP_CON *)(msg->SigP))->d_sr_db_noise; - ((T_TR_MMI_SR_RECO_STOP_CON *)(ptr))->d_sr_model_size = ((T_MMI_SR_RECO_STOP_CON *)(msg->SigP))->d_sr_model_size; - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MMI_SR_RECO_STOP_CON)); - } - } - break; - - case MMI_SR_UPDATE_CHECK_START_REQ: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MMI_SR_UPDATE_CHECK_START_REQ), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MMI_SR_UPDATE_CHECK_START_REQ *)(ptr))->header = TRL1_MMI_SR_UPDATE_CHECK_START_REQ | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_MMI_SR_UPDATE_CHECK_START_REQ *)(ptr))->database_id = ((T_MMI_SR_UPDATE_CHECK_REQ *)(msg->SigP))->database_id; - ((T_TR_MMI_SR_UPDATE_CHECK_START_REQ *)(ptr))->word_index = ((T_MMI_SR_UPDATE_CHECK_REQ *)(msg->SigP))->word_index; - ((T_TR_MMI_SR_UPDATE_CHECK_START_REQ *)(ptr))->model_address = (UWORD32) ((T_MMI_SR_UPDATE_CHECK_REQ *)(msg->SigP))->model_address; - ((T_TR_MMI_SR_UPDATE_CHECK_START_REQ *)(ptr))->speech = ((T_MMI_SR_UPDATE_CHECK_REQ *)(msg->SigP))->speech; - ((T_TR_MMI_SR_UPDATE_CHECK_START_REQ *)(ptr))->speech_address = (UWORD32) ((T_MMI_SR_UPDATE_CHECK_REQ *)(msg->SigP))->speech_address; - ((T_TR_MMI_SR_UPDATE_CHECK_START_REQ *)(ptr))->vocabulary_size = ((T_MMI_SR_UPDATE_CHECK_REQ *)(msg->SigP))->vocabulary_size; - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MMI_SR_UPDATE_CHECK_START_REQ)); - } - } - break; - - case MMI_SR_UPDATE_CHECK_STOP_REQ: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MMI_SR_UPDATE_CHECK_STOP_REQ), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MMI_SR_UPDATE_CHECK_STOP_REQ *)(ptr))->header = TRL1_MMI_SR_UPDATE_CHECK_STOP_REQ | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MMI_SR_UPDATE_CHECK_STOP_REQ)); - } - } - break; - - case MMI_SR_UPDATE_CHECK_START_CON: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MMI_SR_UPDATE_CHECK_START_CON), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MMI_SR_UPDATE_CHECK_START_CON *)(ptr))->header = TRL1_MMI_SR_UPDATE_CHECK_START_CON | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MMI_SR_UPDATE_CHECK_START_CON)); - } - } - break; - - case MMI_SR_UPDATE_CHECK_STOP_CON: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MMI_SR_UPDATE_CHECK_STOP_CON), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MMI_SR_UPDATE_CHECK_STOP_CON *)(ptr))->header = TRL1_MMI_SR_UPDATE_CHECK_STOP_CON | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_MMI_SR_UPDATE_CHECK_STOP_CON *)(ptr))->error_id = ((T_MMI_SR_UPDATE_CHECK_STOP_CON *)(msg->SigP))->error_id; - ((T_TR_MMI_SR_UPDATE_CHECK_STOP_CON *)(ptr))->best_word_index = ((T_MMI_SR_UPDATE_CHECK_STOP_CON *)(msg->SigP))->best_word_index; - ((T_TR_MMI_SR_UPDATE_CHECK_STOP_CON *)(ptr))->best_word_score = ((T_MMI_SR_UPDATE_CHECK_STOP_CON *)(msg->SigP))->best_word_score; - ((T_TR_MMI_SR_UPDATE_CHECK_STOP_CON *)(ptr))->second_best_word_index = ((T_MMI_SR_UPDATE_CHECK_STOP_CON *)(msg->SigP))->second_best_word_index; - ((T_TR_MMI_SR_UPDATE_CHECK_STOP_CON *)(ptr))->second_best_word_score = ((T_MMI_SR_UPDATE_CHECK_STOP_CON *)(msg->SigP))->second_best_word_score; - ((T_TR_MMI_SR_UPDATE_CHECK_STOP_CON *)(ptr))->third_best_word_index = ((T_MMI_SR_UPDATE_CHECK_STOP_CON *)(msg->SigP))->third_best_word_index; - ((T_TR_MMI_SR_UPDATE_CHECK_STOP_CON *)(ptr))->third_best_word_score = ((T_MMI_SR_UPDATE_CHECK_STOP_CON *)(msg->SigP))->third_best_word_score; - ((T_TR_MMI_SR_UPDATE_CHECK_STOP_CON *)(ptr))->fourth_best_word_index = ((T_MMI_SR_UPDATE_CHECK_STOP_CON *)(msg->SigP))->fourth_best_word_index; - ((T_TR_MMI_SR_UPDATE_CHECK_STOP_CON *)(ptr))->fourth_best_word_score = ((T_MMI_SR_UPDATE_CHECK_STOP_CON *)(msg->SigP))->fourth_best_word_score; - ((T_TR_MMI_SR_UPDATE_CHECK_STOP_CON *)(ptr))->d_sr_db_level = ((T_MMI_SR_UPDATE_CHECK_STOP_CON *)(msg->SigP))->d_sr_db_level; - ((T_TR_MMI_SR_UPDATE_CHECK_STOP_CON *)(ptr))->d_sr_db_noise = ((T_MMI_SR_UPDATE_CHECK_STOP_CON *)(msg->SigP))->d_sr_db_noise; - ((T_TR_MMI_SR_UPDATE_CHECK_STOP_CON *)(ptr))->d_sr_model_size = ((T_MMI_SR_UPDATE_CHECK_STOP_CON *)(msg->SigP))->d_sr_model_size; - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MMI_SR_UPDATE_CHECK_STOP_CON)); - } - } - break; - - case L1_SRBACK_SAVE_DATA_REQ: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_L1_SRBACK_SAVE_DATA_REQ), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_L1_SRBACK_SAVE_DATA_REQ *)(ptr))->header = TRL1_L1_SRBACK_SAVE_DATA_REQ | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_L1_SRBACK_SAVE_DATA_REQ *)(ptr))->database_id = ((T_L1_SRBACK_SAVE_DATA_REQ *)(msg->SigP))->database_id; - ((T_TR_L1_SRBACK_SAVE_DATA_REQ *)(ptr))->model_index = ((T_L1_SRBACK_SAVE_DATA_REQ *)(msg->SigP))->model_index; - ((T_TR_L1_SRBACK_SAVE_DATA_REQ *)(ptr))->model_RAM_address = (UWORD32) ((T_L1_SRBACK_SAVE_DATA_REQ *)(msg->SigP))->model_RAM_address; - ((T_TR_L1_SRBACK_SAVE_DATA_REQ *)(ptr))->speech = ((T_L1_SRBACK_SAVE_DATA_REQ *)(msg->SigP))->speech; - ((T_TR_L1_SRBACK_SAVE_DATA_REQ *)(ptr))->start_buffer = (UWORD32) ((T_L1_SRBACK_SAVE_DATA_REQ *)(msg->SigP))->start_buffer; - ((T_TR_L1_SRBACK_SAVE_DATA_REQ *)(ptr))->stop_buffer = (UWORD32) ((T_L1_SRBACK_SAVE_DATA_REQ *)(msg->SigP))->stop_buffer; - ((T_TR_L1_SRBACK_SAVE_DATA_REQ *)(ptr))->start_address = (UWORD32) ((T_L1_SRBACK_SAVE_DATA_REQ *)(msg->SigP))->start_address; - ((T_TR_L1_SRBACK_SAVE_DATA_REQ *)(ptr))->stop_address = (UWORD32) ((T_L1_SRBACK_SAVE_DATA_REQ *)(msg->SigP))->stop_address; - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_L1_SRBACK_SAVE_DATA_REQ)); - } - } - break; - - case L1_SRBACK_SAVE_DATA_CON: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_L1_SRBACK_SAVE_DATA_CON), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_L1_SRBACK_SAVE_DATA_CON *)(ptr))->header = TRL1_L1_SRBACK_SAVE_DATA_CON | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_L1_SRBACK_SAVE_DATA_CON)); - } - } - break; - - case L1_SRBACK_LOAD_MODEL_REQ: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_L1_SRBACK_LOAD_MODEL_REQ), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_L1_SRBACK_LOAD_MODEL_REQ *)(ptr))->header = TRL1_L1_SRBACK_LOAD_MODEL_REQ | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_L1_SRBACK_LOAD_MODEL_REQ *)(ptr))->database_id = ((T_L1_SRBACK_LOAD_MODEL_REQ *)(msg->SigP))->database_id; - ((T_TR_L1_SRBACK_LOAD_MODEL_REQ *)(ptr))->model_index = ((T_L1_SRBACK_LOAD_MODEL_REQ *)(msg->SigP))->model_index; - ((T_TR_L1_SRBACK_LOAD_MODEL_REQ *)(ptr))->model_RAM_address = (UWORD32) ((T_L1_SRBACK_LOAD_MODEL_REQ *)(msg->SigP))->model_RAM_address; - ((T_TR_L1_SRBACK_LOAD_MODEL_REQ *)(ptr))->CTO_enable = ((T_L1_SRBACK_LOAD_MODEL_REQ *)(msg->SigP))->CTO_enable; - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_L1_SRBACK_LOAD_MODEL_REQ)); - } - } - break; - - case L1_SRBACK_LOAD_MODEL_CON: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_L1_SRBACK_LOAD_MODEL_CON), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_L1_SRBACK_LOAD_MODEL_CON *)(ptr))->header = TRL1_L1_SRBACK_LOAD_MODEL_CON | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_L1_SRBACK_LOAD_MODEL_CON)); - } - } - break; - - case L1_SRBACK_TEMP_SAVE_DATA_REQ: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_L1_SRBACK_TEMP_SAVE_DATA_REQ), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_L1_SRBACK_TEMP_SAVE_DATA_REQ *)(ptr))->header = TRL1_L1_SRBACK_TEMP_SAVE_DATA_REQ | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_L1_SRBACK_TEMP_SAVE_DATA_REQ *)(ptr))->model_RAM_address_input = (UWORD32) ((T_L1_SRBACK_TEMP_SAVE_DATA_REQ *)(msg->SigP))->model_RAM_address_input; - ((T_TR_L1_SRBACK_TEMP_SAVE_DATA_REQ *)(ptr))->model_RAM_address_output = (UWORD32) ((T_L1_SRBACK_TEMP_SAVE_DATA_REQ *)(msg->SigP))->model_RAM_address_output; - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_L1_SRBACK_TEMP_SAVE_DATA_REQ)); - } - } - break; - - case L1_SRBACK_TEMP_SAVE_DATA_CON: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_L1_SRBACK_TEMP_SAVE_DATA_CON), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_L1_SRBACK_TEMP_SAVE_DATA_CON *)(ptr))->header = TRL1_L1_SRBACK_TEMP_SAVE_DATA_CON | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_L1_SRBACK_TEMP_SAVE_DATA_CON)); - } - } - break; - #endif // SPEECH_RECO - #if (FIR) - case MMI_AUDIO_FIR_REQ: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MMI_AUDIO_FIR_REQ), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MMI_AUDIO_FIR_REQ *)(ptr))->header = TRL1_MMI_AUDIO_FIR_REQ | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_MMI_AUDIO_FIR_REQ *)(ptr))->fir_loop = ((T_MMI_AUDIO_FIR_REQ *)(msg->SigP))->fir_loop; - ((T_TR_MMI_AUDIO_FIR_REQ *)(ptr))->update_fir = ((T_MMI_AUDIO_FIR_REQ *)(msg->SigP))->update_fir; - ((T_TR_MMI_AUDIO_FIR_REQ *)(ptr))->fir_ul_coefficient = (UWORD32) ((T_MMI_AUDIO_FIR_REQ *)(msg->SigP))->fir_ul_coefficient; - ((T_TR_MMI_AUDIO_FIR_REQ *)(ptr))->fir_dl_coefficient = (UWORD32) ((T_MMI_AUDIO_FIR_REQ *)(msg->SigP))->fir_dl_coefficient; - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MMI_AUDIO_FIR_REQ)); - } - } - break; - - case MMI_AUDIO_FIR_CON: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MMI_AUDIO_FIR_CON), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MMI_AUDIO_FIR_CON *)(ptr))->header = TRL1_MMI_AUDIO_FIR_CON | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MMI_AUDIO_FIR_CON)); - } - } - break; - #endif //FIR - #if (L1_AEC == 1) - case MMI_AEC_REQ: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MMI_AEC_REQ), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MMI_AEC_REQ *)(ptr))->header = TRL1_MMI_AEC_REQ | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_MMI_AEC_REQ *)(ptr))->aec_control = ((T_MMI_AEC_REQ *)(msg->SigP))->aec_control; - - #if (L1_NEW_AEC) - ((T_TR_MMI_AEC_REQ *)(ptr))->cont_filter = ((T_MMI_AEC_REQ *)(msg->SigP))->cont_filter; - ((T_TR_MMI_AEC_REQ *)(ptr))->granularity_att = ((T_MMI_AEC_REQ *)(msg->SigP))->granularity_att; - ((T_TR_MMI_AEC_REQ *)(ptr))->coef_smooth = ((T_MMI_AEC_REQ *)(msg->SigP))->coef_smooth; - ((T_TR_MMI_AEC_REQ *)(ptr))->es_level_max = ((T_MMI_AEC_REQ *)(msg->SigP))->es_level_max; - ((T_TR_MMI_AEC_REQ *)(ptr))->fact_vad = ((T_MMI_AEC_REQ *)(msg->SigP))->fact_vad; - ((T_TR_MMI_AEC_REQ *)(ptr))->thrs_abs = ((T_MMI_AEC_REQ *)(msg->SigP))->thrs_abs; - ((T_TR_MMI_AEC_REQ *)(ptr))->fact_asd_fil = ((T_MMI_AEC_REQ *)(msg->SigP))->fact_asd_fil; - ((T_TR_MMI_AEC_REQ *)(ptr))->fact_asd_mut = ((T_MMI_AEC_REQ *)(msg->SigP))->fact_asd_mut; - #else - ((T_TR_MMI_AEC_REQ *)(ptr))->cont_filter = 0; - ((T_TR_MMI_AEC_REQ *)(ptr))->granularity_att = 0; - ((T_TR_MMI_AEC_REQ *)(ptr))->coef_smooth = 0; - ((T_TR_MMI_AEC_REQ *)(ptr))->es_level_max = 0; - ((T_TR_MMI_AEC_REQ *)(ptr))->fact_vad = 0; - ((T_TR_MMI_AEC_REQ *)(ptr))->thrs_abs = 0; - ((T_TR_MMI_AEC_REQ *)(ptr))->fact_asd_fil = 0; - ((T_TR_MMI_AEC_REQ *)(ptr))->fact_asd_mut = 0; - #endif - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MMI_AEC_REQ)); - } - } - break; - - #if (L1_NEW_AEC) - case L1_AEC_IND: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_L1_AEC_IND), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_L1_AEC_IND *)(ptr))->header = TRL1_L1_AEC_IND | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_L1_AEC_IND *)(ptr))->far_end_pow = ((T_L1_AEC_IND *)(msg->SigP))->far_end_pow; - ((T_TR_L1_AEC_IND *)(ptr))->far_end_noise = ((T_L1_AEC_IND *)(msg->SigP))->far_end_noise; - ((T_TR_L1_AEC_IND *)(ptr))->es_level = ((T_L1_AEC_IND *)(msg->SigP))->es_level; - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_L1_AEC_IND)); - } - } - #endif - - case MMI_AEC_CON: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MMI_AEC_CON), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MMI_AEC_CON *)(ptr))->header = TRL1_MMI_AEC_CON | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MMI_AEC_CON)); - } - } - break; - #endif //AEC - - #if (AUDIO_MODE) - case MMI_AUDIO_MODE_REQ: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MMI_AUDIO_MODE_REQ), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MMI_AUDIO_MODE_REQ *)(ptr))->header = TRL1_MMI_AUDIO_MODE_REQ | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_MMI_AUDIO_MODE_REQ *)(ptr))->audio_mode = ((T_MMI_AUDIO_MODE *)(msg->SigP))->audio_mode; - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MMI_AUDIO_MODE_REQ)); - } - } - break; - - case MMI_AUDIO_MODE_CON: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MMI_AUDIO_MODE_CON), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MMI_AUDIO_MODE_CON *)(ptr))->header = TRL1_MMI_AUDIO_MODE_CON | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MMI_AUDIO_MODE_CON)); - } - } - break; - - #endif // AUDIO_MODE - - #if (MELODY_E2) - // MMI command and request - case MMI_MELODY0_E2_START_REQ : - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MMI_MELODY0_E2_START_REQ), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MMI_MELODY0_E2_START_REQ *)(ptr))->header = TRL1_MMI_MELODY0_E2_START_REQ | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_MMI_MELODY0_E2_START_REQ *)(ptr))->session_id = ((T_MMI_MELODY_E2_REQ *)(msg->SigP))->session_id, - ((T_TR_MMI_MELODY0_E2_START_REQ *)(ptr))->loopback = ((T_MMI_MELODY_E2_REQ *)(msg->SigP))->loopback; - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MMI_MELODY0_E2_START_REQ)); - } - } - break; - - case MMI_MELODY0_E2_STOP_REQ : - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MMI_MELODY0_E2_STOP_REQ), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MMI_MELODY0_E2_STOP_REQ *)(ptr))->header = TRL1_MMI_MELODY0_E2_STOP_REQ | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MMI_MELODY0_E2_STOP_REQ)); - } - } - break; - - case MMI_MELODY0_E2_START_CON : - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MMI_MELODY0_E2_START_CON), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MMI_MELODY0_E2_START_CON *)(ptr))->header = TRL1_MMI_MELODY0_E2_START_CON | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MMI_MELODY0_E2_START_CON)); - } - } - break; - - case MMI_MELODY0_E2_STOP_CON : - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MMI_MELODY0_E2_STOP_CON), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MMI_MELODY0_E2_STOP_CON *)(ptr))->header = TRL1_MMI_MELODY0_E2_STOP_CON | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MMI_MELODY0_E2_STOP_CON)); - } - } - break; - - case MMI_MELODY1_E2_START_REQ : - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MMI_MELODY0_E2_START_REQ), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MMI_MELODY1_E2_START_REQ *)(ptr))->header = TRL1_MMI_MELODY1_E2_START_REQ | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_MMI_MELODY1_E2_START_REQ *)(ptr))->session_id = ((T_MMI_MELODY_E2_REQ *)(msg->SigP))->session_id, - ((T_TR_MMI_MELODY1_E2_START_REQ *)(ptr))->loopback = ((T_MMI_MELODY_E2_REQ *)(msg->SigP))->loopback; - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MMI_MELODY1_E2_START_REQ)); - } - } - break; - - case MMI_MELODY1_E2_STOP_REQ : - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MMI_MELODY1_E2_STOP_REQ), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MMI_MELODY1_E2_STOP_REQ *)(ptr))->header = TRL1_MMI_MELODY1_E2_STOP_REQ | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MMI_MELODY1_E2_STOP_REQ)); - } - } - break; - - case MMI_MELODY1_E2_START_CON : - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MMI_MELODY1_E2_START_CON), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MMI_MELODY1_E2_START_CON *)(ptr))->header = TRL1_MMI_MELODY1_E2_START_CON | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MMI_MELODY1_E2_START_CON)); - } - } - break; - - case MMI_MELODY1_E2_STOP_CON : - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MMI_MELODY1_E2_STOP_CON), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MMI_MELODY1_E2_STOP_CON *)(ptr))->header = TRL1_MMI_MELODY1_E2_STOP_CON | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MMI_MELODY1_E2_STOP_CON)); - } - } - break; - - // Audio download instrument message - case L1_BACK_MELODY_E2_LOAD_INSTRUMENT_REQ : - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_L1_BACK_MELODY_E2_LOAD_INSTRUMENT_REQ), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_L1_BACK_MELODY_E2_LOAD_INSTRUMENT_REQ *)(ptr))->header = TRL1_L1_BACK_MELODY_E2_LOAD_INSTRUMENT_REQ | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_L1_BACK_MELODY_E2_LOAD_INSTRUMENT_REQ *)(ptr))->melody_id = ((T_L1_BACK_MELODY_E2_LOAD_INSTRUMENT_REQ *)(msg->SigP))->melody_id; - ((T_TR_L1_BACK_MELODY_E2_LOAD_INSTRUMENT_REQ *)(ptr))->number_of_instrument = ((T_L1_BACK_MELODY_E2_LOAD_INSTRUMENT_REQ *)(msg->SigP))->number_of_instrument; - ((T_TR_L1_BACK_MELODY_E2_LOAD_INSTRUMENT_REQ *)(ptr))->waves_table_id[0] = ((T_L1_BACK_MELODY_E2_LOAD_INSTRUMENT_REQ *)(msg->SigP))->waves_table_id[0]; - ((T_TR_L1_BACK_MELODY_E2_LOAD_INSTRUMENT_REQ *)(ptr))->waves_table_id[1] = ((T_L1_BACK_MELODY_E2_LOAD_INSTRUMENT_REQ *)(msg->SigP))->waves_table_id[1]; - ((T_TR_L1_BACK_MELODY_E2_LOAD_INSTRUMENT_REQ *)(ptr))->waves_table_id[2] = ((T_L1_BACK_MELODY_E2_LOAD_INSTRUMENT_REQ *)(msg->SigP))->waves_table_id[2]; - ((T_TR_L1_BACK_MELODY_E2_LOAD_INSTRUMENT_REQ *)(ptr))->waves_table_id[3] = ((T_L1_BACK_MELODY_E2_LOAD_INSTRUMENT_REQ *)(msg->SigP))->waves_table_id[3]; - ((T_TR_L1_BACK_MELODY_E2_LOAD_INSTRUMENT_REQ *)(ptr))->waves_table_id[4] = ((T_L1_BACK_MELODY_E2_LOAD_INSTRUMENT_REQ *)(msg->SigP))->waves_table_id[4]; - ((T_TR_L1_BACK_MELODY_E2_LOAD_INSTRUMENT_REQ *)(ptr))->waves_table_id[5] = ((T_L1_BACK_MELODY_E2_LOAD_INSTRUMENT_REQ *)(msg->SigP))->waves_table_id[5]; - ((T_TR_L1_BACK_MELODY_E2_LOAD_INSTRUMENT_REQ *)(ptr))->waves_table_id[6] = ((T_L1_BACK_MELODY_E2_LOAD_INSTRUMENT_REQ *)(msg->SigP))->waves_table_id[6]; - ((T_TR_L1_BACK_MELODY_E2_LOAD_INSTRUMENT_REQ *)(ptr))->waves_table_id[7] = ((T_L1_BACK_MELODY_E2_LOAD_INSTRUMENT_REQ *)(msg->SigP))->waves_table_id[7]; - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_L1_BACK_MELODY_E2_LOAD_INSTRUMENT_REQ)); - } - } - break; - - case L1_BACK_MELODY_E2_LOAD_INSTRUMENT_CON : - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_L1_BACK_MELODY_E2_LOAD_INSTRUMENT_CON), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_L1_BACK_MELODY_E2_LOAD_INSTRUMENT_CON *)(ptr))->header = TRL1_L1_BACK_MELODY_E2_LOAD_INSTRUMENT_CON | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_L1_BACK_MELODY_E2_LOAD_INSTRUMENT_CON *)(ptr))->melody_id = ((T_L1_BACK_MELODY_E2_LOAD_INSTRUMENT_CON *)(msg->SigP))->melody_id; - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_L1_BACK_MELODY_E2_LOAD_INSTRUMENT_CON)); - } - } - break; - - case L1_BACK_MELODY_E2_UNLOAD_INSTRUMENT_REQ : - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_L1_BACK_MELODY_E2_UNLOAD_INSTRUMENT_REQ), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_L1_BACK_MELODY_E2_UNLOAD_INSTRUMENT_REQ *)(ptr))->header = TRL1_L1_BACK_MELODY_E2_UNLOAD_INSTRUMENT_REQ | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_L1_BACK_MELODY_E2_UNLOAD_INSTRUMENT_REQ *)(ptr))->melody_id = ((T_L1_BACK_MELODY_E2_UNLOAD_INSTRUMENT_REQ *)(msg->SigP))->melody_id; - ((T_TR_L1_BACK_MELODY_E2_UNLOAD_INSTRUMENT_REQ *)(ptr))->number_of_instrument = ((T_L1_BACK_MELODY_E2_UNLOAD_INSTRUMENT_REQ *)(msg->SigP))->number_of_instrument; - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_L1_BACK_MELODY_E2_UNLOAD_INSTRUMENT_REQ)); - } - } - break; - - case L1_BACK_MELODY_E2_UNLOAD_INSTRUMENT_CON : - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_L1_BACK_MELODY_E2_UNLOAD_INSTRUMENT_CON), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_L1_BACK_MELODY_E2_UNLOAD_INSTRUMENT_CON *)(ptr))->header = TRL1_L1_BACK_MELODY_E2_UNLOAD_INSTRUMENT_CON | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_L1_BACK_MELODY_E2_UNLOAD_INSTRUMENT_CON *)(ptr))->melody_id = ((T_L1_BACK_MELODY_E2_UNLOAD_INSTRUMENT_CON *)(msg->SigP))->melody_id; - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_L1_BACK_MELODY_E2_UNLOAD_INSTRUMENT_REQ)); - } - } - break; - - // L1S stop confirmation - case L1_MELODY0_E2_STOP_CON : - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_L1_MELODY0_E2_STOP_CON), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_L1_MELODY0_E2_STOP_CON *)(ptr))->header = TRL1_L1_MELODY0_E2_STOP_CON | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_L1_MELODY0_E2_STOP_CON)); - } - } - break; - - case L1_MELODY1_E2_STOP_CON : - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_L1_MELODY1_E2_STOP_CON), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_L1_MELODY1_E2_STOP_CON *)(ptr))->header = TRL1_L1_MELODY1_E2_STOP_CON | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_L1_MELODY1_E2_STOP_CON)); - } - } - break; - - // Instrument download - #endif // MELODY_E2 -#if (L1_VOCODER_IF_CHANGE == 1) - case MMI_TCH_VOCODER_CFG_REQ: - { - char *ptr; - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MMI_TCH_VOCODER_CFG_REQ), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - ((T_TR_MMI_TCH_VOCODER_CFG_REQ *)(ptr))->header = TRL1_MMI_TCH_VOCODER_CFG_REQ | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MMI_TCH_VOCODER_CFG_REQ)); - } - } - break; - case MMI_TCH_VOCODER_CFG_CON: - { - char *ptr; - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MMI_TCH_VOCODER_CFG_CON), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - ((T_TR_MMI_TCH_VOCODER_CFG_CON *)(ptr))->header = TRL1_MMI_TCH_VOCODER_CFG_CON | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MMI_TCH_VOCODER_CFG_CON)); - } - } - break; - case L1_VOCODER_CFG_ENABLE_CON: - { - char *ptr; - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_L1_VOCODER_CFG_ENABLE_CON), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - ((T_TR_L1_VOCODER_CFG_ENABLE_CON *)(ptr))->header = TRL1_L1_VOCODER_CFG_ENABLE_CON | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - L1_send_trace_no_cpy(ptr,sizeof(T_TR_L1_VOCODER_CFG_ENABLE_CON)); - } - } - break; - case L1_VOCODER_CFG_DISABLE_CON: - { - char *ptr; - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_L1_VOCODER_CFG_DISABLE_CON), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - ((T_TR_L1_VOCODER_CFG_DISABLE_CON *)(ptr))->header = TRL1_L1_VOCODER_CFG_DISABLE_CON | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - L1_send_trace_no_cpy(ptr,sizeof(T_TR_L1_VOCODER_CFG_DISABLE_CON)); - } - } - break; - -#endif // L1_VOCODER_IF_CHANGE - #endif // AUDIO_TASK - - /////////////////// - // OML1 messages // - /////////////////// - - case OML1_CLOSE_TCH_LOOP_REQ: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_OML1_CLOSE_TCH_LOOP_REQ), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_OML1_CLOSE_TCH_LOOP_REQ *)(ptr))->header = TRL1_OML1_CLOSE_TCH_LOOP_REQ | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_OML1_CLOSE_TCH_LOOP_REQ *)(ptr))->sub_channel = ((T_OML1_CLOSE_TCH_LOOP_REQ *)(msg->SigP))->sub_channel; - ((T_TR_OML1_CLOSE_TCH_LOOP_REQ *)(ptr))->frame_erasure = ((T_OML1_CLOSE_TCH_LOOP_REQ *)(msg->SigP))->frame_erasure; - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_OML1_CLOSE_TCH_LOOP_REQ)); - } - } - break; - - case OML1_OPEN_TCH_LOOP_REQ: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_OML1_OPEN_TCH_LOOP_REQ), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_OML1_OPEN_TCH_LOOP_REQ *)(ptr))->header = TRL1_OML1_OPEN_TCH_LOOP_REQ | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_OML1_OPEN_TCH_LOOP_REQ)); - } - } - break; - - case OML1_START_DAI_TEST_REQ: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_OML1_START_DAI_TEST_REQ), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_OML1_START_DAI_TEST_REQ *)(ptr))->header = TRL1_OML1_START_DAI_TEST_REQ | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_OML1_START_DAI_TEST_REQ *)(ptr))->tested_device = ((T_OML1_START_DAI_TEST_REQ *)(msg->SigP))->tested_device; - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_OML1_START_DAI_TEST_REQ)); - } - } - break; - - case OML1_STOP_DAI_TEST_REQ: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_OML1_STOP_DAI_TEST_REQ), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_OML1_STOP_DAI_TEST_REQ *)(ptr))->header = TRL1_OML1_STOP_DAI_TEST_REQ | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_OML1_STOP_DAI_TEST_REQ)); - } - } - break; - - /////////////////// - // Test messages // - /////////////////// - - case TST_TEST_HW_REQ: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_TST_TEST_HW_REQ), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_TST_TEST_HW_REQ *)(ptr))->header = TRL1_TST_TEST_HW_REQ | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_TST_TEST_HW_REQ)); - } - } - break; - - case L1_TEST_HW_INFO: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_L1_TEST_HW_INFO), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_L1_TEST_HW_INFO *)(ptr))->header = TRL1_L1_TEST_HW_INFO | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_L1_TEST_HW_INFO *)(ptr))->dsp_code_version = ((T_TST_TEST_HW_CON*)(msg->SigP))->dsp_code_version; - ((T_TR_L1_TEST_HW_INFO *)(ptr))->dsp_checksum = ((T_TST_TEST_HW_CON*)(msg->SigP))->dsp_checksum; - ((T_TR_L1_TEST_HW_INFO *)(ptr))->dsp_patch_version = ((T_TST_TEST_HW_CON*)(msg->SigP))->dsp_patch_version; - ((T_TR_L1_TEST_HW_INFO *)(ptr))->mcu_alr_version = ((T_TST_TEST_HW_CON*)(msg->SigP))->mcu_alr_version; - ((T_TR_L1_TEST_HW_INFO *)(ptr))->mcu_tm_version = ((T_TST_TEST_HW_CON*)(msg->SigP))->mcu_tm_version; - #if L1_GPRS - ((T_TR_L1_TEST_HW_INFO *)(ptr))->mcu_gprs_version = ((T_TST_TEST_HW_CON*)(msg->SigP))->mcu_gprs_version; - #else - ((T_TR_L1_TEST_HW_INFO *)(ptr))->mcu_gprs_version = 0; - #endif - #if ((((CHIPSET !=2 )) && ((LONG_JUMP != 0))) || (CHIPSET == 12) || (CHIPSET == 15)) - ((T_TR_L1_TEST_HW_INFO *)(ptr))->d_checksum1 = d_checksum1; - ((T_TR_L1_TEST_HW_INFO *)(ptr))->d_checksum2 = d_checksum2; - #else - ((T_TR_L1_TEST_HW_INFO *)(ptr))->d_checksum1 = 0; - ((T_TR_L1_TEST_HW_INFO *)(ptr))->d_checksum2 = 0; - #endif - L1_send_trace_no_cpy(ptr,sizeof(T_TR_L1_TEST_HW_INFO)); - } - } - break; - - case TST_SLEEP_REQ: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_TST_SLEEP_REQ), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_TST_SLEEP_REQ *)(ptr))->header = TRL1_TST_SLEEP_REQ | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_TST_SLEEP_REQ *)(ptr))->sleep_mode = ((T_TST_SLEEP_REQ*)(msg->SigP))->sleep_mode; - ((T_TR_TST_SLEEP_REQ *)(ptr))->clocks = ((T_TST_SLEEP_REQ*)(msg->SigP))->clocks; - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_TST_SLEEP_REQ)); - } - } - break; - - ///////// - // ADC // - ///////// - - case MMI_ADC_REQ: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MMI_ADC_REQ), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MMI_ADC_REQ *)(ptr))->header = TRL1_MMI_ADC_REQ | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MMI_ADC_REQ)); - } - } - break; - - case MMI_STOP_ADC_REQ: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MMI_STOP_ADC_REQ), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MMI_STOP_ADC_REQ *)(ptr))->header = TRL1_MMI_STOP_ADC_REQ | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MMI_STOP_ADC_REQ)); - } - } - break; - - case MMI_STOP_ADC_CON: - { - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_MMI_STOP_ADC_CON), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_MMI_STOP_ADC_CON *)(ptr))->header = TRL1_MMI_STOP_ADC_CON | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_MMI_STOP_ADC_CON)); - } - } - break; - - } // ...End of switch - } // End if L1A message trace enabled -} - -#if L1_RECOVERY - -/*********************************/ -/* Trace in case of system crash */ -/*********************************/ - -void l1_trace_recovery(void) -{ - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TR_RECOVERY), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - - ((T_TR_RECOVERY *)(ptr))->header = TRL1_RECOVERY | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - - L1_send_trace_no_cpy(ptr,sizeof(T_TR_RECOVERY)); - } -} -#endif - -/*************************************************************************/ -/* L1 Dynamic traces */ -/*************************************************************************/ - -/* WARNING : Following functions are called by L1S */ -/***************************************************/ - -#if (DSP_DEBUG_TRACE_ENABLE == 1) - #define DSP_DEBUG_ENABLE \ - if (trace_info.dsp_debug_buf_start[l1s_dsp_com.dsp_r_page] == 0) \ - { \ - trace_info.dsp_debug_buf_start[l1s_dsp_com.dsp_r_page] = l1s_dsp_com.dsp_db2_current_r_ptr->d_debug_ptr_begin; \ - trace_info.dsp_debug_fn[l1s_dsp_com.dsp_r_page] = l1s.actual_time.fn; \ - trace_info.dsp_debug_time[l1s_dsp_com.dsp_r_page] = (UWORD16)l1s.debug_time; \ - } -#endif - -////////////////////// -// L1S Debug Traces // -////////////////////// - -/*-------------------------------------------------------*/ -/* Trace_L1s_Abort() */ -/*-------------------------------------------------------*/ -/* Parameters : */ -/* Return : */ -/* */ -/*-------------------------------------------------------*/ -void Trace_L1s_Abort(UWORD8 task) -{ - xSignalHeaderRec *msg; - - // Allocate DEBUG message. - msg = os_alloc_sig(sizeof(T_TR_L1S_ABORT)); - DEBUGMSG(status,NU_ALLOC_ERR) - msg->SignalCode = TRACE_INFO; - - ((T_TR_L1S_ABORT *)(msg->SigP))->header = TRL1_L1S_ABORT | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_L1S_ABORT *)(msg->SigP))->tpu_offset = l1s.tpu_offset; - ((T_TR_L1S_ABORT *)(msg->SigP))->tpu_offset_hw = l1s.tpu_offset_hw; - ((T_TR_L1S_ABORT *)(msg->SigP))->d_debug = l1s_dsp_com.dsp_db_r_ptr->d_debug & 0xffff; - ((T_TR_L1S_ABORT *)(msg->SigP))->debug_time = (UWORD16) l1s.debug_time & 0xffff; - ((T_TR_L1S_ABORT *)(msg->SigP))->adc_mode = l1a_l1s_com.adc_mode; // ADC enabled - ((T_TR_L1S_ABORT *)(msg->SigP))->task = task; - - // send message... - os_send_sig(msg, L1C1_QUEUE); - DEBUGMSG(status,NU_SEND_QUEUE_ERR) - -} - -/*-------------------------------------------------------*/ -/* Trace_MCU_DSP_Com_Mismatch() */ -/*-------------------------------------------------------*/ -/* Parameters : */ -/* Return : */ -/* */ -/*-------------------------------------------------------*/ -void Trace_MCU_DSP_Com_Mismatch(UWORD8 task) -{ - if (trace_info.current_config->l1_dyn_trace & 1 << L1_DYN_TRACE_L1S_DEBUG) - { - xSignalHeaderRec *msg; - - if((l1s_dsp_com.dsp_db_r_ptr->d_debug & 0xffff ) != (l1s.debug_time & 0xffff )) - // Debug number is different than the one expected... - { - if(!trace_info.DSP_misaligned) - // MCU/DSP com. is misaligned. - { - #if (DSP_DEBUG_TRACE_ENABLE == 1) - if (trace_info.current_config->l1_dyn_trace & 1<<L1_DYN_TRACE_DSP_DEBUG) - { - // Flag DSP error for DSP trace and memorize address of start of DSP trace -#if(MELODY_E2 || L1_MP3 || L1_AAC || L1_DYN_DSP_DWNLD ) - // DSP Trace is output ONLY if melody e2, mp3 or dynamic download are not currently running - if(trace_info.dsptrace_handler_globals.trace_flag_blocked == FALSE) -#endif - DSP_DEBUG_ENABLE - } - #endif - - RTTL1_EVENT(RTTL1_EVENT_ERROR, RTTL1_EVENT_SIZE_ERROR) - - trace_info.DSP_misaligned = TRUE; - } - else - return; - } - else - { - if(trace_info.DSP_misaligned) - // MCU/DSP com. is now realigned. - { - trace_info.DSP_misaligned = FALSE; - } - else - return; - } - - // Allocate DEBUG message. - msg = os_alloc_sig(sizeof(T_TR_MCU_DSP_MISMATCH)); - DEBUGMSG(status,NU_ALLOC_ERR) - msg->SignalCode = TRACE_INFO; - - ((T_TR_MCU_DSP_MISMATCH *)(msg->SigP))->header = TRL1_MCU_DSP_MISMATCH | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_MCU_DSP_MISMATCH *)(msg->SigP))->tpu_offset = l1s.tpu_offset; - ((T_TR_MCU_DSP_MISMATCH *)(msg->SigP))->tpu_offset_hw = l1s.tpu_offset_hw; - ((T_TR_MCU_DSP_MISMATCH *)(msg->SigP))->d_debug = l1s_dsp_com.dsp_db_r_ptr->d_debug & 0xffff; - ((T_TR_MCU_DSP_MISMATCH *)(msg->SigP))->debug_time = (UWORD16) l1s.debug_time & 0xffff; - ((T_TR_MCU_DSP_MISMATCH *)(msg->SigP))->adc_mode = l1a_l1s_com.adc_mode; // ADC enabled - ((T_TR_MCU_DSP_MISMATCH *)(msg->SigP))->task = task; - ((T_TR_MCU_DSP_MISMATCH *)(msg->SigP))->error = trace_info.DSP_misaligned; - - // send message... - os_send_sig(msg, L1C1_QUEUE); - DEBUGMSG(status,NU_SEND_QUEUE_ERR) - } -} - -/*-------------------------------------------------------*/ -/* Trace_PM_Equal_0() */ -/*-------------------------------------------------------*/ -/* Parameters : */ -/* Return : */ -/* */ -/*-------------------------------------------------------*/ -void Trace_PM_Equal_0(UWORD32 pm, UWORD8 task) -{ - if(pm==0) // PM error in the frame - { - if (trace_info.PM_Task == 255) // 1st PM error in the frame: This PM is memorized - trace_info.PM_Task = task; // memorize the Task of this 1st PM error - - #if ( ((TRACE_TYPE==1) || (TRACE_TYPE == 4))) - if (trace_info.current_config->l1_dyn_trace & 1 << L1_DSP_TRACE_FULL_DUMP) - { -#if(MELODY_E2 || L1_MP3 || L1_AAC || L1_DYN_DSP_DWNLD ) - // DSP Trace is output ONLY if melody e2, mp3 or dynamic download are not currently running - if(trace_info.dsptrace_handler_globals.trace_flag_blocked == FALSE) -#endif - l1_trace_full_dsp_buffer(); // trace DSP trace buffer in case a PM error occurs - } // used only for debug mode, - #endif - - } - else // no error in the frame :is it a PM recovery ? - { - if (trace_info.Not_PM_Task == 255) // 1st PM recovery case: task of recovery needs to be memorized - trace_info.Not_PM_Task = task; - } -} - -/*-------------------------------------------------------*/ -/* Trace_PM_Equal_0_balance() */ -/*-------------------------------------------------------*/ -/* Parameters : */ -/* Return : */ -/* */ -/*-------------------------------------------------------*/ -void Trace_PM_Equal_0_balance(void) -{ - // Here below we handle the case where we have lot of PM occuring during next frames - // The PM traces are filtered in order to trace: - // => the first PM - // => the latest PM when we have no more PM - BOOL trace_pm = FALSE; - - - if(trace_info.PM_Task != 255) // at least one PM occured in the current frame - { - if(!trace_info.PM_equal_0) // We are not in a phase of PM: We trace only the 1st PM - { - if (trace_info.current_config->l1_dyn_trace & 1 << L1_DYN_TRACE_L1S_DEBUG) - { - trace_pm = TRUE; - - #if (DSP_DEBUG_TRACE_ENABLE == 1) - if (trace_info.current_config->l1_dyn_trace & 1<<L1_DYN_TRACE_DSP_DEBUG) - // Flag DSP error for DSP trace and memorize address of start of DSP trace - { -#if(MELODY_E2 || L1_MP3 || L1_AAC || L1_DYN_DSP_DWNLD ) - // DSP Trace is output ONLY if melody e2, mp3 or dynamic download are not currently running - if(trace_info.dsptrace_handler_globals.trace_flag_blocked == FALSE) -#endif - - DSP_DEBUG_ENABLE - } - #endif - - RTTL1_EVENT(RTTL1_EVENT_ERROR, RTTL1_EVENT_SIZE_ERROR) - } - - trace_info.PM_equal_0 = TRUE; // We enter in a phase of a lot of PM - } - } - else // no PM in the current frame - { - if(trace_info.PM_equal_0) // this is the end of the PM phase: we trace the latest PM - { - if (trace_info.current_config->l1_dyn_trace & 1 << L1_DYN_TRACE_L1S_DEBUG) - { - trace_pm = TRUE; - } - - trace_info.PM_equal_0 = FALSE; - } - } - - if (trace_pm) - { - xSignalHeaderRec *msg; - - // Allocate DEBUG message. - msg = os_alloc_sig(sizeof(T_TR_PM_EQUAL_0)); - DEBUGMSG(status,NU_ALLOC_ERR) - msg->SignalCode = TRACE_INFO; - - ((T_TR_PM_EQUAL_0 *)(msg->SigP))->header = TRL1_PM_EQUAL_0 | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_PM_EQUAL_0 *)(msg->SigP))->tpu_offset = l1s.tpu_offset; - ((T_TR_PM_EQUAL_0 *)(msg->SigP))->tpu_offset_hw = l1s.tpu_offset_hw; - ((T_TR_PM_EQUAL_0 *)(msg->SigP))->d_debug = l1s_dsp_com.dsp_db_r_ptr->d_debug & 0xffff; - ((T_TR_PM_EQUAL_0 *)(msg->SigP))->debug_time = (UWORD16) l1s.debug_time & 0xffff; - ((T_TR_PM_EQUAL_0 *)(msg->SigP))->adc_mode = l1a_l1s_com.adc_mode; // ADC enabled - ((T_TR_PM_EQUAL_0 *)(msg->SigP))->task = trace_info.PM_Task; - ((T_TR_PM_EQUAL_0 *)(msg->SigP))->no_pm_task = trace_info.Not_PM_Task; - ((T_TR_PM_EQUAL_0 *)(msg->SigP))->error = trace_info.PM_equal_0; - - // send message... - os_send_sig(msg, L1C1_QUEUE); - DEBUGMSG(status,NU_SEND_QUEUE_ERR) - } - - trace_info.PM_Task = 255; - trace_info.Not_PM_Task = 255; -} - -/*-------------------------------------------------------*/ -/* l1_trace_IT_DSP_error() */ -/*-------------------------------------------------------*/ -/* Parameters : */ -/* Return : */ -/* */ -/*-------------------------------------------------------*/ -void l1_trace_IT_DSP_error(UWORD8 cause) -{ - #if (TRACE_TYPE==1) || (TRACE_TYPE==4) - if (trace_info.current_config->l1_dyn_trace & 1<<L1_DYN_TRACE_L1S_DEBUG) - { - xSignalHeaderRec *msg; - - // Allocate DEBUG message. - msg = os_alloc_sig(sizeof(T_TR_IT_DSP_ERROR)); - DEBUGMSG(status,NU_ALLOC_ERR) - msg->SignalCode = TRACE_INFO; - - ((T_TR_IT_DSP_ERROR *)(msg->SigP))->header = TRL1_IT_DSP_ERROR | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - - // send message... - os_send_sig(msg, L1C1_QUEUE); - DEBUGMSG(status,NU_SEND_QUEUE_ERR) - } - #endif -} - -/////////////////////// -// P.Transfer traces // -/////////////////////// - -#if L1_GPRS - -/*-------------------------------------------------------*/ -/* Trace_dl_ptcch() */ -/*-------------------------------------------------------*/ -/* Parameters : */ -/* Return : */ -/* */ -/*-------------------------------------------------------*/ -void Trace_dl_ptcch(UWORD8 ordered_ta, - UWORD8 crc) // Current TX allocation for Polling -{ - xSignalHeaderRec *msg; - - // Allocate DEBUG message. - msg = os_alloc_sig(sizeof(T_TR_DL_PTCCH)); - DEBUGMSG(status,NU_ALLOC_ERR) - msg->SignalCode = TRACE_INFO; - - ((T_TR_DL_PTCCH *)(msg->SigP))->header = TRL1_DL_PTCCH | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_DL_PTCCH *)(msg->SigP))->crc_error = crc; - ((T_TR_DL_PTCCH *)(msg->SigP))->ordered_ta = ordered_ta; - - // send message... - os_send_sig(msg, L1C1_QUEUE); - DEBUGMSG(status,NU_SEND_QUEUE_ERR) - -} // End Trace_ptcch_error - -/*-------------------------------------------------------*/ -/* Trace_rlc_ul_param() */ -/*-------------------------------------------------------*/ -/* Parameters : */ -/* Return : */ -/* */ -/*-------------------------------------------------------*/ -void Trace_rlc_ul_param(UWORD8 assignment_id, - UWORD8 tx_no, - UWORD32 fn, - UWORD8 ta, - UWORD32 a_pu_gprs, - UWORD32 a_du_gprs, - BOOL fix_alloc_exhaust) -{ - xSignalHeaderRec *msg; - - // Allocate DEBUG message. - msg = os_alloc_sig(sizeof(T_TR_RLC_UL_PARAM)); - DEBUGMSG(status,NU_ALLOC_ERR) - msg->SignalCode = TRACE_INFO; - - ((T_TR_RLC_UL_PARAM *)(msg->SigP))->header = TRL1_RLC_UL_PARAM | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_RLC_UL_PARAM *)(msg->SigP))->a_pu_gprs = a_pu_gprs; - ((T_TR_RLC_UL_PARAM *)(msg->SigP))->a_du_gprs = a_du_gprs; - ((T_TR_RLC_UL_PARAM *)(msg->SigP))->assignment_id = assignment_id; - ((T_TR_RLC_UL_PARAM *)(msg->SigP))->tx_no = tx_no; - ((T_TR_RLC_UL_PARAM *)(msg->SigP))->fn_param = fn; - ((T_TR_RLC_UL_PARAM *)(msg->SigP))->ta = ta; - ((T_TR_RLC_UL_PARAM *)(msg->SigP))->fix_alloc_exhaust = fix_alloc_exhaust; - - // send message... - os_send_sig(msg, L1C1_QUEUE); - DEBUGMSG(status,NU_SEND_QUEUE_ERR) -} - -/*-------------------------------------------------------*/ -/* Trace_rlc_dl_param() */ -/*-------------------------------------------------------*/ -/* Parameters : */ -/* Return : */ -/* */ -/*-------------------------------------------------------*/ -void Trace_rlc_dl_param( UWORD8 assignment_id, - UWORD32 fn, - UWORD32 d_rlcmac_rx_no_gprs, - UWORD8 rx_no, - UWORD8 rlc_blocks_sent, - UWORD8 last_poll_response) -{ - xSignalHeaderRec *msg; - - // Allocate DEBUG message. - msg = os_alloc_sig(sizeof(T_TR_RLC_DL_PARAM)); - DEBUGMSG(status,NU_ALLOC_ERR) - msg->SignalCode = TRACE_INFO; - - - ((T_TR_RLC_DL_PARAM *)(msg->SigP))->header = TRL1_RLC_DL_PARAM | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_RLC_DL_PARAM *)(msg->SigP))->fn_param = fn; - ((T_TR_RLC_DL_PARAM *)(msg->SigP))->d_rlcmac_rx_no_gprs = d_rlcmac_rx_no_gprs; - ((T_TR_RLC_DL_PARAM *)(msg->SigP))->assignment_id = assignment_id; - ((T_TR_RLC_DL_PARAM *)(msg->SigP))->rx_no = rx_no; - ((T_TR_RLC_DL_PARAM *)(msg->SigP))->rlc_blocks_sent = rlc_blocks_sent; - ((T_TR_RLC_DL_PARAM *)(msg->SigP))->last_poll_response = last_poll_response; - - // send message... - os_send_sig(msg, L1C1_QUEUE); - DEBUGMSG(status,NU_SEND_QUEUE_ERR) -} - -/*-------------------------------------------------------*/ -/* Trace_uplink_no_TA() */ -/*-------------------------------------------------------*/ -/* Parameters : */ -/* Return : */ -/* */ -/*-------------------------------------------------------*/ -void Trace_uplink_no_TA() -{ - xSignalHeaderRec *msg; - - // Allocate DEBUG message. - msg = os_alloc_sig(sizeof(T_TR_FORBIDDEN_UPLINK)); - DEBUGMSG(status,NU_ALLOC_ERR) - msg->SignalCode = TRACE_INFO; - - ((T_TR_FORBIDDEN_UPLINK *)(msg->SigP))->header = TRL1_FORBIDDEN_UPLINK | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - - // send message... - os_send_sig(msg, L1C1_QUEUE); - DEBUGMSG(status,NU_SEND_QUEUE_ERR) -} - -/*-------------------------------------------------------*/ -/* l1_trace_ptcch_disable() */ -/*-------------------------------------------------------*/ -/* Parameters : */ -/* Return : */ -/* Trace the gauging is running */ -/*-------------------------------------------------------*/ -void l1_trace_ptcch_disable(void) -{ - #if (TRACE_TYPE==1) || (TRACE_TYPE==4) - - xSignalHeaderRec *msg; - - if (trace_info.current_config->l1_dyn_trace & 1<<L1_DYN_TRACE_L1S_DEBUG) - { - // Allocate DEBUG message. - msg = os_alloc_sig(sizeof(T_TR_PTCCH_DISABLE)); - DEBUGMSG(status,NU_ALLOC_ERR) - msg->SignalCode = TRACE_INFO; - - ((T_TR_TOA_NOT_UPDATED *)(msg->SigP))->header = TRL1_PTCCH_DISABLE | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - - // send message... - os_send_sig(msg, L1C1_QUEUE); - DEBUGMSG(status,NU_SEND_QUEUE_ERR) - } - #endif -} - -/*-------------------------------------------------------*/ -/* Trace_pdtch() */ -/*-------------------------------------------------------*/ -/* Parameters : */ -/* Return : */ -/* */ -/*-------------------------------------------------------*/ -void Trace_condensed_pdtch(UWORD8 rx_allocation, UWORD8 tx_allocation) -{ - xSignalHeaderRec *msg; - - // Allocate DEBUG message. - msg = os_alloc_sig(sizeof(T_CONDENSED_PDTCH_INFO)); - DEBUGMSG(status,NU_ALLOC_ERR) - msg->SignalCode = TRACE_CONDENSED_PDTCH; - - ((T_CONDENSED_PDTCH_INFO *)(msg->SigP))->fn = l1s.actual_time.fn; - ((T_CONDENSED_PDTCH_INFO *)(msg->SigP))->rx_allocation = rx_allocation; - ((T_CONDENSED_PDTCH_INFO *)(msg->SigP))->tx_allocation = tx_allocation; - ((T_CONDENSED_PDTCH_INFO *)(msg->SigP))->blk_status = trace_info.pdtch_trace.blk_status; - ((T_CONDENSED_PDTCH_INFO *)(msg->SigP))->dl_cs_type = trace_info.pdtch_trace.dl_cs_type; - ((T_CONDENSED_PDTCH_INFO *)(msg->SigP))->dl_status[0] = trace_info.pdtch_trace.dl_status[0]; - ((T_CONDENSED_PDTCH_INFO *)(msg->SigP))->dl_status[1] = trace_info.pdtch_trace.dl_status[1]; - ((T_CONDENSED_PDTCH_INFO *)(msg->SigP))->dl_status[2] = trace_info.pdtch_trace.dl_status[2]; - ((T_CONDENSED_PDTCH_INFO *)(msg->SigP))->dl_status[3] = trace_info.pdtch_trace.dl_status[3]; - ((T_CONDENSED_PDTCH_INFO *)(msg->SigP))->ul_status[0] = trace_info.pdtch_trace.ul_status[0]; - ((T_CONDENSED_PDTCH_INFO *)(msg->SigP))->ul_status[1] = trace_info.pdtch_trace.ul_status[1]; - ((T_CONDENSED_PDTCH_INFO *)(msg->SigP))->ul_status[2] = trace_info.pdtch_trace.ul_status[2]; - ((T_CONDENSED_PDTCH_INFO *)(msg->SigP))->ul_status[3] = trace_info.pdtch_trace.ul_status[3]; - ((T_CONDENSED_PDTCH_INFO *)(msg->SigP))->ul_status[4] = trace_info.pdtch_trace.ul_status[4]; - ((T_CONDENSED_PDTCH_INFO *)(msg->SigP))->ul_status[5] = trace_info.pdtch_trace.ul_status[5]; - ((T_CONDENSED_PDTCH_INFO *)(msg->SigP))->ul_status[6] = trace_info.pdtch_trace.ul_status[6]; - ((T_CONDENSED_PDTCH_INFO *)(msg->SigP))->ul_status[7] = trace_info.pdtch_trace.ul_status[7]; - - // send message... - os_send_sig(msg, L1C1_QUEUE); - DEBUGMSG(status,NU_SEND_QUEUE_ERR) -} - -/*-------------------------------------------------------*/ -/* Quick_Trace() */ -/*-------------------------------------------------------*/ -/* Parameters : */ -/* Return : */ -/* Description: This function can be used to quickly add */ -/* a trace */ -/* NOT TO USE FOR PERMANENT TRACES !!! */ -/*-------------------------------------------------------*/ -void Quick_Trace(UWORD8 debug_code, - UWORD32 param0, - UWORD32 param1, - UWORD32 param2, - UWORD32 param3, - UWORD32 param4, - UWORD32 param5, - UWORD32 param6) -{ - xSignalHeaderRec *msg; - - // Allocate DEBUG message. - msg = os_alloc_sig(sizeof(T_QUICK_TRACE)); - DEBUGMSG(status,NU_ALLOC_ERR) - msg->SignalCode = QUICK_TRACE; - - ((T_QUICK_TRACE *)(msg->SigP))->debug_code = debug_code; - ((T_QUICK_TRACE *)(msg->SigP))->fn = l1s.actual_time.fn; - - ((T_QUICK_TRACE *)(msg->SigP))->tab[0] = param0; - ((T_QUICK_TRACE *)(msg->SigP))->tab[1] = param1; - ((T_QUICK_TRACE *)(msg->SigP))->tab[2] = param2; - ((T_QUICK_TRACE *)(msg->SigP))->tab[3] = param3; - ((T_QUICK_TRACE *)(msg->SigP))->tab[4] = param4; - ((T_QUICK_TRACE *)(msg->SigP))->tab[5] = param5; - ((T_QUICK_TRACE *)(msg->SigP))->tab[6] = param6; - - // send message... - os_send_sig(msg, L1C1_QUEUE); - DEBUGMSG(status,NU_SEND_QUEUE_ERR) -} - -#endif // L1_GPRS - -/////////////////////// -// DSP error traces // -/////////////////////// - -#if (D_ERROR_STATUS_TRACE_ENABLE) - -/*-------------------------------------------------------*/ -/* Trace_d_error_status() */ -/*-------------------------------------------------------*/ -/* Parameters : */ -/* Return : */ -/* */ -/*-------------------------------------------------------*/ -void Trace_d_error_status() -{ - #if L1_GPRS - UWORD16 d_error_status_masked = - (l1s_dsp_com.dsp_ndb_ptr->d_error_status) & - (trace_info.d_error_status_masks[l1a_l1s_com.dsp_scheduler_mode - 1]); // depends on the scheduler mode - #else - UWORD16 d_error_status_masked = - (l1s_dsp_com.dsp_ndb_ptr->d_error_status) & - (trace_info.d_error_status_masks[GSM_SCHEDULER - 1]); - #endif - UWORD16 changed_bits = d_error_status_masked ^ trace_info.d_error_status_old; - - // trace in case of change of status (field is reseted on change of scheduler) - if (changed_bits) - { - xSignalHeaderRec *msg; - - // Allocate DEBUG message. - msg = os_alloc_sig(sizeof(T_TR_D_ERROR_STATUS)); - DEBUGMSG(status,NU_ALLOC_ERR) - msg->SignalCode = TRACE_INFO; - - ((T_TR_D_ERROR_STATUS *)(msg->SigP))->header = TRL1_D_ERROR_STATUS | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_D_ERROR_STATUS *)(msg->SigP))->debug_time = (UWORD16)l1s.debug_time; - ((T_TR_D_ERROR_STATUS *)(msg->SigP))->d_error_status = d_error_status_masked; - ((T_TR_D_ERROR_STATUS *)(msg->SigP))->d_debug = l1s_dsp_com.dsp_db_r_ptr->d_debug & 0xffff; - - // send message... - os_send_sig(msg, L1C1_QUEUE); - DEBUGMSG(status,NU_SEND_QUEUE_ERR) - - #if (DSP_DEBUG_TRACE_ENABLE == 1) - if (trace_info.current_config->l1_dyn_trace & 1<<L1_DYN_TRACE_DSP_DEBUG) - { - // DSP debug buffer trace only if an ERROR is detected (not for a End of error detection) - if ((changed_bits & d_error_status_masked) & ~trace_info.d_error_status_old) - { - // Flag DSP error for DSP trace and memorize address of start of DSP trace - -#if(MELODY_E2 || L1_MP3 || L1_AAC || L1_DYN_DSP_DWNLD) - // DSP Trace is output ONLY if melody e2, mp3 or dynamic download are not currently running - if(trace_info.dsptrace_handler_globals.trace_flag_blocked == FALSE) -#endif - - DSP_DEBUG_ENABLE - } - } - #endif - - RTTL1_EVENT(RTTL1_EVENT_ERROR, RTTL1_EVENT_SIZE_ERROR) - - trace_info.d_error_status_old = d_error_status_masked; - } - - // Clear bits that have been set by the DSP - l1s_dsp_com.dsp_ndb_ptr->d_error_status &= ~d_error_status_masked; -} - -#endif // (D_ERROR_STATUS_TRACE_ENABLE) - -#if (DSP_DEBUG_TRACE_ENABLE == 1) - -/*-------------------------------------------------------*/ -/* Trace_dsp_debug() */ -/*-------------------------------------------------------*/ -/* Parameters : */ -/* Return : */ -/* */ -/*-------------------------------------------------------*/ -void Trace_dsp_debug() -{ - // WARNING: l1s_dsp_com.dsp_r_page changed in l1s_end_manager() but DSP DB pointers haven't been - // updated !!! - UWORD32 start_address = trace_info.dsp_debug_buf_start[l1s_dsp_com.dsp_r_page]; - UWORD32 end_address, stop_address; - UWORD16 size; - API *i; - UWORD8 j = 0; - xSignalHeaderRec *msg; - - // DSP DEBUG trace only works when GSM activity is enabled - if (l1s_dsp_com.dsp_r_page_used == FALSE) - { - trace_info.dsp_debug_buf_start[0] = trace_info.dsp_debug_buf_start[1] = 0; - } - - // If a DSP error occured... - if (start_address) - { - WORD32 diff = l1s.debug_time - trace_info.fn_last_dsp_debug; - - if (diff < 0) diff += 0xFFFFFFFF; - - if (diff >= 104) - { - - // Take the DB_R pointers on the start/end of last TDMA trace - start_address = 0xFFD00000 + (start_address - 0x800) * 2; - end_address = 0xFFD00000 + (l1s_dsp_com.dsp_db2_other_r_ptr->d_debug_ptr_end - 0x800) * 2; - - // Process size of block - if (end_address >= start_address) - { - size = end_address - start_address; - stop_address = end_address; - } - else - { - size = end_address - start_address + C_DEBUG_BUFFER_SIZE * 2; - stop_address = (0xFFD00000 + (C_DEBUG_BUFFER_ADD + 1 + C_DEBUG_BUFFER_SIZE - 0x800) * 2); - } - - if ((size > 0) && (size < 1000) && (size < C_DEBUG_BUFFER_SIZE)) - { - // Allocate memory pool - msg = os_alloc_sig(size + sizeof(T_DSP_DEBUG_INFO) - 2*sizeof(API)); - DEBUGMSG(status,NU_ALLOC_ERR) - - msg->SignalCode = TRACE_DSP_DEBUG; - ((T_DSP_DEBUG_INFO *)(msg->SigP))->size = size; - ((T_DSP_DEBUG_INFO *)(msg->SigP))->fn = trace_info.dsp_debug_fn[l1s_dsp_com.dsp_r_page]; - ((T_DSP_DEBUG_INFO *)(msg->SigP))->debug_time = trace_info.dsp_debug_time[l1s_dsp_com.dsp_r_page]; - ((T_DSP_DEBUG_INFO *)(msg->SigP))->patch_version = l1s_dsp_com.dsp_ndb_ptr->d_version_number2; - ((T_DSP_DEBUG_INFO *)(msg->SigP))->trace_level = l1s_dsp_com.dsp_ndb_ptr->d_debug_trace_type; - - // Copy data into message - for (i = (API*)start_address; i < (API*)stop_address; i++) - { - ((T_DSP_DEBUG_INFO *)(msg->SigP))->buffer[j++] = *i; - } - - // Circular buffer management - if (i != (API*)end_address) - { - for (i = (API*) (0xFFD00000 + (C_DEBUG_BUFFER_ADD + 1 - 0x800)*2); i < (API*)end_address; i++) - { - ((T_DSP_DEBUG_INFO *)(msg->SigP))->buffer[j++] = *i; - } - } - - // Send sig to L1A - os_send_sig(msg, L1C1_QUEUE); - DEBUGMSG(status,NU_SEND_QUEUE_ERR) - - // Set FN to avoid another DSP debug trace in the next 104 frames. - trace_info.fn_last_dsp_debug = l1s.debug_time; - } - } // Enf if diff >= 104 - - // Clear flag - trace_info.dsp_debug_buf_start[l1s_dsp_com.dsp_r_page] = 0; - } // End if "DSP error occured" -} - -#if (AMR == 1) - -/*-------------------------------------------------------*/ -/* Trace_dsp_amr_debug() */ -/*-------------------------------------------------------*/ -/* Parameters : */ -/* Return : */ -/* */ -/*-------------------------------------------------------*/ -void Trace_dsp_amr_debug() -{ - UWORD32 start_address; - UWORD32 end_address, stop_address; - UWORD16 size; - API *i; - UWORD8 j = 0; - xSignalHeaderRec *msg; - - // Start address of the AMR trace in the DSP trace buffer - start_address = l1s_dsp_com.dsp_ndb_ptr->xxx; - - // Clear the pointer - l1s_dsp_com.dsp_ndb_ptr->xxx = 0; - - // If start address different of 0 -> trace to be performed - if (start_address != 0) - { - // Process MCU start address - start_address = 0xFFD00000 + (start_address - 0x800) * 2; - - // Check ID and read size - if ((((API*)start_adress & 0xFE00) >> 9) == C_AMR_TRACE_ID) - { - // Read size - size = ((((API*)start_address) & 0x1FF) * 2); - start_address += sizeof(API); // Do not dump header - - // Process stop address - end_address = start_address + size; - - // Circular buffer... - if (end_address <= (0xFFD00000 + (C_DEBUG_BUFFER_ADD + 1 + C_DEBUG_BUFFER_SIZE - 0x800) * 2)) - { - stop_address = end_address; - } - else - { - stop_address = (0xFFD00000 + (C_DEBUG_BUFFER_ADD + 1 + C_DEBUG_BUFFER_SIZE - 0x800) * 2); - end_address -= C_DEBUG_BUFFER_SIZE * 2; - } - - // Create L1S->L1A message and dump buffer - - // Allocate memory pool - msg = os_alloc_sig(size+sizeof(T_DSP_AMR_DEBUG_INFO)-2*sizeof(API)); - DEBUGMSG(status,NU_ALLOC_ERR) - - msg->SignalCode = TRACE_DSP_AMR_DEBUG; - ((T_DSP_AMR_DEBUG_INFO *)(msg->SigP))->size = size; - ((T_DSP_AMR_DEBUG_INFO *)(msg->SigP))->fn = l1s.actual_time.fn; - - // Copy data into message - for (i = (API*)start_address; i < (API*)stop_address; i++) - { - ((T_DSP_AMR_DEBUG_INFO *)(msg->SigP))->buffer[j++] = *i; - } - - // Circular buffer management - if (i != (API*)end_address) - { - for (i = (API*) (0xFFD00000 + (C_DEBUG_BUFFER_ADD + 1 - 0x800)*2); i < (API*)end_address; i++) - { - ((T_DSP_AMR_DEBUG_INFO *)(msg->SigP))->buffer[j++] = *i; - } - } - - // Send sig to L1A - os_send_sig(msg, L1C1_QUEUE); - DEBUGMSG(status,NU_SEND_QUEUE_ERR) - } - } -} - -#endif // #if (AMR == 1) - -#endif // #if (DSP_DEBUG_TRACE_ENABLE) - -/////////////////////////// -// Trace type 1 CPU load // -/////////////////////////// - -#if ((TRACE_TYPE == 1) || (TRACE_TYPE == 4)) && (CODE_VERSION != SIMULATION) - -/*-------------------------------------------------------*/ -/* L1S_CPU_load_process() */ -/*-------------------------------------------------------*/ -/* Parameters : */ -/* Return : */ -/* */ -/*-------------------------------------------------------*/ -void Trace_L1S_CPU_load() -{ - #define TIMER_RESET_VALUE (0xFFFF) - #define TICKS_PER_TDMA (1875) - - unsigned long cpu; - - //Dtimer2_Start(0); - layer_1_sync_end_time = TIMER_RESET_VALUE - Dtimer2_ReadValue(); - - // Trace - cpu = (100 * layer_1_sync_end_time) / TICKS_PER_TDMA; - - if (cpu > max_cpu) - { - max_cpu=cpu; - fn_max_cpu=l1s.actual_time.fn; - max_cpu_flag = 1; - } - - if (((l1s.actual_time.fn%1326) == 0) && (max_cpu_flag == 0)) - max_cpu = 0; -} /* end of Trace_L1S_CPU_load() */ - -#if 0 /* FreeCalypso: feature not present in our chipset */ -/********** DSP CPU load measurement *************/ -void l1_dsp_cpu_load_read() -{ - - #define DSP_TIMER_PRESCALER_VALUE (9) - - T_DB_MCU_TO_DSP_CPU_LOAD *mcu_dsp_cpu_load_r_ptr; // DSP CPU load measurement - UWORD32 dsp_fgd_tsk_cycles = 0L; - UWORD16 dsp_tdma_fn; - UWORD16 d_dsp_page_read; - UWORD32 d_dsp_work_period; - UWORD32 d_dsp_fgd_tsk_cycles_per_tdma; - UWORD16 d_tdma_fnmod4; - UWORD16 d_tdma_fnmod13; - - // **** 1. Read the DSP FGD task cycles from API **** - - // Check if DSP CPU load has been written in first buffer - mcu_dsp_cpu_load_r_ptr = (T_DB_MCU_TO_DSP_CPU_LOAD *)DSP_CPU_LOAD_DB_W_PAGE_0; - if ((API)mcu_dsp_cpu_load_r_ptr->d_dsp_fgd_tsk_tim0 & 0x8000) - { - mcu_dsp_cpu_load_r_ptr->d_dsp_fgd_tsk_tim0 &= ~(0x8000); // reset the bit - dsp_fgd_tsk_cycles = (UWORD32)(((UWORD32)mcu_dsp_cpu_load_r_ptr->d_dsp_fgd_tsk_tim0 << 16) - + ((UWORD32)mcu_dsp_cpu_load_r_ptr->d_dsp_fgd_tsk_tim1)); - dsp_fgd_tsk_cycles = (dsp_fgd_tsk_cycles * DSP_TIMER_PRESCALER_VALUE); - - dsp_tdma_fn = (API)mcu_dsp_cpu_load_r_ptr->d_tdma_dsp_fn; - - d_dsp_page_read = 0; - } - else - { - // Check if DSP CPU load has been written in second buffer - mcu_dsp_cpu_load_r_ptr = (T_DB_MCU_TO_DSP_CPU_LOAD *)DSP_CPU_LOAD_DB_W_PAGE_1; - if ((API)mcu_dsp_cpu_load_r_ptr->d_dsp_fgd_tsk_tim0 & 0x8000) - { - mcu_dsp_cpu_load_r_ptr->d_dsp_fgd_tsk_tim0 &= ~(0x8000); // reset the bit - dsp_fgd_tsk_cycles = (UWORD32)(((UWORD32)mcu_dsp_cpu_load_r_ptr->d_dsp_fgd_tsk_tim0 << 16) - + ((UWORD32)mcu_dsp_cpu_load_r_ptr->d_dsp_fgd_tsk_tim1)); - dsp_fgd_tsk_cycles = (dsp_fgd_tsk_cycles * DSP_TIMER_PRESCALER_VALUE); - - dsp_tdma_fn = (API)mcu_dsp_cpu_load_r_ptr->d_tdma_dsp_fn; - - d_dsp_page_read = 1; - - } - } - - // **** 2. Get the number of DSP cycles per TDMA (based on DSP work period) **** - if (dsp_fgd_tsk_cycles != 0L) - { - /* Take care of TDMA FN overflow */ - d_dsp_work_period = (l1s.actual_time.fn_mod42432 - dsp_tdma_fn - 2 + 42432) % 42432; - - d_dsp_fgd_tsk_cycles_per_tdma = dsp_fgd_tsk_cycles/(d_dsp_work_period + 1); // to avoid divide by 0, just in case - - // **** 3. For DSP work-period, update max cycles count **** - d_tdma_fnmod13 = (l1s.actual_time.fn_mod13 - 1 + 13) % 13; - d_tdma_fnmod4 = (l1s.actual_time.fn_mod13_mod4 - 1 + 4) % 4; - - if (d_tdma_fnmod13 == 12) //Idle/SACCH/PTCCH frames - { - if (dsp_max_cpu_load_idle_frame <= d_dsp_fgd_tsk_cycles_per_tdma) - dsp_max_cpu_load_idle_frame = d_dsp_fgd_tsk_cycles_per_tdma; - } - else // for TDMA frames 0/1/2/3 (mod 4) - { - if (dsp_max_cpu_load_trace_array[d_tdma_fnmod4] <= d_dsp_fgd_tsk_cycles_per_tdma) - dsp_max_cpu_load_trace_array[d_tdma_fnmod4] = d_dsp_fgd_tsk_cycles_per_tdma; - } - - // **** 4. If 104 TDMA frames have elapsed, print out the DSP CPU cycles **** - if ((l1s.actual_time.fn_mod42432 % 104) == 0) - { - l1_dsp_cpu_load_trace_flag = 1; - } - } -} /* end of l1_dsp_cpu_load_read() */ -#endif - -#endif - -/////////////////////////// -// Additional L1S traces // -/////////////////////////// - -/*-------------------------------------------------------*/ -/* l1_trace_ADC() */ -/*-------------------------------------------------------*/ -/* Parameters : */ -/* Return : */ -/* */ -/*-------------------------------------------------------*/ -void l1_trace_ADC(UWORD8 type) -{ - #if (TRACE_TYPE==1) || (TRACE_TYPE==4) - - xSignalHeaderRec *msg; - - if (trace_info.current_config->l1_dyn_trace & 1<<L1_DYN_TRACE_L1A_MESSAGES) - { - // Allocate DEBUG message. - msg = os_alloc_sig(sizeof(T_TR_ADC)); - DEBUGMSG(status,NU_ALLOC_ERR) - msg->SignalCode = TRACE_INFO; - - ((T_TR_ADC *)(msg->SigP))->header = TRL1_ADC | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_ADC *)(msg->SigP))->type = type; - - // send message... - os_send_sig(msg, L1C1_QUEUE); - DEBUGMSG(status,NU_SEND_QUEUE_ERR) - } - #endif -} - -/*-------------------------------------------------------*/ -/* l1_trace_burst_param() */ -/*-------------------------------------------------------*/ -/* Parameters : */ -/* Return : */ -/* */ -/*-------------------------------------------------------*/ -void l1_trace_burst_param (UWORD32 angle, UWORD32 snr, UWORD32 afc, UWORD32 task, - UWORD32 pm, UWORD32 toa_val, UWORD32 IL_for_rxlev) -{ - #if (TRACE_TYPE==1) || (TRACE_TYPE==4) - - xSignalHeaderRec *msg; - - if (trace_info.current_config->l1_dyn_trace & 1<<L1_DYN_TRACE_BURST_PARAM) - { - // Allocate DEBUG message. - msg = os_alloc_sig(sizeof(T_TR_BURST_PARAM)); - DEBUGMSG(status,NU_ALLOC_ERR) - msg->SignalCode = TRACE_INFO; - - ((T_TR_BURST_PARAM *)(msg->SigP))->header = TRL1_BURST_PARAM | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_BURST_PARAM *)(msg->SigP))->angle = angle; - ((T_TR_BURST_PARAM *)(msg->SigP))->snr = snr; - ((T_TR_BURST_PARAM *)(msg->SigP))->afc = afc; - ((T_TR_BURST_PARAM *)(msg->SigP))->task = task; - ((T_TR_BURST_PARAM *)(msg->SigP))->pm = pm; - ((T_TR_BURST_PARAM *)(msg->SigP))->toa = toa_val; - ((T_TR_BURST_PARAM *)(msg->SigP))->input_level = IL_for_rxlev; - - // send message... - os_send_sig(msg, L1C1_QUEUE); - DEBUGMSG(status,NU_SEND_QUEUE_ERR) - } - #endif -} - - -/*-------------------------------------------------------*/ -/* l1_trace_saic() */ -/*-------------------------------------------------------*/ -/* Parameters : */ -/* Return : */ -/* */ -/*-------------------------------------------------------*/ -void l1_trace_saic(UWORD32 SWH_flag, UWORD32 SAIC_flag) -{ - #if (TRACE_TYPE==1) || (TRACE_TYPE==4) - - xSignalHeaderRec *msg; - - if (trace_info.current_config->l1_dyn_trace & 1<<L1_DYN_TRACE_SAIC_DEBUG) - { - // Allocate DEBUG message. - msg = os_alloc_sig(sizeof(T_TR_SAIC_DEBUG)); - DEBUGMSG(status,NU_ALLOC_ERR) - msg->SignalCode = TRACE_INFO; - - ((T_TR_SAIC_DEBUG *)(msg->SigP))->header = TRL1_SAIC_DEBUG | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - ((T_TR_SAIC_DEBUG *)(msg->SigP))->SWH_flag = SWH_flag; - ((T_TR_SAIC_DEBUG *)(msg->SigP))->SAIC_flag = SAIC_flag; - - // send message... - os_send_sig(msg, L1C1_QUEUE); - DEBUGMSG(status,NU_SEND_QUEUE_ERR) - } - #endif -} - - -/*-------------------------------------------------------*/ -/* l1_trace_new_toa() */ -/*-------------------------------------------------------*/ -/* Parameters : */ -/* Return : */ -/* */ -/*-------------------------------------------------------*/ -void l1_trace_new_toa(void) -{ - #if (TRACE_TYPE==1) || (TRACE_TYPE==4) - - xSignalHeaderRec *msg; - - if (trace_info.current_config->l1_dyn_trace & 1<<L1_DYN_TRACE_L1A_MESSAGES) - { - // Allocate DEBUG message. - msg = os_alloc_sig(sizeof(T_TR_NEW_TOA)); - DEBUGMSG(status,NU_ALLOC_ERR) - msg->SignalCode = TRACE_INFO; - - ((T_TR_NEW_TOA *)(msg->SigP))->header = TRL1_NEW_TOA | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - #if (TOA_ALGO == 2) - ((T_TR_NEW_TOA *)(msg->SigP))->toa_shift = l1s.toa_var.toa_shift; - #else - ((T_TR_NEW_TOA *)(msg->SigP))->toa_shift = l1s.toa_shift; - #endif - - #if(TOA_ALGO == 2) - ((T_TR_NEW_TOA *)(msg->SigP))->toa_frames_counter = trace_info.toa_trace_var.toa_frames_counter; - ((T_TR_NEW_TOA *)(msg->SigP))->toa_accumul_counter = trace_info.toa_trace_var.toa_accumul_counter; - ((T_TR_NEW_TOA *)(msg->SigP))->toa_accumul_value = trace_info.toa_trace_var.toa_accumul_value; - #endif - - // send message... - os_send_sig(msg, L1C1_QUEUE); - DEBUGMSG(status,NU_SEND_QUEUE_ERR) - } - #endif -} - -/*-------------------------------------------------------*/ -/* l1_trace_toa_not_updated() */ -/*-------------------------------------------------------*/ -/* Parameters : */ -/* Return : */ -/* TOA ERROR: TOA not updated */ -/*-------------------------------------------------------*/ -void l1_trace_toa_not_updated(void) -{ - #if (TRACE_TYPE==1) || (TRACE_TYPE==4) - - // !!!!!!!!!!!!!!!!!!!!!!!! - // !!! should not occur !!! - // !!!!!!!!!!!!!!!!!!!!!!!! - - xSignalHeaderRec *msg; - - if (trace_info.current_config->l1_dyn_trace & 1<<L1_DYN_TRACE_L1S_DEBUG) - { - // Allocate DEBUG message. - msg = os_alloc_sig(sizeof(T_TR_TOA_NOT_UPDATED)); - DEBUGMSG(status,NU_ALLOC_ERR) - msg->SignalCode = TRACE_INFO; - - ((T_TR_TOA_NOT_UPDATED *)(msg->SigP))->header = TRL1_TOA_NOT_UPDATED | (l1s.actual_time.fn << TR_HEADER_FN_DELAY); - #if (TOA_ALGO == 2) - ((T_TR_TOA_NOT_UPDATED *)(msg->SigP))->toa_shift = l1s.toa_var.toa_shift; - #else - ((T_TR_TOA_NOT_UPDATED *)(msg->SigP))->toa_shift = l1s.toa_shift; - #endif - // send message... - os_send_sig(msg, L1C1_QUEUE); - DEBUGMSG(status,NU_SEND_QUEUE_ERR) - } - #endif -} - -//////////////////////////////////////// -// Dynamic trace configuration change // -//////////////////////////////////////// - -/*-------------------------------------------------------*/ -/* l1_send_trace_version() */ -/*-------------------------------------------------------*/ -/* Parameters : */ -/* Return : */ -/* */ -/*-------------------------------------------------------*/ -void l1_send_trace_version() -{ - #if (TRACE_TYPE == 1) - char ptr[11]; - char nb_bytes_sent = 0; - - ptr[0] = trace_info.l1_trace_user_id; - ptr[1] = TRACE_CHECK_RESULT_OPCODE & 0xff; - ptr[2] = (TRACE_CHECK_RESULT_OPCODE >> 8) & 0xff; - ptr[3] = (TRACE_CHECK_RESULT_OPCODE >> 16) & 0xff; - ptr[4] = (TRACE_CHECK_RESULT_OPCODE >> 24) & 0xff; - ptr[5] = sizeof(T_TRACE_CELLS) & 0xff; - ptr[6] = (sizeof(T_TRACE_CELLS) >> 8) & 0xff; - ptr[7] = (sizeof(T_TRACE_CELLS) >> 16) & 0xff; - ptr[8] = (sizeof(T_TRACE_CELLS) >> 24) & 0xff; - ptr[9] = L1_TRACE_VERSION & 0xff; - ptr[10] = (L1_TRACE_VERSION >> 8) & 0xff; - - while( nb_bytes_sent < 11) - nb_bytes_sent += SER_tr_WriteNBytes(SER_LAYER_1, (SYS_UWORD8 *)ptr + nb_bytes_sent, 11 - nb_bytes_sent ); - - #elif (TRACE_TYPE == 4) - char *ptr; - - if (rvt_mem_alloc(trace_info.l1_trace_user_id, sizeof(T_TRACE_VERSION), (T_RVT_BUFFER *) &ptr) == RVT_OK) - { - ((T_TRACE_VERSION *)ptr)->Opcode = TRACE_CHECK_RESULT_OPCODE; - ((T_TRACE_VERSION *)ptr)->checksum = sizeof(T_TRACE_CELLS); - ((T_TRACE_VERSION *)ptr)->version = L1_TRACE_VERSION; - - L1_send_trace_no_cpy(ptr,sizeof(T_TRACE_VERSION)); - } - #endif -} - -/*-------------------------------------------------------*/ -/* l1_trace_configuration() */ -/*-------------------------------------------------------*/ -/* Parameters : */ -/* Return : */ -/* */ -/*-------------------------------------------------------*/ -void l1_trace_configuration(T_RVT_BUFFER trace_msg, UINT16 trace_msg_size) -{ - UWORD8 Opcode = trace_msg[0]; - - switch (Opcode) - { - case TRACE_CONFIG_OPCODE: - { - // Send message to L1A - xSignalHeaderRec *msg; - - // Allocate DEBUG message. - msg = os_alloc_sig(sizeof(T_TRACE_CONFIG_CHANGE)); - DEBUGMSG(status,NU_ALLOC_ERR) - msg->SignalCode = TRACE_CONFIG; - - // NOTE: trace_msg isnt necessary 32-bit aligned !!! - - // First UWORD32 is the classic L1 dynamic trace - ((T_TRACE_CONFIG_CHANGE *)(msg->SigP))->trace_config = (trace_msg[1]) | (trace_msg[2] << 8) | (trace_msg[3] << 16) | (trace_msg[4] << 24); - - // The eight following UWORD32 define the RTT cell configuration - ((T_TRACE_CONFIG_CHANGE *)(msg->SigP))->rtt_cell_enable[0] = (trace_msg[5]) | (trace_msg[6] << 8) | (trace_msg[7] << 16) | (trace_msg[8] << 24); - ((T_TRACE_CONFIG_CHANGE *)(msg->SigP))->rtt_cell_enable[1] = (trace_msg[9]) | (trace_msg[10] << 8) | (trace_msg[11] << 16) | (trace_msg[12] << 24); - ((T_TRACE_CONFIG_CHANGE *)(msg->SigP))->rtt_cell_enable[2] = (trace_msg[13]) | (trace_msg[14] << 8) | (trace_msg[15] << 16) | (trace_msg[16] << 24); - ((T_TRACE_CONFIG_CHANGE *)(msg->SigP))->rtt_cell_enable[3] = (trace_msg[17]) | (trace_msg[18] << 8) | (trace_msg[19] << 16) | (trace_msg[20] << 24); - ((T_TRACE_CONFIG_CHANGE *)(msg->SigP))->rtt_cell_enable[4] = (trace_msg[21]) | (trace_msg[22] << 8) | (trace_msg[23] << 16) | (trace_msg[24] << 24); - ((T_TRACE_CONFIG_CHANGE *)(msg->SigP))->rtt_cell_enable[5] = (trace_msg[25]) | (trace_msg[26] << 8) | (trace_msg[27] << 16) | (trace_msg[28] << 24); - ((T_TRACE_CONFIG_CHANGE *)(msg->SigP))->rtt_cell_enable[6] = (trace_msg[29]) | (trace_msg[30] << 8) | (trace_msg[31] << 16) | (trace_msg[32] << 24); - ((T_TRACE_CONFIG_CHANGE *)(msg->SigP))->rtt_cell_enable[7] = (trace_msg[33]) | (trace_msg[34] << 8) | (trace_msg[35] << 16) | (trace_msg[36] << 24); - - // Last UWORD32 define the RTT event - ((T_TRACE_CONFIG_CHANGE *)(msg->SigP))->rtt_event = (trace_msg[37]) | (trace_msg[38] << 8) | (trace_msg[39] << 16) | (trace_msg[40]); - - // send message... - os_send_sig(msg, L1C1_QUEUE); - DEBUGMSG(status,NU_SEND_QUEUE_ERR) - } - break; - - case TRACE_CHECKING_OPCODE: - { - l1_send_trace_version(); - } - break; - } -} +/* + * FreeCalypso: the binary trace code has been excised + * because we have no way of reconstructing what it was + * in the TCS211 version before LoCosto changes. + */ /************************************ ASCII trace *********************************************************/