Sound output fails on reboot after phat beat installation

I am using phat beat and have installed the software using curl | bash. I get audio output after installation and can see that the phat beat is working.

However, after rebooting the device, the audio output no longer works. On terminal, I get

ALSA lib pcm_hw.c:1713:(_snd_pcm_hw_open) Invalid value for card
audio_open_alsa: failed to open audio device default. No such file or directory

And if I resintall again, the problem would resolved, until the device reboots, then the problem will recur. Could anyone advise me on this matter?

What are you using to play sound?

Which version of Raspbian is this?

I am using flite, a speech synthesis program to play sound, as well as aplay function within my script to play an audio file. This is on Stretch OS. The problem occurs about 1/3 of the time. Sometimes it happens when I reboot, other times I dont get this issue. It is however still ongoing.

What do you see if you run:

aplay -l
aplay -L

It may be that the Speech Synthesis program and Pulse Audio are not getting on well. You should try stopping Pulse before running it and see if that helps:

sudo systemctl stop pulseaudio

On entering aplay -l on terminal, I get aplay: device_list:270: no soundcards found...

On entering aplay -L on terminal, I get:

Discard all samples (playback) or generate zero samples (capture)

Entering sudo systemctl stop pulseaudio does not seem to make a difference.

This is strange, could you post the contents of your /boot/config.txt please?

The contents are:

dtoverlay=pwm-2chan,pin=18,func=2,pin2=13,func2=4                              $

You need to remove:


Since pin 18 is the i2s clock, and is required for audio-output to function.

Additionally pin 13 is the rewind button on pHAT BEAT.

Thanks! Deleted as suggested and it works now.