cancel
Showing results for 
Search instead for 
Did you mean: 

stereo recording with 2 MEMS mics using libPDMFilter

mad88
Associate II
Posted on January 18, 2016 at 18:37

Hello everyone,

I have a STM32F4-Discovery board with an integrated MP45DT02 MEMS mic, and I've bought also anothere mic (an MP34DT01), I would like to record at the same time from the 2 mics.

I'm able to record in RAM and playback the audio from the integrated mic, to do so, I've edited the example application ''Audio_playback_and_record'' (http://www.st.com/st-web-ui/static/active/en/resource/technical/document/application_note/DM00040802.pdf).

To decode the pdm bitstream I use the libPDMFilter distributed with the example (its header is ''pdm_filter.h'')...

The problem is that the only documentation I've found for that lib is this:

http://www.st.com/st-web-ui/static/active/en/resource/technical/document/application_note/DM00040808.pdf

...But there are no hints on how to decode a stereo bitstream produced by 2 mics (the only thing that is said is that, in the bitstream, L/R channel's bytes must be interleaved)...

I've tried a lot of configuration of all parameters but I still can't get the desired result...

At the end I'm able to get one channel or the other for example:

L channel ok, silence on the right channel.

Or (switching the bytes) the opposite

...But I can't get both channel togheter.

How to get L/R with libPDMFilter?

Otherwise... Are there any serious documentation about that lib?

Thank you very much!

#pdm-stereo-mems-mic-libpdmfilter
1 REPLY 1
mad88
Associate II
Posted on January 19, 2016 at 09:28

OK, I've a partial solution...

now I'm using the pdm decoding library that you can find here:

https://my.st.com/public/STe2ecommunities/mcu/Lists/STM32Discovery/Flat.aspx?RootFolder=%2Fpublic%2FSTe2ecommunities%2Fmcu%2FLists%2FSTM32Discovery%2FOpen%20source%20PDM%20filter%20for%20MP45DT02%20mic&FolderCTID=0x01200200770978C69A1141439FE559EB459D75800084C20D8867EAD444A5987D47BE638E0F&currentvie...

(thanks to )

...But it would be useful if someone, maybe from ST, give us some hints or some documentation about the libPDMFilter, especially about stereo decoding. Indeed it seems (but I'm not sure) that libPDMFilter is faster than the other library so it could be a better choice in some circumstances.

Thanks