Skip to content

machine/samd21: Initial implementation of I2S hardware interface #331

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 1 commit into from
May 12, 2019

Conversation

deadprogram
Copy link
Member

This PR provides a very basic initial implementation for the I2S hardware interface tested on the Adafruit Circuit Playground Express. It is only known to work with the PDM microphone that is onboard the Circuit Playground Express, although it might work with other I2S devices.

…g Circuit Playground Express

Signed-off-by: Ron Evans <[email protected]>
@deadprogram
Copy link
Member Author

Any feedback on this implementation?

@deadprogram deadprogram requested a review from aykevl May 11, 2019 13:34
@deadprogram
Copy link
Member Author

🆗 or ⛔ ?

@aykevl
Copy link
Member

aykevl commented May 12, 2019

The PR in general looks good. What I'm mostly worried about is how buffering is done. Does the hardware provide some sort of buffer, or is there a way to transfer using DMA/interrupts? Unlike most other transports (SPI etc.), small delays will disrupt the signal.

@deadprogram
Copy link
Member Author

Really, this is just a naive interface. A future PR may look into using DMA/buffering.

Copy link
Member

@aykevl aykevl left a comment

Choose a reason for hiding this comment

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

Ok, perhaps it's better to merge then. I suspect this is going to vary by chip so we could take a look at other chips and update then with an API that takes buffering into account.
I have an I2S DAC lying around somewhere with surprisingly high quality output so I could test that one (also on other line nrf52840?).

@aykevl aykevl merged commit d90f194 into dev May 12, 2019
@deadprogram deadprogram deleted the feature/samd21-i2s branch May 14, 2019 14:52
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