New MPD and ffmpeg packages available for update

Hi all,

I am writing to announce you that MPD 0.19.13 and ffmpeg 3 are available for update if you are using latest 0.99.4 images:

  1. clear the package cache
pacman -Scc

you will need to pres and ENTER twice

 

2. Update ffmpeg (it’s a good idea even if you use mpd-archphile minimal which is ffmpeg independent):

pacman -Sy ffmpeg-archphile

 

3. Now it’s time to update the MPD package. For a standard installation you should do the following:

pacman -Sy mpd-archphile

Replace the name of the package with mpd-archphile-minimal, mpd-archphile-sacd, mpd-archphile-sacd if you use a different package.

Please note that mpd-archphile-native-dsd remains in 0.19.12, and mpd-archphile-sacd remains on an old github version but they are both rebuilt in order to use latest ffmpeg package.

 

4. If you use an i2s dac, its time to run i2select. If you use Odroid C1+ or Cubox-i you must run bselect and choose your board.

 

Please note that MPD package update will override your mpd.conf configuration.

 

Have fun,

Michael

Ps. A special thanks goes to espakman  for his very important support in general (testing, bugfixing etc.) and to iSushi42 for testing the packages.

An apology to the community and a new version for Raspberry Pi 2 (0.99.4c)

Hi all,

As many of you may have noticed since the first version of 0.99.4 beta for Raspberry Pi 2, I stated that I had patched the linux kernel and had fixed some issues with 24 bit and i2s dacs. After a lot o research it appears that the patch I applied did nothing. Let me give you some history:

Since the beginning of Rpi kernels and i2s dacs there were two modules: bcm2708-i2s (from the source of Raspberry Pi foundation) and bcm2835-i2s (from the tree tha Linus Torvalds maintains). When these two sources merged, both modules continued existing although the only module that was needed for i2s connectivity was bcm2708-i2s. In latest dev Raspberry Pi kernels (If I remember correctly 4.4.y) the devs decided to merge these modules keeping only the name of bcm2835-i2s.

Later, a patch appeared that corrected the code for 24 bit playback . I found the code that was patching bcm2835-i2s (this is the one used in 4.4 and 4.5 and the patch was needed there) and without having understood that in 4.1.17 and 4.1.18 this module is in reality useless, I decided to patch it and offer a custom kernel package for Archphile.

As you understand my custom kernel was fixing a module that does nothing in these versions. In 4.1.18 that was the kernel of 0.99.4b, the only module used was bcm2708-i2s which is 100% ok with 24 bit playback.

In order to be able to fully understand all of the above, I decided to ask the man behind the code of these modules, Florian Meier. He was very quick and to the point explaining me that my patch was in fact doing nothing:


Hi Michael,

the bcm2835-i2s is coming from upstream (i.e. the kernel as maintained by Torvalds),
while the bcm2708-i2s is coming from downstream(i.e. the kernel maintained by the
Raspberry Pi Foundation). In principle they both perform the same task. At the time
of development there was a disagreement about how to name the platform so it was
different for upstream and downstream.
Unfortunately when merging the upstream kernel and the downstream kernel no one
thought about merging these files. It would be best to merge all recent changes to
the bcm2708-i2s into the bcm2835-i2s and replace the usage of the bcm2708-i2s with
the usage of the bcm2835-i2s everywhere.

Greetings,
Florian


I would like to apologize for spreading the community that I made a kernel package that solved a problem that did not exist. For this reason I decided to make an image again, this time using the default archlinuxARM kernel package 4.1.18. I hope this is the final image for now. You can donwload it here:

 

 

I hope you will have my feedback very soon regarding the Raspberry Pi 3 and Odroid C2!

 

Cheers,

Michael

 

0.99.4b Beta is up for Raspberry Pi 2, Odroid C1+, Cubox-i and Udoo Quad

