OpenWrt Forum Archive

Topic: white russian rc5 and usb audio ?

The content of this topic has been archived between 12 Apr 2018 and 25 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

First of all, great work.  RC5 installed without a hitch on my WRTSL54GS.   I've got USB installed (should be working according to dmesg, haven't tried connecting a disk yet). 

  I just have one question -- what's up with usb audio? 

  I checked the forums, and I've gotten lots of wild goose chases. . . packages that don't exist anymore, package sites that don't exist, etc.   Specifically :

http://wiki.openwrt.org/UsbAudioHowto?h … 28HowTo%29  indicates that audio is only available in Kamikaze and higher. . .

http://mpd.wikicities.com/wiki/OpenWRT_FullInstall (link from the above howto) talks about an alternate release (http://downloads.openwrt.org/people/nbd … s2-4MB.trx), which doesn't exist.  It also points at an ipkg repository that's gone :
src nico http://downloads.openwrt.org/people/nic … 4/packages
src nico-testing http://openwrt.org/downloads/people/nic … l/packages

  I'm hoping that the first post is wrong and someone can point me at some audio packages before I run off and build it myself!

  Thanks in advance,
Matt

I'm in the exact same boat here. I've installed WhiteRussian RC5 on my WRTSL54GS and things are working great.  What a slick system!

However I want to try USB audio and have found the same few documents related to it.  The ipkg repository from "nico" seems to have changed since the docs were written.  Do we need to build our own firmware and include soundcore, alsa, etc?  Should we build a custom WhiteRussian or do we need to go with Kamikaze?  Please forgive me if I've missed something obvious in the docs but I'm not sure how to proceed and I'd like to avoid bricking my router.  smile

Any help would be greatly appreciated!!  Thanks.

I took the same trip through the forums and packages (real and non-existant) to get USB audio to work on my WRTSL54GS.

I tried the package mentioned by "LittelIdiot" and even with the authors help couldn't get it to work.

I tried several USB audio devices (dongles, etc) and while they were recognized as USB devices attached to the hub, the system said there were no drivers for the device. (and I did try them directly attached with the same result and "system unit Linux" deals with them just fine).

If I tried to use them anyway, mpg123 (and other audio players) said there was some kind of "pipe" error. (to be expected with no drivers!)

So, for the time being, I gave up.

All other USB devices I tried, worked fine.

One can only hope that rc6 has USB audio support as well as UPnP in some supported way.

Jim

Thanks for the link LittleIdiot.  I was finally able to get the USB audio working on my WRTSL54GS.  I am using a $20 USB audio adapter from Radio Shack (CMedia chipset).  I installed the packages and loaded the modules as described in the section for Polypaudio ... except I left out Polypaudio and went with mpd from the RC5 backports repository.  Had a few little roadblocks to overcome (eg: I had to reference /dev/sound/dsp instead of the default /dev/dsp) but not too bad.  Using a remote CIFS fileshare to store my music and the web-based console phpMp2 from musicpd.org, this makes for a pretty sweet setup!

Ah, good news. So, superkaybee, it sounds like you used the *.o from that link? Or did you build them yourself for RC5? Other roadblocks to expect?

Now I am able to reproduce obrienj's broken pipes :-(
Is OSS the right choice at all?
superkaybee, can you post some specifics? would be so great!

Sorry for the delay with my response.  It took a bit of playing around but I got it to work as follows:

- use 'lsusb' to verify that the device has been detected

- add a few new sources to /etc/ipkg.conf:

src backports http://downloads.openwrt.org/backports/rc5
src sebek http://sokrates.mimuw.edu.pl/~sebek/openwrt/packages

- install packages:

ipkg install alsa-utils
ipkg install libpthread

- extract the audio kernel modules from sebek's link above:

wget -P /tmp http://sokrates.mimuw.edu.pl/~sebek/ope … 2.4.30.tgz
cd /lib/modules/2.4.30
tar -zxvf /tmp/kernel-modules-sound-usb-2.4.30.tgz

- create /etc/modules.d/70-snd-usb-audio:

soundcore
snd-page-alloc
snd
snd-rawmidi
snd-hwdep
snd-timer
snd-pcm
snd-mixer-oss
snd-pcm-oss
snd-usb-lib
snd-usb-audio

- reboot and make sure the modules loaded correctly by doing an 'lsmod'
- install mpd using ipkg:

ipkg install mpd

- update /etc/mpd.conf by configuring OSS for output and mixer:

# OSS Output
audio_output {
    type            "oss"
    name            "my OSS sound card"
    device          "/dev/sound/dsp"
}

# OSS Mixer
mixer_type              "oss"
mixer_device            "/dev/sound/mixer"
mixer_control           "PCM"

- give mpd a try!

(Last edited by superkaybee on 20 Jul 2006, 03:20)

Yes, the method here described works but... what a poor quality!

