Raspberry pi zero phat dac

Hello. I have a raspberry pi zero and install phat dac. I am getting no sound. I followed the instructions posted on your website, pimoroni. Any other ideas, thoughts?

have you tried the simple one-line installer:

curl -sS https://get.pimoroni.com/phatdac | bash

… it should just work.

Yes, I’ve tried that and it did not work. I am trying to play sound using the CLI, using cvlc, mplayer and speaker-test and it does not work. Is there a specific command to make that play?

it’s hard to tell without knowing what your system started as and where it is at now… what happens if you run the script again?

… if it does not offer you to run speaker-test then that means you have the default bcm2835 module still loaded up and it may be quite a challenge to route the sounds as required.

you can also run the following manually:

speaker-test -c2 -t wav

presumably the sound should come out of one of the output (HDMI or pHAT DAC)?

If I run the script, it finishes and then it starts speaker-test… I do not hear sound. I also ran the test manually and no sound.

I would verify your soldering, a flaky joint might well be the root of your troubles.

I verified the soldering last night. I went one by one. I also checked it with a tester. I also installed a new copy of raspbian, ran the script and it still does not work.

then maybe your unit is dead. shoot support@pimoroni.com an email and they’ll sort you out.

Just to be sure, can you check the following; in terminal run:

lsmod

And look for:

snd_soc_hifiberry_dac
snd_soc_bcm2835_i2s

And also try;

aplay -l

And see what it says,

And:

alsamixer

To see if that says snd_rpi_hifiberry_dac at the top left.

Even without a DAC plugged in, it should show up if the software-side is okay.

This is it shows up:

root@pizero:~# lsmod | grep hifibe
snd_soc_hifiberry_dac 2911 0
snd_soc_core 168662 3 snd_soc_hifiberry_dac,snd_soc_pcm5102a,snd_soc_bcm2708_i2s
snd_pcm 92581 3 snd_soc_core,snd_soc_hifiberry_dac,snd_pcm_dmaengine

root@pizero:~# lsmod | grep 2835
bcm2835_gpiomem 3703 0

root@pizero:~# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: sndrpihifiberry [snd_rpi_hifiberry_dac], device 0: HifiBerry DAC HiFi pcm5102a-hifi-0 []
Subdevices: 1/1
Subdevice #0: subdevice #0

alsamixer has on the top left: snd_rpi_hifiberry_dac

Getting the same issue here, software side everything looks ok but getting no sound output…

Did you find a solution @hept?

@timgeyssens I did not. They are sending me a replacement. I will let you know how it goes when I receive it.

I was initially getting the same problem as reported by hept (my kit was a pHAT DAC - Wireless Audio Kit straight from pimoroni).
Booting up on Raspbian lite. Instructions followed from http://learn.pimoroni.com/tutorial/phat/raspberry-pi-phat-dac-install
But no sound at all.
Reflashed the uSD and this time used the one-line installer + reboot. Still no sound.

Finally, I went through all the files that are supposed to be modified by the one liner and noticed some difference on /etc/asound.conf
I had some strange character between the “!” and the “default”. I removed that and also I splat the “type hw card 0” on two lines. Reboot and voila.

So if this can help someone else.

pcm.!default { type hw card 0 } ctl.!default { type hw card 0 }

You are right there was that character there and I removed it. I rebooted and still no sound.

Yes, I’m not convinced the asound is an issue in your case as aplay -l seems happy enough… it can’t hurt to fix the script though (it’ll be done soon).

Sorry, maybe I should have precised better that splitting it in 2 was really what worked for me. On one line (even with the strange character removed), I was still getting no sound. I have no clue however about what this should achieve, I was just copying/pasting what I found on the web (where it was on two lines).
But it was the only way I could get it to work and I thought about sharing here “my solution” if it could help someone else.

My aplay -l was also correct after the one liner. But still I couldn’t get any sound without the above mentioned trick.

@RogueM, thanks for correcting the script.

I received my replacement device plugged it in and it worked like a charm…

1 Like

So I spent a good few hours on this until I realised that Pimoroni assumes you use the phat-dac as user ‘pi’. If you use your sound software as any other user, ensure that your user is a member of the ‘audio’ group:
sudo usermod -a -G audio