Pirate-Radio, pivumeter, Stretch

You should follow the steps here to set up Pulse Audio: https://gist.github.com/Gadgetoid/3301cec3e47495e75b31d3120d8f17d9

I’ve just set up a scope on the Data/Clock and +/- speaker lines to confirm this. With Pulse Audio running the PWM waveform generated by the DAC on both speaker terminals is identical when paused- IE: there’s no potential difference and thus no current flow.

With just VLC playing to ALSA, when you pause the PWM signal on one side is clamped to HIGH and the PWM signal on the other is clamped LOW. This is a 5v potential difference and thus bad things happen.

This appears to be because the PCM Frame-Sync signal stops abruptly, but the Clock is still running. When Pulse Audio is added to the picture, it keeps both Clock and Frame-Sync running, deliberately playing silence.

I don’t fully understand why this is happening with raw ALSA, but it seems like something that shouldn’t happen and may be related to an errant audio driver. It could well have cropped up in Stretch due to the removal of Pulse.