IIO: ADC: add stm32 DFSDM support for PDM microphone

This code offers a way to handle PDM audio microphones in
ASOC framework. Audio driver should use consumer API.
A specific management is implemented for DMA, with a
callback, to allows to handle audio buffers efficiently.

Signed-off-by: Arnaud Pouliquen <[email protected]>
Reviewed-by: Jonathan Cameron <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
This commit is contained in:
Arnaud Pouliquen 2018-01-10 11:13:12 +01:00 • committed by Mark Brown
commit eca949800d
No known key found for this signature in database
GPG key ID: 24D68B725D5487D0
3 changed files with 529 additions and 7 deletions

View file

@ -0,0 +1,16 @@
What: /sys/bus/iio/devices/iio:deviceX/in_voltage_spi_clk_freq
KernelVersion: 4.14
Contact: [email protected]
Description:
For audio purpose only.
Used by audio driver to set/get the spi input frequency.
This is mandatory if DFSDM is slave on SPI bus, to
provide information on the SPI clock frequency during runtime
Notice that the SPI frequency should be a multiple of sample
frequency to ensure the precision.
if DFSDM input is SPI master
Reading SPI clkout frequency,
error on writing
If DFSDM input is SPI Slave:
Reading returns value previously set.
Writing value before starting conversions.