Help with Speaker Phat clicks and pops

Basically, pHAT BEAT has two of the mono amp chips on to enable stereo output; same chip just that there’s two of them. There’s also the LEDs and buttons on pHAT BEAT of courses and the LEDs on pHAT BEAT are a different sort to those on Speaker pHAT (APA102 vs. regular white LEDs).

I started a new thread of my own, was also thinking I might be confusing things and or cluttering up this thread. ;)

Ok - I genuinely wasn’t sure!

Hey, no problem. That’s why I posted to let you and others know. ;) I don’t have a Speaker pHat or I would have used it for testing and stayed on track. I will be watching this thread though to see how things go.

Ok, I just installed a virgin copy of Stretch FULL and it works.

Since a virgin installation of Jesse FULL fails, Pimoroni need to update their description that says:
“Our software does not support Raspbian Wheezy"
to
"Our software does not support Raspbian Wheezy or Rasbian Jessie. It ONLY supports Jessie Lite or Stretch Full”.
until such time as they can actually get around to testing which versions work.

I’ve noticed the “Our software does not support Raspbian Wheezy” message is only on the product page for the pHat itself. My take is its referring to the one line installer for the Speaker pHat, pHat Beat, etc. Not VLC Radio which appears to have be updated for Stretch. It suggests using Stretch Lite.Thing is though, for me, the VLR radio install (Pirate Radio) installer also installs the pHat Beat stuff? I’m thinking they just haven’t gotten everything “on the same page” so to speak. Wish I had the skills to really dig into this but I’m a Raspbian / Linux noob. It’s all Greek to me.

It seems a bit amateurish to sell some hardware with software knocked up on Git. The very least a customer should expect is a statement of which operating systems are supported and a decent working example.

Disappointing, to say the least.

I’m sorry you feel disappointed, but it’s worth pointing out that this is our whole purpose- having software that’s ready to go and totally opaque doesn’t give anyone the chance to learn or understand how it works, or prod and poke at it. We’re all about tinkering/expanding/tweaking/modifying and making something your own. That’s why our slogan is “Tech Treasure for Tinkerers”.

(and yes, the installer not working at all on Jessie is not helping my case here, but there’s only one of me working on software so these things happen)

Still, we’re keen to make the software install process as painless as possible for people who just want a kit-form radio and don’t intend to tweak it. For the past few months I’ve been working on a software image for this very purpose, but since it’s just me working on software, it’s taking some time to bash off the rough edges and make a final release. That’s very much on my radar, though!

If you’re sure you never want to make and modifications/customisation to your radio other than changing the WiFi credentials and playlist you can try this distribution in its current form by grabbing it from here: http://get.pimoroni.com/pirateradio-v20171113.zip

Just unzip it to a blank SD card, update wpa_supplicant.conf with your WiFi configuration, playlist.m3u with your stations and it should just work.

The one-line-installer is supposed to work in Jessie, but clearly something went awry. My tests in Jessie lite were successful, and I’ll be attempting the same in Jessie Full when I get back into the office to figure out where this went wrong.

The lack of “Raspbian Wheezy” support is a different issue- since it’s an old distribution that has very different ways of going about things. Stretch and Jessie are much closer, but still like to change things up to throw spanners in the works.

I’ve been using 2017-07-05-raspbian-jessie which I believe was the last release before Stretch. Doing a sudo apt-get update upgrade doesn’t seem to make any difference, the Pirate radio install fails anyway.
I do have a working Jessie install up and running though. If there is any info, or something you want me to look at on that working install, let me know. That was done a while back and backed up, not sure what revision of Jessie it is?

Do you see an ~/.asoundrc file (eg /home/pi/.asoundrc) or something like that?

I seem to remember the VolumeAlsa plugin in Jessie had a habit of messing with the audio configuration, and that could be what’s happening here.

Just a guess, at the moment, I’m still speeding across the country in a train.

