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
3 changes: 3 additions & 0 deletions src/audio/base_fw.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
LOG_MODULE_REGISTER(basefw, CONFIG_SOF_LOG_LEVEL);

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.

"srop trace context"?


SOF_DEFINE_REG_UUID(basefw);
/* unused with Zephyr, generates no output */
DECLARE_TR_CTX(basefw_comp_tr, SOF_UUID(basefw_uuid), LOG_LEVEL_INFO);

static struct ipc4_system_time_info global_system_time_info;
Expand Down Expand Up @@ -850,7 +851,9 @@ __cold static int basefw_set_large_config(struct comp_dev *dev, uint32_t param_i

static const struct comp_driver comp_basefw = {
.uid = SOF_RT_UUID(basefw_uuid),
#ifndef __ZEPHYR__

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.

Could this be reversed? I mean these are only needed in LIBRARY builds now (or are they even needed there)? Or maybe that's not accurate enough, but maybe "#ifdef CONFIG_TRACE" (i.e. a build really using sof-logger with dictionaries).

And for Zephyr, this doesn't cover the case where you build with Zephyr but disable CONFIG_ZEPHYR_LOG. I think these cases should be prevented somehow.

.tctx = &basefw_comp_tr,
#endif
.ops = {
.get_large_config = basefw_get_large_config,
.set_large_config = basefw_set_large_config,
Expand Down
3 changes: 3 additions & 0 deletions src/audio/chain_dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ static const uint32_t max_chain_number = DT_NUM_HDA_HOST_OUT + DT_NUM_HDA_HOST_I
LOG_MODULE_REGISTER(chain_dma, CONFIG_SOF_LOG_LEVEL);

SOF_DEFINE_REG_UUID(chain_dma);
/* unused with Zephyr, generates no output */
DECLARE_TR_CTX(chain_dma_tr, SOF_UUID(chain_dma_uuid), LOG_LEVEL_INFO);

/* chain dma component private data */
Expand Down Expand Up @@ -787,7 +788,9 @@ __cold static void chain_task_free(struct comp_dev *dev)

static const struct comp_driver comp_chain_dma = {
.uid = SOF_RT_UUID(chain_dma_uuid),
#ifndef __ZEPHYR__

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Zephyr is only RTOS now. We can remove support for legacy after v2.15

.tctx = &chain_dma_tr,
#endif
.ops = {
.create = chain_task_create,
.trigger = chain_task_trigger,
Expand Down
3 changes: 3 additions & 0 deletions src/audio/dai-zephyr.c
Original file line number Diff line number Diff line change
Expand Up @@ -2067,12 +2067,15 @@ int dai_zephyr_unbind(struct dai_data *dd, struct comp_dev *dev, struct bind_inf
}
#endif /* CONFIG_IPC_MAJOR_4 */

/* unused with Zephyr, generates no output */
DECLARE_TR_CTX(dai_comp_tr, SOF_UUID(dai_uuid), LOG_LEVEL_INFO);

static const struct comp_driver comp_dai = {
.type = SOF_COMP_DAI,
.uid = SOF_RT_UUID(dai_uuid),
#ifndef __ZEPHYR__
.tctx = &dai_comp_tr,
#endif
.ops = {
.create = dai_new,
.free = dai_free,
Expand Down
3 changes: 3 additions & 0 deletions src/audio/google/google_hotword_detect.c
Original file line number Diff line number Diff line change
Expand Up @@ -446,12 +446,15 @@ static int ghd_prepare(struct comp_dev *dev)
return comp_set_state(dev, COMP_TRIGGER_PREPARE);
}

/* unused with Zephyr, generates no output */
DECLARE_TR_CTX(ghd_tr, SOF_UUID(ghd_uuid), LOG_LEVEL_INFO);

static const struct comp_driver ghd_driver = {
.type = SOF_COMP_KEYWORD_DETECT,
.uid = SOF_RT_UUID(ghd_uuid),
#ifndef __ZEPHYR__
.tctx = &ghd_tr,
#endif
.ops = {
.create = ghd_create,
.free = ghd_free,
Expand Down
3 changes: 3 additions & 0 deletions src/audio/host-zephyr.c
Original file line number Diff line number Diff line change
Expand Up @@ -1311,12 +1311,15 @@ static uint64_t host_get_processed_data(struct comp_dev *dev, uint32_t stream_no
return ret;
}

/* unused with Zephyr, generates no output */
DECLARE_TR_CTX(host_tr, SOF_UUID(host_uuid), LOG_LEVEL_INFO);

static const struct comp_driver comp_host = {
.type = SOF_COMP_HOST,
.uid = SOF_RT_UUID(host_uuid),
#ifndef __ZEPHYR__
.tctx = &host_tr,
#endif
.ops = {
.create = host_new,
.free = host_free,
Expand Down
3 changes: 3 additions & 0 deletions src/audio/kpb.c
Original file line number Diff line number Diff line change
Expand Up @@ -2717,12 +2717,15 @@ static int kpb_set_large_config(struct comp_dev *dev, uint32_t param_id,
}
}

/* unused with Zephyr, generates no output */
DECLARE_TR_CTX(kpb_tr, SOF_UUID(KPB_UUID), LOG_LEVEL_INFO);

static const struct comp_driver comp_kpb = {
.type = SOF_COMP_KPB,
.uid = SOF_RT_UUID(KPB_UUID),
#ifndef __ZEPHYR__
.tctx = &kpb_tr,
#endif
.ops = {
.create = kpb_new,
.free = kpb_free,
Expand Down
4 changes: 4 additions & 0 deletions src/audio/selector/selector.c
Original file line number Diff line number Diff line change
Expand Up @@ -590,13 +590,16 @@ static int selector_reset(struct comp_dev *dev)
return ret;
}

/* unused with Zephyr, generates no output */
DECLARE_TR_CTX(selector_tr, SOF_UUID(selector_uuid), LOG_LEVEL_INFO);

/** \brief Selector component definition. */
static const struct comp_driver comp_selector = {
.type = SOF_COMP_SELECTOR,
.uid = SOF_RT_UUID(selector_uuid),
#ifndef __ZEPHYR__
.tctx = &selector_tr,
#endif
.ops = {
.create = selector_new,
.free = selector_free,
Expand Down Expand Up @@ -1176,6 +1179,7 @@ SOF_LLEXT_BUILDINFO;

#else

/* unused with Zephyr, generates no output */
DECLARE_TR_CTX(selector_tr, SOF_UUID(selector4_uuid), LOG_LEVEL_INFO);
DECLARE_MODULE_ADAPTER(selector_interface, selector4_uuid, selector_tr);
SOF_MODULE_INIT(selector, sys_comp_module_selector_interface_init);
Expand Down
3 changes: 3 additions & 0 deletions src/audio/tone/tone-ipc3.c
Original file line number Diff line number Diff line change
Expand Up @@ -375,12 +375,15 @@ static int tone_reset(struct comp_dev *dev)
return 0;
}

/* unused with Zephyr, generates no output */
DECLARE_TR_CTX(tone_tr, SOF_UUID(tone_uuid), LOG_LEVEL_INFO);

static const struct comp_driver comp_tone = {
.type = SOF_COMP_TONE,
.uid = SOF_RT_UUID(tone_uuid),
#ifndef __ZEPHYR__
.tctx = &tone_tr,
#endif
.ops = {
.create = tone_new,
.free = tone_free,
Expand Down
3 changes: 3 additions & 0 deletions src/drivers/amd/common/acp_bt_dai.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

SOF_DEFINE_REG_UUID(btdai);

/* unused with Zephyr, generates no output */
DECLARE_TR_CTX(btdai_tr, SOF_UUID(btdai_uuid), LOG_LEVEL_INFO);

static inline int btdai_set_config(struct dai *dai, struct ipc_config_dai *common_config,
Expand Down Expand Up @@ -79,7 +80,9 @@ static int btdai_get_hw_params(struct dai *dai,
const struct dai_driver acp_btdai_driver = {
.type = SOF_DAI_AMD_BT,
.uid = SOF_UUID(btdai_uuid),
#ifndef __ZEPHYR__
.tctx = &btdai_tr,
#endif
.dma_dev = SOF_DMA_DEV_BT,
.dma_caps = SOF_DMA_CAP_BT,
.ops = {
Expand Down
3 changes: 3 additions & 0 deletions src/drivers/amd/common/acp_dmic_dai.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ extern struct acp_dmic_silence acp_initsilence;

SOF_DEFINE_REG_UUID(acp_dmic_dai);

/* unused with Zephyr, generates no output */
DECLARE_TR_CTX(acp_dmic_dai_tr, SOF_UUID(acp_dmic_dai_uuid), LOG_LEVEL_INFO);

static inline int acp_dmic_dai_set_config(struct dai *dai, struct ipc_config_dai *common_config,
Expand Down Expand Up @@ -157,7 +158,9 @@ static int acp_dmic_dai_get_hw_params(struct dai *dai,
const struct dai_driver acp_dmic_dai_driver = {
.type = SOF_DAI_AMD_DMIC,
.uid = SOF_UUID(acp_dmic_dai_uuid),
#ifndef __ZEPHYR__
.tctx = &acp_dmic_dai_tr,
#endif
.dma_dev = SOF_DMA_DEV_DMIC,
.dma_caps = SOF_DMA_CAP_DMIC,
.ops = {
Expand Down
3 changes: 3 additions & 0 deletions src/drivers/amd/rembrandt/acp_hs_dai.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include <platform/chip_offset_byte.h>

SOF_DEFINE_REG_UUID(hsdai);
/* unused with Zephyr, generates no output */
DECLARE_TR_CTX(hsdai_tr, SOF_UUID(hsdai_uuid), LOG_LEVEL_INFO);

#if defined(__ZEPHYR__)
Expand Down Expand Up @@ -193,7 +194,9 @@ static int hsdai_get_hw_params(struct dai *dai,
const struct dai_driver acp_hsdai_driver = {
.type = SOF_DAI_AMD_HS,
.uid = SOF_UUID(hsdai_uuid),
#ifndef __ZEPHYR__
.tctx = &hsdai_tr,
#endif
.dma_dev = SOF_DMA_DEV_SP,
.dma_caps = SOF_DMA_CAP_SP,
.ops = {
Expand Down
3 changes: 3 additions & 0 deletions src/drivers/amd/rembrandt/acp_sp_dai.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include <platform/chip_offset_byte.h>

SOF_DEFINE_REG_UUID(spdai);
/* unused with Zephyr, generates no output */
DECLARE_TR_CTX(spdai_tr, SOF_UUID(spdai_uuid), LOG_LEVEL_INFO);

static inline int spdai_set_config(struct dai *dai, struct ipc_config_dai *common_config,
Expand Down Expand Up @@ -79,7 +80,9 @@ static int spdai_get_hw_params(struct dai *dai,
const struct dai_driver acp_spdai_driver = {
.type = SOF_DAI_AMD_SP,
.uid = SOF_UUID(spdai_uuid),
#ifndef __ZEPHYR__
.tctx = &spdai_tr,
#endif
.dma_dev = SOF_DMA_DEV_SP,
.dma_caps = SOF_DMA_CAP_SP,
.ops = {
Expand Down
3 changes: 3 additions & 0 deletions src/drivers/amd/rembrandt/acp_sw_audio_dai.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

SOF_DEFINE_REG_UUID(swaudiodai);

/* unused with Zephyr, generates no output */
DECLARE_TR_CTX(swaudiodai_tr, SOF_UUID(swaudiodai_uuid), LOG_LEVEL_INFO);

static inline int swaudiodai_set_config(struct dai *dai, struct ipc_config_dai *common_config,
Expand Down Expand Up @@ -98,7 +99,9 @@ static int swaudiodai_get_hw_params(struct dai *dai,
const struct dai_driver acp_swaudiodai_driver = {
.type = SOF_DAI_AMD_SDW,
.uid = SOF_UUID(swaudiodai_uuid),
#ifndef __ZEPHYR__
.tctx = &swaudiodai_tr,
#endif
.dma_dev = DMA_DEV_SW,
.dma_caps = DMA_CAP_SW,
.ops = {
Expand Down
3 changes: 3 additions & 0 deletions src/drivers/amd/renoir/acp_sp_dai.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include <platform/chip_offset_byte.h>

SOF_DEFINE_REG_UUID(spdai);
/* unused with Zephyr, generates no output */
DECLARE_TR_CTX(spdai_tr, SOF_UUID(spdai_uuid), LOG_LEVEL_INFO);

static inline int spdai_set_config(struct dai *dai, struct ipc_config_dai *common_config,
Expand Down Expand Up @@ -145,7 +146,9 @@ static int spdai_get_hw_params(struct dai *dai,
const struct dai_driver acp_spdai_driver = {
.type = SOF_DAI_AMD_SP,
.uid = SOF_UUID(spdai_uuid),
#ifndef __ZEPHYR__
.tctx = &spdai_tr,
#endif
.dma_dev = DMA_DEV_SP,
.dma_caps = DMA_CAP_SP,
.ops = {
Expand Down
3 changes: 3 additions & 0 deletions src/drivers/amd/vangogh/acp_hs_dai.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include <platform/chip_offset_byte.h>

SOF_DEFINE_REG_UUID(hsdai);
/* unused with Zephyr, generates no output */
DECLARE_TR_CTX(hsdai_tr, SOF_UUID(hsdai_uuid), LOG_LEVEL_INFO);

static inline int hsdai_set_config(struct dai *dai, struct ipc_config_dai *common_config,
Expand Down Expand Up @@ -82,7 +83,9 @@ static int hsdai_get_hw_params(struct dai *dai,
const struct dai_driver acp_hsdai_driver = {
.type = SOF_DAI_AMD_HS,
.uid = SOF_UUID(hsdai_uuid),
#ifndef __ZEPHYR__
.tctx = &hsdai_tr,
#endif
.dma_dev = DMA_DEV_HS,
.dma_caps = DMA_CAP_HS,
.ops = {
Expand Down
3 changes: 3 additions & 0 deletions src/drivers/amd/vangogh/acp_sp_dai.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include <platform/chip_offset_byte.h>

SOF_DEFINE_REG_UUID(spdai);
/* unused with Zephyr, generates no output */
DECLARE_TR_CTX(spdai_tr, SOF_UUID(spdai_uuid), LOG_LEVEL_INFO);

static inline int spdai_set_config(struct dai *dai, struct ipc_config_dai *common_config,
Expand Down Expand Up @@ -79,7 +80,9 @@ static int spdai_get_hw_params(struct dai *dai,
const struct dai_driver acp_spdai_driver = {
.type = SOF_DAI_AMD_SP,
.uid = SOF_UUID(spdai_uuid),
#ifndef __ZEPHYR__
.tctx = &spdai_tr,
#endif
.dma_dev = DMA_DEV_SP,
.dma_caps = DMA_CAP_SP,
.ops = {
Expand Down
3 changes: 3 additions & 0 deletions src/drivers/imx/esai.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ LOG_MODULE_REGISTER(esai, CONFIG_SOF_LOG_LEVEL);

SOF_DEFINE_REG_UUID(esai);

/* unused with Zephyr, generates no output */
DECLARE_TR_CTX(esai_tr, SOF_UUID(esai_uuid), LOG_LEVEL_INFO);

struct esai_pdata {
Expand Down Expand Up @@ -429,7 +430,9 @@ static int esai_get_hw_params(struct dai *dai,
const struct dai_driver esai_driver = {
.type = SOF_DAI_IMX_ESAI,
.uid = SOF_UUID(esai_uuid),
#ifndef __ZEPHYR__
.tctx = &esai_tr,
#endif
.dma_dev = DMA_DEV_ESAI,
.ops = {
.trigger = esai_trigger,
Expand Down
3 changes: 3 additions & 0 deletions src/drivers/imx/micfil.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ LOG_MODULE_REGISTER(micfil_dai, CONFIG_SOF_LOG_LEVEL);

SOF_DEFINE_REG_UUID(micfil);

/* unused with Zephyr, generates no output */
DECLARE_TR_CTX(micfil_tr, SOF_UUID(micfil_uuid), LOG_LEVEL_INFO);

#define MICFIL_OSR_DEFAULT 16
Expand Down Expand Up @@ -318,7 +319,9 @@ static int micfil_remove(struct dai *dai)
const struct dai_driver micfil_driver = {
.type = SOF_DAI_IMX_MICFIL,
.uid = SOF_UUID(micfil_uuid),
#ifndef __ZEPHYR__
.tctx = &micfil_tr,
#endif
.dma_dev = SOF_DMA_DEV_MICFIL,
.ops = {
.trigger = micfil_trigger,
Expand Down
3 changes: 3 additions & 0 deletions src/drivers/imx/sai.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ LOG_MODULE_REGISTER(sai, CONFIG_SOF_LOG_LEVEL);

SOF_DEFINE_REG_UUID(sai);

/* unused with Zephyr, generates no output */
DECLARE_TR_CTX(sai_tr, SOF_UUID(sai_uuid), LOG_LEVEL_INFO);

#define REG_TX_DIR 0
Expand Down Expand Up @@ -559,7 +560,9 @@ static int sai_get_hw_params(struct dai *dai,
const struct dai_driver sai_driver = {
.type = SOF_DAI_IMX_SAI,
.uid = SOF_UUID(sai_uuid),
#ifndef __ZEPHYR__
.tctx = &sai_tr,
#endif
.dma_dev = SOF_DMA_DEV_SAI,
.ops = {
.trigger = sai_trigger,
Expand Down
3 changes: 3 additions & 0 deletions src/drivers/mediatek/afe/afe-dai.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

SOF_DEFINE_REG_UUID(afe_dai);

/* unused with Zephyr, generates no output */
DECLARE_TR_CTX(afe_dai_tr, SOF_UUID(afe_dai_uuid), LOG_LEVEL_INFO);
LOG_MODULE_DECLARE(mtk_afe, CONFIG_SOF_LOG_LEVEL);

Expand Down Expand Up @@ -100,7 +101,9 @@ static int afe_dai_drv_get_fifo(struct dai *dai, int direction, int stream_id)
const struct dai_driver afe_dai_driver = {
.type = SOF_DAI_MEDIATEK_AFE,
.uid = SOF_UUID(afe_dai_uuid),
#ifndef __ZEPHYR__
.tctx = &afe_dai_tr,
#endif
.dma_dev = SOF_DMA_DEV_AFE_MEMIF,
.ops = {
.trigger = afe_dai_drv_trigger,
Expand Down
9 changes: 8 additions & 1 deletion src/include/sof/audio/module_adapter/module/generic.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,13 @@
#define IPC_MOD_CMD(v) .cmd = v,
#endif

/* Zephyr's tr_*() macros ignore the trace context, no need to store it */
#ifdef __ZEPHYR__
#define MODULE_ADAPTER_TCTX_INIT(tr) NULL
#else
#define MODULE_ADAPTER_TCTX_INIT(tr) &(tr)
#endif

/*
* \brief Macro to declare a module adapter component.
* \param adapter - name of the module.
Expand All @@ -51,7 +58,7 @@
static const struct comp_driver comp_##adapter##_module = { \
.type = SOF_COMP_MODULE_ADAPTER, \
.uid = SOF_RT_UUID(uuid), \
.tctx = &(tr), \
.tctx = MODULE_ADAPTER_TCTX_INIT(tr), \
.ops = { \
.create = module_adapter_new, \
.prepare = module_adapter_prepare, \
Expand Down
3 changes: 3 additions & 0 deletions src/library_manager/lib_manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ LOG_MODULE_REGISTER(lib_manager, CONFIG_SOF_LOG_LEVEL);

SOF_DEFINE_REG_UUID(lib_manager);

/* unused with Zephyr, generates no output */
DECLARE_TR_CTX(lib_manager_tr, SOF_UUID(lib_manager_uuid), LOG_LEVEL_INFO);

struct lib_manager_dma_ext {
Expand Down Expand Up @@ -762,7 +763,9 @@ static void lib_manager_prepare_module_adapter(struct comp_driver *drv, const st
drv->type = SOF_COMP_MODULE_ADAPTER;
drv->uid_cp = *uuid;
drv->uid = &drv->uid_cp;
#ifndef __ZEPHYR__
drv->tctx = &lib_manager_tr;
#endif
drv->ops.create = lib_manager_module_create;
drv->ops.prepare = module_adapter_prepare;
drv->ops.params = module_adapter_params;
Expand Down
Loading