-
Notifications
You must be signed in to change notification settings - Fork 140
ASoC/SoundWire: improve dmesg logs #3631
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
79a45c0
e1b181e
bd7d302
c162e51
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -148,6 +148,8 @@ static void ipc3_log_header(struct device *dev, u8 *text, u32 cmd) | |
| case SOF_IPC_TRACE_DMA_PARAMS: | ||
| str2 = "DMA_PARAMS"; break; | ||
| case SOF_IPC_TRACE_DMA_POSITION: | ||
| if (!sof_debug_check_flag(SOF_DBG_PRINT_DMA_POSITION_UPDATE_LOGS)) | ||
| return; | ||
| str2 = "DMA_POSITION"; break; | ||
| case SOF_IPC_TRACE_DMA_PARAMS_EXT: | ||
| str2 = "DMA_PARAMS_EXT"; break; | ||
|
|
@@ -300,7 +302,8 @@ static int ipc3_wait_tx_done(struct snd_sof_ipc *ipc, void *reply_data) | |
| "ipc tx error for %#x (msg/reply size: %d/%zu): %d\n", | ||
| hdr->cmd, hdr->size, msg->reply_size, ret); | ||
| } else { | ||
| ipc3_log_header(sdev->dev, "ipc tx succeeded", hdr->cmd); | ||
| if (sof_debug_check_flag(SOF_DBG_PRINT_IPC_SUCCESS_LOGS)) | ||
| ipc3_log_header(sdev->dev, "ipc tx succeeded", hdr->cmd); | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @plbossart, can we do the same for rx at the end of if (sof_debug_check_flag(SOF_DBG_PRINT_IPC_SUCCESS_LOGS))
ipc3_log_header(sdev->dev, "ipc rx done", hdr.cmd);
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we can, it's just that I don't see a parallel between rx and tx. for tx, we start the IPC and will get an error. What happens for RX if someone the IPC handling goes south?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @ujfalusi can you comment on this one? I am not sure what you are asking for.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @plbossart, I would expect it to report an error when handling the received message, but OK, let's leave that one out for now. |
||
| if (msg->reply_size) | ||
| /* copy the data returned from DSP */ | ||
| memcpy(reply_data, msg->reply_data, | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we had this debate in past: which one is more important, the start of the TX or the end of the TX. Back then I proposed to drop the start and print either the success or the error when it is done to remove the duplication.
But in some cases it is interesting to know how long a tx took and if we had an RX between the start and the completion of the TX.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can't continue with all logs enabled @ujfalusi, it's not sustainable for production CI.
We would still see if an RX IPC happened between the start of the TX IPC and the RX IPC error.
We could add a flag to make the success printed optionally if that helps.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, but this is also the case when the verbose printing is enabled in kernel config.
Dropping the success message is fine I think. No message == all is good.