Skip to content

Commit

Permalink
IIO: ADC: add stm32 DFSDM support for PDM microphone
Browse files Browse the repository at this point in the history
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 <arnaud.pouliquen@st.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
arnopo authored and broonie committed Jan 10, 2018
1 parent e2e6771 commit eca9498
Show file tree
Hide file tree
Showing 3 changed files with 529 additions and 7 deletions.
16 changes: 16 additions & 0 deletions Documentation/ABI/testing/sysfs-bus-iio-dfsdm-adc-stm32
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
What: /sys/bus/iio/devices/iio:deviceX/in_voltage_spi_clk_freq
KernelVersion: 4.14
Contact: arnaud.pouliquen@st.com
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.
Loading

0 comments on commit eca9498

Please sign in to comment.