Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/include/module/module/base.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

#include "interface.h"
#include "../ipc4/base-config.h"
#include <sof/list.h>

#define module_get_private_data(mod) ((mod)->priv.private)
#define module_set_private_data(mod, data) ((mod)->priv.private = data)
Expand Down Expand Up @@ -54,7 +55,7 @@ struct module_data {
* Below #ifdef is a temporary solution used until work on separating a common interface
* for loadable modules is completed.
*/
#ifdef SOF_MODULE_API_PRIVATE
#ifdef SOF_MONOLITHIC_BUILD
enum module_state state;
size_t new_cfg_size; /**< size of new module config data */
void *runtime_params;
Expand Down Expand Up @@ -84,7 +85,7 @@ struct processing_module {
* Below #ifdef is a temporary solution used until work on separating a common interface
* for loadable modules is completed.
*/
#ifdef SOF_MODULE_API_PRIVATE
#ifdef SOF_MONOLITHIC_BUILD
struct sof_ipc_stream_params *stream_params;
struct list_item sink_buffer_list; /* list of sink buffers to save produced output */

Expand Down
3 changes: 2 additions & 1 deletion src/include/sof/audio/module_adapter/iadk/adsp_stddef.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@
#include <stddef.h>
#include <stdint.h>
#include <user/trace.h>
#ifndef SOF_MONOLITHIC_BUILD
#include <rtos/string.h>

#endif /* SOF_MONOLITHIC_BUILD */
#ifdef __ZEPHYR__
#include <zephyr/sys/util.h>
#endif /* __ZEPHYR__ */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@
#define NATIVE_SYSTEM_SERVICE_H

#include <stdint.h>

#ifndef SOF_MONOLITHIC_BUILD
#include "logger.h"
#endif
#include "adsp_stddef.h"
#include <module/iadk/adsp_error_code.h>

Expand Down
13 changes: 9 additions & 4 deletions src/include/sof/audio/module_adapter/module/generic.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@

#ifndef __SOF_AUDIO_MODULE_GENERIC__
#define __SOF_AUDIO_MODULE_GENERIC__

#include <stdint.h>
#include <sof/list.h>
#ifndef SOF_MONOLITHIC_BUILD
#include <sof/audio/component.h>
#include <sof/ut.h>
#include <sof/lib/memory.h>
Expand All @@ -30,8 +32,9 @@
#define IS_PROCESSING_MODE_SINK_SOURCE(mod) ((mod)->proc_type == MODULE_PROCESS_TYPE_SOURCE_SINK)

#define MAX_BLOB_SIZE 8192
#endif /* SOF_MONOLITHIC_BUILD */
#define MODULE_MAX_SOURCES 8

#ifndef SOF_MONOLITHIC_BUILD
#define API_CALL(cd, cmd, sub_cmd, value, ret) \
do { \
ret = (cd)->api((cd)->self, \
Expand Down Expand Up @@ -87,7 +90,7 @@ UT_STATIC void sys_comp_module_##adapter##_init(void) \
} \
\
DECLARE_MODULE(sys_comp_module_##adapter##_init)

#endif /* SOF_MONOLITHIC_BUILD */
/**
* \enum module_state
* \brief Module-specific states
Expand Down Expand Up @@ -141,12 +144,13 @@ struct module_processing_data {
void *out_buff; /**< A pointer to module output buffer. */
};

#ifndef SOF_MONOLITHIC_BUILD
/*
* Definition used to extend structure definitions to include fields for exclusive use by SOF.
* This is a temporary solution used until work on separating a common interface for loadable
* modules is completed.
*/
#define SOF_MODULE_API_PRIVATE
#define SOF_MONOLITHIC_BUILD
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need to put this under #ifndef SOF_MONOLITHIC_BUILD and it makes little sense that way - if it isn't defined, then we define it... From this commit I don't see any other places where this can be defined, so this doesn't seem to protect against redefinition.


#include <module/module/base.h>

Expand Down Expand Up @@ -320,4 +324,5 @@ void module_adapter_set_params(struct processing_module *mod, struct sof_ipc_str
int module_adapter_set_state(struct processing_module *mod, struct comp_dev *dev,
int cmd);
int module_adapter_sink_src_prepare(struct comp_dev *dev);
#endif /* SOF_MONOLITHIC_BUILD */
#endif /* __SOF_AUDIO_MODULE_GENERIC__ */