Archphile - An Archlinux Based Audiophile Distribution for Raspberry Pi and Udoo Quad

It is really really a sad news. I have been using Archphile for so many years. Hope Mike can continue to update his github so that we can use the receipe there to update our Archphile.
moOde audio player or Volumio update speed is very fast, and Archphile always stays in the Linux interface, even if the speed can be faster, but the number of users will be pitiful, stop maintenance is not unexpected.

moodeaudio.org
 
moOde audio player or Volumio update speed is very fast, and Archphile always stays in the Linux interface, even if the speed can be faster, but the number of users will be pitiful, stop maintenance is not unexpected.

moodeaudio.org
well you definitely not its in user range :)
philosophy that Michael was using to develop Archphile is very suitable for sound quality - minimum of everything needed to produce bit perfect sound. that includes flashy user interfaces, amount of functions, album arts.

It doesn't needed to be updated frequently. what for? its stable,supports all kinds of DACs, it works for listening music from files, and it was tested on all RPIs except 4.
If you interested more in functionality, and style then Moode is a better choice. But for sound quality - this one is and will be unbeatable





 
If someone cares about enabling bluetooth on Archphile, here are the steps. It was done with external USB bluetooth dongle, as from RPI 3+ bluetooth sound was choppy. But if you still wish to try onboard bluetooth chip you need just to include these 3 steps, otherwise pass them

Code:
1. pacman -U [URL]https://github.com/RoEdAl/alarm-bluetooth-raspberrypi/releases/download/v5-2/bluetooth-raspberrypi-5-2-any.pkg.tar.xz[/URL]
2. Remove the attachment of /dev/ttyAMA0 (/dev/ttyS0 in mini-UART version) to the console from /boot/cmdline.txt
3. add dtoverlay=bcmbt to /boot/config.txt
So the code for bluetooth with USB dongle:
Code:
 1. [very important step] nano /etc/pacman.d/mirrorlist 

 (uncomment Server = http://tardis.tiny-vps.com/aarm/repos/2018/05/26/$arch/$repo , 

comment #Server = http://mirror.archlinuxarm.org/$arch/$repo )
  
2. nano /boot/config.txt (uncomment audio DAC)
3. nano /etc/mpd.conf -> mixer_type from “disabled” to “software”
4. reboot
5. pacman -S libical
6.  pacman -S bluez
7. pacman -S bluez-utils
8. pacman -S bluez-libs
9. reboot
at this point bluetooth should be running and you can test by:
Code:
10. systemctl start bluetooth.service
11. bluetoothctl 
    a) list (should show bluetooth chips connected, if you have USB dongle inserted, like Controller 00:15:83:EE:37:A8 archphile [default])
    b) power on
    c) discoverable yes  [now you should scan and see Archphile on the phone/pc bluetooth devices]
    d) exit
now software for installing bluez-alsa:
Code:
12. pacman -S binutils
13. pacman -S libfdk-aac
13. pacman -S sbc
14. pacman -S git
15. pacman -S autoconf
16. pacman -S automake
17. pacman -S gcc
18. pacman -S pkgconfig
19. pacman -S make
 20. pacman -S fakeroot 

or 
pacman -S base-devel (enter)
Creating new user and installing package bluez-alsa
Code:
12. useradd -m -G users -s /bin/bash archie
13. nano /etc/sudoers -> add this line “archie ALL=(ALL) ALL”
14. cd /home/archie
15. su archie
16. wget [URL]https://aur.archlinux.org/cgit/aur.git/snapshot/bluez-alsa-git.tar.gz[/URL]
17. tar -xf bluez-alsa-git.tar.gz
18. cd bluez-alsa-git
19. makepkg
20. pacman -U bluez-alsa-git-1.4.0.r34.g0c5d9fc-1-armv7h.pkg.tar.xz
you can check bluealsa now:
Code:
21. bluealsa (if no errors ctr+c)
22. killall bluealsa
23. bluealsa -p a2dp-sink &
24. bluetoothctl 
    a) power on
    b) scan on
    c) [find address the devices you want to connect in the form of xx:xx:xx:xx:xx:xx and copy it] scan off
    d) pair xx:xx:xx:xx:xx:xx [your device code , paste it]
    e) connect xx:xx:xx:xx:xx:xx [now on the phone you should see that its connected for audio streaming, keep in mind that volume was set to 100%]
    f) exit
