Skip to content
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

drivers: dai: intel: ssp: Improve logging output #68623

Conversation

ujfalusi
Copy link
Collaborator

@ujfalusi ujfalusi commented Feb 6, 2024

The printed logs lack usable information curerntly, for example: arecord -Dhw:0,0 -fdat | aplay -Dhw:0,0 -fdat

results:
...
[13110.111051] dai_intel_ssp: dai_ssp_pre_start: dai_ssp_pre_start [13110.111070] dai_intel_ssp: dai_ssp_start: dai_ssp_start [13110.455085] dai_intel_ssp: dai_ssp_pre_start: dai_ssp_pre_start [13110.455103] dai_intel_ssp: dai_ssp_start: dai_ssp_start [13229.817080] dai_intel_ssp: dai_ssp_pause: dai_ssp_pause TX [13229.819111] dai_intel_ssp: dai_ssp_stop: dai_ssp_stopTX stop [13229.858060] dai_intel_ssp: dai_ssp_pause: dai_ssp_pause RX [13229.858556] dai_intel_ssp: dai_ssp_stop: dai_ssp_stop RX stop ...

If we use multiple SSPs this gets even harder to understand. Which SSP is starting exactly?

This patch improves the prints to prefix it with SSP instance and drops the printing of func, resulting:
...
[13444.974460] dai_intel_ssp: dai_ssp_early_start: SSP0 RX [13444.974486] dai_intel_ssp: dai_ssp_start: SSP0 RX
[13445.318453] dai_intel_ssp: dai_ssp_early_start: SSP0 TX [13445.318478] dai_intel_ssp: dai_ssp_start: SSP0 TX
[13446.323438] dai_intel_ssp: dai_ssp_pause: SSP0 TX [13446.324141] dai_intel_ssp: dai_ssp_stop: SSP0 TX
[13446.329403] dai_intel_ssp: dai_ssp_pause: SSP0 RX [13446.330931] dai_intel_ssp: dai_ssp_stop: SSP0 RX
...

The printed logs lack usable information curerntly, for example:
arecord -Dhw:0,0 -fdat | aplay -Dhw:0,0 -fdat

results:
...
[13110.111051] <inf> dai_intel_ssp: dai_ssp_pre_start: dai_ssp_pre_start
[13110.111070] <inf> dai_intel_ssp: dai_ssp_start: dai_ssp_start
[13110.455085] <inf> dai_intel_ssp: dai_ssp_pre_start: dai_ssp_pre_start
[13110.455103] <inf> dai_intel_ssp: dai_ssp_start: dai_ssp_start
[13229.817080] <inf> dai_intel_ssp: dai_ssp_pause: dai_ssp_pause TX
[13229.819111] <inf> dai_intel_ssp: dai_ssp_stop: dai_ssp_stopTX stop
[13229.858060] <inf> dai_intel_ssp: dai_ssp_pause: dai_ssp_pause RX
[13229.858556] <inf> dai_intel_ssp: dai_ssp_stop: dai_ssp_stop RX stop
...

If we use multiple SSPs this gets even harder to understand. Which SSP is
starting exactly?

This patch improves the prints to prefix it with SSP instance and drops the
printing of __func__, resulting:
...
[13444.974460] <inf> dai_intel_ssp: dai_ssp_early_start: SSP0 RX
[13444.974486] <inf> dai_intel_ssp: dai_ssp_start: SSP0 RX
[13445.318453] <inf> dai_intel_ssp: dai_ssp_early_start: SSP0 TX
[13445.318478] <inf> dai_intel_ssp: dai_ssp_start: SSP0 TX
[13446.323438] <inf> dai_intel_ssp: dai_ssp_pause: SSP0 TX
[13446.324141] <inf> dai_intel_ssp: dai_ssp_stop: SSP0 TX
[13446.329403] <inf> dai_intel_ssp: dai_ssp_pause: SSP0 RX
[13446.330931] <inf> dai_intel_ssp: dai_ssp_stop: SSP0 RX
...

Signed-off-by: Peter Ujfalusi <[email protected]>
@henrikbrixandersen henrikbrixandersen added this to the v3.7.0 milestone Feb 20, 2024
@fabiobaltieri fabiobaltieri merged commit 6423bc3 into zephyrproject-rtos:main Feb 26, 2024
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants