# Sound output fails on reboot after phat beat installation

**URL:** <https://forums.pimoroni.com/t/sound-output-fails-on-reboot-after-phat-beat-installation/6874>\
**Category:** Support\
**Created:** [January 8, 2018, 10:25am UTC](https://forums.pimoroni.com/t/sound-output-fails-on-reboot-after-phat-beat-installation/6874 "2018-01-08T10:25:48Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![craver2000](https://avatars.discourse-cdn.com/v4/letter/c/ea666f/32.png) [@craver2000](https://forums.pimoroni.com/u/craver2000)\
**Post date:** [January 8, 2018, 10:25am UTC](https://forums.pimoroni.com/t/sound-output-fails-on-reboot-after-phat-beat-installation/6874/1 "2018-01-08T10:25:48Z")

</div>

I am using phat beat and have installed the software using `curl https://get.pimoroni.com/phatbeat | 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?

---

<div class="post-metadata">

**Author:** ![gadgetoid](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/gadgetoid/32/13_2.png) [@gadgetoid](https://forums.pimoroni.com/u/gadgetoid)\
**Post date:** [January 8, 2018, 11:28am UTC](https://forums.pimoroni.com/t/sound-output-fails-on-reboot-after-phat-beat-installation/6874/2 "2018-01-08T11:28:38Z")

</div>

What are you using to play sound?

Which version of Raspbian is this?

---

<div class="post-metadata">

**Author:** ![craver2000](https://avatars.discourse-cdn.com/v4/letter/c/ea666f/32.png) [@craver2000](https://forums.pimoroni.com/u/craver2000)\
**Post date:** [January 12, 2018, 2:54pm UTC](https://forums.pimoroni.com/t/sound-output-fails-on-reboot-after-phat-beat-installation/6874/3 "2018-01-12T14:54:40Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![gadgetoid](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/gadgetoid/32/13_2.png) [@gadgetoid](https://forums.pimoroni.com/u/gadgetoid)\
**Post date:** [January 16, 2018, 12:13pm UTC](https://forums.pimoroni.com/t/sound-output-fails-on-reboot-after-phat-beat-installation/6874/4 "2018-01-16T12:13:34Z")

</div>

What do you see if you run:

```nohighlight
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:

```auto
sudo systemctl stop pulseaudio

```

---

<div class="post-metadata">

**Author:** ![craver2000](https://avatars.discourse-cdn.com/v4/letter/c/ea666f/32.png) [@craver2000](https://forums.pimoroni.com/u/craver2000)\
**Post date:** [January 17, 2018, 12:44am UTC](https://forums.pimoroni.com/t/sound-output-fails-on-reboot-after-phat-beat-installation/6874/5 "2018-01-17T00:44:04Z")

</div>

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

On entering `aplay -L` on terminal, I get:

> null  
> Discard all samples (playback) or generate zero samples (capture)  
> default  
> pivumeter  
> softvol\_and\_pivumeter

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

---

<div class="post-metadata">

**Author:** ![gadgetoid](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/gadgetoid/32/13_2.png) [@gadgetoid](https://forums.pimoroni.com/u/gadgetoid)\
**Post date:** [January 17, 2018, 6:19pm UTC](https://forums.pimoroni.com/t/sound-output-fails-on-reboot-after-phat-beat-installation/6874/6 "2018-01-17T18:19:01Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![craver2000](https://avatars.discourse-cdn.com/v4/letter/c/ea666f/32.png) [@craver2000](https://forums.pimoroni.com/u/craver2000)\
**Post date:** [January 18, 2018, 1:47am UTC](https://forums.pimoroni.com/t/sound-output-fails-on-reboot-after-phat-beat-installation/6874/7 "2018-01-18T01:47:28Z")

</div>

The contents are:

```
dtoverlay=pwm-2chan,pin=18,func=2,pin2=13,func2=4 $
dtparam=i2c_arm=on
dtoverlay=i2s-mmap
dtoverlay=hifiberry-dac
```

---

<div class="post-metadata">

**Author:** ![gadgetoid](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/gadgetoid/32/13_2.png) [@gadgetoid](https://forums.pimoroni.com/u/gadgetoid)\
**Post date:** [January 18, 2018, 11:43am UTC](https://forums.pimoroni.com/t/sound-output-fails-on-reboot-after-phat-beat-installation/6874/8 "2018-01-18T11:43:56Z")

</div>

You need to remove:

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

```

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.

---

<div class="post-metadata">

**Author:** ![craver2000](https://avatars.discourse-cdn.com/v4/letter/c/ea666f/32.png) [@craver2000](https://forums.pimoroni.com/u/craver2000)\
**Post date:** [January 18, 2018, 4:10pm UTC](https://forums.pimoroni.com/t/sound-output-fails-on-reboot-after-phat-beat-installation/6874/9 "2018-01-18T16:10:08Z")

</div>

Thanks! Deleted as suggested and it works now.
