monnier
10-02-2006, 22:53
Looking at the waveserver and such stuff, and seeing how my router sits right next to my old stereo whose CD player died a while ago, I thought it would be neat to try and use my trusty wl500g as a jukebox.
I'm not using an MS products, so the waveserver seems useless (given the lack of documentation). Also I'm not convinced I want to store my music on some remote computer. My wl500g is the only computer that's always ON, so it makes sense to keep as much stuff there as possible.
In the end I decided it would be good to try and install musicpd.
So I bought a cheap USB audio dongle (about CDN$30).
It's connected to a hub where I also connect my printer and a flash storage (for my experiments: if it works well, I'll get an external harddrive instead).
There's an ipkg for musicpd, so I tried to install it with ipkg.sh, but it didn't work (ipkg.sh issued various warnings/error messages along the way, especially about incorrect parameters passed to `sed', but in the end things seemed pretty much installed at the right place): the package needed a libgcc_s.so (or something like that: I don't have the exact message at hand) which is probably distributed with OpenWrt but not with Oleg's firmware.
So I compiled it by hand. I still had the cross-compiler I used to compile my NTP server, so I decided to try and use that one (dates back to 1.7.X.X days).
I started by compiling the following packages:
- libao-0.8.6
- zlib-1.2.3
- libogg-1.1.3
- libvorbis-1.1.2
- mpd-0.11.5
(most of my songs are in Vorbis format so I needed that)
All of those libs have been statically linked into the resulting `mpd' executable (about 700KB).
When I installed it, it didn't work. Several problems:
- libao's oss driver is a dynamically loaded plugin but the build procedure relies on libtool for that and for some reason this didn't work (maybe I'd need a cross-compiler version of libtool). So I hacked the source to statically link the oss "plugin".
- the default mpd.conf used /dev/mixer rather than /dev/sound/mixer. Also it used the "PCM" rather than "Pcm" volume control, so the volume control didn't work.
- my card only takes 48khz streams, so I had to add a line in mpd.conf.
- I hadn't plugged my cables correctly (yup, that's right, I'm an idiot).
- the poor BCM4710 was not up to decoding Vorbis (MP3 is OK with about 65% CPU).
Luckily I bumped into Tremor, so I installed it from http://svn.xiph.org/branches/lowmem-branch/Tremor.
Then mpd needed a patch to use the Tremor library. Luckily someone else wrote this one already: http://reich.sdf-eu.org/hannes/code/mpd-0.11.2-tremorSupport-1.0.
With the Tremor library, the resulting executable is slightly smaller, but most importantly it plays Vorbis OK (with about 50% CPU).
Now the resulting sound quality is not that great, tho. Also I don't know yet how well the poor BCM4710 will handle the load when there's some actual network activity at the same time. So I'm not yet sure whether I'll get the external drive to place my music on it.
Still, print/ntp/dns/http/mpd serving with such a little box is quite respectable (oh and it does the routing and the wireless too).
BTW, this is all with Oleg's firmware and without using the flash disk as root partition nor as swap. It seems I still have some memory free (I killed lpd, waveserver, rcamd, p9101d, and telnetd (BTW: why isn't there a /var/run/telnetd.pid and neither is there one for waveserver (as opposed to waveservermain)?)). Would it be worth it for me to use a swap partition on my flash drive? And/or to use my flash drive as root partition?
I'm not using an MS products, so the waveserver seems useless (given the lack of documentation). Also I'm not convinced I want to store my music on some remote computer. My wl500g is the only computer that's always ON, so it makes sense to keep as much stuff there as possible.
In the end I decided it would be good to try and install musicpd.
So I bought a cheap USB audio dongle (about CDN$30).
It's connected to a hub where I also connect my printer and a flash storage (for my experiments: if it works well, I'll get an external harddrive instead).
There's an ipkg for musicpd, so I tried to install it with ipkg.sh, but it didn't work (ipkg.sh issued various warnings/error messages along the way, especially about incorrect parameters passed to `sed', but in the end things seemed pretty much installed at the right place): the package needed a libgcc_s.so (or something like that: I don't have the exact message at hand) which is probably distributed with OpenWrt but not with Oleg's firmware.
So I compiled it by hand. I still had the cross-compiler I used to compile my NTP server, so I decided to try and use that one (dates back to 1.7.X.X days).
I started by compiling the following packages:
- libao-0.8.6
- zlib-1.2.3
- libogg-1.1.3
- libvorbis-1.1.2
- mpd-0.11.5
(most of my songs are in Vorbis format so I needed that)
All of those libs have been statically linked into the resulting `mpd' executable (about 700KB).
When I installed it, it didn't work. Several problems:
- libao's oss driver is a dynamically loaded plugin but the build procedure relies on libtool for that and for some reason this didn't work (maybe I'd need a cross-compiler version of libtool). So I hacked the source to statically link the oss "plugin".
- the default mpd.conf used /dev/mixer rather than /dev/sound/mixer. Also it used the "PCM" rather than "Pcm" volume control, so the volume control didn't work.
- my card only takes 48khz streams, so I had to add a line in mpd.conf.
- I hadn't plugged my cables correctly (yup, that's right, I'm an idiot).
- the poor BCM4710 was not up to decoding Vorbis (MP3 is OK with about 65% CPU).
Luckily I bumped into Tremor, so I installed it from http://svn.xiph.org/branches/lowmem-branch/Tremor.
Then mpd needed a patch to use the Tremor library. Luckily someone else wrote this one already: http://reich.sdf-eu.org/hannes/code/mpd-0.11.2-tremorSupport-1.0.
With the Tremor library, the resulting executable is slightly smaller, but most importantly it plays Vorbis OK (with about 50% CPU).
Now the resulting sound quality is not that great, tho. Also I don't know yet how well the poor BCM4710 will handle the load when there's some actual network activity at the same time. So I'm not yet sure whether I'll get the external drive to place my music on it.
Still, print/ntp/dns/http/mpd serving with such a little box is quite respectable (oh and it does the routing and the wireless too).
BTW, this is all with Oleg's firmware and without using the flash disk as root partition nor as swap. It seems I still have some memory free (I killed lpd, waveserver, rcamd, p9101d, and telnetd (BTW: why isn't there a /var/run/telnetd.pid and neither is there one for waveserver (as opposed to waveservermain)?)). Would it be worth it for me to use a swap partition on my flash drive? And/or to use my flash drive as root partition?