Help in building Raspberry Pi with DAC

rajivaryan1984

Active Member
Joined
Nov 6, 2013
Messages
355
Points
28
Location
INDIA
Hi, does anybody in the forum using Raspberry Pi with any DAC using the same as streamer and playing NAS / PC files.

I need some help in getting a Raspberry Pi with DAC which can --

1. Play Hi-Res files whichever format through USB/ PC / NAS.

If anyone could refer me to someone who can help build the same...

Regards
Rajiv
 
If you haven't bought raspberry Pi and dac already, just go for Allo Boss2 player. It's essentially the same raspberry Pi and a dac hat with a nice case.
 
Premoddev, I have a Boss 2, Isolator and case that I am selling. If you want, you can take it from me. You need to buy the Pi alone. Pi 3B is enough.

Venkat
 
Last edited:
Hi, does anybody in the forum using Raspberry Pi with any DAC using the same as streamer and playing NAS / PC files.

I need some help in getting a Raspberry Pi with DAC which can --

1. Play Hi-Res files whichever format through USB/ PC / NAS.

FMs have suggested the allo boss player. This is allo's best selling product has has very good reviews. Their latest iteration is the allo boss signature player. This has been reviewed by ASR and in a rare instance Amir has in fact recommended it. If you buy the allo boss2 signature (or the non-signature version), it is recommended to have a good 5v power supply. Don't use a cell phone charger to power it. You can use LPS from allo (allo shanti), ifi or a very good SMPS (allo nirvana) from allo.


You can buy it from fabtolab.com



If anyone could refer me to someone who can help build the same...
If you use boss2, it will save you lot of headache. But I can guide you to build the same if you decide to do it yourself. It isn't difficult. You will have to just buy the raspberry pi dac, a good hat dac, good power supply (but that's what allo boss is). I have been building this since 2014 and have also built one for an US client as OEM to play licensed music in commercial establishments, shops like 7x11, etc

I have also released portion of my software for these players on github
and
 
Last edited:
Premoddev, I have a Boss 2, Isolator and case that I am selling. If you want, you can take it from me. You need to buy the Pi alone. Pi 3B is enough.

Venkat
Hi Venkat,
It's not me looking for Boss player, the OP Rajiv who is searching for a similar solution.
Btw, I guess you are referring for boss1.2 with isolator and case?

Thanks,
Premod
 
FMs have suggested the allo boss player. This is allo's best selling product has has very good reviews. Their latest iteration is the allo boss signature player. This has been reviewed by ASR and in a rare instance Amir has in fact recommended it. If you buy the allo boss2 signature (or the non-signature version), it is recommended to have a good 5v power supply. Don't use a cell phone charger to power it. You can use LPS from allo (allo shanti), ifi or a very good SMPS (allo nirvana) from allo.
Any pointers to Allo Boss2 signature player? I couldn't find it on their site.
 
To the OP, I can highly recommend the Boss 2 player/DAC based on personal experience. For the cost, the convenience and bang for the buck are astounding. I would also suggest atleast getting the Nirvana PSU to power it.
 
If you use boss2, it will save you lot of headache. But I can guide you to build the same if you decide to do it yourself. It isn't difficult. You will have to just buy the raspberry pi dac, a good hat dac, good power supply (but that's what allo boss is). I have been building this since 2014 and have also built one for an US client as OEM to play licensed music in commercial establishments, shops like 7x11, etc

I have also released portion of my software for these players on github
and

I'm also looking into similar setup as OP. I want to have a single pi to run pi-hole and jellyfin on docker. Question is whether I can use the same pi for this as well.

Every post/video mentions volumio/moode etc. when talking about pi-based audio streamers. I don't want to run multiple pis if I can avoid it. So, I'm wondering if I could have a single pi to rule/run them all.
 
I'm also looking into similar setup as OP. I want to have a single pi to run pi-hole and jellyfin on docker. Question is whether I can use the same pi for this as well.

Every post/video mentions volumio/moode etc. when talking about pi-based audio streamers. I don't want to run multiple pis if I can avoid it. So, I'm wondering if I could have a single pi to rule/run them all.
Sure. You can install pi-hole as well as docker on the same pi. The big advantage of not using moode and volumio is that you can run the 64 bit Raspian instead of the 32-bit images that all these so called user-friendly layer distributions.
 
