//******************************************************************************
//
// Function Name:  VPU_ProcessStatusMainAMRDone()
//
// Description:		This function handles the processing needed after ARM receives
//					STATUS_MAIN_AMR_DONE from DSP.
//
// Notes:			The full duplex DSP interface is in sharedmem, not vsharedmem.
//					But since its function is closely related to voice processing,
//					we put it here.
//
//******************************************************************************
void VPU_ProcessStatusMainAMRDone(StatQ_t status_msg)
{
    VPSharedMem_t *vp_shared_mem = (VPSharedMem_t *) ((unsigned int)SHAREDMEM_GetSharedMemPtr());
    UInt16 codecType;

    codecType = vp_shared_mem->VOIP_UL_buf.voip_vocoder;

    Log_DebugPrintf(LOGID_AUDIO, "=====AP: VPU_ProcessStatusMainAMRDone codecType=0x%x\r\n", codecType);

    if (((codecType & 0xf000) == VOIP_PCM)		// VoIP PCM
	|| ((codecType & 0xf000) == VOIP_FR)		// VoIP FR
	|| ((codecType & 0xf000) == VOIP_AMR475)	// VoIP AMR-NB
	|| ((codecType & 0xf000) ==  VOIP_G711_U))	// VoIP G.711
    {
	VoIP_ProcessStatusMainAMRDone(status_msg);
	return;
    }
}
Example #2
0
void SYSPARM_Init(void)
{
        SharedMem_t * const mem = SHAREDMEM_GetSharedMemPtr();
        PAGE1_SharedMem_t * const pg1_mem = SHAREDMEM_GetPage1SharedMemPtr();
        PAGE5_SharedMem_t * const pg5_mem = SHAREDMEM_GetPage5SharedMemPtr();

        pr_info(__AUD"SYSPARM_Init\n");

        //mem->shared_frame_out   = 0;
        pg5_mem->shared_cmdq_in = 0;
        pg5_mem->shared_cmdq_out = 0;
        pg5_mem->shared_statusq_in = 0;
        pg5_mem->shared_statusq_out = 0;

        mem->shared_audio_output_gain = 32767;	// sys_data_ind->audio_output_gain;
        pg1_mem->shared_polyringer_out_gain_dl = 64;
        pg1_mem->shared_polyringer_out_gain_ul = 64;

//#ifdef VPU_INCLUDED
        VPSHAREDMEM_Init();
//#endif
}