Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to debug a Linux I2S audio input issue

I am trying, and failing, to connect an I2S microphone (Invensense ICS43432) to my Raspberry Pi (B+) running Arch Linux. I have asked for specific advice in the relevant Arch Linux ARM forum but my question is really more general than that: how does one go about debugging Linux audio input issues?

I have verified with a logic analyser that the I2S microphone is sending sensible data in the correct channel (left) and the correct pin of the Raspberry Pi. The I2S microphone appears under ALSA as a "sound card". arecord is perfectly happy to record from that device and I have boosted the gain of that device using alsamixer by 30 dB. Yet all the data bytes of the recorded file are zero.

How does one go about checking the flow of audio data, the operation of DMA, under Linux?

like image 585
Rob Avatar asked Nov 07 '22 11:11

Rob


1 Answers

I had the same problem trying to record in stereo, using 2 Adafruit I2S MEMS breakout mics: arecord worked fine, but zeros when using ALSA to write to a bin file. Choosing a 32 bit word format (Little Endian 32 bits, Signed) made it work. Only I end up with 64 bit stereo Frames.

like image 175
Willem Avatar answered Nov 14 '22 22:11

Willem