Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
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
24 changes: 11 additions & 13 deletions posix/include/rtos/spinlock.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,6 @@ typedef uint32_t k_spinlock_key_t;
extern uint32_t lock_dbg_atomic;
extern uint32_t lock_dbg_user[DBG_LOCK_USERS];

extern struct tr_ctx sl_tr;

/* panic on deadlock */
#define spin_try_lock_dbg(lock, line) \
do { \
Expand All @@ -88,9 +86,9 @@ extern struct tr_ctx sl_tr;
break; /* lock acquired */ \
} \
if (__tries == 0) { \
tr_err_atomic(&sl_tr, "DED"); \
tr_err_atomic(&sl_tr, "line: %d", line); \
tr_err_atomic(&sl_tr, "user: %d", (lock)->user); \
tr_err_atomic("DED"); \
tr_err_atomic("line: %d", line); \
tr_err_atomic("user: %d", (lock)->user); \
panic(SOF_IPC_PANIC_DEADLOCK); /* lock not acquired */ \
} \
} while (0)
Expand All @@ -102,11 +100,11 @@ extern struct tr_ctx sl_tr;
int __i = 0; \
int __count = lock_dbg_atomic >= DBG_LOCK_USERS \
? DBG_LOCK_USERS : lock_dbg_atomic; \
tr_err_atomic(&sl_tr, "eal"); \
tr_err_atomic(&sl_tr, "line: %d", line); \
tr_err_atomic(&sl_tr, "dbg_atomic: %d", lock_dbg_atomic); \
tr_err_atomic("eal"); \
tr_err_atomic("line: %d", line); \
tr_err_atomic("dbg_atomic: %d", lock_dbg_atomic); \
for (__i = 0; __i < __count; __i++) { \
tr_err_atomic(&sl_tr, "value: %d", \
tr_err_atomic("value: %d", \
(lock_dbg_atomic << 24) | \
lock_dbg_user[__i]); \
} \
Expand All @@ -115,14 +113,14 @@ extern struct tr_ctx sl_tr;

#define spin_lock_dbg(line) \
do { \
tr_info(&sl_tr, "LcE"); \
tr_info(&sl_tr, "line: %d", line); \
tr_info("LcE"); \
tr_info("line: %d", line); \
} while (0)

#define spin_unlock_dbg(line) \
do { \
tr_info(&sl_tr, "LcX"); \
tr_info(&sl_tr, "line: %d", line); \
tr_info("LcX"); \
tr_info("line: %d", line); \
} while (0)

#else /* CONFIG_DEBUG_LOCKS_VERBOSE */
Expand Down
6 changes: 3 additions & 3 deletions posix/include/rtos/wait.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ static inline void wait_for_interrupt(int level)
{
LOG_MODULE_DECLARE(wait, CONFIG_SOF_LOG_LEVEL);

tr_dbg(&wait_tr, "WFE");
tr_dbg("WFE");
#if CONFIG_DEBUG_LOCKS
if (lock_dbg_atomic)
tr_err_atomic(&wait_tr, "atm");
tr_err_atomic("atm");
#endif
platform_wait_for_interrupt(level);
tr_dbg(&wait_tr, "WFX");
tr_dbg("WFX");
}

/**
Expand Down
4 changes: 2 additions & 2 deletions posix/include/sof/lib/perf_cnt.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ struct perf_cnt_data {
#if CONFIG_PERFORMANCE_COUNTERS

#define perf_cnt_trace(ctx, pcd) \
tr_info(ctx, "perf plat last %u peak %u cpu last %u, peak %u", \
tr_info("perf plat last %u peak %u cpu last %u, peak %u", \
(uint32_t)((pcd)->plat_delta_last), \
(uint32_t)((pcd)->plat_delta_peak), \
(uint32_t)((pcd)->cpu_delta_last), \
Expand Down Expand Up @@ -78,7 +78,7 @@ struct perf_cnt_data {
/* perf measurement windows size 2^x */
#define PERF_CNT_CHECK_WINDOW_SIZE 10
#define task_perf_avg_info(pcd, task_p, class) \
tr_info(task_p, "perf_cycle task %p, %pU cpu avg %u peak %u",\
tr_info("perf_cycle task %p, %pU cpu avg %u peak %u",\
class, (class)->uid, \
(uint32_t)((pcd)->cpu_delta_sum), \
(uint32_t)((pcd)->cpu_delta_peak))
Expand Down
8 changes: 4 additions & 4 deletions src/audio/base_fw.c
Original file line number Diff line number Diff line change
Expand Up @@ -425,10 +425,10 @@ static int fw_config_set_force_l1_exit(const struct sof_tlv *tlv)
const uint32_t force = tlv->value[0];

if (force) {
tr_info(&basefw_comp_tr, "FW config set force dmi l0 state");
tr_info("FW config set force dmi l0 state");
intel_adsp_force_dmi_l0_state();
} else {
tr_info(&basefw_comp_tr, "FW config set allow dmi l1 state");
tr_info("FW config set allow dmi l1 state");
intel_adsp_allow_dmi_l1_state();
}

Expand All @@ -451,7 +451,7 @@ static int basefw_set_fw_config(bool first_block,
default:
break;
}
tr_warn(&basefw_comp_tr, "returning success for Set FW_CONFIG without handling it");
tr_warn("returning success for Set FW_CONFIG without handling it");
return 0;
}

Expand Down Expand Up @@ -485,7 +485,7 @@ static int basefw_get_large_config(struct comp_dev *dev,
case IPC4_EXTENDED_SYSTEM_TIME:
ret = basefw_get_ext_system_time(data_offset, data);
if (ret == IPC4_UNAVAILABLE) {
tr_warn(&basefw_comp_tr, "returning success for get host EXTENDED_SYSTEM_TIME without handling it");
tr_warn("returning success for get host EXTENDED_SYSTEM_TIME without handling it");
return 0;
} else {
return ret;
Expand Down
8 changes: 4 additions & 4 deletions src/audio/buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ struct comp_buffer *buffer_alloc(uint32_t size, uint32_t caps, uint32_t flags, u
struct comp_buffer *buffer;
void *stream_addr;

tr_dbg(&buffer_tr, "buffer_alloc()");
tr_dbg("buffer_alloc()");

/* validate request */
if (size == 0) {
tr_err(&buffer_tr, "buffer_alloc(): new size = %u is invalid",
tr_err("buffer_alloc(): new size = %u is invalid",
size);
return NULL;
}
Expand All @@ -48,7 +48,7 @@ struct comp_buffer *buffer_alloc(uint32_t size, uint32_t caps, uint32_t flags, u
buffer = rzalloc(zone, 0, SOF_MEM_CAPS_RAM, sizeof(*buffer));

if (!buffer) {
tr_err(&buffer_tr, "buffer_alloc(): could not alloc structure");
tr_err("buffer_alloc(): could not alloc structure");
return NULL;
}

Expand All @@ -58,7 +58,7 @@ struct comp_buffer *buffer_alloc(uint32_t size, uint32_t caps, uint32_t flags, u
stream_addr = rballoc_align(0, caps, size, align);
if (!stream_addr) {
rfree(buffer);
tr_err(&buffer_tr, "buffer_alloc(): could not alloc size = %u bytes of type = %u",
tr_err("buffer_alloc(): could not alloc size = %u bytes of type = %u",
size, caps);
return NULL;
}
Expand Down
26 changes: 11 additions & 15 deletions src/audio/chain_dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -147,14 +147,14 @@ static void handle_xrun(struct chain_dma_data *cd)

if (cd->link_connector_node_id.f.dma_type == ipc4_hda_link_output_class &&
!cd->xrun_notification_sent) {
tr_warn(&chain_dma_tr, "handle_xrun(): underrun detected");
tr_warn("handle_xrun(): underrun detected");
xrun_notif_msg_init(cd->msg_xrun, cd->link_connector_node_id.dw,
SOF_IPC4_GATEWAY_UNDERRUN_DETECTED);
ipc_msg_send(cd->msg_xrun, NULL, true);
cd->xrun_notification_sent = true;
} else if (cd->link_connector_node_id.f.dma_type == ipc4_hda_link_input_class &&
!cd->xrun_notification_sent) {
tr_warn(&chain_dma_tr, "handle_xrun(): overrun detected");
tr_warn("handle_xrun(): overrun detected");
xrun_notif_msg_init(cd->msg_xrun, cd->link_connector_node_id.dw,
SOF_IPC4_GATEWAY_OVERRUN_DETECTED);
ipc_msg_send(cd->msg_xrun, NULL, true);
Expand Down Expand Up @@ -185,14 +185,14 @@ static enum task_state chain_task_run(void *data)
case 0:
break;
case -EPIPE:
tr_warn(&chain_dma_tr, "chain_task_run(): dma_get_status() link xrun occurred,"
tr_warn("chain_task_run(): dma_get_status() link xrun occurred,"
" ret = %u", ret);
#if CONFIG_XRUN_NOTIFICATIONS_ENABLE
handle_xrun(cd);
#endif
break;
default:
tr_err(&chain_dma_tr, "chain_task_run(): dma_get_status() error, ret = %u", ret);
tr_err("chain_task_run(): dma_get_status() error, ret = %u", ret);
return SOF_TASK_STATE_COMPLETED;
}

Expand All @@ -203,7 +203,7 @@ static enum task_state chain_task_run(void *data)
/* Host DMA does not report xruns. All error values will be treated as critical. */
ret = dma_get_status(cd->chan_host->dma->z_dev, cd->chan_host->index, &stat);
if (ret < 0) {
tr_err(&chain_dma_tr, "chain_task_run(): dma_get_status() error, ret = %u", ret);
tr_err("chain_task_run(): dma_get_status() error, ret = %u", ret);
return SOF_TASK_STATE_COMPLETED;
}

Expand All @@ -221,15 +221,13 @@ static enum task_state chain_task_run(void *data)

ret = dma_reload(cd->chan_host->dma->z_dev, cd->chan_host->index, 0, 0, increment);
if (ret < 0) {
tr_err(&chain_dma_tr,
"chain_task_run(): dma_reload() host error, ret = %u", ret);
tr_err("chain_task_run(): dma_reload() host error, ret = %u", ret);
return SOF_TASK_STATE_COMPLETED;
}

ret = dma_reload(cd->chan_link->dma->z_dev, cd->chan_link->index, 0, 0, increment);
if (ret < 0) {
tr_err(&chain_dma_tr,
"chain_task_run(): dma_reload() link error, ret = %u", ret);
tr_err("chain_task_run(): dma_reload() link error, ret = %u", ret);
return SOF_TASK_STATE_COMPLETED;
}
} else {
Expand All @@ -246,9 +244,8 @@ static enum task_state chain_task_run(void *data)
cd->chan_link->index, 0, 0,
half_buff_size);
if (ret < 0) {
tr_err(&chain_dma_tr,
"chain_task_run(): dma_reload() link error, ret = %u",
ret);
tr_err("chain_task_run(): dma_reload() link error, ret = %u",
ret);
return SOF_TASK_STATE_COMPLETED;
}
cd->first_data_received = true;
Expand All @@ -262,8 +259,7 @@ static enum task_state chain_task_run(void *data)
ret = dma_reload(cd->chan_host->dma->z_dev, cd->chan_host->index,
0, 0, transferred);
if (ret < 0) {
tr_err(&chain_dma_tr,
"chain_task_run(): dma_reload() host error, ret = %u", ret);
tr_err("chain_task_run(): dma_reload() host error, ret = %u", ret);
return SOF_TASK_STATE_COMPLETED;
}

Expand All @@ -272,7 +268,7 @@ static enum task_state chain_task_run(void *data)
ret = dma_reload(cd->chan_link->dma->z_dev, cd->chan_link->index,
0, 0, half_buff_size);
if (ret < 0) {
tr_err(&chain_dma_tr, "chain_task_run(): dma_reload() "
tr_err("chain_task_run(): dma_reload() "
"link error, ret = %u", ret);
return SOF_TASK_STATE_COMPLETED;
}
Expand Down
2 changes: 1 addition & 1 deletion src/audio/channel_map.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ struct sof_ipc_channel_map *chmap_get(struct sof_ipc_stream_map *smap,
uint32_t byte = 0;

if (index >= smap->num_ch_map) {
tr_err(&chmap_tr, "chmap_get(): index %d out of bounds %d",
tr_err("chmap_get(): index %d out of bounds %d",
index, smap->num_ch_map);

return NULL;
Expand Down
4 changes: 2 additions & 2 deletions src/audio/dp_queue.c
Original file line number Diff line number Diff line change
Expand Up @@ -288,14 +288,14 @@ struct dp_queue *dp_queue_create(size_t min_available, size_t min_free_space, ui
goto err;

dp_queue->audio_stream_params.id = id;
tr_info(&dp_queue_tr, "DpQueue created, id: %u shared: %u min_available: %u min_free_space %u, size %u",
tr_info("DpQueue created, id: %u shared: %u min_available: %u min_free_space %u, size %u",
id, dp_queue_is_shared(dp_queue), min_available, min_free_space,
dp_queue->data_buffer_size);

/* return a pointer to allocated structure */
return dp_queue;
err:
tr_err(&dp_queue_tr, "DpQueue creation failure");
tr_err("DpQueue creation failure");
rfree(dp_queue);
return NULL;
}
12 changes: 5 additions & 7 deletions src/audio/rtnr/rtnr.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@
/* ID for RTNR data */
#define RTNR_DATA_ID_PRESET 12345678

static const struct comp_driver comp_rtnr;

/** \brief RTNR processing functions map item. */
struct rtnr_func_map {
enum sof_ipc_frame fmt; /**< source frame format */
Expand All @@ -78,27 +76,27 @@ void rtnr_printf(int a, int b, int c, int d, int e)
{
switch (a) {
case 0xa:
comp_cl_info(&comp_rtnr, "rtnr_printf 1st=%08x, 2nd=%08x, 3rd=%08x, 4st=%08x",
comp_cl_info(NULL, "rtnr_printf 1st=%08x, 2nd=%08x, 3rd=%08x, 4st=%08x",
b, c, d, e);
break;

case 0xb:
comp_cl_info(&comp_rtnr, "rtnr_printf 1st=%08x, 2nd=%08x, 3rd=%08x, 4st=%08x",
comp_cl_info(NULL, "rtnr_printf 1st=%08x, 2nd=%08x, 3rd=%08x, 4st=%08x",
b, c, d, e);
break;

case 0xc:
comp_cl_warn(&comp_rtnr, "rtnr_printf 1st=%08x, 2nd=%08x, 3rd=%08x, 4st=%08x",
comp_cl_warn(NULL, "rtnr_printf 1st=%08x, 2nd=%08x, 3rd=%08x, 4st=%08x",
b, c, d, e);
break;

case 0xd:
comp_cl_dbg(&comp_rtnr, "rtnr_printf 1st=%08x, 2nd=%08x, 3rd=%08x, 4st=%08x",
comp_cl_dbg(NULL, "rtnr_printf 1st=%08x, 2nd=%08x, 3rd=%08x, 4st=%08x",
b, c, d, e);
break;

case 0xe:
comp_cl_err(&comp_rtnr, "rtnr_printf 1st=%08x, 2nd=%08x, 3rd=%08x, 4st=%08x",
comp_cl_err(NULL, "rtnr_printf 1st=%08x, 2nd=%08x, 3rd=%08x, 4st=%08x",
b, c, d, e);
break;

Expand Down
Loading