diff --git a/src/audio/module_adapter/iadk/module_initial_settings_concrete.cpp b/src/audio/module_adapter/iadk/module_initial_settings_concrete.cpp index bf8909d8b543..82e1e02f5e96 100644 --- a/src/audio/module_adapter/iadk/module_initial_settings_concrete.cpp +++ b/src/audio/module_adapter/iadk/module_initial_settings_concrete.cpp @@ -6,7 +6,6 @@ #include #include -#include extern "C" { int memcpy_s(void * dst, size_t maxlen, const void * src, size_t len); diff --git a/src/audio/module_adapter/iadk/system_agent.cpp b/src/audio/module_adapter/iadk/system_agent.cpp index 77c0e120db9f..56bf4449693a 100644 --- a/src/audio/module_adapter/iadk/system_agent.cpp +++ b/src/audio/module_adapter/iadk/system_agent.cpp @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include @@ -62,7 +61,7 @@ namespace system { /* Structure storing handles to system service operations */ -AdspSystemService SystemAgent::system_service_ = { +const AdspSystemService SystemAgent::system_service_ = { native_system_service_log_message, native_system_service_safe_memcpy, native_system_service_safe_memmove, diff --git a/src/audio/module_adapter/library/native_system_service.c b/src/audio/module_adapter/library/native_system_service.c index cc8496ea0733..7f41c2eeaf47 100644 --- a/src/audio/module_adapter/library/native_system_service.c +++ b/src/audio/module_adapter/library/native_system_service.c @@ -128,7 +128,7 @@ AdspErrorCode native_system_service_get_interface(adsp_iface_id id, system_servi return ADSP_NO_ERROR; } -struct native_system_service_api native_system_service = { +const struct native_system_service_api native_system_service = { .log_message = native_system_service_log_message, .safe_memcpy = native_system_service_safe_memcpy, .safe_memmove = native_system_service_safe_memmove, diff --git a/src/include/module/module/base.h b/src/include/module/module/base.h index babe4178c409..d3f912957791 100644 --- a/src/include/module/module/base.h +++ b/src/include/module/module/base.h @@ -6,8 +6,8 @@ * Adrian Warecki */ -#ifndef __MODULE_MODULE_GENERIC__ -#define __MODULE_MODULE_GENERIC__ +#ifndef __MODULE_MODULE_BASE__ +#define __MODULE_MODULE_BASE__ #include #include @@ -180,4 +180,4 @@ struct processing_module { #endif /* SOF_MODULE_PRIVATE */ }; -#endif /* __MODULE_MODULE_GENERIC__ */ +#endif /* __MODULE_MODULE_BASE__ */ diff --git a/src/include/module/module/interface.h b/src/include/module/module/interface.h index 638334982324..21332dd08898 100644 --- a/src/include/module/module/interface.h +++ b/src/include/module/module/interface.h @@ -155,7 +155,7 @@ struct module_interface { int num_output_buffers); /** - * Set module configuration for the given configuration ID + * (optional) Set module configuration for the given configuration ID * * If the complete configuration message is greater than MAX_BLOB_SIZE bytes, the * transmission will be split into several smaller fragments. @@ -171,7 +171,7 @@ struct module_interface { size_t response_size); /** - * Get module runtime configuration for the given configuration ID + * (optional) Get module runtime configuration for the given configuration ID * * If the complete configuration message is greater than MAX_BLOB_SIZE bytes, the * transmission will be split into several smaller fragments. @@ -185,13 +185,13 @@ struct module_interface { uint8_t *fragment, size_t fragment_size); /** - * Set processing mode for the module + * (unused) Set processing mode for the module */ int (*set_processing_mode)(struct processing_module *mod, enum module_processing_mode mode); /** - * Get the current processing mode for the module + * (unused) Get the current processing mode for the module */ enum module_processing_mode (*get_processing_mode)(struct processing_module *mod); @@ -207,16 +207,17 @@ struct module_interface { */ int (*free)(struct processing_module *mod); /** - * Module specific bind procedure, called when modules are bound with each other + * (optional) Module specific bind procedure, called when modules are bound with each other */ int (*bind)(struct processing_module *mod, void *data); /** - * Module specific unbind procedure, called when modules are disconnected from one another + * (optional) Module specific unbind procedure, called when modules are disconnected from + * one another */ int (*unbind)(struct processing_module *mod, void *data); /** - * Module specific trigger procedure, called when modules are triggered + * (optional) Module specific trigger procedure, called when modules are triggered */ int (*trigger)(struct processing_module *mod, int cmd); diff --git a/src/include/sof/audio/module_adapter/iadk/logger.h b/src/include/sof/audio/module_adapter/iadk/logger.h deleted file mode 100644 index d447eb07a514..000000000000 --- a/src/include/sof/audio/module_adapter/iadk/logger.h +++ /dev/null @@ -1,48 +0,0 @@ -/* SPDX-License-Identifier: BSD-3-Clause - * - * Copyright(c) 2022 Intel Corporation. All rights reserved. - */ -/*! \file logger.h */ - -#ifndef _ADSP_FDK_LOGGER_H_ -#define _ADSP_FDK_LOGGER_H_ - -#include -#include "system_service.h" -#ifdef __cplusplus -namespace intel_adsp -{ -/*! \brief Helper class which handles the values list passed at call to the LOG_MESSAGE macro. - * \internal - * This class should not be used directly. log sending can be performed with help of the macro - * \ref LOG_MESSAGE. - */ -class Logger -{ -public: - /*! \cond INTERNAL */ - Logger(AdspSystemService const &system_service, AdspLogHandle const &log_handle) - : - system_service_(system_service), - log_handle_(log_handle) - {} - - template - void SendMessage(uint32_t log_entry, uint32_t _ignored, uint32_t param1 = 0, - uint32_t param2 = 0, uint32_t param3 = 0, uint32_t param4 = 0) - { - (void)_ignored; - system_service_.log_message(LOG_LEVEL, log_entry, &log_handle_, - param1, param2, param3, param4); - } - - /*! \endcond INTERNAL */ -private: - AdspSystemService const &system_service_; - AdspLogHandle const &log_handle_; -}; -} /* namespace intel_adsp */ - -#endif /* #ifdef __cplusplus */ - -#endif /* _ADSP_FDK_LOGGER_H_ */ diff --git a/src/include/sof/audio/module_adapter/iadk/system_agent.h b/src/include/sof/audio/module_adapter/iadk/system_agent.h index 7c44845f044e..ff2dcfbc9b5e 100644 --- a/src/include/sof/audio/module_adapter/iadk/system_agent.h +++ b/src/include/sof/audio/module_adapter/iadk/system_agent.h @@ -55,7 +55,7 @@ namespace system } private: - static AdspSystemService system_service_; + static const AdspSystemService system_service_; uint32_t log_handle_; uint32_t const core_id_; uint32_t module_id_; diff --git a/src/include/sof/audio/module_adapter/iadk/system_service.h b/src/include/sof/audio/module_adapter/iadk/system_service.h index 453247a38505..00439a0bf734 100644 --- a/src/include/sof/audio/module_adapter/iadk/system_service.h +++ b/src/include/sof/audio/module_adapter/iadk/system_service.h @@ -7,7 +7,6 @@ #ifndef _ADSP_SYSTEM_SERVICE_H_ #define _ADSP_SYSTEM_SERVICE_H_ -#include "logger.h" #include "adsp_stddef.h" #include #include "native_system_service.h" diff --git a/src/include/sof/audio/module_adapter/library/native_system_service.h b/src/include/sof/audio/module_adapter/library/native_system_service.h index 74f6a823192b..438db2abb363 100644 --- a/src/include/sof/audio/module_adapter/library/native_system_service.h +++ b/src/include/sof/audio/module_adapter/library/native_system_service.h @@ -8,7 +8,6 @@ #include -#include "logger.h" #include "adsp_stddef.h" #include