Install Steps

  1. Make sure you have all the dependant software installed:

    apache (I use v2)
    php (I use 5)
    python
    mpd
    pulseaudio (I use 0.9.19, tweaks might be required for others)
    heyu (optional)
    icecast (optional)

    darkice
    
    vnc stuff (optional)
    tightvncserver
    vnc-java  
    seamonkey  
    ratpoison
    
  2. Get your own copy of the source tree. Everything is written in python/php so there is no compiling or installing involved. I would recommend putting the tree in this path since it is what I use: /var/www-aliases/WholeHomeAudio.

    git clone git://gitorious.org/pulse-whole-home-audio/pulse-whole-home-audio.git

  3. We’ll start with configuring PulseAudio for system mode. If PA is configured for per user session mode (pretty sure every distro is) then you will need to disable that. I'm not quite sure the appropriate way on Ubuntu 9.10, but I removed all pulse config files (look in /etc/pulse/) except daemon.conf. I then edited my daemon.conf to make it like the one I have checked into the tree in /config/pulseAudio. The basic gist is that system mode and daemon should be enabled.

    NOTE: Autospawning attempts made by libcanbera (I think that is the culprit) can make things annoying and bloat your logs. I need to figure out how to disable this.

  4. Next we need to configure PA to load up your hardware sinks appropriately. The default config in /config/pulseAudio/config.pa has 5 zones, one of which is a real sound output and 4 of which are just fake remaps back to the same output. You should replace the alsa sinks with your cards. If you have a multichannel card then you will probably have to use module-remap to split it into multiple 2 channel cards. You can find details on the PA site. If you have fewer than 5 zones I would recommend leaving some of the fake zones in until things are working and then try removing them. I never test with +/– 5 zones so…

    Set this line for appropriate IP’s: load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1;10.10.0.0/24
    Make sure you have enough module-combine’s for your number of zones.

    Module-combine has different parameters based on pulse version, check the wiki.
    Depending on the performance of your computer and number of zones you should adjust your resample method. You can find details on the PA site about the options.  
    Organize your zones such that a hardware zone (not remap), or if you have no hardware zones, just the one you want to be highest quality is zone1.
    
  5. Now it’s time to try out your PA config. Start by ensuring that there is no instance of PA running (ps -A | grep pulse). If there is, kill it. Then try starting PA with your config:

    sudo pulseaudio —system -nF config.pa

    If it worked then great, otherwise time to debug. You can try adding “-v” to the command to get more verbose error outputs.

  6. Once you have PA working your are pretty much through the tough part. Now you need to start going through all the .py and .php files in the various /config/ subdirectories and set all of the various paths and web addresses based on your install location and server ip/dns name. I’ll refrain from getting too detailed on the settings here because I plan to simplify things a lot.

  7. Now you have to get the website portion setup within apache. I have provided sample settings (/config/apache/sites) that you just have to customize and drop into your apache config file. On Ubuntu that file is found in /etc/apache2/sites-enabled/000-default. Then restart apache:

    sudo /etc/init.d/apache2 restart

  8. Next we will add a new unpriviledged user to run all the music player daemons (mpd). I have named my user “entertain”. You can add the user with the standard gui tools in your distro. Just make sure you turn off basically all their rights (I even set the bash to /bin/false). Once you have created your user, make sure they are a member of both the pulse and pulse-access groups. While your at it add your username and all the other desktop users on your machine as well.

  9. Time to setup mpd. In the /config/mpd folder you will find a bunch of .conf.template files. Copy each file into the same folder but remove the .template ending. Then edit each file. Make sure your set the paths and the username. I have put the mpd and mpd/playlists folder in the home folder of my unpriviledged user.

  10. Done…kinda. Eventually I will get to writing instructions for the remaining non-essential pieces.

TODO:

  • x10 config
  • Alarm config
  • Icecast config
  • How to get sound for the console logged in user