Skip to content

Update audiobusio.PDMIn to run clock constantly #446

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

Closed
kattni opened this issue Nov 17, 2017 · 1 comment
Closed

Update audiobusio.PDMIn to run clock constantly #446

kattni opened this issue Nov 17, 2017 · 1 comment
Milestone

Comments

@kattni
Copy link

kattni commented Nov 17, 2017

A number of the Circuit Playground Express boards have an onboard mic that, based on software reesearch, takes longer to initialise than others. (I specify software research to clarify that I did not determine this with a logic analyser or other hardware-specific testing.) This results in failure when trying to run code that uses a small buffer to record as there is no data being returned. This can be resolved by sampling a small slice at the end of a larger buffer, however, this causes massive latency issues.

Essentially, there is a delay between the beginning of PDMIn sending something along the clock pin to the mic, and the mic responding. Create a buffer of 160 bytes and no data will be returned. Create a buffer of 2016 bytes, and sample a slice of the last 160 bytes of the buffer, and sound data is returned.

The resolution would be to update audiobusio.PDMIn to run the clock constantly and then only record data when requested.

@kattni kattni added this to the 3.0 milestone Nov 17, 2017
@dhalbert
Copy link
Collaborator

Fixed in 2.x by #479. Will ber merged into 3.0.

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

No branches or pull requests

2 participants