From e2ad42f0d397dc0141a74e754a1cec767c14064e Mon Sep 17 00:00:00 2001 From: "Dobrowolski, PawelX" Date: Thu, 9 Mar 2023 11:42:14 +0100 Subject: [PATCH] loadable module: module api version structure Building system for iadk modules and for native sof modules has built in information about used api. That information we use to switch between two different methods of registering modules. Signed-off-by: Dobrowolski, PawelX --- .../module_adapter/library/module_api_ver.h | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 src/include/sof/audio/module_adapter/library/module_api_ver.h diff --git a/src/include/sof/audio/module_adapter/library/module_api_ver.h b/src/include/sof/audio/module_adapter/library/module_api_ver.h new file mode 100644 index 000000000000..ba6c1bcbe383 --- /dev/null +++ b/src/include/sof/audio/module_adapter/library/module_api_ver.h @@ -0,0 +1,34 @@ +/* SPDX-License-Identifier: BSD-3-Clause */ +/* + * Copyright(c) 2023 Intel Corporation. All rights reserved. + * + * Author: Pawel Dobrowolski + */ + +#ifndef __MODULE_API_VER_H__ +#define __MODULE_API_VER_H__ + +/* + * Api version 5.0.0 for sof loadable modules + */ + +#define SOF_MODULE_API_MAJOR_VERSION 5 +#define SOF_MODULE_API_MIDDLE_VERSION 0 +#define SOF_MODULE_API_MINOR_VERSION 0 + +union sof_module_api_version { + uint32_t full; + struct { + uint32_t minor : 10; + uint32_t middle : 10; + uint32_t major : 10; + uint32_t reserved : 2; + } fields; +}; + +struct sof_module_api_build_info{ + uint32_t format; + union sof_module_api_version api_version_number; +}; + +#endif /* __MODULE_API_VER_H__ */