Skip to content

Commit f48c5e2

Browse files
author
Jyri Sarha
committed
probe: logging: Remove logging hook when logging disabled
Remove logging hook when logging is disabled or probes module is unloaded. This should re-enable buffering in case the probes dma client crashes and is respawned or something similar happens. Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
1 parent 55c352b commit f48c5e2

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/probe/probe.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1433,6 +1433,10 @@ int probe_point_remove(uint32_t count, const uint32_t *buffer_id)
14331433

14341434
if (_probe->probe_points[j].stream_tag != PROBE_POINT_INVALID &&
14351435
buf_id->full_id == buffer_id[i]) {
1436+
#if CONFIG_LOG_BACKEND_SOF_PROBE
1437+
if (enable_logs(&_probe->probe_points[j]))
1438+
probe_logging_init(NULL);
1439+
#endif
14361440
#if CONFIG_IPC_MAJOR_4
14371441
dev = ipc_get_comp_by_id(ipc_get(),
14381442
IPC4_COMP_ID(buf_id->fields.module_id,
@@ -1498,6 +1502,9 @@ static int probe_free(struct processing_module *mod)
14981502

14991503
probe_deinit();
15001504

1505+
#if CONFIG_LOG_BACKEND_SOF_PROBE
1506+
probe_logging_init(NULL);
1507+
#endif
15011508
return 0;
15021509
}
15031510

0 commit comments

Comments
 (0)