Skip to content

Fix RP2xxx I2SOut reversed channels #10250

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

Merged
merged 5 commits into from
Apr 21, 2025
Merged

Conversation

dhalbert
Copy link
Collaborator

The left and right stereo channels were reversed for most cases of audiobusio.I2SOut on raspberrypi. See the table in #10230 (comment) for details.

This was not a problem for audiopwmio.PWMAudioOut, and not a problem for Espressif on SAMD I2SOut. The problem was that the data was in the opposite channel order expected. Interestingly, the sample programin

Fixed by flipping the LRCLK in three out of the four PIO programs. Also I put the PIO programs into separate files which are checked in, for convenience. They are not yet built automatically -- we could do that later.

Tested on a Metro RP2040 with an Adafruit Speaker Bonnet.

@VinceParsons FYI

Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One extra change and please add comments in the pio files that explain what the permutation is. Thanks!

@dhalbert dhalbert requested a review from tannewt April 14, 2025 22:39
@dhalbert
Copy link
Collaborator Author

CI is weird, as of this moment, it has only done the doc build.

@dhalbert
Copy link
Collaborator Author

CI now OK.

Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a couple more comments to hopefully make it easier to maintain.

@dhalbert dhalbert requested a review from tannewt April 15, 2025 17:39
@dhalbert
Copy link
Collaborator Author

@tannewt this is ready for review again.

Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@tannewt tannewt merged commit 5987adb into adafruit:main Apr 21, 2025
159 checks passed
@VinceParsons
Copy link

Thank you all!

@dhalbert dhalbert deleted the rp2040-i2sout-swap branch April 21, 2025 18:20
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.

i2s stereo is reversed in Raspberry Pi Pico
3 participants