Skip to content
Merged
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
10 changes: 5 additions & 5 deletions src/ipc/ipc4/logging.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
#include <ipc4/logging.h>
#include <rtos/kernel.h>
#if !CONFIG_LIBRARY
#include <zephyr/logging/log_backend.h>
#include <zephyr/logging/log.h>
Copy link
Collaborator

Choose a reason for hiding this comment

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

@tmleman The commit has a certain AI tint to it :) The "why this PR?" was left a bit open still. I guess this is not just refactoring, but starting to use SOF_LOG_LEVEL. Is there any concrete change from this PR? I think we set SOF_LOG_LEVEL for SOF side code already, but does this impact Zephyr side logs?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@kv2019i I have rephrased the commit description and provided a better justification for these changes.

I guess this is not just refactoring

You're right, it's not just a refactor; it's a fix for an unseen error. And since it's unseen, I didn't mention it ;P

#include <zephyr/logging/log_ctrl.h>
#endif
#if CONFIG_LOG_BACKEND_SOF_PROBE
#include <sof/probe/probe.h>
Expand Down Expand Up @@ -144,7 +144,7 @@ int ipc4_logging_enable_logs(bool first_block,
k_mutex_init(&log_mutex);
k_work_init_delayable(&log_work, log_work_handler);

log_backend_activate(log_backend, mtrace_log_hook);
log_backend_enable(log_backend, mtrace_log_hook, CONFIG_SOF_LOG_LEVEL);

mtrace_aging_timer = log_state->aging_timer_period;
if (mtrace_aging_timer < IPC4_MTRACE_AGING_TIMER_MIN_MS) {
Expand All @@ -155,7 +155,7 @@ int ipc4_logging_enable_logs(bool first_block,
} else {
k_work_flush_delayable(&log_work, &ipc4_log_work_sync);
adsp_mtrace_log_init(NULL);
log_backend_deactivate(log_backend);
log_backend_disable(log_backend);
}

return 0;
Expand Down Expand Up @@ -189,10 +189,10 @@ int ipc4_logging_enable_logs(bool first_block,
if (!probe_is_backend_configured())
return -EINVAL;

log_backend_activate(log_backend, NULL);
log_backend_enable(log_backend, NULL, CONFIG_SOF_LOG_LEVEL);

} else {
log_backend_deactivate(log_backend);
log_backend_disable(log_backend);
}

return 0;
Expand Down
Loading