Posted: Mon Sep 06, 2010 21:49 Post subject: [SOLVED] - USB Audio for Broadcom DD-WRT devices
USB Audio device support for Broadcom devices running the 2.6 kernel builds.
[SOLUTION]
Step 1) Install DD-WRT
1.Load up the router with a current mega build of dd-wrt.
Step 2) Modify the default configuration after a 30/30/30 reset.
1.From the DD-WRT web interface select the Services tab and then the USB service tab
◦Enable all the USB options, and select /opt in the drop down list for the Disk Mount Point. Click [Apply]
2.Plug in your USB 2.0 powered hub to the router USB port.
3.Plug in your USB audio device into the hub. ***Remember to also connect a set of speakers/headphones at some point as well.
Step 3) Partition Setup for OTRW
Take special care to setup your storage device correctly prior to installing OTRW;
1.Follow the guide in this article to setup the USB HDD with the correct partitioning, correct order and file-system formats
2.Once you USB drive is ready plug that into the USB hub as well. The port you select on the USB hub should be the same one used for the Optware install from that point on.
Step 4) Install OTRW
1.Login to the router console and run the following commands to begin the download and install of OTRW.
#1 Downloads the OTRW install script
#2 Starts the install script
1. wget -O /tmp/prep_optware http://wd.mirmana.com/prep_optware
2. sh /tmp/prep_optware
3. 20 or so minutes later the install will complete. Wait 3 minutes more then type reboot.
4. This time when the router boots it will load the OTRW from the USB drive after its normal startup. Optware like an addon needs 2-3minutes to load completely after the routers network comes back online. Be patient
Step 5) Turn on the sound service
1. Login to the router console and Turn on the OTRW sound service by using the commands
Code:
service soundmodules on
service soundmodules start
[VERIFY IT WORKED]
after reboot if all went well the dmesg command will show;
usbcore: registered new interface driver snd-usb-audio
also you can tell its working due to the /dev/sound/dsp item being created.
[ADDITIONAL STEPS]
4 - Seems you have to create a symbolic link as well. This is so the default config for audio players will work. They most seem to look for /dev/dsp; (This has to be repeated after every reboot) So I put it in the start up script in the Commands section of the webinternface and it seems to work after a reboot every time.
Code:
ln -s /dev/sound/dsp /dev/dsp
5 - A very import step is to install an audio player that can use the newly install usb audio device.Also equally important as the player is to install any audio library packages needed for the various audio formats and features in your personal collection.
The console based audio player I used is called moc and one called mpg123 and it seems to work with some success. ( It plays at least)
Then from the console change directory to the location where your mp3's/audio files are. To play a file try this command..
mocp <filename>
mpg123 <filename>
example code
Code:
mocp BobMarley.mp3
You should get a blue screen (see screen shot attached) with the file displayed on the right on side (think of that right side as your live playlist). The left side is the file-system navigation so you can browse to files and queue them up etc..
[NOTES]
you can test that ALSA is working by running the commands;
amixer
aplay
@Frater
Is there anyway that you can include some or all of these adjustments to your soundmodules service?
EDIT: Better question can someone tell me how I can verify if they wil work in the k26 dd-wrt? _________________ Location (urban) - 1x Linksys EA8500 (AP wlan0 & wlan1 enabled)
1x Asus 68u (Repeater Bridge w/VAP) - wl0 disabled
1x Asus 87u (Client Bridge) - wl1 disabled
I am looking to also use my USB port (610N v1) to get audio streamed from my PC.
Can you please tell me if you managed this and if so - how exactly?
Many thanks
Matt
I'm still working on it. I've found a USB audio device that I'm goign to try and use.
Step one is to get Optware the Right way up and running on your router/ USB hub and flash drive ( partitioned and formatted) and then you will be on your way....
install vlc...
"ipkg-opt install vlc "
then come back and let me know how you did and I hope by then to have the usb audio dongle and see if I can get it to play locally first using some wired speakers. _________________ Location (urban) - 1x Linksys EA8500 (AP wlan0 & wlan1 enabled)
1x Asus 68u (Repeater Bridge w/VAP) - wl0 disabled
1x Asus 87u (Client Bridge) - wl1 disabled
But I already have the 610N in the same place so don't see any point buying more hardware if I don't have to.
I'll see how I get on with the Optware and let you know. Please let me know about the USB hub and if I need it
Thanks
Matt
The 610n has a single USB port.
To stream Audio to a set of BT speakers you will need the following connected to your router;
1x USB FLASH Drive to run Optware and the apps
1x USB Audio dongle (for a sound card for the router)
1x USB Bluetooth dongle ( To stream the music to the BT speakers)
1x USB External HDD to host all the media files.
A 4 port powered USB 2.0 HUB is needed and the devices listed above. _________________ Location (urban) - 1x Linksys EA8500 (AP wlan0 & wlan1 enabled)
1x Asus 68u (Repeater Bridge w/VAP) - wl0 disabled
1x Asus 87u (Client Bridge) - wl1 disabled
ah ok. I don't want to stream over bluetooth, just straight into my HIFI next to the router.
It's cheaper for my to just by that crappy Asus router and follow the guide on youtube. 25eur here, which is less than it will cost for all the other kit to get the 610N working
ah ok. I don't want to stream over bluetooth, just straight into my HIFI next to the router.
It's cheaper for my to just by that crappy Asus router and follow the guide on youtube. 25eur here, which is less than it will cost for all the other kit to get the 610N working
No Bluetooth streaming, no problem. Just remove the Bluetooth USB dongle from the setup.
The guide on youtube is building a solution based device with much different limitations then the setup listed above.
I'm trying to use my router as my central device for Hosting the following services and deviecs over the WAN/LAN without the need for any additional computers;
-shared usb printer/scanner over the LAN
-my media (Mov's/Pics/Songs)
-NAS/Samba for a small file server (samba 3.5HDD)
-FTP Server (proFTPd)
-HTTP Server (lighttpd)
-Audio server (Wired and nonWired aka BlueTooth) _________________ Location (urban) - 1x Linksys EA8500 (AP wlan0 & wlan1 enabled)
1x Asus 68u (Repeater Bridge w/VAP) - wl0 disabled
1x Asus 87u (Client Bridge) - wl1 disabled
The missing key, from the research I've done, is the sound drivers (soundcore.ko, and about ten snd-*.ko files). Some indicate that these should be included with the ALSA Optware packages, but none (unless I'm doing something wrong) are installed with the two at www.dd-wrt.com/wiki/index.php/Quick_list_of_Optware_packages. Many support files are written, but none of the needed .ko files.
I'm a newcomer to Linux, not sure about 'cross-compiling your own'. Trying to find functional binaries. (Will post here if/when successful.)
Seems like more people would be interested in getting sound operational.
Posted: Wed Dec 08, 2010 18:54 Post subject: Sound with DD-WRT
A little more information, the progression of searching for a solution to Sound with DD-WRT:
1. Get Optware. Install both ALSA packages referenced above. No drivers (soundcore.ko, etc.) are present. Sound cards are not recognized.
2. Go to the USB drivers | Audio section of the DD-WRT USB page, www.dd-wrt.com/wiki/index.php/USB#Multimedia. One date mentioned is "1997." (Some of the material seems to be woefully outdated.) All links given there lead to dead ends (some included below).
3. Search Internet for existing usb_sound modules. Some are found, both 2.4 and 2.6 versions. None work.
A. All attempts to get the (current) 2.6 kernel to use the older 2.4 drivers (which apparently DO work on 2.4 builds) fail with "No module found in object" error. (Though a good command of Polish could lead to better results. :^)
B. The latest sound modules available are 2.6.22.xx, which do not run on the 2.6.23.xx and higher versions. Notes:
Oleg (the famous -- only needs one name, like 'Sade' or 'Elvis' or 'Brainslayer') posts the most up-to-date pre-compiled kernel modules for the wl500g here: http://code.google.com/p/wl500g/downloads/list. Attempts to use these first causes a vermagic error, then when one edits the '2.6.22.19' directly in the binary to '2.6.23.17' so that it might load (This method sometimes works!), the error messages are, for example:
Code:
soundcore: Unknown symbol request_module
soundcore: Unknown symbol kmalloc_caches
Conclusion:
If a Linux guru would be willing to build and post the needed sound modules, an abundance of testers could assist in the debug. Failing this, there won't be sound with DD-WRT: no Jingle Bells, no O-Tanenbaum, just silence.
it requires some fiddling to figure out the correct order of 'insmoding'... but it works ;)
I can't believe that nobody could compile it... it took 15 minutes to get the modules done!
Enjoy!
UPDATE:
- created ipkg
install and reboot
you might want to get mpg123 and some music to test it...
UPDATE 2: - modified startup script to add ALSA dev creation
Thus: ALSA is now working what means BETTER QUALITY!
Also, AMIXER is working! (did not manage to get ALSAMIXER to work) anyway both the programs are essentially the same.
I have no use for it, but just finished some simple supporting scripts.
OTRW will download the modules and place them in /opt/lib/modules/2.6.24.111
They can be started with 'service soundmodules start' and made autostart with 'service soundmodules on'
if [ -z "$1" ] ; then
case `echo "$0" | sed 's:^.*/\(.*\):\1:g'` in
S??*) rc="start" ;;
K??*) rc="stop" ;;
*) rc="usage" ;;
esac
else
rc="$1"
fi
# Start/Stop/Status samba
case "$rc" in
status)
lsmod | grep -e snd -e sound
;;
start)
KERNEL=`uname -r`
if cd /opt/lib/modules/$KERNEL ; then
optlog "${SCRIPT}" "inserting soundmodules"
/sbin/insmod soundcore.ko
/sbin/insmod snd.ko
/sbin/insmod snd-seq-device.ko
/sbin/insmod snd-page-alloc.ko
/sbin/insmod snd-rawmidi.ko
/sbin/insmod snd-timer.ko
/sbin/insmod snd-pcm.ko
/sbin/insmod snd-usb-lib.ko
/sbin/insmod snd-hwdep.ko
/sbin/insmod snd-usb-audio.ko
/sbin/insmod snd-mixer-oss.ko
/sbin/insmod snd-pcm-oss.ko
cd - 2>&1 >/dev/null
fi
;;
*)
echo "Usage: $0 (start|status|usage)"
;;
esac
exit 0
_________________ Asus RT16N + OTRW
Kingston 4GB USB-disk 128 MB swap + 1.4GB ext3 on /opt + 2 GB ext3 on /mnt
Copperjet 1616 modem in ZipB-config
Asterisk, pixelserv & Pound running on router
Another Asus RT16N as WDS-bridge