25. bluealsa-aplay 00:00:00:00:00:00 [now you should be hearing music through RPI if you streaming lets say from android phone to which you connected]
you can also trust device for future auto connection. You could connect to arhcphile without any need to open bluetoothctl
Code:
26. trust xx:xx:xx:xx:xx:xx
yeah i know its lengthy procedure. It should take an hour or so to install, but at least not 4 days as for me to figure it out.

Another issue that its not auto-pair auto-connect for new devices. If i'll find the way will update the post






 
I can't remember what I have done to enable NFS sharing couple a months ago. I know that it didn't worked with just entering sharing data in fstab... Started using moode with SACD iso support and some older volumio also with SACD but it was on Chinese. If somebody have experience with NFS sharing on archphile ... I'd like to try it again
 
If someone cares about enabling bluetooth on Archphile, here are the steps. It was done with external USB bluetooth dongle, as from RPI 3+ bluetooth sound was choppy. But if you still wish to try onboard bluetooth chip you need just to include these 3 steps, otherwise pass them

Code:
1. pacman -U [URL]https://github.com/RoEdAl/alarm-bluetooth-raspberrypi/releases/download/v5-2/bluetooth-raspberrypi-5-2-any.pkg.tar.xz[/URL]
2. Remove the attachment of /dev/ttyAMA0 (/dev/ttyS0 in mini-UART version) to the console from /boot/cmdline.txt
3. add dtoverlay=bcmbt to /boot/config.txt
So the code for bluetooth with USB dongle:
Code:
 1. [very important step] nano /etc/pacman.d/mirrorlist 

 (uncomment Server = http://tardis.tiny-vps.com/aarm/repos/2018/05/26/$arch/$repo , 

comment #Server = http://mirror.archlinuxarm.org/$arch/$repo )
  
2. nano /boot/config.txt (uncomment audio DAC)
3. nano /etc/mpd.conf -> mixer_type from “disabled” to “software”
4. reboot
5. pacman -S libical
6.  pacman -S bluez
7. pacman -S bluez-utils
8. pacman -S bluez-libs
9. reboot
at this point bluetooth should be running and you can test by:
Code:
10. systemctl start bluetooth.service
11. bluetoothctl 
    a) list (should show bluetooth chips connected, if you have USB dongle inserted, like Controller 00:15:83:EE:37:A8 archphile [default])
    b) power on
    c) discoverable yes  [now you should scan and see Archphile on the phone/pc bluetooth devices]
    d) exit
now software for installing bluez-alsa:
Code:
12. pacman -S binutils
13. pacman -S libfdk-aac
13. pacman -S sbc
14. pacman -S git
15. pacman -S autoconf
16. pacman -S automake
17. pacman -S gcc
18. pacman -S pkgconfig
19. pacman -S make
 20. pacman -S fakeroot 

