Linux Audio Introduction
Choices abound with Linux distributions. I have tried Ubuntu, Fedora, Damn Small Linux, Gentoo, Debian, Puppy Linux, Lubuntu, Bodhi Linux, Linux Mint and a few others. The best way to test drive just about any Linux distro is to get yourself a Pendrive that is at least 1 Gig and go to PendriveLinux, they have everything you need to download and run Linux straight from your USB Pendrive stick. With a little time and patience you can settle on your own personal favorite flavor of Linux.
For audio, look for a Linux distro with a very small footprint which works very well out of the box and does not have Pulse Audio installed by default. However if Pulse-Audio is the default it can be removed easily. Ideally, the only thing that should be done is to install the real-time kernel and set up ALSA for real-time processing. From there you can have your choice of audio front ends like Clementine or DeadBeef to play music, or install Music Player Daemon and operate the software remotely from another computer or even a iTouch or Android phone.
What is Music Player Daemon?
Music Player Daemon is a program that runs in the background and gives the absolute best sound of any software I have heard to date. The best thing about MPD is that you can install a client [the interface that controls MPD] on any type of computer; a PC, a Mac, iTouch, iPhone, Android product or Linux computer. Having a client on another computer makes MPD the best choice for a headless computer. Set-up can be a little difficult but it all boils down to about 7 steps to be off and running.
Looking for a traditional music player? Try DeadBeef, its pretty much the Foobar of Linux imo, you can even import Foobar's eq settings. Clementine is also great!
These instructions assume you already are aware of:
Synaptic Package Manager, Terminal, and your distributions text editor.
How to install Music Player Daemon [click on the pics to enlarge]
1)Go to Synaptic Package Manager and type in mpd then search, right mouse button ->Mark for Installation...repeat for gmpc.
Afterwards select Apply.
2)Create 2 Music Directories, by default the Music directory already exists, if not
Open a terminal window and type
sudo mkdir Music
sudo mkdir Playlist
Copy and paste your music files into the folder. Once the music files are loaded into the new folders, type the command below in a terminal window to open up permissions.
sudo chmod 755 -R Music
sudo chmod 755 -R Playlist
2a)For external HD music, NTFS formatted hard drive might have permission problems...in that case see bottom of tutorial to resolve.
ls [shows directories within external HD]
sudo chmod 755 -R [name of music directory]
Use pwd to find the path as shown, then use that path for the mpd.conf file
3)aplay -l to find sound card - USB
Note commands in terminal window and results that return. [ls, pwd, ifconfig, aplay -l]
3a)aplay -L to find SPDIF out, always called IEC958
Note: For SPDIF out you must un-mute the port first. Do the following:
Type: alsamixer in terminal, then press F5 for [ALL]. Use the arrow key and press the letter "M" on your keyboard to un-mute everything, then Esc.
Use > arrow to highlight and letter M to un-mute
4)Change file, remove the comment [#]
5)Change file, add music path, add playlist path, add soundcard
In new terminal
Scroll down a bit and comment out the localhost line and use your IP address instead for GMPC
Save the file, then
sudo killall mpd
6)Create file for internet radio
add the http of your favorite station and save as a .m3u file. Save As then save it in your Playlist directory.
if you already have a .pls file from your favorite radio station just type
sudo cp [your .pls file] [whatevername.m3u] <~~~This will copy the playlist file into a new .m3u file for MPD
For example; sudo cp groovesalad130.pls groove.m3u
sudo chmod 775 -R Playlist[from your home directory]
7)Restart MPD and update database with music
Configure GMPC, add the ip address as shown then connect. Then select Server->Update Database
I found that if you don't have a network connection at startup MPD will fail to start. To work around this I added a line in a start-up script that starts MPD about 15 seconds after boot. See "Setting up ALSA" for details.
Also after all the tweaks I have done, adding the Real-Time Kernel, ALSA tweaks etc. I find that the biggest difference in sound can be obtained by adjusting the buffer size. Sound can go from thin and flat to lush and full....this is great for final tuning to the perfect sound that synergizes with the rest of your gear.
Upsampling with Sox Sample-Rate Converter
Open Synaptics Package Manager and install Sox.
Add or replace the following lines below the original output lines. If added below the original audio_output lines you will have 2 methods to output. One normal and one upsampled....make sure you toggle one OFF before playing music.
Upgrade to the latest Alpha version of MPD
1)Add repository and key to Synaptic Package Managersudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com C116A57C
sudo add-apt-repository ppa:gmpc-trunk/mpd-trunk
Go to Synaptic Package Manager first refresh and then search for mpd, right mouse button Mark for Upgrade then Apply. Repeat for gmpc.
Go here for details https://launchpad.net/~gmpc-trunk/+archive/mpd-trunk
NOTE: In order to get .wav .aif .aiff file to play you need to add these lines to the mpd.conf file
Permission problems when mounting an external NTFS hard drive?
In mpd.conf file run the pid as the same owner of the NTFS....
ls -al to find owner of external hard drive
In mpd.conf file change owner
Create a .mpd directory in the home directory
chmod 755 .mpd