Skip to content

Add sof isr#1402

Merged
PanRe merged 4 commits intohathach:add-sof-isrfrom
PanRe:add-sof-isr
Mar 16, 2022
Merged

Add sof isr#1402
PanRe merged 4 commits intohathach:add-sof-isrfrom
PanRe:add-sof-isr

Conversation

@PanRe
Copy link
Copy Markdown
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
7FM pushed a commit to 7FM/tinyusb that referenced this pull request Aug 23, 2025
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.

1 participant