Skip to content

Commit 21947cd

Browse files
keyonjieplbossart
authored andcommitted
ASoC: SOF: trace: only init wait_queue one time
Today we init trace wait_queue at each resume, snd_sof_init_trace_ipc(), which will clear the wait_queue entry that is waiting for trace update at suspend, that will lead to sof-logger infinitely waiting for logger tools like sof-logger so no trace updating or refreshing though we are back to resume and playback. Here move this wait_queue initialization to snd_sof_init_trace() which is called at first boot only, keep waiting trace update during S0->S3->S0, and fix logger tools no update issues. Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
1 parent b34040b commit 21947cd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

sound/soc/sof/trace.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,6 @@ int snd_sof_init_trace_ipc(struct snd_sof_dev *sdev)
160160
params.buffer.offset = 0;
161161
params.buffer.pages = sdev->dma_trace_pages;
162162

163-
init_waitqueue_head(&sdev->trace_sleep);
164163
sdev->host_offset = 0;
165164

166165
ret = snd_sof_dma_trace_init(sdev, &params.stream_tag);
@@ -233,6 +232,8 @@ int snd_sof_init_trace(struct snd_sof_dev *sdev)
233232
goto table_err;
234233
}
235234

235+
init_waitqueue_head(&sdev->trace_sleep);
236+
236237
ret = snd_sof_init_trace_ipc(sdev);
237238
if (ret < 0)
238239
goto table_err;

0 commit comments

Comments
 (0)