Airport Express: Linux and Mac

Knox got an Airport Express for his Mac. For now, we’ll use it as our music streaming solution, though my eventual goal is to get something like a Squeezebox or Sonos.

Setting up the AEX to work with the Mac was mostly simple, with one caveat: to get onto our existing wireless network, we had to provide the hex version of our 64-bit ASCII WEP key as the 40-bit WEP key the Mac dialog was asking for.

For Linux, it’s slightly more involved. I found out about raop_play, a simplistic music client that, most importantly, includes a driver such that ALSA applications can stream music to a virtual audio card which actually gets streamed to the AEX. Pretty nifty.

I followed Nils Winkler’s instructions for setting up raop_play. Here’s the additional stuff I had to do to get this to work:

  • Before compiling, install the following packages libsamplerate-devel fltk fltk-devel libid3tag-devel fltk-fluid

  • Delete the line #include <linux/config.h> in drivers/alsa_raoppcm.c

  • Patch the kernel module source

  • Create Nils’s suggested scripts: load_airport_express_driver, start_airport_express, and stop_airport_express. Modify start_airport_express to have the IP address of the AEX.

At this point, the basic infrastructure was working:

  • Run start_airport_express

  • Verify the sound “card” is installed: cat /proc/asound/cards

  • Play some music: sudo mplayer -ao alsa:device=hw=1.0 some_song.mp3

Unfortunately, I couldn’t run as non-root. My devices on /dev/snd look like this:

 drwxr-xr-x   2 root root        180 2008-04-06 07:44 .
 drwxr-xr-x  14 root root       5200 2008-04-06 07:44 ..
 crw-rw----+  1 root root     116, 6 2008-04-06 07:42 controlC0
 crw-rw----   1 root root     116, 8 2008-04-06 07:44 controlC1
 crw-rw----+  1 root root     116, 5 2008-04-06 07:42 pcmC0D0c
 crw-rw----+  1 root root     116, 4 2008-04-06 07:42 pcmC0D0p
 crw-rw----   1 root root     116, 7 2008-04-06 07:44 pcmC1D0p
 crw-rw----+  1 root root     116, 3 2008-04-06 07:42 seq
 crw-rw----+  1 root root     116, 2 2008-04-06 07:42 timer

The C1 entries are used raop_play, but you’ll notice they don’t have a + in the permissions column. Why is that? What does the + mean? Tell me if you know!

On a hunch, though, I chowned controlC1 and pcmC1d0p to my user group—and I could play as non-root.

Well, mostly. I can stream music from applications that let me select the ALSA device, such as mplayer and xmss. Unfortunately, I don’t see how to configure rhythmbox to use raop_player. (Tell me if you know!)

Leave a Reply