Pirate-Radio, pivumeter, Stretch

Started with Stretch-Lite and installed the radio (vlc).
Works after modifying /etc/asound.conf to get rid of dmix as recommended by @gadgetoid.
Also noticed (as already reported) that when paused for a long time the speaker gets very hot.

In the install the line dtoverlay=i2s-mmap is added to config.txt.
This overlay does not exist in Stretch and can be deleted.

The vumeter only uses the bottom LEDs.
Did some investigation and it seems the incoming meter-value is much lower than in Jessie(?).
Maybe something to do with the disappearance of i2s-mmap?
Changing the scale factor (file phat-beat.c, line 88) from 32767.0 to 4095.0 uses the full
LED range, at least for vlcd.

Do not know if this also works for the other pirate-radio applications.

Is this using Pulse Audio to eliminate pops/clicks, or just from having VLC paused for a long duration?

@gadgetoid No Pulse Audio, just having VLC paused for a long time.

Hi,
The same problem : Pirate Radio

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.

Not had time for tinkering recently, but will probably get a new sd card to install stretch on shortly. Is pulse audio still using a bunch of CPU when silent?

It seems so- I conducted tests where it was using 3% on a Pi Zero, but have been unable to replicate them- bizarre! It’s a shame, because it’s basically essential to make the audio output behave itself.

@gadgetoid I have a pi zero w with a phatbeat on top running on raspbian stretch. I installed the vlc-radio using the one line installer and did follow your guide to configure Pulse Audio to get rid of the Pops…

Everything is working so far but there is still a loud POP through the speakers when i boot up the Pi and the Pulse Audio Service is started by systemd. It’s the same on shutdown. Is there any chance of getting rid of the pops on boot and shutdown?

As far a short I know it’s impossible to get rid of the pops on boot/shutdown, but it’s certainly something I’d like to investigate further.

Even if it’s technically possible to mitigate the start/stop pops, it may not be possible to modify the software on the Pi to actually accomplish it. I’m continuing to grapple with the software anyway- or at least leaning upon the maintainers of Raspbian heavily for their help.