2021-01-08 09:16 AM
I'm looking for device tree configuration to acquire 4/6 PDM microphones resulting in an ALSA tdm stream. It's mentioned in the official documentation here(https://www.st.com/content/ccc/resource/training/technical/product_training/group0/30/7d/ca/21/db/00/4c/d2/STM32MP1-Peripheral_Serial_Audio_Interface_SAI/files/STM32MP1-Peripheral_Serial_Audio_Interface_SAI.pdf/jcr:content/translations/en.STM32MP1-Peripheral_Serial_Audio_Interface_SAI.pdf) and in AN5027 but no reference to MP1 code
2021-01-11 08:49 AM
Hello,
maybe the following wiki pages will help you:
PDM microphones could benefit to be connected to DFSDM instead of SAI (SAI requires decimation filter to be done in SW, DFSDM provides up to 6 x HW filters)
Regards.
2021-01-12 01:54 AM
Hello Patrick,
thanks for sharing all the documentation.
Unfortunately I could not find any information (or example) about SAI PDM in the official Wiki.
As I've read in your application note(AN5027) it seems to be possible, but there are no tips on implementation on MP1. Do you have any more information about this?
Thanks,
Aldo
2021-01-12 03:05 AM
Although SAI HW support PDM microphones, this mode is only usable with Cortex-M4 using HAL (you might find examples on STM32H7 Cube).
SAI Linux driver does not support PDM microphones.
Under Linux, you should use DFSDM IP, which is much more powerful than SAI when using digital microphone (HW filtering) and you could connect up to 6 microphones using only 3 pins + 1 clock.
for HW example, 4 x microphones connected to DFSDM are available on STM32MP157x-EV1 board.
There is no SW example, but this is fully supported using ALSA and DFSDM driver as described in Wiki.
Regards.
2021-01-12 03:15 AM
Hi Patrick,
thanks for the detailed info about SAI PDM.
Actually we have been through DFSDM, and we're looking for a solution to connect multiple PDM microphones (4/6) to STM32MP1 ALSA, to obtain a single multi-channel inteleaved input. The goal is to have a single card/device that records an interleaved stream of N microphones.
We have our own PCB based on STM32MP1 and we've connected 4 mics on DFSDM, but the result has been of 4 separate ALSA card/devices (following ST device tree for STM32MP157x-EV1)
Is there a way to make them interleaved at driver level? We'd like to avoid using ALSA's multi or similar.
Thanks,
Aldo
2021-01-12 03:16 AM
just replied off thread, sorry. Please read the post here below.
2021-01-13 06:48 AM
Hi @ARicc.1 ,
I got feedback from audio team which is in line with @PatrickF comment :
BR,
Christophe