As we started to work on our standalone Pandora player, I decided to do some testing with hardware that I had sitting around. I have a Linksys NSLU2 (“SLUG”) which I had previously loaded Debian Linux on and a SoundBlaster Live! 24-Bit External USB sound card. In the past I had used MPD on the SLUG similar to the MightOhm project. The SLUG has a similar chipset to the ASUS router and is one of OpenWRT’s many supported hardware platforms. This makes it a good choice for figuring out what modifications need to be made to the pianobar software and default OpenWRT installation.
Yesterday I installed openWRT Kamikaze 8.09.2 on the SLUG using these instructions posted on the OpenWRT website. I was able to flash the new firmware from my Ubuntu laptop using the upslug2 utility. I then followed the openWRT Beginner’s Guide to gain access to the SLUG and changed the default IP address, which was the same as my actual router, and root password. I used telnet to change the password, but configured the IP address using the web interface. Since I wasn’t going to be using the SLUG as a router I decided to turn off dnsmasq, to prevent it from interfering with my actual router, and the firewall. This was done by issuing the following commands as root:
/etc/init.d/dnsmasq disable
/etc/init.d/firewall disable
The instructions also walked through enabling USB support and after rebooting it was able mount a usb drive and the usb sound card was listed in the lsusb output.
Following the instructions in Part 5 of the MightOhm guide I installed & configured kmod-usb-audio, kmod-usb-ohci, & mpd. I used the default repository and not the one listed in the MightOhm guide since Kamikaze 8.09.2 uses the 2.6 kernel by default and MightOhm uses the 2.4 kernel to get around the wireless driver issue with the ASUS router. My sound card showed up as /dev/audio versus the MightyOhm’s dev/sound/dsp. The default repository does not include mpc so I installed Sonata on my Ubuntu laptop to control the MPD server.
I was able to playback mp3s, but the start of each song was kind of jerky. I didn’t encounter this problem with my previous SLUG setup. That setup used ALSA instead of OSS, which might be the problem. So, I decided to install the packages alsa-lib and alsa-utils. In order to get ALSA to work I had to manually add a user group called audio. By default, OpenWRT does not include any utilities to manipulate users or groups. To add the audio group I issued the following command:
echo "audio:x:2000:" >> /etc/group
After adding the group I was able to play a WAV file with aplay, but I have not been able to get MPD to work yet with ALSA. My guess is that I have the wrong hardware listed in the MPD configuration, but I ran out to time to test it yesterday.