Edit: Most of the new information is now included in Archphile Website documentation. Please read carefully all the sections of Tips & Tricks in order to understand how you can configure Archphile to suit your own needs!


 

Hi all,

after almost a week of feedback and testing after 0.99.4 Beta I am happy to announce you that Archphile 0.99.4b Beta is up for all the supported boards. With regards to the differences between 0.99.4 released last week for Raspberry Pi 2 and Odroid C1+ the only differences are:

– Fully updated system that includes latest Glibc that fixes a security vulnerability
– a custom Raspberry Pi 2 kernel based on 4.1.18 which fixes the maximum volume of Hifiberry Plus Dac
– an updated i2select package in order to be compliant with the kernel above

A quick summary for all devices:

– Latest MPD 0.19.12
– Latest YMPD with extra patches (fix for folders shown as empy – remeber last database folder position – dirble API Key)
– Replaced shairport with shairport-sync 2.8
– Added bselect command that configures mpd.conf for various embedded boards
– Added commands to backup/restore MPD database
– Added option to limit MPD in one core
– Added option to optimize IRQ affinity
– Added Samba capabilities – USB disks can be shared in local network
– Added USB sleep support (needs extra configuration)
– Added brutefir support (playground repository)
– Added an alternative minimalistic MPD package named mpd-archphile-minimal (playground repository)
– Added optional MPD fork with SACD ISO support and another MPD fork with native DSD support
– Added the useful alsacap command line tool

The website is not updated yet in order to include the latest tips and how-tos. You can use all the information from the previous announcements for 0.99.4 Beta where I explain most of the new stuff until I finish with the website pages.

Please note that Archphile is a completely open source and non-commercial distribution based on user donations. If you like my distribution and you want to help me keep it alive please donate using the paypal button below!

 

I hope you will enjoy it!

Cheers,

Michael

 

P.s I would like to thank Espakman from Archphile forum and Sat Lover from avclub.gr that helped me apply all the bugfixes for Hifiberry Plus i2s DAC!

 

Archphile 0.99.4 beta for Raspberry Pi 2 is up!

Edit: Please see updated guide for mpd-archphile-sacd. Due to a typo you need to give one extra command. The package will be re-uploaded.

Edit 2: The new mpd-archphile-sacd package is uploaded. If you haven’t installed it, please follow the instructions directly. If you have already installed, please run the following command before reinstalling:

pacman -Scc

when it asks you please press Y and ENTER twice.


 

Hi all,

it’s been a long since the last uploaded image and I am very happy to announce that Archphile 0.99.4 beta image for Raspberry Pi 2 is up!

If you want to have a look at the changelog please click here.

Some noticeable changes:

– custom kernel image based on 4.1.17
MPD 0.19.12
– option to run MPD only in one core
– latest YMPD with many fixes and additions (please go to settings for update DB!) that you will notice immediately like, option to play stream from the web interface, dirble support etc. It also solves an old bug that caused many folders to appear as empty.
– replacement of shairport with shairport-sync to support latest ios devices
– custom libupnp package
– dbackup/drestore commands to backup and restore MPD database
samba support for USB disks – now you can add music to your USB disk through your local network using samba
brutefir support – it’s installed by default with options in mpd.conf but of course it needs extra configuration to work
lirc installed by default. I will write a how to on how to configure your custom remote control
– Playground repository is enabled by default. It includes many packages like a minimal version of MPD, a custom MPD version with native DSD playback support and a fork of MPD with SACD ISO playback support. It also includes squeezelite, logitechmediaserver and some extra packages for which I am going to write a separate how-to.

Run MPD in one core

edit /usr/bin/archphile-optimize with:

nano /usr/bin/archphile-optimize

and make the changes to:

# set affinity of MPD in one core – choose values from 0-3
#taskset -c -p 2 $(pidof mpd)

so that it becomes as follows:

# set affinity of MPD in one core – choose values from 0-3
taskset -c -p 2 $(pidof mpd)

