USB sound and linux

I am not looking for high performance sound. I also am not looking for sound capture. I just want to play video clips that seem to be popping up more and more often. I bought this thing (out of frustration and resignation) after not being able to get the sound built into my motherboard to work.

I can play CD's (and probably wav files) through it, but getting to work along with video clips in my browser still stumps me.

I went to my local in town computer store and bought a SIIG USB SoundWave 7.1. The price was around $20, maybe less. It is a little flat black USB dongle with a blue LED and a 1/8 inch headphone jack.

I am running Fedora Core 9 on an AMD system with a 2.6.26.6-79.fc9.x86_64 kernel.

When I plug the thing in, the blue light comes on and dmesg shows me the following lines:

usb 2-6: new full speed USB device using ohci_hcd and address 3
usb 2-6: configuration #1 chosen from 1 choice
usb 2-6: New USB device found, idVendor=0d8c, idProduct=0103
usb 2-6: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 2-6: Product: USB Sound Device        
usb 2-6: Manufacturer: C-Media INC.

The command cat /proc/bus/usb/devices yields:

T:  Bus=02 Lev=01 Prnt=01 Port=05 Cnt=02 Dev#=  3 Spd=12  MxCh= 0
D:  Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=0d8c ProdID=0103 Rev= 0.10
S:  Manufacturer=C-Media INC.
S:  Product=USB Sound Device        
C:* #Ifs= 2 Cfg#= 1 Atr=80 MxPwr=500mA
I:* If#= 0 Alt= 0 #EPs= 0 Cls=01(audio) Sub=01 Prot=00 Driver=snd-usb-audio
I:* If#= 1 Alt= 0 #EPs= 0 Cls=01(audio) Sub=02 Prot=00 Driver=snd-usb-audio
I:  If#= 1 Alt= 1 #EPs= 1 Cls=01(audio) Sub=02 Prot=00 Driver=snd-usb-audio
E:  Ad=06(O) Atr=09(Isoc) MxPS= 192 Ivl=1ms

All this is well and good, but how can I get this thing to make some noise (or better yet, noises that I want to hear)? Some fishing around in the /dev directory yield the following candidates:

What I do for a test is:

cat /dev/urandom >/dev/dsp7
This is pretty much "white noise", and I do this with a cable to the tuner input of my integrated amp, with the sound turned all the way down (at first on each trial), since I am no fool. The /dev/dsp7 choice yields the "sound of the ocean", whereas the other sound devices yield no output (through the USB device anyway, they are no doubt connected to the motherboard sound hardware that I could not convince to work the last time I had the time and energy to give it a try.

This is great if I want to copy wave files to a somewhat obscure device node, but this is not quite what I want to do. I dream someday of using my browser, and just starting up one of these online tutorials and hearing the sound. This would have been great when I did the online driver safety school without sound (on second thought, maybe it was just fine without sound). So now the question is how to make /dev/dsp7 my "default sound device".

Configuring linux sound

I use the Gnome desktop, so your mileage will vary if you use something else. At the time of this writing, I followed the menu path:
System > Preferences > Hardware > Sound
And got to a friendly little "Sound Preferences" dialog, and changed virtually every playback option offered from Autodetect to USB Audio.

After this, I went to:

System > Administration > Soundcard Detection
This wanted to run system-config-soundcard and prompted for the root password. However, this thing does not belong in a fedora core 9 system, and is a leftover from fedora core 8. Ultimately what I did was:
yum erase system-config-soundcard

Playing a CD

I insert a music CD, and try
Applications > Sound and Video > Audacious
This thing "just doesn't work". It has a nice tidy (spartan) interface, but clicking on the triangle-shaped play button produces no effect, so on to the next candidate.
Applications > Sound and Video > Rhythmbox Music Player
The interface seems unduly complicated, but at the bottom of the left section I see what looks like the title of the CD I inserted, and when I double click on this, music starts! After this, the play button works (the one I wasted so much time clicking on) and serves to start and stop the sound. Not bad.

Sound from my browser

Things grind rapidly to a halt here amidst broken glass and smoking wreckage.

I run firefox (2.0.0.17) on a 64 bit system. A quick check indicates that the videos that I can view so nicely yield no sound. A little bit of googling around lead me to believe that a lot of these videos (all or many of which are ultimately U-tube hosted) are being displayed via the flash plugin. At this time, on a 64 bit system like mine, these are being handled by a 32 bit flash plugin that is wedged into my 64 bit browser via the ndiswrapper. All of this may or may not be germane, but it does make me feel a bit edgy.

Google yields lots of advice, none of which has worked for me yet. It is said that the flash plugin tries to do sound via the older "oss" system, and can be tricked into working via any number of schemes. The first suggestion is to set an environment variable via:

export FIREFOX_DSP=auto
Another tip is to run firefox inside of aoss which is some kind of compatibility thing to trap old style oss calls and redirect them to the new (alsa?) sound system. The big problem here, is that there is nothing called aoss on my system, and it is not clear what package owns it that I should install. (Some more poking around indicates that the packages alsa-oss and alsa-oss-libs maybe be the ticket here, stay tuned.)

Another tip is to issue the command: asoundconf set-default-card default, but again there is nothing on my system called asoundconf and it isn't clear what package I might add to provide it, although this seems to be part of the old (is it old?) alsa sound system.

No joy as yet here in mudville.


Have any comments? Questions? Drop me a line!

Adventures in Computing / tom@mmto.org