Teensy 3.6 Need to support a mems mic on i2cInput

Status
Not open for further replies.

Kent.Swan

Member
As is noted in this forum and other Teensy Audio documents Teensy Audio is a synchronized 16 bit audio buffer interchange system and as such 24 bit sample I2S input devices (mems microphones in this case) are not supported. Reviewing the code I2S Input uses DMA to capture the data stream directly into a Teensy Audio transfer buffer.

I'm need to directly support a pair of I2S compliant microphones (SPH0645LM4H) with both L and R active. This because I cannot seem to locate a 16bit I2S compliant mems microphones. (If anyone knows of one I'd love to know).

Anyway, my question is on modifying the I2S input code to capture 24 bit L/R data into an intermediate capture results buffer then, like many of the math processing modules, decimate the data into a standard 16 bit interchange buffer compliant with the rest of the system.

I would like any opinion on doing this, caveats, watch out for, etc.
 
Maybe you're using an old version of Teensyduino or the audio library? Or maybe you're using the quad I2S? Or maybe something else is wrong and you're assuming this is the problem?

Long ago the stereo I2S input was changed to have BCLK/LRCLK ratio of 64, specifically for compatibility with these MEMS mics. Many people have used them since. It does indeed work. The high 16 bits of each input word are captured into the audio library and the low 16 bits are ignored.

But the quad I2S is still a ratio of 32. Someday it too will be changed to 64, but that's a low priority.
 
Status
Not open for further replies.
Back
Top