mirror of https://github.com/thesofproject/sof.git
pipeline: add pipeline and component ids to pipe_foo() output for Zephyr
The component and pipeline identifiers were direct part of the older SOF dictionary format. This information was added directly to encoded output and was not part of the log message. When using Zephyr logging subsystem, this type of audio specific information has be to put as part of the log messages like any other log content. Modify pipe_{err,warn,info,dbg} macros to add pipeline and component identifiers to all printed log messages. Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
This commit is contained in:
parent
bae8457c78
commit
838d001390
|
@ -39,13 +39,23 @@ extern struct tr_ctx pipe_tr;
|
|||
/* device tracing */
|
||||
#if defined(__ZEPHYR__) && defined(CONFIG_ZEPHYR_LOG)
|
||||
|
||||
#define pipe_err(pipe_p, __e, ...) LOG_ERR(__e, ##__VA_ARGS__)
|
||||
#if CONFIG_IPC_MAJOR_4
|
||||
#define __PIPE_FMT "pipe:%u %#x "
|
||||
#else
|
||||
#define __PIPE_FMT "pipe:%u.%u "
|
||||
#endif
|
||||
|
||||
#define pipe_warn(pipe_p, __e, ...) LOG_WRN(__e, ##__VA_ARGS__)
|
||||
#define pipe_err(pipe_p, __e, ...) LOG_ERR(__PIPE_FMT __e, trace_pipe_get_id(pipe_p), \
|
||||
trace_pipe_get_subid(pipe_p), ##__VA_ARGS__)
|
||||
|
||||
#define pipe_info(pipe_p, __e, ...) LOG_INF(__e, ##__VA_ARGS__)
|
||||
#define pipe_warn(pipe_p, __e, ...) LOG_WRN(__PIPE_FMT __e, trace_pipe_get_id(pipe_p), \
|
||||
trace_pipe_get_subid(pipe_p), ##__VA_ARGS__)
|
||||
|
||||
#define pipe_dbg(pipe_p, __e, ...) LOG_DBG(__e, ##__VA_ARGS__)
|
||||
#define pipe_info(pipe_p, __e, ...) LOG_INF(__PIPE_FMT __e, trace_pipe_get_id(pipe_p), \
|
||||
trace_pipe_get_subid(pipe_p), ##__VA_ARGS__)
|
||||
|
||||
#define pipe_dbg(pipe_p, __e, ...) LOG_DBG(__PIPE_FMT __e, trace_pipe_get_id(pipe_p), \
|
||||
trace_pipe_get_subid(pipe_p), ##__VA_ARGS__)
|
||||
|
||||
#else
|
||||
|
||||
|
|
Loading…
Reference in New Issue