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

Add sof isr #1402

Merged
merged 4 commits into from Mar 16, 2022
Merged

Add sof isr #1402

merged 4 commits into from Mar 16, 2022

Conversation

PanRe
Copy link
Collaborator

@PanRe PanRe commented Mar 15, 2022

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! :)

@PanRe PanRe merged commit 9050273 into hathach:add-sof-isr Mar 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant