File tree Expand file tree Collapse file tree 2 files changed +33
-0
lines changed
Expand file tree Collapse file tree 2 files changed +33
-0
lines changed Original file line number Diff line number Diff line change @@ -33,4 +33,10 @@ config LOG_BACKEND_SOF_PROBE_OUTPUT
3333 help
3434 Set the logging format for SOF probe output.
3535
36+ config LOG_BACKEND_SOF_PROBE_OUTPUT_AUTO_ENABLE
37+ bool "Automatically enabe probes logging when probe dma is started"
38+ depends on LOG_BACKEND_SOF_PROBE_OUTPUT
39+ help
40+ Automatically enable logging on probes extraction dma.
41+
3642endmenu
Original file line number Diff line number Diff line change @@ -260,6 +260,8 @@ static enum task_state probe_task(void *data)
260260 return SOF_TASK_STATE_RESCHEDULE ;
261261}
262262
263+ static void probe_auto_enable_logs (uint32_t stream_tag );
264+
263265int probe_init (struct probe_dma * probe_dma )
264266{
265267 struct probe_pdata * _probe = probe_get ();
@@ -323,6 +325,10 @@ int probe_init(struct probe_dma *probe_dma)
323325 for (i = 0 ; i < CONFIG_PROBE_POINTS_MAX ; i ++ )
324326 _probe -> probe_points [i ].stream_tag = PROBE_POINT_INVALID ;
325327
328+ #if CONFIG_LOG_BACKEND_SOF_PROBE
329+ if (probe_dma )
330+ probe_auto_enable_logs (probe_dma -> stream_tag );
331+ #endif
326332 return 0 ;
327333}
328334
@@ -1206,6 +1212,27 @@ int probe_point_add(uint32_t count, struct probe_point *probe)
12061212 return 0 ;
12071213}
12081214
1215+ static void probe_auto_enable_logs (uint32_t stream_tag )
1216+ {
1217+ struct probe_point log_point = {
1218+ #if CONFIG_IPC_MAJOR_4
1219+ .buffer_id = {
1220+ .full_id = 0 ,
1221+ },
1222+ #else
1223+ .buffer_id = 0 ,
1224+ #endif
1225+ .purpose = PROBE_PURPOSE_EXTRACTION ,
1226+ .stream_tag = stream_tag ,
1227+ };
1228+ int ret ;
1229+ ret = probe_point_add (1 , & log_point );
1230+
1231+ if (ret )
1232+ tr_err (& pr_tr , "probe_auto_enable_logs() failed" );
1233+
1234+ }
1235+
12091236#if CONFIG_IPC_MAJOR_3
12101237int probe_dma_info (struct sof_ipc_probe_info_params * data , uint32_t max_size )
12111238{
You can’t perform that action at this time.
0 commit comments