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.
Describe the PR
Implement SOF ISR for audio driver and synopsis dwc2 driver. Still work in progress.
Additional context
This version is only a preview of what i am intending to do. The SOF interrupt is enabled and disabled by the audio driver in case an active alternative interface setting is set. The SOF ISR in the audio driver tries to calculate the 16.16 feedback value in order to avoid confronting the user with those details. The "only" thing the user needs to do is to provide information about the master clock frequency, the sampling rate, and by use of a callback function a cycle count of the master clock. Additional tweaks to keep the feedback value in place are currently not implemented.
Next to the audio driver, also the user has the possibility to enable the SOF interrupt. There is still some logic missing such that the audio driver and the user do not mess up in enabling/disabling the SOF when needed.
I am aware that the feedback value calculation within the audio driver can not stay there in the end. However, it would be nice to have it there as many users already have a guide line of how it can be calculated.
Finally, the old way of setting the feedback value completely by the user without SOF is preserved. By use of a define, the SOF ISR approach can be disabled. This might be of interest, in case SOF is not wanted to save CPU power for something else in exchange for a bigger required buffer.
Let me know what you think! :)