[HowTo] Streaming audio from Winamp/XMMS/etc.
I recently invested some time in getting my WL-500g router to wirelessly play audio from Winamp, and I'd like to share this information with everybody, as I couldn't find much about this topic in the forums. The whole text is also available on this web page.
Installing EsounD on the WL-500g
For receiving sound streams on the router and playing them on the USB sound card, the well-kown EsounD daemon is used. You can either install it as an ipgk from Unslug or download the binary file from this location:
EsounD daemon binary:
esd
Before starting it, the default ASUS sound server (useable only from Windows Media Player) needs to be killed, as it occupies the sound card:
Code:
killall waveservermain
killall waveserver
Then the esd daemon can be started:
Code:
esd -d /dev/sound/dsp -tcp -public &
Connecting to the soundcard from a client computer
If you are running Linux, you can use an audio player like XMMS or amaroK, choose an EsounD output plugin (gstreamer in case of amaroK) and enter the server's IP address.
In order to connect to the EsoundD server from Windows, Kasper Laudrup has a nice EsounD output plugin for Winamp available at his site. Note that for Winamp 5 you need to download the Winamp 2 version, not Winamp 3. At the bottom of this page, there also is a link to an updated version, which includes better resampling.
Special issues with the Audigy 2 NX
If you have a Soundblaster Audigy 2 NX USB soundcard, some extra work has to be done as this one is not completely behaving like a normal USB soundcard. However, at least on Windows this is an excellent sound card, and it has a very good signal quality.
Updated kernel module
Note: the patch is included in the firmware from version 1.9.2.7-7b on, so it is no longer necessary to replace the module
The standard ASUS usb soundcard driver does not work with an Audigy 2 NX, so I had to patch it. Now it seems to run pretty stable. You can download the updated kernel module here:
binary module (compiled for 1.9.2.7-6b firmare):
audio.o
patch for the original kernel code:
audio.c.diff
To install the module, either replace the file in /lib/modules/2.4.20/kernel/drivers/usb/ (if you are running off a USB drive) and reboot or download it to some other location and exchange the module in the kernel with the following commands:
Code:
rmmod audio
insmod audio.o
Resampling
In case the soundcard uses a different sampling rate than your sound files, the esd daemon on the router will automatically resample the audio stream. Normally this should be no problem, as esd by default runs at 44100Hz, which also is the sampling rate of most MP3/Ogg/AAC/... files and therefore no resampling should happen. However, if you have an Audigy 2 NX, esd will only run at 48000Hz. Now the problem is that esd does a pretty bad job at resampling which results in audible loss of sound-quality, especially at high frequencies.
The solution was to modify the esd Winamp plugin to automatically resample to the server frequency using the Secret Rabbit Code library, which provides much higher conversion quality. The updated Winamp2/5 plugin is available for download at the following location:
To install, just copy the dll into the Winamp/Plugins directory and configure the plugin from Winamp preferences.
Of course, you use the information given here and the software available for download at your own risk. The author is not responsible for any damage it may cause to your computer or router.
Details on downloading and configuring
Quote:
Originally Posted by kristel
Can you please give me some detail information how to run the esound demon on wl500g and how to configure the winamp plugin.
I have download the esd binary, but what i shut do with it?
I assume that you are already running Olegs firmware, it won't work without. You need to open a telnet or ssh connection to the router (e.g. with putty) using the router's login name (admin) and the password. First, kill the waveserver as described in the first post.
If you are running from a usb memory stick or hard drive, I suggest to download esound using the ipkg program:
Code:
ipkg install esound
esd -d /dev/sound/dsp -tcp -public &
In case the router is not booting off a usb drive, you can download the binary directly using wget:
Code:
cd /usr/local
wget http://home.in.tum.de/%7Epustka/mipsel/esd
chmod a+x esd
and then start the demon with
Code:
/usr/local/esd -d /dev/sound/dsp -tcp -public &
Of course, the changes will get lost when the router is restarted, e.g. due to power loss. To keep the file permanently, you could save the file to flashfs, as suggested by WlanMan. For details, please see Olegs page. In this case, you also might want to create a post-boot script to start the demon automatically
The Winamp plugin (out_esd.dll) needs to be downloaded to the winamp plugin directory (e.g. C:\Program Files\Winamp 5\Plugins). Then, it is configured in the winamp preferences: (Ctrl-P)->Plugins->Output->Esound Output for Winamp. There, click configure. For the host, enter the ip or name of your router, by default "192.168.1.1" or "my.router". The port needs to be 16001. You could also change the password (must be 16 characters), but you need to restart the esound demon afterwards. From my experience, you also need to use the same password on all computers that should be able to access the soundcard.
Same problem, Somebody to help?
I have done everything as Daniel wrote.
Download was ok, but when I tried to start proces the answet is:
/dev/sound/dsp: No such file or directory
What might be wrong ??
-------------------------------------------------------------------------
Connecting to home.in.tum.de[131.159.74.1]:80
esd 100% |***************************| 90568 00:00 ETA
[admin@hobbiton local]$ chmod a+x esd
[admin@hobbiton local]$ /usr/local/esd -d /dev/sound/dsp -tcp -public &
[admin@hobbiton local]$ - using device /dev/sound/dsp
/dev/sound/dsp: No such file or directory
-------------------------------------------------------------------------
Stanislav