Sure. You can install pi-hole as well as docker on the same pi. The big advantage of not using moode and volumio is that you can run the 64 bit Raspian instead of the 32-bit images that all these so called user-friendly layer distributions.
So, what would I need to install on raspbian for streaming music from external drive? I'm assuming that would have its own client apps or web interface. Would there be any difference if I just use jellyfin/plex instead assuming I don't use spotify/tidal etc.?

One more thing, would the official power supply suffice for the dac hat?
 
Last edited:
So, what would I need to install on raspbian for streaming music from external drive?
The question is how familiar are you with Linux? Do you know how to read man pages. Nothing much is required. Just few steps
1. Connect the external drive to your raspberrypi on a usb 3.0 port
2. Do journalctl -l, go to the bottom and see the device name.
3. Format your external hard disk to one of the following filesystems (ext4, zfs, xfs, btrfs). ext4 will be a good choice. DONT DONT use NTFS unless you are OK with sub par performance. One uses the mkfs.ext4 to format a filesystem for ext4, mkfs.xfs for xfs, etc, etc
4. Run the blkid command to get the UUID of the hard disk
3. Edit /etc/fstab and put your entry for your hard disk for the above UUID.
4. mount the disk first time using the mount command. If the disk mounts, you have scuccessfully added the hard disk. No on every reboot the hard disk will automatically get mounted

For easy reference all files related to my setup are here https://github.com/mbhangui/pistop/tree/master/example_config/server

I'm assuming that would have its own client apps or web interface. Would there be any difference if I just use jellyfin/plex instead assuming I don't use spotify/tidal etc.?
I have used mpd extensively and recently also used Logitech media server. I prefer MPD because I find it is the one that is the most efficient and doesn't take any system resource. to install you just need to run the command apt-get install mpd. Once you have done that you need to edit /etc/mpd.conf to point to your music folder on your external hard disk. mpd will scan your entire music directory in few seconds and build its tag database with tags that are already present in your music files (title, author, album, year, etc).
mpd doesn't come with any interface. It is a client server model where any client can connect to mpd on port 6600 and query mpd for details like what song is playing, what is the position of playback, the song title, song author, etc. It can also issue commands like stop, play, pause, etc. There are plenty of clients available. You are free to chose any client that gives a good graphical interface. I use cantata on my macbook and linux latop.

Logitech media server is similar. It runs a service written in perl and provides http interface on port 9000. You can use any web browser to connect to LMS on port 9000.

Since I have tried both. Here are few pros and cons of LMS and mpd

MPD: Pros
1. Extremely efficient and tiny code. It has the best code available to buffer music data and send it to the dac. It works flawlessly with ALSA. Extremly IMPORTANT. mpd passes the music data locally from the hard disk directly to the dac. It doesn't stream the data like LMS.
2. Extremely low latency output. This is expected because the code is small and written in C/C++. Low latency is also because the data is passed directly to the DAC and not via streaming. Also because mpd does nothing that is not related to producing sound. (e.g. recording when the song was played, providing rating button, maintaining playcounts, etc).
3. You can have a satellite system. If you have multiple clients or multiple music playback systems (e.g. multiple RPIs in different rooms). In this case one mpd will provide the song database and it's metadata. slave mpd clients pick can exchange the traffic with miniscule amount of data
4. You can even use the unix telnet command to play song. As a developer who is always on the terminal and uses vi editor for coding, the worst thing that can happen when you have to use the mouse. Using the mouse drastically reduces your typing throughput as your hand has to leave the keyboard. I use tmux to run multiple terminals on different screens. i run the vim on one screen and a terminal based mpd player on another screen. So when I have to pause, stop, play any music, I can do just by switching ther terminal screen and type few letters to do any song operation. There is a command line player for LMS too, but I haven't tried it yet.
5. mpd can play all formats natively (DSD, wav, flac, mpd, ogg, etc). It can also do only the fly conversion if your DAC doesn't support it.
6. mpd serves both as a media server as well as a player.
7. Opens the audio device only when playing. So you can use any other music client when you are not playing song using mpd
8. It can do MQA. It has plugin for both Tidal as well as Qobuz
9. It has 64-bit version.

MPD: Cons
1. No graphical interface. mpd is a pure music player. With few commands that can be sent on port 6600. So for a novice it takes longer to understand mpd. A newcomer often struggles finding the proper gui or client to play music. But there are plenty of clients (linux desktops, command line and web based clients). See https://www.musicpd.org/clients/

