diff --git a/src/audio/up_down_mixer/up_down_mixer_coef.h b/src/audio/up_down_mixer/up_down_mixer_coef.h index 2085b8e33720..9dce43a0d2f9 100644 --- a/src/audio/up_down_mixer/up_down_mixer_coef.h +++ b/src/audio/up_down_mixer/up_down_mixer_coef.h @@ -8,7 +8,7 @@ #include "up_down_mixer_ipc4.h" #include -#if CONFIG_COMP_UP_DOWN_MIXER +#if CONFIG_COMP_UP_DOWN_MIXER || ~MODULE_PRIVAT #define COMPUTE_COEFF_32BIT(counter, denominator) ((0x7fffffffULL * (counter)) / (denominator)) #define COMPUTE_COEFF_16BIT(counter, denominator) ((0x7fffULL * (counter)) / (denominator)) diff --git a/src/audio/up_down_mixer/up_down_mixer_hifi3.c b/src/audio/up_down_mixer/up_down_mixer_hifi3.c index 259cf5128b9f..47a7d89749c7 100644 --- a/src/audio/up_down_mixer/up_down_mixer_hifi3.c +++ b/src/audio/up_down_mixer/up_down_mixer_hifi3.c @@ -6,7 +6,7 @@ #include "up_down_mixer.h" -#if defined(__XCC__) && XCHAL_HAVE_HIFI3 +#if defined(__XCC__) && XCHAL_HAVE_HIFI3 || ~defined MODULE_PRIVAT #include #include diff --git a/src/include/sof/audio/component.h b/src/include/sof/audio/component.h index 59d5867cae0b..5c43c94b3434 100644 --- a/src/include/sof/audio/component.h +++ b/src/include/sof/audio/component.h @@ -15,7 +15,7 @@ #ifndef __SOF_AUDIO_COMPONENT_H__ #define __SOF_AUDIO_COMPONENT_H__ - +#ifndef MODULE_PRIVAT #include #include #include @@ -23,7 +23,9 @@ #include #include #include +#else #include +#endif #include #include @@ -118,7 +120,7 @@ enum { #define COMP_ATTR_VDMA_INDEX 3 /**< Comp index of the virtual DMA at the gateway. */ #define COMP_ATTR_BASE_CONFIG 4 /**< Component base config */ /** @}*/ - +#ifndef MODULE_PRIVAT /** \name Trace macros * @{ */ @@ -244,7 +246,7 @@ enum { (uint32_t)((pcd)->peak_mcps_period_cnt)) /** @}*/ - +#endif /** \brief Type of endpoint this component is connected to in a pipeline */ enum comp_endpoint_type { COMP_ENDPOINT_HOST, /**< Connected to host dma */ @@ -294,7 +296,7 @@ struct comp_ops { struct comp_dev *(*create)(const struct comp_driver *drv, const struct comp_ipc_config *ipc_config, const void *ipc_specific_config); - +#ifndef MODULE_PRIVAT /** * Called to delete the specified component device. * @param dev Component device to be deleted. @@ -510,6 +512,7 @@ struct comp_ops { * @return total data processed if succeeded, 0 otherwise. */ uint64_t (*get_total_data_processed)(struct comp_dev *dev, uint32_t stream_no, bool input); +#endif //MODULE_PRIVAT }; /** @@ -646,7 +649,7 @@ static inline enum sof_comp_type dev_comp_type(const struct comp_dev *dev) { return dev->ipc_config.type; } - +#ifndef MODULE_PRIVAT /** * Allocates memory for the component device and initializes common part. * @param drv Parent component driver. @@ -905,5 +908,5 @@ int comp_verify_params(struct comp_dev *dev, uint32_t flag, struct sof_ipc_stream_params *params); /** @}*/ - +#endif // MODULE_PRIVAT #endif /* __SOF_AUDIO_COMPONENT_H__ */ diff --git a/src/include/sof/audio/dp_queue.h b/src/include/sof/audio/dp_queue.h index 877613d141f9..bdbf17920d94 100644 --- a/src/include/sof/audio/dp_queue.h +++ b/src/include/sof/audio/dp_queue.h @@ -9,12 +9,13 @@ #include #include +#ifndef MODULE_PRIVAT #include #include #include #include #include - +#endif /** * DP queue is a lockless circular buffer * providing safe consumer/producer cached operations cross cores diff --git a/src/include/sof/audio/module_adapter/iadk/adsp_stddef.h b/src/include/sof/audio/module_adapter/iadk/adsp_stddef.h index 759a60b988de..ff328d84d789 100644 --- a/src/include/sof/audio/module_adapter/iadk/adsp_stddef.h +++ b/src/include/sof/audio/module_adapter/iadk/adsp_stddef.h @@ -11,7 +11,7 @@ #include #include -#ifdef __ZEPHYR__ +#ifdef __ZEPHYR__ && !defined MODULE_PRIVAT #include #endif /* __ZEPHYR__ */ diff --git a/src/include/sof/audio/module_adapter/module/generic.h b/src/include/sof/audio/module_adapter/module/generic.h index ed43aa319194..d73ae757a61f 100644 --- a/src/include/sof/audio/module_adapter/module/generic.h +++ b/src/include/sof/audio/module_adapter/module/generic.h @@ -13,14 +13,20 @@ #ifndef __SOF_AUDIO_MODULE_GENERIC__ #define __SOF_AUDIO_MODULE_GENERIC__ +#ifndef MODULE_PRIVAT #include #include #include +#endif //MODULE_PRIVAT #include #include #include #include "module_interface.h" - +#ifndef MODULE_PRIVAT +#if CONFIG_INTEL_MODULES +#include "modules.h" +#endif +#endif /* * helpers to determine processing type * Needed till all the modules use PROCESSING_MODE_SINK_SOURCE diff --git a/src/include/sof/audio/module_adapter/module/module_interface.h b/src/include/sof/audio/module_adapter/module/module_interface.h index ccddcf6fda0a..a50f07b50b2b 100644 --- a/src/include/sof/audio/module_adapter/module/module_interface.h +++ b/src/include/sof/audio/module_adapter/module/module_interface.h @@ -7,8 +7,9 @@ #ifndef __SOF_MODULE_INTERFACE__ #define __SOF_MODULE_INTERFACE__ - +#ifndef MODULE_PRIVAT #include +#endif #include #include diff --git a/src/include/sof/trace/trace.h b/src/include/sof/trace/trace.h index d1beb48d81e2..e31bf24642bf 100644 --- a/src/include/sof/trace/trace.h +++ b/src/include/sof/trace/trace.h @@ -10,7 +10,6 @@ #ifndef __SOF_TRACE_TRACE_H__ #define __SOF_TRACE_TRACE_H__ - #ifndef RELATIVE_FILE #error "This file requires RELATIVE_FILE to be defined. " \ "Add it to CMake's target with sof_append_relative_path_definitions." @@ -64,7 +63,6 @@ struct tr_ctx; #define TRACE_BOOT_SYS_NOTIFIER (TRACE_BOOT_SYS + 0x300) #define TRACE_BOOT_SYS_POWER (TRACE_BOOT_SYS + 0x400) -/* platform/device specific codes */ #define TRACE_BOOT_PLATFORM_ENTRY (TRACE_BOOT_PLATFORM + 0x100) #define TRACE_BOOT_PLATFORM_IRQ (TRACE_BOOT_PLATFORM + 0x110) #define TRACE_BOOT_PLATFORM_MBOX (TRACE_BOOT_PLATFORM + 0x120) @@ -384,7 +382,7 @@ static inline int trace_filter_update(const struct trace_filter *filter) * DECLARE_TR_CTX, tr_ctx and component UUID system below */ #define _TRACE_INV_CLASS TRACE_CLASS_DEPRECATED - +#endif //MODULE_PRIVAT /** * Trace context. */ @@ -392,7 +390,7 @@ struct tr_ctx { const struct sof_uuid_entry *uuid_p; /**< UUID pointer, use SOF_UUID() to init */ uint32_t level; /**< Default log level */ }; - +#ifndef MODULE_PRIVAT #if defined(UNIT_TEST) #define TRACE_CONTEXT_SECTION #else @@ -535,7 +533,7 @@ struct tr_ctx { static inline void mtrace_printf(int log_level, const char *format_str, ...) { }; - +#endif //MODULE_PRIVAT #endif /* CONFIG_TRACE */ #endif /* __SOF_TRACE_TRACE_H__ */