I'm using the same setup that works great with Oleg's custom firmware (http://wl500g.info) and there's no way to compare the results. Here on openwrt the audio quality is worse than a crappy old radio. Unfortunately, I must say, since I liked openwrt a lot, but for multimedia use (like standalone music player), Oleg's firmware works perfectly.

Let's hope the audio will be supported properly in future firmware releases...

Ping

hmm, you must be doing something wrong. usb audio works perfectly fine for me ever since I've installed it. The only problem was that the usb audio stick didn't like the USB 2.0 hub, but as soon as I put in on USB 1.1 hub or directly onto the asus usb port, it works great. I'm not using alsa, just straight OSS.

Interesting. Do you think it was your Audio Stick that didnt like the Hub? Or maybe OpenWRT that didnt like USB1.1 devices in USB2 Hubs?

Mmmm.. i  made my test connecting the audio stick directly to the router. My experience with Oleg's firmware is that through an hub it would not work, so i didn't even considered it. Then I guess the sound card might be responsible for the bad audio, maybe it's not properly recognized..?
I'm using this one from Conrad (in case you are german or you know Conrad) here is the link:

Hama Usb 5.1 Audio Konverter: http://www.conrad.de/goto.php?artikel=991625

What did you use?

Ping

Clarity: I had a similar problem with my USB sound card and USB hub.  This discussion helped me out:

http://forum.openwrt.org/viewtopic.php?id=5973

I ended up unloading the USB2 driver (actually just removed /etc/modules.d/60-usb2) so everything was USB1.1 speed which is just fine for the USB sound card and my USB remote.  Speed might be an issue if you've got USB storage too.

It seems that I have to get a USB1.1 hub. Unloading ehci-hcd or equivalently removing 60-usb2 will result in loosing my USB harddrive. usb-storage remained untouched of course. It just vanishes but is immediately available as soon as I insmod ehci-hcd. *sigh*

May I ask  dumb question...
What exactly is the purpose of having USB audio?
What are you doing with it?

ok...three questions smile

canadiantrend:

I am not sure. I've tried two different usb audio sticks, and they both behaved the same. Seems to be a Linux issue, as XP has no such problem with the same hardware. But with 1.1 hub it all works perfectly.

24jedi:
as for what I'm doing with it - i'm using my router sometimes as an mp3 player, when I don't want to have my computer on and just want the music. I can control it via a web interface that's accessible from internet and therefore also via my cellphone.

Got it.

Thanks guys, even with your help it took me awhile to figure out the details. The necessary info is all in this forum/wiki - you 'only' have to put the pieces together.
But its great to be told that it is possible at all :-)

As for why I wanted to have it: a combination of
a) crappy radio stations, but a nice collection of own music (in mp3),
b) no PC that runs all the time,
c) instead Ive only a laptop that is conected wirelessly,
d) cable-modem with the cable coming into the house in the living-room
e) so: no cables, no noise except for the harddrive
f) with the same setup I can share my photos

so now I can just tune into my my shuffle playing jukebox anytime!


superkaybee: what kind of remote are you using? and how? lircd+homebrew, bluetooth-dongle? does mpd allow to be remote-controlled?
actually I have a USB-infrared-receiver flying around here - would be cool for skip, pause, playlist-skip...

This might also be a nerd-worthy solution: http://www.dslinux.org/wiki/DSLinux_as_Terminal

CT: I picked up this USB remote (http://www.thinkgeek.com/computing/accessories/5a20) from ThinkGeek, very reasonable.  I'm using the lirc 0.8x package provided in this thread:

http://forum.openwrt.org/viewtopic.php?pid=21216

Note that I had to download the OpenWrt SDK and compile the driver for the Streamzap (lirc_streamzap.o).

Then I setup lirc to use Nathan True's simple 'mpc' script to send the needed commands to mpd.  His site below has some very helpful stuff:

http://devices.natetrue.com/musicap

Thanks all. I just tried this and got mpd working on my WRTSL54GS. The sound quality is fine.

The only problem I have is that the audio is missing for about the first 4 secs of a track, and the audio continues for about 6 secs after I press the pause button. I tried changing the mpd buffering options and also tried a different USB sound card, but with no effect.

Any ideas what the problem might be? If it's any help, I'm also running mpd on a wl500-g deluxe, with nico's kmod-soundcore and kmod-usb-audio and don't have the problem on that!

Just to update. I solved my audio buffering problem by using the audio.o module from my wl500-g deluxe instead of the snd-* modules.

After having been away for a month, reviewing all of the posts on this subject, and doing a clean install, I have concluded that the following will NOT work.

A WRTSL54GS with a USB2.0 hub with a C-Media based audio dongle running RC5 with only USB 2 support and the software/install outlined by superkaybee.

On this setup, my USB2.0 hard-drive works fine, the dongle light comes on, /dev/sound/dsp, etc are created as well as some /dev/snd devices, lsusb tells me about the dongle, but the log simply says it is there and connected to a port.

If I try to run mpg123, the log shows messages about a failed datapipe on urb0 err = -89 and no audio output.

Is my conclusion correct or did I make some kind of oops?

Jim

nbd,

Not being familar with the site you reference, do I assume you are referring to the file "kmod-usb2_2.4.30-brcm-3_mipsel.ipk" at that site?

Is that the only file/package to be installed?

Jim

usb-core as well and (if you're using it) usb-storage

nbd,

Thank you for the pointers and the really great product. 

If my retirement didn't take up so much time (golf, grandchildren, and all that) I'd offer to get involved and resume writing code. 

But to the situation at hand.

I installed kmod-usb2, kmod-usb-storage, and kmod-usb-core from the referenced site and rebooted.

My usb hard drive continues to work BUT the audio still does not.

A little more detail, the error is "kern.err kernel ALSA usbaudio.c:830 cannot submit datapipe for urb 0, err = -89"

It seems to repeat for each frame that mpg123 is trying to send to the audio device /dev/sound/dsp.

Anyone have any thoughts or do I just buy a Linksys WMB54G and do it that way if I can figure out what exactly the windows virtual audio utility sends to it.

Shame really, I was really hoping to be able to use the WRTSL54GS to stream audio from my favorite classical station.

Jim