Dapper Sound System broken by plugging in a Webcam

Bug #48377 reported by Sven Herzberg
34
Affects Status Importance Assigned to Milestone
alsa-utils (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

I bought a webcam some time ago, now I attached it to my computer and it works fine. But there's a really big problem for me right now.

As both the webcam and the sound card of the computer are accessed by alsa, I have two alsa devices: hw:0 and hw:1

Unfortunately the assignment of these devices seems to change with every reboot (I didn't check this behaviour, but I have the feeling that one day it works and one day it doesn't).

So, please provide a solution for

a) keeping the sequence of detetion the same with every reboot
b) provide a way to specify the alsa device for the gstreamer alsa sink by something different than the "hw:0" name

Revision history for this message
Sven Herzberg (herzi) wrote :

Changing to major as this makes listening music not really user friendly.

Revision history for this message
Sebastien Bacher (seb128) wrote :

reassigning to alsa, gst doesn't decide of the devices order

Revision history for this message
Hasta Manana (manhasta) wrote :

I can confirm this bug. Computers with more than one sound card (in my case ESI Juli@ and SAA1734) get random sound device list order. This is extremely annoying. I had to come up with this to make sound on my tv-tuner to work:

sox -r 32000 -w -t ossdsp /dev/dsp`arecord -l | grep '^card [0-9]: SAA7134' | awk '$2 == "2:" {print "2"}'` -t ossdsp /dev/dsp`aplay -l | grep '^card [0-9]: Juli \[ESI Juli@\], device 0:' | awk '$2 == "2:" {print "2"}'`

because sound devices interchange between /dev/dsp and /dev/dsp2 randomly at reboot. Also, it affects the 'Default sound card' setting in sound preferences.

Revision history for this message
Daniel T Chen (crimsun) wrote :

(Dropping Importance. Sorry, but a usability bug, while extremely annoying, does not constitute an Importance of the extremity of a system crash.)

If System> Preferences> Sound> Default sound card's drop-down menu is not working properly, that's a bug in the gnome-control-center source package.

alsa-utils in Dapper includes the asoundconf(1) utility that gnome-control-center's Sound applet invokes to perform the background task. If you find using asoundconf(1) [see the set-default-card convenience macro] remains utterly ineffectual, then you can forcibly set one driver to /not/ be the default (i.e., not grab index 0).

Let's take the example of my computer, which uses the snd_intel8x0 and snd_usb_audio drivers. (While asoundconf(1) works for me, for the purposes of this illustration I'll pretend it doesn't work.) Let's say that I really want my onboard sound chipset to be the secondary instead of the primary, since my M-Audio Transit USB is a "much better"/preferable device. In this case I would issue the following command:

$ echo "options snd_intel8x0 index=-2" |sudo tee -a /etc/modprobe.d/alsa-base

The above command effectively forces the snd_intel8x0 driver to not grab the first available index in the presence of other drivers.

So -- what info is needed for you guys? Please /attach/ (don't comment inline) the output from ``lspci -v && cat /proc/asound/cards''. Also indicate which of the cards you wish to use as the primary one and whether asoundconf(1) [with the convenience macro mentioned above] works when you invoke it by hand and restart ALSA apps (this does not affect OSS emulation).

Changed in alsa-lib:
importance: High → Low
status: Unconfirmed → Needs Info
Revision history for this message
Sven Herzberg (herzi) wrote :

I cannot agree here. The "solution" that you explain here is a workaround, but I consider needing to fix this problem manually still a bug in Ubuntu.

Revision history for this message
Daniel T Chen (crimsun) wrote :

I'm not disagreeing that it's a bug (and even stated as much in my reply); I've encountered it myself using the System> Preferences> Sound control panel. I'm saying the workaround described above is viable until the developers have more time to troubleshoot.

Revision history for this message
Martin Pitt (pitti) wrote : Re: [Bug 48377] Re: Dapper Sound System broken by plugging in a Webcam

Hi,

Daniel T Chen [2006-06-17 19:03 -0000]:
> If System> Preferences> Sound> Default sound card's drop-down menu is
> not working properly, that's a bug in the gnome-control-center source
> package.

That was not stated by the reporter. I assume that the original
reporter never used this function in the first place. As soon as you
select a default card in the applet, then the default ALSA card will
be fixed (by setting it in ~/.asoundrc.asoundconf).

So, a random hotplug order is not something we can change, at least in
the short time. Instead, we could write a default .asoundrc in a login
session if none exists yet.

Martin

--
Martin Pitt http://www.piware.de
Ubuntu Developer http://www.ubuntulinux.org
Debian Developer http://www.debian.org

Revision history for this message
Daniel T Chen (crimsun) wrote :

There is now (as of Dapper) a system in place to use the more human-friendly string from ``asoundconf list''. Using asoundconf(1)'s convenience macro, set-default-card, will write an ~/.asoundrc.asoundconf that is resilient to changing device indices.

Please report whether it works in Dapper. If it doesn't, please try today's Edgy live cd.

Revision history for this message
Daniel T Chen (crimsun) wrote :

Fixed in Edgy. (Note this change makes people who want to use usb audio devices by default as card 0 unhappy.)

Changed in alsa-utils:
status: Needs Info → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.