Skip to content

Commit

Permalink
loadable module: module api version structure
Browse files Browse the repository at this point in the history
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 <pawelx.dobrowolski@intel.com>
  • Loading branch information
pjdobrowolski authored and lgirdwood committed Jul 12, 2023
1 parent 70c257f commit e2ad42f
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions src/include/sof/audio/module_adapter/library/module_api_ver.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/* SPDX-License-Identifier: BSD-3-Clause */
/*
* Copyright(c) 2023 Intel Corporation. All rights reserved.
*
* Author: Pawel Dobrowolski <pawelx.dobrowolski@intel.com>
*/

#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__ */

0 comments on commit e2ad42f

Please sign in to comment.