LMS Pros
1. The LMS server is quite efficient even though it is in perl. It does consume more resources than mpd, takes longer to tag files, but is many times better than the so called distributions. Some members call these distributions OS.
2. It stores lot of metadata technically not part of song data (things like user rating for the song, how many times song was played, etc)
3. Plenty of plugins. The material skin plugin gives you a nice web based player. The connection to the internal web interface is persisent and efficient. WHen you use volumio, moode, the so called distributions, they continuously connect to mpd just to display the song played position.
4. With the chromecast plugin, it can play your local music on google chromecast devices with the albumart. I can effortlessly play song on my android tv. The feature is what I love the most. It plays song even on my google home mini and chromecast audio device.
5. Once you have installed LMS and the player, using it is a breeze.
6. It has 64-bit version

LMS Cons:
1. Takes more resources than a mpd setup.
2. DSD playback is not native. You require to enable a plugin which does DSD over PCM.
3. You don't have LMS in the official debian repository. So you have to download from here https://mysqueezebox.com/download. The client can be downloaded from here https://sourceforge.net/projects/lmsclients/files/squeezelite/linux/
4. LMS is just the media server. For playback you need a player. The player is a separate executable called squeezelite.
5. Grabs the audio device even when you are not playing any song. This prevents other players like airplay, spotify from using the audio device. So to play spotify for example, you have to press the power button on the player interface to turn off the player
8. Higher latency than mpd. So sound will not be neutral. Music playback is always by exchanging data from the LMS server to the squeezelite client on the network. So if you are using LMS, then it is important that you use a gigabit network and not wifi connectivity between the LMS server and the squeezelite client.

One more thing, would the official power supply suffice for the dac hat?
Using any Linear Power supply for the hat is always better. A good low cost solution is the Allo Shanti LPS.

This is my music interface when using mpd
cantata.jpeg

This is my interface for LMS.
logitech.jpg
EDIT:

If you use one of the distributions, the pain of doing setup goes away. You get everything installed and configured. I have tried moode, dietpi and volumio. IMHO moode is the best. It exploits the maximum features of mpd. I have also heard good reviews of picore player which uses LMS. But haven't tried that distribution.
 
Last edited:
The question is how familiar are you with Linux? Do you know how to read man pages. Nothing much is required. Just few steps

I'm not a linux guru. I used to have a dual boot system in college when I had to learn basic linux and bash scripting. So, I guess I'm somewhat familiar with it. But, in my experience, if you aren't a linux expert, you're going to have a tough time when things go wrong and they always do go wrong! Here's my favourite xkcd on the topic.


3. Format your external hard disk to one of the following filesystems (ext4, zfs, xfs, btrfs). ext4 will be a good choice. DONT DONT use NTFS unless you are OK with sub par performance. One uses the mkfs.ext4 to format a filesystem for ext4, mkfs.xfs for xfs, etc, etc

For easy reference all files related to my setup are here https://github.com/mbhangui/pistop/tree/master/example_config/server

I really appreciate the steps and the link. Those would certainly come in handy when I do try these.

I need the filesystem to be compatible with windows. I don't know if there's now a reliable way to use linux filesystems on windows. I'd look into it. All my external drives are exFAT as of now.


1. Extremely efficient and tiny code. It has the best code available to buffer music data and send it to the dac. It works flawlessly with ALSA. Extremly IMPORTANT. mpd passes the music data locally from the hard disk directly to the dac. It doesn't stream the data like LMS.

Can you please explain the difference between running mpd or LMS on pi with a dac hat? It just seems to me either both would be streaming or passing the data locally in this case.


If you use one of the distributions, the pain of doing setup goes away. You get everything installed and configured. I have tried moode, dietpi and volumio. IMHO moode is the best. It exploits the maximum features of mpd. I have also heard good reviews of picore player which uses LMS. But haven't tried that distribution.

Well, as I mentioned before, I'm trying to run everything on a single pi that would run docker. That takes all of these distributions out of the equation.

By the way, I found a docker image for LMS maintained by LMS community. Disclaimer: I don't know if that's an official community or not.


3. You can have a satellite system. If you have multiple clients or multiple music playback systems (e.g. multiple RPIs in different rooms). In this case one mpd will provide the song database and it's metadata. slave mpd clients pick can exchange the traffic with miniscule amount of data

