Phat dac speaker-test works but nothing else does

Hi there
I have been messing around with the phat dac for a little while trying to get audio out. I have no network connection (yet) on my Pi zero so I am using the manual config process with Jessie. When I run the speaker-test I get audio out of the phat dac which is great but when I try any other application it doesn’t work. For example omxplayer -o both [filename] will output to hdmi fine but not to the phat dac. So the device pops in lsmod just fine, so it must be loading. The only other issue is that when I run alsamixer I get an error “this sound device does not have any controls”.

I have a USB wifi on the way to try the script but it would be great to get some idea of what is (not) going on with my install.

the pHAT DAC’s PCM5102A does not have hardware volume control, so the message you receive using alsamixer is correct/expected.

omxplayer does not support alsa and can only be used to output sound through the on-board audio (hdmi/analogue).

Hi - I’ve exactly the same set-up and symptoms as the original post, and so would like to ask a question along the same lines rather than add a new thread.
When I run the speaker-test I too get output to my small powered speaker.
However, in the O/S GUI there is a red cross on the speaker control, which I thought was an indication of a problem, but from other threads I’m beginning to think that would be expected?
Also if I try to access Preferences -> Audio Device Settings I am presented with an error indicating there is no sound card present and advising me to enable to a HAT (sorry I don’t have it exact, this is from memory) - again expected? I tried the Minecraft pre-installed game hoping it would make sound but it didn’t.
Basically I’d like to know what exactly a working PHAT DAC set-up looks and behaves like if installed correctly. Thanks

yes, the control in the lxpanel is specifically made to control for the on-board chip, so, since the pHAT DAC installer disables it, it will be disabled too.

I’d have to check pimixer (which is what is called via the menu entry) on a working setup to be sure, but that does not look right, it should at least list the pHAT DAC, though there will be no hardware control.

same for minecraft, I can’t tell you what to expect, though it wouldn’t be surprising if it addressed the gpu directly, which means it’s unlikely to work with an external card.

maybe @gadgetoid knows?

Firstly thanks for taking the time to reply, as you’ll have guessed this is a fun new hobby for me.
I’ve been trying to use omxplayer EDIT: Just read your first reply again, stating this won’t work.

I was worried that my set-up may be wrong because I did it manually, so I downloaded and copied across the phatdac file from pimoroni and then ran that…1st time it did the set-up, then played the sound successfully. The 2nd time it did the same again - I thought I’d read that it would only offer the speaker-test if it thought the set-up hadn’t yet been done? Maybe that’s a clue. My pi0 has a male GPIO pin array, and the phat dac has the female one it came with, and they’re plugged together - should that set-up work?

From your response it sounds like you might be saying the behaviour in pimixer may not be right, but otherwise things are as I should expect. May aim is to build a simple jukebox controlled by python scripts interfacing with pots on a vintage radio…so maybe I just need to find the right cli mp3 player that can output through the phat dac to prove this part of the project works?

yes, all you have described seems fine, from a setup point of view. Whether you can use a program with the pHAT DAC - without significant efforts at least - will depend on whether they interact with alsa.

… here’s is a topic from forums that explains the problem, with omxplayer specifically, but I would be very surprised if that weren’t similar for minecraft:

sorry, I can’t be totally authoritative on the matter, it’s not a subject I don’t feel particularly knowledgeable in, so it’s possible there are ways around it.

Was disappointed when I read this thread but omxplayer does in fact work with alsa (and phat dac). Just pass -o alsa, e.g.

omxplayer -o alsa

1 Like