Skip to content

Commit

Permalink
idefe
Browse files Browse the repository at this point in the history
  • Loading branch information
pjdobrowolski committed Dec 21, 2023
1 parent 292f18f commit c40dfba
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 17 deletions.
2 changes: 1 addition & 1 deletion src/audio/up_down_mixer/up_down_mixer_coef.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include "up_down_mixer_ipc4.h"
#include <stdint.h>

#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))
Expand Down
2 changes: 1 addition & 1 deletion src/audio/up_down_mixer/up_down_mixer_hifi3.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 <xtensa/tie/xt_hifi3.h>
#include <errno.h>
Expand Down
15 changes: 9 additions & 6 deletions src/include/sof/audio/component.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,17 @@

#ifndef __SOF_AUDIO_COMPONENT_H__
#define __SOF_AUDIO_COMPONENT_H__

#ifndef MODULE_PRIVAT
#include <sof/audio/buffer.h>
#include <sof/audio/format.h>
#include <sof/audio/pipeline.h>
#include <rtos/idc.h>
#include <sof/lib/dai.h>
#include <sof/schedule/schedule.h>
#include <ipc/control.h>
#else
#include <sof/ipc/topology.h>
#endif
#include <kernel/abi.h>

#include <limits.h>
Expand Down Expand Up @@ -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
* @{
*/
Expand Down Expand Up @@ -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 */
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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
};

/**
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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__ */
3 changes: 2 additions & 1 deletion src/include/sof/audio/dp_queue.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@

#include <sof/audio/sink_api.h>
#include <sof/audio/source_api.h>
#ifndef MODULE_PRIVAT
#include <sof/audio/audio_stream.h>
#include <rtos/bit.h>
#include <sof/common.h>
#include <ipc/topology.h>
#include <sof/coherent.h>

#endif
/**
* DP queue is a lockless circular buffer
* providing safe consumer/producer cached operations cross cores
Expand Down
2 changes: 1 addition & 1 deletion src/include/sof/audio/module_adapter/iadk/adsp_stddef.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include <user/trace.h>
#include <rtos/string.h>

#ifdef __ZEPHYR__
#ifdef __ZEPHYR__ && !defined MODULE_PRIVAT
#include <zephyr/sys/util.h>
#endif /* __ZEPHYR__ */

Expand Down
8 changes: 7 additions & 1 deletion src/include/sof/audio/module_adapter/module/generic.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,20 @@
#ifndef __SOF_AUDIO_MODULE_GENERIC__
#define __SOF_AUDIO_MODULE_GENERIC__

#ifndef MODULE_PRIVAT
#include <sof/audio/component.h>
#include <sof/ut.h>
#include <sof/lib/memory.h>
#endif //MODULE_PRIVAT
#include <sof/audio/sink_api.h>
#include <sof/audio/source_api.h>
#include <sof/audio/dp_queue.h>
#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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@

#ifndef __SOF_MODULE_INTERFACE__
#define __SOF_MODULE_INTERFACE__

#ifndef MODULE_PRIVAT
#include <sof/compiler_attributes.h>
#endif
#include <sof/audio/sink_api.h>
#include <sof/audio/source_api.h>

Expand Down
8 changes: 3 additions & 5 deletions src/include/sof/trace/trace.h
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -384,15 +382,15 @@ 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.
*/
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
Expand Down Expand Up @@ -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__ */

0 comments on commit c40dfba

Please sign in to comment.