BananaPI route audio over HDMI

Default, audio comes over audio jack, but i wanted to route over hdmi, because i have an AV-Receiver with a high-quality audio engine which should do the transfer from digital to analog signal.
Successfully tested it with Lubuntu 3.1.1 and Bananian.

First, install pulseaudio
apt-get install pulseaudio

Configure your /etc/pulse/ Add the following line at the end:
load-module module-hal-detect
It enables pulseaudio to route sound to hdmi.

At the end, edit your /boot/uEnv.txt and switch from 0 to 1:
How to get there?

#if /mnt doesn't exist, create it by
mkdir /mnt
#type the following, to see, where boot partition is mounted:
#you should see something like /dev/mmcblk0p1. Now mount it:
mount /dev/mmcblk0p1 /mnt
#now you can edit uEnv.txt by
gedit /mnt/uEnv.txt

Compile kernel on BananaPI

Requires SD Card with >=4GB:

    apt-get install git build-essential libncurses5-dev u-boot-tools uboot-mkimage
    cd ~
    git clone --depth 1
    cd linux-bananapi
    make sun7i_defconfig
    make menuconfig
    make -j2 uImage modules
    make modules_install
    mount /dev/mmcblk0p1 /boot
    cp arch/arm/boot/uImage /boot