and reboot with:

systemctl reboot

Backup/restore MPD database

Run dbackup command to backup the database and drestore in order to restore it. The backup location is in /opt/dbackup. You can also put your mpd.db using a fresh installation there and give drestore to restore your previously backed up MPD database. The location of the file you have to manually backup (using filezilla with sftp protocol for example) is:

/var/lib/mpd/mpd.db

Share your mounted USB disk using SAMBA

systemctl start nmbd smbd
systemctl enable nmbd smbd

Installation of custom MPD packages (please note that only the preinstalled package is supported!)

pacman -Sy mpd-archphile-minimal
systemctl reenable mpd
systemctl restart mpd
pacman -Sy mpd-archphile-native-dsd
systemctl reenable mpd
systemctl restart mpd
pacman -Sy mpd-archphile-sacd
systemctl reenable mpd
systemctl restart mpd

In order to restore official MPD package just do the following:

pacman -Sy mpd-archphile
systemctl reenable mpd
systemctl restart mpd

Installation of squeezelite/logitechmediaserver (completely unofficial – just for experimenting – Archphile will always be an MPD based distribution)

pacman -Sy logitechmediaserver squeezelite-archphile
systemctl stop mpd ympd
systemctl disable mpd ympd
systemctl start squeezelite logitechmediaserver
systemctl enable squeezelite logitechmediaserver

The commands above will install logitechmediaserver and squeezelite on the same machine, disable MPD and ympd and will use squeezelite by default.

If you want to go back to the old situation:

systemctl start mpd ympd
systemctl enable mpd ympd

and if you want to unininstalled the extra packages:

pacman -R logitechmediaserver squeezelite-archphile

Please note that in the next days I will update the website with new sections including additional details for all the changes and additions. Most of the existing guides are ready to be used with this version

That’s all for now! I will come back the next days uploading the images for the remaining devices. I will also update i2select package in order to support the Iqaudio AMP+.

Please note that Archphile is a completely open source and non-commercial distribution based on user donations. If you like my distribution and you want to help me keep it alive please donate using the paypal button below!

 

P.S. I would like to thank a new Archphile forum member named espakman. His last minute bugfixes and suggestions helped me upload the best possible image for this device!

 

Cheers,

Michael

Archphile 0.99.3 Beta for all devices (including Raspberry Pi 2)

Note: Updated I2s configuraiton section in order to fix a small bug (thanks Panagiotis!)

Hi all!

I am very happy to announce you that Archphile 0.99.3 is available for downloading for all supported devices:

– Raspberry Pi 2
– Rasbperry Pi B/B+
– Udoo Quad
– Cubox-i

I would really like to thank all the people who donated and especiallty Kostis for donating 2 Raspberry Pi model 2 and made the release for this board possible! In addition I would like to thank Pierre, Stavros and Kostis for helping me testing the images in various stages of Archphile preparation.

 

– Download

Changelog

Major changes/additions:

– Raspberry Pi 2 support
– native ffmpeg support (not enabled by default)
– i2s configuration tool (i2select)
– support of local cover art (using mongoose  – see below for instructions)
– latest ArchlinuxARM and MPD 0.19.9

Configuration:

System configuration (optional)

Network configuration (static ip highly recommended – ethernet connection also highly recommended)

Nas configuration (optional – only for NAS owners ) (usb disks are supported by default, you just plug and enjoy!)

MPD configuration (please ignore the section for more file formats and see below for details – this section will be updated ASAP)

I2s configuration (please ignore it a the moment and see below – it’s much easier now!)

Upnp and Airplay configuration

Android remote control configuration

 

Configuring your i2s dac with i2select configuration tool:

– use Putty from a windows machine or the terminal from Linux/BSD/Mac os X and connect via ssh on your Raspberry Pi

– I just got report about a small bug that causes mpd not to run so only the first time and before running i2select, please give the following commands