I do want a setup like that where I would stream different music in different rooms simultaneously from the same server. Hopefully, this is also doable with LMS.


8. Higher latency than mpd. So sound will not be neutral. Music playback is always by exchanging data from the LMS server to the squeezelite client on the network. So if you are using LMS, then it is important that you use a gigabit network and not wifi connectivity between the LMS server and the squeezelite client.

I was really leaning towards the LMS option as I found that docker image, but that is certainly a huge setback as I won't be able to run wired connection to all the clients.


This is my music interface when using mpd
View attachment 68886

This is my interface for LMS.
View attachment 68887

Looks great!
 
I really appreciate the steps and the link. Those would certainly come in handy when I do try these.

I need the filesystem to be compatible with windows. I don't know if there's now a reliable way to use linux filesystems on windows. I'd look into it. All my external drives are exFAT as of now.
You just need to install samba and your samba share will work on mac or windows. That's how it is in my setup. My hard disk is ext4 but the shared folder is mountable on mac, windows and my android phones.

Can you please explain the difference between running mpd or LMS on pi with a dac hat? It just seems to me either both would be streaming or passing the data locally in this case.
mpd doesn't stream. mpd is a media server as well as an ALSA playback client. It needs the filesystem locally (either directly attached hard disk or mounted using NFS, sama, etc on the same machine where mpd is running. So mpd directly pushes the data from the music file to the DAC hat. It is a single step process. The flow is like this

mpd server ---> read music data from hard disk ---> push it to the DAC

LMS is different. LMS is just a media server. It cannot play music. The actual ALSA playback client is squeezlite. The filesystem is local only to the LMS server. It streams the music file data to squeezelite clients on TCP port 3483. The squeezelite clients pushes the data to the DAC hat after receiving data on port 3483. So it is a two step process. The flow is like this

LMS server --> read music data from hard disk ---> push it to squeezelite client on port 3483 ----> push to to DAC

Another way to explain the difference
mpd server directly streams the music avaiable locally to the dac.
LMS server streams the music available locall to remote squeezelite clients over the network on TCP port 3483.

Well, as I mentioned before, I'm trying to run everything on a single pi that would run docker. That takes all of these distributions out of the equation.

By the way, I found a docker image for LMS maintained by LMS community. Disclaimer: I don't know if that's an official community or not.




I do want a setup like that where I would stream different music in different rooms simultaneously from the same server. Hopefully, this is also doable with LMS.
Very much doable in LMS and also you can have synchronized playback.
WIth mpd you cannot have synchcronized playback
EDIT: I just sniffed the network and did lsof on squeezelite. squeezelite uses port 3483 to communicate the music data from the LMS server. You can run the LMS server on your docker images and the squeezlite client on the host.

Screenshot 2022-04-22 at 08.06.50.png

I was really leaning towards the LMS option as I found that docker image, but that is certainly a huge setback as I won't be able to run wired connection to all the clients.
Even with mpd your filesystem will be remote for all your raspberry PIs, except for the raspberry pi where the hard disk is directly attached. So it isn't a big deal.

With mpd you have at least one machine that has the hard disk directly attached and music playback is without using the network. On other machines your music data is actually over the network through the filesystem like NFS or Samba.

With LMS each and every machine is streaming audio over the network. Even on the machine having the hard disk, LMS will be streaming data to the loal squeezelite client on the loopback network interface on TCP port 3483.

Remember that the music playback is always happenng from the buffer, regardless of whether you are using mpd or using squeezlite client of LMS. The underlying driver for both is ALSA. So both should sound the same. However there is more likelyhood of things going wrong for LMS than with mpd because of the extra network layer involving TCP port 3483. In the end, it is neither mpd or squeezelite playing the audio. It is the ALSA driver. Our ears are so biased that we here things differentlly just by looks, cost, etc of the equipment.
 
Last edited:
@mbhangui excellent explanations.
Can you please highlight why NTFS is avoidable as a format for storing music files as compared to exfat while connecting the drive to raspbian based distros like MoOde Audio.
As I am fully on windows platform, NTFS works flawlessly for me when I need to connect the drive to my laptop for copying files or for anything else.
If NTFS has pitfalls only option left out is exfat.
 
Join WhatsApp group to get HiFiMART.com Offers & Deals delivered to your smartphone!
Back
Top