or 
pacman -S base-devel (enter)
Creating new user and installing package bluez-alsa
Code:
12. useradd -m -G users -s /bin/bash archie
13. nano /etc/sudoers -> add this line “archie ALL=(ALL) ALL”
14. cd /home/archie
15. su archie
16. wget [URL]https://aur.archlinux.org/cgit/aur.git/snapshot/bluez-alsa-git.tar.gz[/URL]
17. tar -xf bluez-alsa-git.tar.gz
18. cd bluez-alsa-git
19. makepkg
20. pacman -U bluez-alsa-git-1.4.0.r34.g0c5d9fc-1-armv7h.pkg.tar.xz
you can check bluealsa now:
Code:
21. bluealsa (if no errors ctr+c)
22. killall bluealsa
23. bluealsa -p a2dp-sink &
24. bluetoothctl 
    a) power on
    b) scan on
    c) [find address the devices you want to connect in the form of xx:xx:xx:xx:xx:xx and copy it] scan off
    d) pair xx:xx:xx:xx:xx:xx [your device code , paste it]
    e) connect xx:xx:xx:xx:xx:xx [now on the phone you should see that its connected for audio streaming, keep in mind that volume was set to 100%]
    f) exit
25. bluealsa-aplay 00:00:00:00:00:00 [now you should be hearing music through RPI if you streaming lets say from android phone to which you connected]
you can also trust device for future auto connection. You could connect to arhcphile without any need to open bluetoothctl
Code:
26. trust xx:xx:xx:xx:xx:xx
yeah i know its lengthy procedure. It should take an hour or so to install, but at least not 4 days as for me to figure it out.

Another issue that its not auto-pair auto-connect for new devices. If i'll find the way will update the post
well basically there are few to auto connect/pair/trust bluetooth devices without a need to login through SSH. One is based on bluez-tools, however i found it quite unreliable when needed to reconnect to devices. For that reason i just wrote few automation scripts with expect to manipulate ‘bluetoothctl’ . I don’t know whether someone is interested in making bluetooth on their archphile, but here are the steps.
Its taken into account that one followed the steps in quoted message. this part is only for connecting pairing heedlessly to bluetooth devices.
FIRST way:
Code:
 1. pacman -S bluez-tools
2. nano /root/bluethooth.cfg
    a) paste: 
*    1234
    b) ctrl + x
    [1234 its a pin code for device connection and can be any number]
3. cd /home
4. nano launnch_autopair.sh
    a) paste: 
#!/bin/bash
systemctl start bluetooth.service
bt-adapter --set Powered 1
bt-adapter --set DiscoverableTimeout 0
bt-adapter --set Discoverable 1
bt-adapter --set PairableTimeout 0
bt-adapter --set Pairable 1
killall bluealsa || true
bluealsa -p a2dp-sink &
bt-agent -c NoInputNoOutput -p /root/bluethooth.cfg -d
bluealsa-aplay 00:00:00:00:00:00 &
    b) ctrl + x
5. nano stop_autopair.sh
    a) paste:
#!/bin/bash
killall bluealsa-aplay || true
killall bluealsa || true
killall bt-agent || true
    b) ctrl + x
and then just to create Raspi buttons on the phone, something like “bluetooth start -> bash /home/launch_autopair.sh”
“bluetooth stop -> bash /home/stop_autopair.sh”
and use it for starting and stopping service

SECOND way

Code:
 1. pacman -S expect
