drivers: dai: intel: ssp: Improve logging output #68623
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
...