Skip to content

Commit 6b59be6

Browse files
committed
[NOT FOR UPSTREAM] ASoC: SOF: ipc4-mtrace: Allow private data reconfiguration
Allow re-initialization of private data of mtrace without module removal. This can only happen with the non upstream debug interface. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
1 parent f068dbc commit 6b59be6

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

sound/soc/sof/ipc4-mtrace.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -519,6 +519,13 @@ static int ipc4_mtrace_init(struct snd_sof_dev *sdev)
519519
int i, ret;
520520

521521
if (sdev->fw_trace_data) {
522+
if (sof_debug_check_flag(SOF_DBG_DSP_OPS_TEST_MODE)) {
523+
/* Re-create the configuration for mtrace */
524+
priv = sdev->fw_trace_data;
525+
memset(priv, 0, sizeof(*priv));
526+
goto setup;
527+
}
528+
522529
dev_err(sdev->dev, "fw_trace_data has been already allocated\n");
523530
return -EBUSY;
524531
}
@@ -536,6 +543,7 @@ static int ipc4_mtrace_init(struct snd_sof_dev *sdev)
536543

537544
sdev->fw_trace_data = priv;
538545

546+
setup:
539547
/* Set initial values for mtrace parameters */
540548
priv->state_info.aging_timer_period = DEFAULT_AGING_TIMER_PERIOD_MS;
541549
priv->state_info.fifo_full_timer_period = DEFAULT_FIFO_FULL_TIMER_PERIOD_MS;

0 commit comments

Comments
 (0)