/****************************************************************************
*
*  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: CHAL_HANDLE chal_caph_switch_init(cUInt32 baseAddress)
*
*  Description: Initialize CAPH ASW
*
****************************************************************************/
CHAL_HANDLE chal_caph_switch_init(cUInt32 baseAddress)
{
    cUInt8  ch;

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

    /* Set the register base address to the caller supplied base address */
    chal_caph_switchc_cb.base = baseAddress;

    /* Need to set SSASW_NOC.SSASW_NOC_EN and SSASW_NOC.SSASW_CLKGATE_BYPASS
     * bits during init. This may be a temporary solution.
     */
chal_caph_switch_enable_clock_bypass((CHAL_HANDLE)(&chal_caph_switchc_cb));
   chal_caph_switch_enable_clock((CHAL_HANDLE)(&chal_caph_switchc_cb));

   return(CHAL_HANDLE)(&chal_caph_switchc_cb);
}