rm /usr/bin/i2select
rm -r /root/.orig
pacman -Sy i2select

– run i2select command:

i2select

You will then see the image below:

i2select

– write the number of your i2s dac and press enter

– follow the instructions in red and reboot your machine immediately using systemctl reboot command

Notes:

1. The only devices tested are Iqaudio Plus and Mamboberry. I also got some nice feedback from a friend of Archphile and I believe that configuration for Hifiberry Plus will be correct out of the box. All other Dacs will also work but there might be some issues with their volume levels. Please give me feedback in Archphile forum and I will do my best to support you!

2. Some I2s Dacs like Hifiberry Plus need a special configuration for their max volume level to be 0db (bit perfect). The script apply correct settings for Hifiberry dac. These default settings will be reloaded after each reboot. If you dont want this to happen, please edit /usr/bin/archphile-optimize:

nano /usr/bin/archphile-optimize

and comment the line /usr/bin/unmute (put a # in the beginning of the line). In order to exit nano, press CTRL+X and then Y and press ENTER.

3. The volume mixer is, as always in archphile, disabled by default. If you want to change this, please edit mpd.conf:

nano /etc/mpd.conf

and change:

mixer_type      “disabled”

to

mixer_type      “hardware”

or

mixer_type      “software”

In order to exit nano, press CTRL+X and then Y and press ENTER. Then, restart MPD and you are ready:

systemctl restart mpd

systemctl restart mpd
systemctl daemon-reload

 

I suggest you to leave number 2 and number 3 as they are by default. These are the optimal settings for bit perfect playback. My advice is to change the volume from your amplifier, leaving Archphile configuration untouched.

 

FFMPEG support (or how to play various exotic file formats)

Some month ago I decided to drop support for ffmped in MPD. That meant that if you had files like alac etc, you needed to install mpd from archphile repositories. After many efforts I managed to create a very minimal in dependencies package (ffmpeg-archphile) and ffmpeg support is now supported by default. However it is not enabled by default. If you want to enable it:

nano /etc/mpd.conf

you will find the section like below

decoder {
plugin “ffmpeg”
enabled “no”
}

change the no to yes:

decoder {
plugin “ffmpeg”
enabled “yes”
}

CTRL+X and then Y and press ENTER

The last step is to restart MPD:

systemctl restart mpd
systemctl daemon-reload

And you are ready!

 

Local cover art support using Mongoose

Many users prefer to user their own cover art while using Mpdroid or Mpod/Mpad. This is usually possible by using well known web server solutions (apache, lighttpd) and this was the reason it was not supported until now. These web servers are not light and I do not wanted a bloated Archphile. I tried various solutions and I ended up with one of the simplest. My solution uses mongoose, which is a very light web server. In order to enable it you must do the following:

edit /usr/bin/archphile-optimize

nano /usr/bin/archphile-optimize

You will find the following section

# local cover art support
#
# uncomment below if you use Mpdroid. The path to music is http://xxx.xxx.xxx.xxx:8080/music/
#mongoose -listening_port 8080 -document_root /var/www/covers
#
# uncomment below if you use Mpod or Mpad. Please change the cover server address to http://xxx.xxx.xxx.xxx:8080
#mongoose -listening_port 8080 -document_root /var/www/Music

 

Lets assume that the ip of your Archphile device is 10.0.0.100. If you want to fetch cover art using Mpdroid you must uncomment and modify the appropriate line so that the result is:

# local cover art support
#
# uncomment below if you use Mpdroid. The path to music is http://xxx.xxx.xxx.xxx:8080/music/
mongoose -listening_port 8080 -document_root /var/www/covers
#
# uncomment below if you use Mpod or Mpad. Please change the cover server address to http://xxx.xxx.xxx.xxx:8080
#mongoose -listening_port 8080 -document_root /var/www/Music

In order to exit nano, press CTRL+X and then Y and press ENTER.

You must then go to settings of Mpdroid and set as path to music

http://10.0.0.100:8080/music/

 

If you wan to fetch cover art using Mpod/Mpad, you will enable the next line:

# local cover art support
#
# uncomment below if you use Mpdroid. The path to music is http://xxx.xxx.xxx.xxx:8080/music/
#mongoose -listening_port 8080 -document_root /var/www/covers
#
# uncomment below if you use Mpod or Mpad. Please change the cover server address to http://xxx.xxx.xxx.xxx:8080
mongoose -listening_port 8080 -document_root /var/www/Music

In order to exit nano, press CTRL+X and then Y and press ENTER.

You must then go to settings of Mpod/Mpad and set as path to music

http://10.0.0.100:8080/

You must then go to settings of Mpdroid and set as path to music

http://10.0.0.100:8080

A good friend Pierre tested it and reported that you can also use:

http://10.0.0.100:8080/music/

He reported that the second option was faster. I don’t have an idevice to test. You will test both and choose what is best for you!

The last step is to reboot:

systemctl reboot

Now, after each boot, you will have mongoose enabled serving your local cover art.

 

Enjoy!

Cheers,

Michael

Archphile 0.99.2 Beta for the Raspberry Pi B and B+ (I2S bugfix release)

Hi all,

Archphile 0.99.2 Beta is up. It came too quickly after 0.99.1 only to fix issues with I2S dacs and 24/96 and 24/192. Some of the symptoms were:

– distorted or “fast forward” sound in 24/96 playback
– no or distorted 24/192 playback

 With this release all issues with 24/96 and 24/192 files and I2s Dacs are fixed.

If you have already downloaded 0.99.1 beta and you don’t want to download again, in this forum thread  I give all instructions to update from 0.99.1  to 0.99.2.

Changelog

Download

Note: If you use an i2s Dac, do not use rpi-update or pacman -Syu to update system. It will break 24 bit playback.

Ps. A big thanks to Marcel  and DimDim for their bug reports and to Vasilis-T who gave me his (in beta stage) I2s Dac (Mamboberry) to do my tests and be able to bugfix!

 

Archphile and i2s Dacs

One of the most interesting features of the Raspberry Pi is that it gives us the option to connect our Dacs directly using I2S.  This is really important because this way we avoid one extra step (USB to I2S) during music reproduction. Since the beginning of Archphile I focused on USB dacs for 2 reasons:

– Most of us have a USB Dac

– I don’t have a Dac that gives me the I2S option

At the moment I feel that Archphile/USB is very stable and it’s time to see what the I2S can give us in terms of sound quality. I have created some quick notes here:

http://archphile.org/lab/i2s/  (edit: you can read the new guide here)

When I will be able to perform some tests and get feedback I will add an official guide in this website but the above link is a good beginning.

Unfortunately all you will find there is just theory. I give you all the steps needed to modify 0.99 Beta and start playing around with I2s Dacs. Unfortunately I do not own any of them and I cannot test, so your feedback is really important!

 

Ps. Most of the steps needed for 0.99 Beta will be included in next image.

 

 

New (rebuilt) MPD packages

Hi all,

I uploaded 0.18.16-2 packages for mpd-archphile and mpd-archphile-ffmpeg. It’s a rebuilt of existing version with two changes:

– niceness is set to -16

– changes in MPD systemd configuration files

 

The update procedure is a little bit more tricky this time:

mkdir /etc/systemd/system/mpd.service.d
wget http://archphile.org/lab/files/user.conf
mv user.conf /etc/systemd/system/mpd.service.d/
pacman -Sy mpd-archphile
systemctl daemon-reload
systemctl restart mpd

 

If you use mpd-archphile-ffmpeg then 4th line needs to change to pacman -Sy mpd-archphile-ffmpeg ffmpeg.

 

If you don’t follow the procedure above, you will not be able to use mpd after this update. All these changes will be included in next beta for all devices.