[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
esound supporting audio streaming over the internet?
I would like to stream the audio input from an USB microphone (attached on WL500gP) over the internet to an appropriate client. Is that possible with esound? If not, how would that work? any working ideas welcome.
many thanks in advance!
Running esound without usb-stick
This weekend I installed Vista with the new WMP 11. Apperently there is a problem with the asus speaker plugin, so I decided to use the esound daemon with winamp instead. The usb-flash boot procedure didn't work for me, I guess a powered usbhub is required, so I decided to build a custom firmware instead. It's a very simple hack, and works perfectly for me:
First build the oleg 1.9.2.7-7g firmware as explained in the wiki: http://wiki.wl500g.info/index.php/co...customfirmware
Enter the broadcom/src/gateway/others folder and get esd:
Code:
$ wget http://home.in.tum.de/%7Epustka/mipsel/esd
$ chmod +x esd
Delete or rename the binary file waveserver in others.
Create a new file named waveserver with this content:
Code:
#!/bin/sh
/usr/sbin/esd -d /dev/sound/dsp -tcp -public &
Make it executable:
Code:
$ chmod +x waveserver
Finally, open the Makefile in the gateway folder and search for the string waveserver. There will be a comment saying something like: Asus binary crap :). Copy the line with "waveserver" and insert a new line where "esd" replaces "waveserver".
Compile with make image-WL500g.
Ofcourse esd will not be disabled when you select disable waveserver from webgui and apply (you will have to reboot to get that effect). But you wouldn't do this trick if you want to disable esd.
Hope someone find this useful. Cheers
1 Attachment(s)
What is the main idee for this project?
Hi,
what is the main idee for this project?
Do you connect a USB-Sound-Card on your Router?
And than connect analog Sound-Cable from the PC-Sound-Card-Line-Out to the USB-Soud-Card-Line-In?
I habe build this Project HowTo WL-HDD + USB-Sound-Hub als MP3-Player mit PDA-Fernbedinung http://www.wl500g.info/showthread.php?t=12042
Can you make a picture of your Hardware?
Is it the same like yours?
By.