MusicBox and PhatDac


#1

Hi, I’m new to all things Pi and would like to get MusicBox working with my PiZero and PhatDac.

I installed the image of MusicBox and it seems to be working ok (as in I can log in to the web gui).

When I try and play music I get nothing but I’m sure it’s because I need to tell MusicBox I’m using the PhatDac.

I tried installing software for the PhatDac base don this info.
https://learn.pimoroni.com/tutorial/phat/raspberry-pi-phat-dac-install

But when I try it says it can’t install as I’m a root user.

I’m not sure if i need that software or if there is a setting / config I need to change in MusicBox.

Below is the output of aplay

root@MusicBox:~# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA]
Subdevices: 8/8
Subdevice #0: subdevice #0
Subdevice #1: subdevice #1
Subdevice #2: subdevice #2
Subdevice #3: subdevice #3
Subdevice #4: subdevice #4
Subdevice #5: subdevice #5
Subdevice #6: subdevice #6
Subdevice #7: subdevice #7
card 0: ALSA [bcm2835 ALSA], device 1: bcm2835 ALSA [bcm2835 IEC958/HDMI]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: sndrpihifiberry [snd_rpi_hifiberry_dac], device 0: HifiBerry DAC HiFi pcm5102a-hifi-0 []
Subdevices: 1/1
Subdevice #0: subdevice #0
root@MusicBox:~#

Thanks.

Phil


#2

You don’t need to install any other software. The phatdac is already supported in Pi Musicbox v0.7RC4. You simply need to select “hifiberry DAC / Phat DAC” in the audio section of the settings webpage.


#3

That’s the version I have and I don’t see PhatDac i the options.

Phil


#4

phatdac is supported in Pi Musicbox v0.7RC4, that’s the current release.


#5

Actually, that’s wrong! Sorry.

Select HifiBerry DAC, that should work. Sorry, I made the change to explicitly include phatDAC in the latest code which I’ve been using for testing. I thought was in rc4 too but it’s not. It is in the next release, which is coming very soon.


#6

Hi, I tried that and still get no audio.

Would it matter that I have a HDMI monitor (without sound) plugged in too?

Not sure of the best way to actually test it, I try to go to a stream but it doesn’t seem to want to even try to play it (maybe because it can’t see the DAC).

Cheers.

Phil


#7

I put an mp3 on a thumbdrive and it looked like it was playing that but no sound come out.

Actually all I am getting from the PhatDac is audio hum.

I tested the DAC on another Raspian build and it worked ok so I know it’s not a hardware issue.

Thanks.

Phil


#8

Hmm. Could you paste the contents of /etc/asound.conf?


#9

How do I access that file? If I put the microSD card in my Mac I only see the MusicBox volume and that doesn’t seem to have a lot of the system files.


#10

I figured ouut I could ssh in.

Here is what the files contains.

root@MusicBox:/etc# less asound.conf

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


#11

I’m a bit perplexed here. We can see it’s recognised the phat dac and it’s assigned to card 1 in the ‘aplay -l’ output and musicbox has correctly assigned card 1 as the default in /etc/asound.conf so it should all be good to go.

Can you run alsamixer and just make sure the phat dac is recognised in there.

Do you hear any output from aplay /usr/share/sounds/alsa/Front_Center.wav?

Did you change any of the other mopidy audio settings?

Are there any errors in /var/log/mopidy/mopidy.log?


#12

I’ll try all of these this evening and report back.

I did not change any other audio settings.

Thanks

Phil


#13

Hi, no sound when I tried to play it.

Here are the screen shots of what I got.

I tried looking at the log using

less /var/log/mopidy/mopidy.log

And it seemed totally empty (maybe I was doing that wrong).

No other settings were changed.

Thanks.

Phil


#14

Phil,
I’m still at a loss here. This all looks exactly right and I use one of these cards myself on one of the test setups. I guess the only difference is I’m using a development build, I could upload that for you if you are interested. But to be honest the only thing that I can think of that is has different in this department is the added phatdac label to the web settings select box.


#15

So weird, if I try the instructions from the PhatDac site, I do get audio.

Let me try that again in case it’s a hardware fault.

I would also happily try the dev build.

Thanks.

Phil


#16

I will try and generate an rc5 image tonight. You might be a bit of a guinea pig though as I’m moving house and my collection of sd card adaptors have been packed away in a box (I don’t know which!).


#17

@Phil_Spitler please give https://github.com/pimusicbox/pimusicbox/releases/tag/v0.7.0RC5 a go.


#18

Alright to download and give it a try over the weekend?


#19

@Steve_Lambert, sure. Spotify connect is pretty cool.


#20

Thanks - I’ll let you know how I get on, hope the move goes well.