Skip to content

Commit 545ab19

Browse files
ranj063lgirdwood
authored andcommitted
ipc4: logging: fix library build
Fix build with CONFIG_LIBRARY. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
1 parent deb7a09 commit 545ab19

2 files changed

Lines changed: 12 additions & 1 deletion

File tree

src/include/ipc4/logging.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,20 @@
88

99
#define SOF_IPC4_LOGGING_MTRACE_PAGE_SIZE 0x1000
1010

11+
#if CONFIG_LIBRARY
12+
static inline int ipc4_logging_enable_logs(bool first_block,
13+
bool last_block,
14+
uint32_t data_offset_or_size,
15+
const char *data)
16+
{
17+
return 0;
18+
}
19+
#else
1120
int ipc4_logging_enable_logs(bool first_block,
1221
bool last_block,
1322
uint32_t data_offset_or_size,
1423
const char *data);
24+
#endif
1525

1626
int ipc4_logging_shutdown(void);
1727

src/ipc/ipc4/logging.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,10 @@
1414
#include <ipc4/base_fw.h>
1515
#include <ipc4/error_status.h>
1616
#include <ipc4/logging.h>
17+
#if !CONFIG_LIBRARY
1718
#include <zephyr/logging/log_backend.h>
1819
#include <zephyr/logging/log.h>
19-
20+
#endif
2021
#if CONFIG_LOG_BACKEND_SOF_PROBE
2122
#include <sof/probe/probe.h>
2223
#endif

0 commit comments

Comments
 (0)