My Phat Dac works perfectly, my Scroll Phat also works fine all on the same Pi Zero. I can stream a radio station with mpc and run the examples in the Scroll Phat folder. I’ve tried to get pivumeter to work today and failed miserably - Started with a fresh build and run the scripts for both Phat Dac, Scroll Phat and pivumeter. My sound.conf looks like this post pivumeter install:
pcm.!default {
type plug
slave.pcm {
type meter
slave.pcm "softvol"
scopes.0 pivumeter
}
}
I’m not sure if you have tried this, but I got it working by setting the sound output for my software to be the pivumeter. Note, though, that this was using a phat beat - I don’t know if it is the right method to use in your case. Worth a try, though.
I’ve added the file above and it works playing a sample wav file but not MPD. So this is down to the MPD config file. The following doesn’t work at all so no audio and no scroll phat:
audio_output {
type "alsa"
name "My ALSA Device"
device “pivumeter” # optional
mixer_type “software” # optional
}
If I change it to:
audio_output {
type "alsa"
name "My ALSA Device"
device “hw:0,0” # optional
mixer_type “software” # optional
}
I get working a working MPD but no Scroll Phat. This is a copy of my asound.conf that I have ‘working’:
pcm.!default {
type plug
slave.pcm {
type meter
slave.pcm "softvol"
scopes.0 pivumeter
}
}
are you sure you mean the audio group? but yes, that is a good point, any service user has to be added to the i2c group, otherwise the VU will not work.
No, you are right, I meant i2c, too many hours spent messing around trying everything under the sun to get it working, i was too impatient to wait for the completed how to articles :)
I’ve followed all the steps above for my Pirate Radio. I’ve finally got Mopidy working, so I get sound, but pivumeters aren’t working. I’ve checked the above, /etc/asound.conf, groups for mopidy (audio and i2c) but I suspect the root cause is that ALSA doesn’t work with Pulseaudio which is default in Raspbian?
the relevant group for phat BEAT, which is part of the Pirate Radio, is gpio, not i2c. Anyhow the installer should have added the relevant user to the relevant group, but I guess it can’t hurt to check.
… note that pulseaudio is not running by default on Raspbian, it will only be started if a process specifically calls it, which, AFAIK, on a clean install, means if you pair bluetooth audio devices with your Pi.
It is possible to make pivumeter work with pulse though, but if it is running on your system the reason why it is so could prevent us talking you through the required tweaks without knowing more details.
So, first of all, you should check pulse is actually running - it shouldn’t be (unless you added software that fires it up on boot).
Hi all, I would like to add my experience with the pirate radio, bluetooth and pulseaudio. I hope this will help anyone who has similar problems.
I installed bluetooth after having setup the pirate radio with the spotipy tutorial. But I had forgotten that pulseaudio is a dependency of just about every bluetooth stack. So after the next reboot the pivumeter stopped working.
This was caused by the pulse client autospawning a pulseaudio process to handle audio! Which means that the alsa setup for pivumeter won’t work. I thought simply configuring the pulse audio client to not autospawn would solve the problem. But it did not. So I simply reinstalled mopidy/spotipy using the pimaroni spotipy script.
Telling pulse to not autospawn:
vim /etc/pulse/client.conf #uncomment this line and change yes to no.
autospawn = no
Before reinstalling spotipy make a copy of /etc/mopidy/mopidy.conf so that the original mopidy config exists and can be used to reset settings after reinstalling mopidy.