2. cd /home
3. wget [url=https://github.com/darjusp/Archphile-playground/blob/master/create_trust.sh]Archphile-playground/create_trust.sh at master * darjusp/Archphile-playground * GitHub[/url]
4. wget [url=https://github.com/darjusp/Archphile-playground/blob/master/first.exp]Archphile-playground/first.exp at master * darjusp/Archphile-playground * GitHub[/url]
5. wget [url=https://github.com/darjusp/Archphile-playground/blob/master/launch_autopair.sh]Archphile-playground/launch_autopair.sh at master * darjusp/Archphile-playground * GitHub[/url]
6. wget [URL]https://github.com/darjusp/Archphile-playground/blob/master/second.exp[/URL]
7. wget [URL]https://github.com/darjusp/Archphile-playground/blob/master/stop_autopair.sh[/URL]
8. wget [URL]https://github.com/darjusp/Archphile-playground/blob/master/trusted_devices.txt[/URL]
and then the same: create remote raspberry buttons something like “bluetooth start -> bash /home/launch_autopair.sh”
“bluetooth stop -> bash /home/stop_autopair.sh”
and use it for starting and stopping service

[pin code in first.exp, to change it: nano /home/first.exp and change pincode numbers without removing “\r”]

hope this helps for someone






 
Spotify on arch nowadays tend to be easy way to get. A year or 2 ago when i’ve tried it happen lot of waste of time and no spot running. With spotifyd its very straightforward.

download and install spotifyd
Code:
1. cd /home
2. wget [URL]https://github.com/Spotifyd/spotifyd/releases/download/0.2.11/spotifyd-2019-06-19-armv6.zip[/URL]
3. mv spotifyd /usr/bin/
create config file
Code:
4. nano /etc/spotifyd.conf
    a) paste: 
# ~/.config/spotifyd/spotifyd.conf
[global]
username = USER
password = PASS
# password_cmd = command_that_writes_password_to_stdout  # can be used as alternative to `password`
# use-keyring = true                                     # can be used as alternative to `password`
backend = alsa                                           # run `spotifyd --backends` for possible values
#device = alsa_audio_device                               # run `aplay -L` for possible values
# control = alsa_audio_device                            # device for the #mixer, if not the same as 'device'
#mixer = PCM
#volume-control = alsa                                    # or alsa_linear, or softvol
# onevent = command_to_run_on_playback_events
device_name = Archphile             # must not contain spaces
bitrate = 320                                            # or 96, or 320
cache_path = cache_directory
volume-normalisation = true
normalisation-pregain = -10
    b) change USER and PASS to your spotify username and password
    c) ctrl+x
now you should check whether its working you can check it by entering and trying to connect:
Code:
spotifyd --no-daemon
create service
Code:
5. cd /usr/lib/systemd/system
6. wget [URL]https://raw.githubusercontent.com/Spotifyd/spotifyd/master/contrib/spotifyd.service[/URL]
7. systemctl start spotifyd.service
enjoy, pretty good sound quality.
if you can connect, but hear no sound -> play with config file, uncomment and change device,mixer,volume-control. Maybe that will solve the issue :)








 
Last edited:
Hello and thanks for these command lines that helped me to have a working spotify installation.

However I have a noob question: I use a Hifiberry Dac+ Pro, I set mixer to "hardware", spotify is working, internet radio are working but I have no volume bar on ympd, volume is always at 100% (nevertheless volume slider works in spotify application). Does someone know how to fix this?

Thank you
 
Hello and thanks for these command lines that helped me to have a working spotify installation.

However I have a noob question: I use a Hifiberry Dac+ Pro, I set mixer to "hardware", spotify is working, internet radio are working but I have no volume bar on ympd, volume is always at 100% (nevertheless volume slider works in spotify application). Does someone know how to fix this?

Thank you
Well I am not sure whether you can control through software volume without mixer as "software", but also there is some problem with ympd volume control. In my case too - i didn't find it. Mympd has volume control, try it

myMPD packages for Archphile 0.99.73 alpha - Archphile



 
By default the sw volume is disabled in Archphile.
I guess you have seen page 10 of the manual: 4.3: Software/Hardware mixer.
I wouldn’t mess with it in order to keep bit-perfect playback for my local files and use the Spotify volume just for Spotify if I wanted to control it though sw.

I know very little about Linux just pointing to something very obvious that sometimes we may miss.
 
By default the sw volume is disabled in Archphile.
I guess you have seen page 10 of the manual: 4.3: Software/Hardware mixer.
I wouldn’t mess with it in order to keep bit-perfect playback for my local files and use the Spotify volume just for Spotify if I wanted to control it though sw.

I know very little about Linux just pointing to something very obvious that sometimes we may miss.


Well its a bit philosophical discussion.
Information is obvious but the difference not so much. I believe without high-end dac, amp and speakers, and lossless format hardly someone will hear the difference. And definitely not from compressed audio like Spotify source.