0

HowTo OSMC RC3 with hifiberry amp+ - simple and fast (but a little bit „dirty“)

deutsche Version folgt anschliessend an den englischen Text

Dear open source friends

The background: I recently purchased the hifiberry amp+ amplifier to surprise my girlfriend with a small music system, including home-made speakers (speaker kit). Since I unfortunately actually don’t have a lot of time I decided to use an out of the box software solution, which however has to support airplay and network control. To make it easier for other people with the same ideas I would like to share these experiences with the community.

The Setup: a Raspberry Pi 2 Model B (https://www.raspberrypi.org/products/raspberry-pi-2-model-b/), a hifiberry amp+ amplifier (https://www.hifiberry.com/ampplus/), two passive speakers (Tangband MediWall1320).

The solutions: a) OpenELEC - advantage: complete software solution including HowTo for the hifiberry amp+ amplifier;. problems: network (both Ethernet and WiFi) crashed constantly, I couldn't find a solution on the fly; b) Raspbian and Kodi (formerly XBMC) - advantage: complete software solution with prepared image from hifiberry which worked out of the box; Problems: Kodi seems to be outdated, Airplay isn’t working. To compile and configure the software by myself I lacked the time (but that should work); c) OSMC (formerly raspbmc) - advantage: complete software solution where everything works; problems: you have to help your osmc a little bit out (follow the HowTo below).

The HowTo OSMC:

