Base image for Raspberry Pi 3 B+, speaker bonnet, I2S microphone and camera

@bulgy, yes I think it’s better to create a fresh thread for the I2S microphone so we keep things separated (if you haven’t already).

Regarding the popping/clipping sound, I took a look at the tutorial you linked. They way they solve it seems a bit hacky but it should work for the audio block too. Basically they install a service that continuously outputs a “silent” sound. Looking at the install script they provide here the command is: /usr/bin/aplay -D default -t raw -r 44100 -c 2 -f S16_LE /dev/zero &. You could add this to your start script, make sure you include the & so it runs in the background and doesn’t halt your main process, however this probably can’t be done from the audio block’s entry point as aplay will need the PuseAudio instance to be running, so you should look into running it from another service.

Another alternative you can try is disabling PulseAudio’s “suspend-on-idle” module. This module “Disconnects sinks and sources from their backend after a predetermined amount of idle time.”, I suspect this might be interfering in your case. To disable it check out the audio block’s script here, you’ll need to add a line to disable “module-suspend-on-idle”.

1 Like