I’ll hook it up to a monitor and keyboard up and have a look and get back to you. On my way out the door for a nice walk in the woods with my dog. Back in about an hour or so.

1 Like

I could use a nice walk in the woods right now, and a dog!

This is my priority for today, anyway, so hopefully we’ll get it cracked!

The frustrating thing is that Pulse is completely unnecessary for newer versions of pHAT BEAT, but there’s no way to detect if there’s a new/old version attached from software.

@Gadgetoid,

I didn’t mean to come across as harsh - my main point was that I was happy to accept that Wheezy is outdated and not expected to work. I was happy to solder the kit together too. This does not necessarily qualify a tinkerer as being able to delve into the internals of Linux, so the implication was that the software should work on Jessie and up, and not require that it be a -lite version - unless so stated.

I don’t mind “mucking in” as long as I know what the parameters are. As it was, it was difficult to know whether the problem was due to my soldering or that ( as it seems) the kit doesn’t work out of the box with a newly installed version of Jessie-full.

I don’t particularly mind that I have to run stretch for this kit. It just would have been nice to have a list of known OS combos that it works with.

I would suggest you feed back to your website maintainer that the bit about not working with Wheezy is updated to include not working with Jessie Full ( I don’t think stopping pulseaudio so that nasty clicks occur between playing MP3s is defined as ‘working’ - especially as it isn’t done by the installation procedure)

Anyhow, I have it working now, so that’s my tuppenyworth.

Cheers.

Brian

She is a 115lb Lab Rottie mix. She has the Lab temperament, very gentle. My friends call her the gentle giant, lol.Trail is icy and slippery but I wear ice cleats on my boots. Rain or shine she wants her morning walk in the woods. A group of us meet every morning with our dogs for the walk. I’m retired now so no commute etc for me.

I don’t see any /home/pi/.asoundrc on my working install.

1 Like

Welp, slight setback. @sandyjmacdonald had been a hero and had a non-working Jessie install on my desk for me to diagnose, but in my haste to set it up I may have introduced a small quantity of coca-cola to my Pi… bear with me!

@bwims no worries, I’m my own worst critic. It bugs me when this stuff isn’t a smooth and simple experience since there’s no point advocating hackable electronics if people get frustrated during the first steps and never get them working!

I hate it when that happens. Hopefully the sticky stuff didn’t get on the SD Card.

This is truly baffling.

Adding the user to the pulse-access group and adding --system to the pulseaudio launch command seems to fix the problem, but I believe it causes another problem; pulse no longer holds open the DAC hw:0,0 and thus leaves it vulnerable to a bad output signal. I’ll need to poke it with my scope to see what’s going on.

top suggests pulse is using no CPU when idle and around 3-4% when active. I can still play audio to hw:0,0 which is not usually the case when Pulse is using it continuously.

The problem seems to be a weird setup of permissions, or something, possibly relating to dbus (I need to check my Lite image to see what the difference is) which is preventing a regular user (pi in most cases) from connecting to Pulse.

Okay a quick check with the scope-on-a-rope and I can’t see any invalid i2s signals being generated either playing through Pulse or through ALSA directly.

This is with the contents of /etc/systemd/system/pulseaudio.service looking like:

[Unit]
Description=PulseAudio Daemon
After=sound.target
Requires=sound.target

[Install]
WantedBy=default.target

[Service]
Restart=always
Type=simple
PrivateTmp=false
ExecStart=/usr/bin/pulseaudio --system --disallow-module-loading --realtime --disallow-exit --no-cpu-limit --log-target=syslog
ExecStop=/usr/bin/pulseaudio --kill

And the Pi user in the pulse-access group:

sudo usermod -a -G pulse-access pi

Use sudo systemctl daemon-reload then sudo systemctl restart pulseaudio to load the new systemd config, and log out/in to make sure you have the pulse-access group.

Or reboot ;)

I’ll have to test this config on other versions and see if it’s worthy of rolling back into the installer.