Skip to content

Audio I/O Fixes - #17

Merged
CorvusPrudens merged 2 commits into
CorvusPrudens:sample-ratefrom
stephenhensley:audio-io-dir
Mar 23, 2026
Merged

CorvusPrudens merged 2 commits into
CorvusPrudens:sample-ratefrom
stephenhensley:audio-io-dir

Conversation

@stephenhensley

Copy link
Copy Markdown

This seems to resolve ongoing channel-swap issues, and the distortion/buzz on the Seed 1.1/Rev5, and PatchSM.

The global channel-swap was due to the I2S setting: frame_sync_active_high.
In libDaisy C++, and the ST HAL, the "I2S Protocol Init" always leaves this set so that the Frame Sync is active high.
This was causing all channels (input and output) two be swapped from the expectation.

An ongoing secondary issue (that likely made the above issue more confusing) is that the Rev5 and Patch SM audio outputs were not swapped, but the inputs were distorted due to a single-sample not being updated/present in the data seen by the callbacks.
I tried a few order-of-operations changes before just reverting the unique handling of these two unique cases to be more similar to the working configurations, and voila -- everything seems to be working well (no distortion, channels are in the correct order).

I have gone back through and tested each revision of the Seed, the Seed2 DFM, and the Patch SM and it seems like they are all behaving as expected now.
If that's the case, I think we could probably go back later and simplify some of this initialization (e.g. remove the separate AudioStream types, consolidating the non-unique sai/dma startup to code that runs after the variant-specific configuration/initialization).

@CorvusPrudens

Copy link
Copy Markdown
Owner

I have gone back through and tested each revision of the Seed, the Seed2 DFM, and the Patch SM and it seems like they are all behaving as expected now.

<3

@CorvusPrudens
CorvusPrudens merged commit ce69ed8 into CorvusPrudens:sample-rate Mar 23, 2026
5 of 8 checks passed
@stephenhensley
stephenhensley deleted the audio-io-dir branch March 23, 2026 17:26
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.

2 participants