Speaker phat help

Thanks. I wanted to make sure so I could fall back on something.

I pulled the latest repo and re-installed and re-ran the server. Now, when I try playing a local file with VLC, I get stuttering playback with a non-stop series of errors:

[b3d6fbb0] core audio resampler debug: using audio resampler module "samplerate"
[b3d032b0] core decoder debug: End of audio preroll
[b4200e08] core input debug: Decoder wait done in 276 ms
[01737e98] core audio output debug: inserting 88 zeroes
[01737e98] alsa audio output warning: cannot write samples: Broken pipe
[01737e98] alsa audio output error: Closing socket
cannot estimate delay: Broken pipe2017-04-11 22:33:39.805379: Client disconnected

[01737e98] alsa audio output warning: cannot write samples: Broken pipe
[01737e98] Closing socket
alsa audio output error: cannot estimate delay: Broken pipe
[01737e98] alsa audio output warning: cannot write samples: Broken pipe
[01737e98] core audio output warning: playback too late (78935): up-sampling
Closing socket
[01737e98] alsa audio output warning: cannot write samples: Broken pipe
[01737e98] core audio output warning: buffer too late (-73450 us): dropped
[01737e98] Closing socket
core audio output debug: playback too late (70835): flushing buffers
[01737e98] core audio output warning: playback too late (91805): up-sampling
[01737e98] core audio output warning: buffer too late (-69881 us): dropped
[b3d66e00] mpgatofixed32 audio converter error: libmad error: bad main_data_begin pointer
[01737e98] core audio output debug: playback too late (67770): flushing buffers
[01737e98] Closing socket

Additionally, when I use AirPlay, I still donā€™t get any LEDs lightup.

Iā€™m actually experiencing a similar issue when trying to get the Pi VU Meter working with my speaker-phat + Pi Zero W when using mopidy. After running the speakerphat one-liner setup, all tests play fine in ~/Pimoroni/speakerphat/test/test.sh, and the VU Meter lights up wonderfully.

After the tests ran, I then installed mopidy and with the defaults, I got sound from the speaker-phat, but no LEDs. I thought this was because mopidy wasnā€™t outputting via Alsa, so I installed the Mopidy-ALSAMixer package and configured my mopidy.conf to use it accordingly:

[audio]
mixer = alsamixer
output = alsasink
mixer_volume = 75

[alsamixer]
enabled = true
card = 0
control = PCM

ā€¦and hereā€™s what I see in the logs:

2017-08-31 00:25:31,740 INFO [4055:MainThread] mopidy.commands: Starting Mopidy mixer: AlsaMixer
2017-08-31 00:25:32,784 INFO [4055:MainThread] mopidy_alsamixer.mixer: Mixing using ALSA, card 0, mixer control "PCM".
2017-08-31 00:25:32,865 INFO [4055:MainThread] mopidy.commands: Mixer volume set to 75
2017-08-31 00:25:32,890 INFO [4055:MainThread] mopidy.commands: Starting Mopidy audio
2017-08-31 00:25:32,921 INFO [4055:MainThread] mopidy.commands: Starting Mopidy backends: GMusicBackend, StreamBackend, M3UBackend, FileBackend, LocalBacke
nd, YoutubeBackend
2017-08-31 00:25:33,161 INFO [4055:Audio-3] mopidy.audio.actor: Audio output set to "alsasink"

Hoping itā€™s something obvious that Iā€™ve missed, but at this point, I am kind of lost, hoping and wishing for these LEDs to prance up and down the speaker-phat PCB.

Great product still, and thanks in advance for any help!

Looking at the config for our spotipy installer, it uses mixer = software and output = autoaudiosink, so itā€™s perhaps worth changing those and seeing if that helps?

Thanks for the suggestion Sandy ā€“ I just tried it now with the config parameters you specified, and still no action on the LEDs. Everything else works well though. Were you folks able to get it working with Mopidy?

Itā€™s quite odd because I know that the pivumeter is an Alsa plugin, so thatā€™s why I tried to configure Mopidy to use Alsa, but still no luck. I also tried routing the audio through PulseAudio, and the sound worked, but again, no LEDs. Also, if it makes any difference, I am running Mopidy as a systemd service, which is run under the ā€˜mopidyā€™ user. I donā€™t see any reason that would matter, but mentioning just for full disclosure.

Willing to troubleshoot more, and no rush on my side, but Iā€™ll certainly be watching for any replies/further suggestions. Thanks again!

@scar45: are you using Stretch? Weā€™ve been having a couple of issues with the pivumeter plugin in Stretch, and @gadgetoid is still trying to get to the bottom of it.

@sandyjmacdonald: I am not actually. I wasnā€™t aware of it, but it looks like a neat option. Iā€™ll try it out if I can get some time to set it up.

I do not have an iphone, i use a Galaxy S7. How can i stream to the speaker phat? I have gotten as far as running test.py and the lights scroll across the phat. Can i play music through my network? external drive? I just need a little guidance on this one. Thank you in advance!

Ron

Hi, I have a fresh install of stretch-lite and used the autoinstaller for my pirate radio and for my speakerphat. Both have horrible popping sounds at indeterminate intervals, but I think it might be I/O conflict. These appear in my vlcd.log file:
alsa error: cannot estimate delay: Broken pipe
alsa warning: cannot write samples: Broken pipe
alsa error: cannot estimate delay: Broken pipe
alsa warning: cannot write samples: Broken pipe
alsa error: cannot estimate delay: Broken pipe
alsa warning: cannot write samples: Broken pipe
core warning: buffer too late (-60072 us): dropped

Any advice? Thanks!

i have a raspberry pi zero and a speaker phat and nothing is working

What have you done so far? What operating system are you using? Can you post a photo of the soldering on both the Speaker pHAT and the Pi Zero, please?

I just wanted to share with the good people at Pimoroni a project I made involving the Speaker pHAT. Itā€™s totally overkill and impractical but itā€™s MY totally overkill and impractical baby!

Itā€™s a standalonen Pi Fridge Magnet that plays the One Minute News when I wave my hand across it.

I mounted a USB-PCB board onto a Pi-zero so I can plug it into my laptop to power/work on. Two powerful Neodymium magnets so it will mount to anything metal.
I also used a Battery HAT so it would work when unplugged. The giant capacitor on the side was to smooth power lines so it wouldnā€™t reboot when I plugged in USB power to the Battery charger.
Finally, I use youtube-dl to get the One Minute News directly from the BBC website.

It was fun to work on and wanted to thank Pimoroni and the help I received this forum for making it possible.