RuneAudio: Enable Hardware Volume Control for AMP+

HiFiBerry user Boyd has written this guide which should help you to configure RuneAudio optimally for your Amp+. These instructions are for use with a Windows PC. Follow these steps carefully – do not change the order!

  1. Download an image of Runeaudio from: http://www.runeaudio.com/download/ (make sure that you pick the version for Raspberry Pi2)
  2. Write the image to an SDHC card (using Win32 DiskImager)
    https://www.raspberrypi.org/documentation/installation/installing-images/windows.md
  3. Insert the SD card into the Raspberry PI and power it up with an Ethernet cable connected to your LAN. Wait until it has booted.
  4. From an Internet browser, go to Runeaudio/local
  5. When the Runeaudio GUI appears, go to the Menu (top right), click on network, and make a note of the LAN IP address. DO NOT MAKE ANY CHANGES AT THIS POINT!
  6. Launch PuTTY on your PC – (you can download a copy from here: http://www.putty.org/) Type the IP address of the Pi2 into the “Host Name (or IPaddress)” box in PuTTY and click Open – click Yes when the PuTTY security alert appears.
  7. Log in to the Raspberry Pi. The user name is root, the password is rune.
  8. Edit Rune’s configuration file (config.txt) to enable HiFiBerry AMP+ type this command in PuTTY
    nano /boot/config.txt
    then use the ↓ (down) button on your keyboard to scroll down the listing, until you reach the section which reads
    # Uncomment one of these lines to enable an audio interface
    #device_tree_overlay=hifiberry-dac
    #device_tree_overlay=hifiberry-dacplus
    #device_tree_overlay=hifiberry-digi
    #device_tree_overlay=hifiberry-amp
    #device_tree_overlay=iqaudio-dac
    #device_tree_overlay=iqaudio-dacplus

    Scroll to the line #device_tree_overlay=hifiberry-amp, and click the delete key, to remove the # symbol, so that the line reads:
    device_tree_overlay=hifiberry-amp
    Do NOT make any other changes to config.txtClick Ctrl-x to exit the nano editor, and type Y to make the change, then hit Enter to write the change to the config.txt file.
  9. The next stage is to download some updates to the Rune audio software. Don’t panic, just follow the instructions, and do NOT reboot the Pi until you have completed this section.
  10. Type these commands in PuTTY
    cd /srv/http
    git stash
    git pull

    After typing the first line, PuTTY will show:
    [root@runeaudio ~]# cd /srv/http)
    After typing the second line, PuTTY will show:
    Saved working directory and index state WIP on dev: 35c5cba Fix mpd global random HEAD is now at 35c5cba Fix mpd global randomAfter typing the third line, lots of lines of stuff will appear!
    Wait till all this activity has stopped, and PuTTy shows [root@runeaudio http]# )

    Type exit to leave the PuTTy session.
    From the browser, click Menu, Power Off, and select reboot. Launch PuTTy and log-in again once the reboot is complete. Then type each of these lines:

    redis-cli del acards /var/www/db/redis_acards_details /var/www/command/refresh_ao
    You will see warnings/errors after typing this third line, just ignore them! Then type each of these lines:
    sync
    reboot

    You can now close PuTTy

  11. Now return to the web browser, and verify that all the changes have been successful. Click on Menu, then click Debug.
  12. Scroll down (about two pages) until you find the section with this heading
    ###### mpd.conf ######
    ################################### # Auto generated mpd.conf file
    # please DO NOT edit it manually!
    # Use RuneUI MPD config section ###################################

    About 40 lines below this, you will find this section. It should look exactly like this:
    audio_output {
    name "snd_rpi_hifiberry_amp"
    type "alsa"
    device "hw:1,0"
    mixer_control "Master"
    mixer_type "hardware"
    mixer_device "hw:1"
    auto_resample "no"
    auto_format "no"
    enabled "yes"
  13. If it doesn’t look exactly like this, then go back and repeat steps 9 and 10, before proceeding with the following sections. otherwise Hardware Volume control will NOT be enabled, and HiFiBerry AMP+ will play at full volume – deafening!)
  14. If the changes have been successful, you can now complete the setup of Rune Audio. Click on MPD, and set up the following parameters:
  15. Audio Output Interface: HiFiBerry Amp+ (I2S)
    Volume control: enabled – hardware
    Start volume: (I set this to 35, so that the audio is just audible when playback starts) Volume knob: (your choice of real-time or on-release).
    Then click on Save and Apply
  16. You can now set up time zone, sources, network etc. etc., and enjoy playing your music.