Пример #1
0
/****************************************************************************
*
*  Function Name: csl_caph_switch_enable_clock
*
*  Description: enable/disable NOC global bit
*
****************************************************************************/
void csl_caph_switch_enable_clock(int enable)
{
	aTrace(LOG_AUDIO_CSL, "%s %d\n", __func__, enable);
	if (enable)
		chal_caph_switch_enable_clock(handle);
	else
		chal_caph_switch_disable_clock(handle);
	return;
}
/****************************************************************************
*
*  Function Name: Void chal_caph_switch_deinit(CHAL_HANDLE handle)
*
*  Description: Deinitialize CAPH ASW
*
****************************************************************************/
void chal_caph_switch_deinit(CHAL_HANDLE handle)
{
    chal_caph_switch_cb_t  *pchal_cb = (chal_caph_switch_cb_t*)handle;
    cUInt8  ch;

    /* Go through all the channels and set them not allocated */
    for(ch=0; ch < CHAL_CAPH_SWITCH_MAX_CHANNELS; ch++)
    {
        pchal_cb->alloc_status[ch] = FALSE;
    }

    /* Need to unset SSASW_NOC.SSASW_NOC_EN and SSASW_NOC.SSASW_CLKGATE_BYPASS
     * bits during init. This may be a temporary solution.
     */
/*    chal_caph_switch_disable_clock_bypass(handle);*/
    chal_caph_switch_disable_clock(handle);

    /* Reset the register base address */
    pchal_cb->base = 0;

    return;
}