1. Install OSMC – download the rc3 image from the OSMC homepage (https://osmc.tv/download/images/) and write it to your SD Card; after that boot and configure the software on your properly and fully assembled Raspberry Pi 2 with the hifiberry amp+.

2. Update and Distupgrade – log into your Raspberry Pi with ssh and upgrade your Pi with the following commands:
sudo apt-get update
sudo apt-get dist-upgrade
sudo reboot



3. Install some tools – that part follows the official hifiberry HowTo (https://www.hifiberry.com/guides/configure-osmc-for-hifiberry/ - I’m quite sure that you don’t need them all, but I was to lazy to check the dependencies :) ) and installs samba (incl. configuration) with the following commands over ssh:
sudo apt-get install curl wget binutils alsa-utils
sudo apt-get install samba
# you can configure your samba as you like
# but the following config should be done:
# [homes]
# comment = Home Directories
# browseable = yes
# read only = no
# create mask = 0775
# directory mask = 0775
sudo nano /etc/samba/smb.conf

# add user osmc (with pw osmc)
sudo smbpasswd -a osmc
sudo reboot



4. configuration (part 1) OSMC – under MyOSMC, Pi Config, Hardware Support you have to activate the sound card with the option hifiberry-dacplus-overlay (https://osmc.tv/help/wiki/pi-soundcard) and to reboot.

5. copy hifiberry-amp-overlay.dtb: download the raspbian image with automatic detection of Digi/Digi+/DAC+/Amp/Amp+ from the hifiberry page (https://www.hifiberry.com/guides/sd-card-images/), unzip it and mount the .img file with an appropriate application. Under /boot/overlays you will find the file hifiberry-amp-overlay.dtb. Copy that file with samba to your Pi and move it into the correct folder:
sudo mv /path/to/hifiberry-amp-overlay.dtb /boot/overlays

6. configuration (part 2) OSMC: again under MyOSMC, Pi Config, Config Editor you can edit the file config.txt - change the entry hifiberry-dacplus-overlay.dtb to hifiberry-amp-overlay.dtb and reboot. After the reboot go to settings, system, audio output, audio output device and choose the entry ALSA: Default (snd_rpi_hifiberry_amp Analog). After that everything should work. ATTENTION: before you can try it out, turn down the volume - otherwise you might get trouble with the neighbors ;)

Have fun!

David

-------------------------- german version ----------------------------

Liebe Open Source Freunde

Die Vorgeschichte: kürzlich habe ich den hifiberry amp+ Verstärker erworben, um meine Freundin mit einer kleinen Musikanlage inklusive selbstgebastelter Lautsprecher (Lautsprecherbausatz) zu überraschen. Da mir leider relativ wenig Zeit zur Verfügung steht, habe ich mich für eine fertige Software Lösung entscheiden, welche jedoch Airplay und Netzwerksteuerung beinhalten musste. Um anderen die Sache etwas zu erleichtern, möchte ich meine Erfahrungen nun mit der Community teilen.

Das Setup: ein Raspberry Pi 2 Model B (https://www.raspberrypi.org/products/raspberry-pi-2-model-b/), einen Hifiberry amp+ Verstärker (https://www.hifiberry.com/ampplus/), zwei Passivlautsprecher (Tangband MediWall1320).

Die Lösungsansätze: a) Openelec – Vorteil: komplette Softwarelösung inkl. HowTo für den Verstärker; Probleme: Netzwerk (sowohl ethernet als auch wlan) brach andauernd zusammen, Lösungen habe ich auf die Schnelle keine gefunden; b) Raspbian und Kodi (ehemals xbmc) – Vorteil: komplette Softwarelösung mit vorbereitetem Image von hifiberry, welches out of the box funktionierte; Probleme: kodi aus den Paketquellen scheint veraltet, Airplay funktioniert nicht. Für selber kompilieren und konfigurieren reichte mir allerdings die Zeit nicht (sollte jedoch funktionieren); c) OSMC (ehemals raspbmc) – Vorteil: komplette Softwarelösung, bei der alles funktioniert; Probleme: für die Nutzung des hifiberry amp+ muss nachgeholfen werden (vgl. nachfolgend).

Das HowTo OSMC:

1. Installation OSMC – rc3 image downloaden (https://osmc.tv/download/images/) und auf SD Card schreiben; danach auf dem fertig montierten Raspberry Pi 2 inkl. Hifiberry amp+ Verstärker booten und konfigurieren.

2. Update und Distupgrade – mit ssh auf das Raspberry Pi zugreifen und zur Sicherheit mit den folgenden Befehlen updaten:
sudo apt-get update
sudo apt-get dist-upgrade
sudo reboot



3. Installation Hilfsprogramme – gemäss offiziellem hifiberry HowTo (https://www.hifiberry.com/guides/configure-osmc-for-hifiberry/, wobei wohl nicht alle benötigt werden – aber ich war zu faul, um die Abhängigkeiten aufzulösen :) ) und samba (inkl. Konfiguration entsprechend der eigenen Wünsche) mit den folgenden Befehlen über ssh:
sudo apt-get install curl wget binutils alsa-utils
sudo apt-get install samba
# konfigurieren nach Wunsch, Details im Internet zu finden
# die folgenden Konfigurationen müssen jedoch sein:
# [homes]
# comment = Home Directories
# browseable = yes
# read only = no
# create mask = 0775
# directory mask = 0775
sudo nano /etc/samba/smb.conf

# user osmc (mit Passwort osmc) adden
sudo smbpasswd -a osmc
sudo reboot



4. Konfiguration (Teil 1) OSMC – am angeschlossenen Bildschirm unter MyOSMC, Pi Config, Hardware Support die Soundcard mit hifiberry-dacplus-overlay aktivieren (https://osmc.tv/help/wiki/pi-soundcard) und rebooten.

5. Kopieren von hifiberry-amp-overlay.dtb: das mit der automatische Erkennung angepasste Raspbian Image von Hifiberry downloaden (https://www.hifiberry.com/guides/sd-card-images/), entpacken und mit einem geeigneten Programm die .img Datei mounten. Unter /boot/overlays findet sich das gesuchte File hifiberry-amp-overlay.dtb (oder angehängte Datei verwenden). Dieses mit samba auf dein Raspberry Pi laden und mit dem folgenden Befehl in den entsprechenden Ordner verschieben:
sudo mv /path/to/hifiberry-amp-overlay.dtb /boot/overlays

6. Konfiguration (Teil 2) OSMC: wiederum über MyOSMC, Pi Config, Config Editor den in der Datei config.txt zu findenden Eintrag hifiberry-dacplus-overlay.dtb mit hifiberry-amp-overlay.dtb überschreiben, neu starten. Nach dem Neustart solltet ihr in der Rubrik Einstellungen, System, Audio-Ausgabe, Audioausgabegerät einen Eintrag ALSA: Default (snd_rpi_hifiberry_amp Analog) finden. Diesen anwählen und alles sollte funktionieren. ACHTUNG: unbedingt VOR dem Versuch die Lautstärke runterdrehen - sonst könntet ihr Ärger mit den Nachbarn kriegen ;)

Viel Spass!

David

15 comments

Please sign in to leave a comment.