Error when using STM32MP157C-EV1 Dmic with S16_LE format
Hi all,
I am using a STM32MP157C-EV1 and testing the digital microphones with ALSA. For testing purposes I am just using the arecord command. All works fine if I use the S32_LE sample format:
$ arecord -D hw:0,4 -f S32_LE /tmp/rec.wav
Recording WAVE '/tmp/rec.wav' : Signed 32 bit Little Endian, Rate 8000 Hz, Mono
For my application I need to use S16_LE. Since this is not natively supported by the driver, I try to use an ALSA "plughw" device to do the conversion, but that fails:
$ arecord -D plughw:0,4 -f S16_LE /tmp/rec.wav
Recording WAVE '/tmp/rec.wav' : Signed 16 bit Little Endian, Rate 8000 Hz, Mono
arecord: set_params:1361: Unable to install hw params:
ACCESS: RW_INTERLEAVED
FORMAT: S16_LE
SUBFORMAT: STD
SAMPLE_BITS: 16
FRAME_BITS: 16
CHANNELS: 1
RATE: 8000
PERIOD_TIME: 64000
PERIOD_SIZE: 512
PERIOD_BYTES: 1024
PERIODS: 6
BUFFER_TIME: 384000
BUFFER_SIZE: 3072
BUFFER_BYTES: 6144
TICK_TIME: 0
This typically means that the (native) driver is reporting a set of supported parameters, but not all combinations are actually supported (so when the plughw device tries to configure the driver, an error occurs).
Any hint on how to solve this?
Guillermo
