/* param handle codec handle. param module audio codec module. param powerOn true is power on, false is power down. return kStatus_Success is success, else configure failed.  */
status_t HAL_CODEC_SGTL5000_SetPower(void *handle, uint32_t module, bool powerOn)
/* param handle codec handle. param module audio codec module. param powerOn true is power on, false is power down. return kStatus_Success is success, else configure failed.  */
status_t HAL_CODEC_SGTL5000_SetPower(void *handle, uint32_t module, bool powerOn)
{
    assert(handle != NULL);
    if (powerOn)
    {
        return SGTL_EnableModule((sgtl_handle_t *)((uint32_t)(((codec_handle_t *)handle)->codecDevHandle)),
                                 HAL_SGTL_MAP_MODULE(module));
    }
    else
    {
        return SGTL_DisableModule((sgtl_handle_t *)((uint32_t)(((codec_handle_t *)handle)->codecDevHandle)),
                                  HAL_SGTL_MAP_MODULE(module));
    }
}