/* param handle codec handle. param cmd module control cmd, reference _codec_module_ctrl_cmd. param data value to write, when cmd is kCODEC_ModuleRecordSourceChannel, the data should be a value combine of channel and source, please reference macro CODEC_MODULE_RECORD_SOURCE_CHANNEL(source, LP, LN, RP, RN), reference codec specific driver for detail configurations. return kStatus_Success is success, else configure failed.  */
status_t CODEC_ModuleControl(codec_handle_t *handle, codec_module_ctrl_cmd_t cmd, uint32_t data)
/* param handle codec handle. param cmd module control cmd, reference _codec_module_ctrl_cmd. param data value to write, when cmd is kCODEC_ModuleRecordSourceChannel, the data should be a value combine of channel and source, please reference macro CODEC_MODULE_RECORD_SOURCE_CHANNEL(source, LP, LN, RP, RN), reference codec specific driver for detail configurations. return kStatus_Success is success, else configure failed.  */
status_t CODEC_ModuleControl(codec_handle_t *handle, codec_module_ctrl_cmd_t cmd, uint32_t data)
{
    assert((handle != NULL) && (handle->codecConfig != NULL));
    assert(handle->codecCapability != NULL);
    switch (cmd)
    {
        case kCODEC_ModuleSwitchI2SInInterface:
            if ((handle->codecCapability->codecModuleCapability & kCODEC_SupportModuleI2SInSwitchInterface) == 0U)
            {
                return kStatus_CODEC_NotSupport;
            }
            break;
        default:
            return kStatus_CODEC_NotSupport;
    }
    return HAL_CODEC_ModuleControl(handle, (uint32_t)cmd, data);
}