usb audio driver can still be loaded first despite settings in /etc/modprobe.d/alsa-base.conf

Bug #483889 reported by Reuben Thomas
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
alsa-driver (Ubuntu)
Invalid
Undecided
Daniel T Chen

Bug Description

The file contains the lines:

# Prevent abnormal drivers from grabbing index 0
options snd-usb-audio index=-2

and yet snd-usb-audio grabs index 0, when snd-hda-intel should have been allowed to.

This problem has only started since I started attaching TWO devices which use the snd-usb-audio driver. Also, one of them is a webcam; I don't know if that somehow gets around the setting for the audio driver.

ProblemType: Bug
Architecture: i386
AudioDevicesInUse: Error: command ['fuser', '-v', '/dev/dsp2', '/dev/dsp1', '/dev/dsp', '/dev/snd/controlC2', '/dev/snd/pcmC2D0p', '/dev/snd/pcmC2D0c', '/dev/snd/pcmC1D0c', '/dev/snd/by-id', '/dev/snd/controlC1', '/dev/snd/by-path', '/dev/snd/controlC0', '/dev/snd/hwC0D0', '/dev/snd/pcmC0D0c', '/dev/snd/pcmC0D0p', '/dev/snd/pcmC0D1p', '/dev/snd/pcmC0D1c', '/dev/snd/seq', '/dev/snd/timer', '/dev/sequencer', '/dev/sequencer2'] failed with exit code 1:
Card0.Amixer.info:
 Card hw:0 'Intel'/'HDA Intel at 0x90440000 irq 22'
   Mixer name : 'SigmaTel STAC9221 A1'
   Components : 'HDA:83847680,106b0800,00103601'
   Controls : 19
   Simple ctrls : 11
Card1.Amixer.info:
 Card hw:1 'camera'/'USB camera at usb-0000:00:1d.1-1, full speed'
   Mixer name : 'USB Mixer'
   Components : 'USB045e:00f7'
   Controls : 3
   Simple ctrls : 2
Card2.Amixer.info:
 Card hw:2 'default'/'C-Media USB Headphone Set at usb-0000:00:1d.2-1, full speed'
   Mixer name : 'USB Mixer'
   Components : 'USB0d8c:000c'
   Controls : 7
   Simple ctrls : 3
Date: Mon Nov 16 23:14:11 2009
DistroRelease: Ubuntu 9.10
NonfreeKernelModules: snd_usb_audio snd_hda_intel aes_i586 aes_generic usb_storage binfmt_misc ppdev lp parport bridge stp bnep vboxnetadp vboxnetflt vboxdrv uinput usblp snd_hda_codec_idt arc4 ecb snd_hda_codec snd_pcm_oss snd_mixer_oss btusb applesmc snd_usb_lib snd_pcm ath5k snd_seq_dummy pl2303 gspca_sonixj gspca_main snd_seq_oss nls_iso8859_1 videodev v4l1_compat mac80211 usbserial snd_seq_midi snd_seq_midi_event led_class iptable_filter ath nls_cp437 snd_seq asix usbnet ip_tables x_tables snd_rawmidi snd_timer snd_seq_device snd_hwdep mii cfg80211 input_polldev snd soundcore snd_page_alloc vfat fat reiserfs usbhid fbcon tileblit font bitblit softcursor ohci1394 i915 ieee1394 drm i2c_algo_bit video output sky2 intel_agp agpgart
Package: alsa-base 1.0.20+dfsg-1ubuntu5
PackageArchitecture: all
ProcEnviron:
 SHELL=/bin/bash
 PATH=(custom, user)
 LANG=en_GB.UTF-8
ProcVersionSignature: Ubuntu 2.6.31-14.48-generic
SourcePackage: alsa-driver
Uname: Linux 2.6.31-14-generic i686

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

The proper way to fix this symptom is to use the slots parameter (passed to snd.ko):

options snd slots=,snd-usb-audio

(Yes, the leading comma is intentional.) However, using this syntax will aggravate people wanting their usb headsets to be the default/primary sound device (think non-PulseAudio users).

Changed in alsa-driver (Ubuntu):
status: New → Won't Fix
Revision history for this message
Reuben Thomas (rrt) wrote :

> The proper way to fix this symptom is to use the slots parameter (passed
> to snd.ko):
>
> options snd slots=,snd-usb-audio

Thanks for the fix, but why the fix in /etc/modprobe.d/alsa-base.conf? And why doesn't it work?

> (Yes, the leading comma is intentional.) However, using this syntax will
> aggravate people wanting their usb headsets to be the default/primary
> sound device (think non-PulseAudio users).

I'm a non-PulseAudio user.

--
http://rrt.sc3d.org
Radiance is the appeasement of myth (Adorno)

So why the fix in /etc/modprobe.d/alsa-base.conf? And why doesn't it work?

> (Yes, the leading comma is intentional.) However, using this syntax will
> aggravate people wanting their usb headsets to be the default/primary
> sound device (think non-PulseAudio users).

I'm a non-PulseAudio user.

Revision history for this message
Reuben Thomas (rrt) wrote :

Just to clarify: you seem to be missing the point here. There is already a fix to stop snd-usb-audio devices becoming the default device, and when I only have my usb headset plugged in, it works fine. But when I also plug in my webcam, it stops working.

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

Point taken, but I don't think I'm missing your point at all. The bug actually lies in the index masking, and using the mask is actually deprecated (although undocumented as being deprecated, which is another bug. Sigh). Upstream wants everyone to use the slots parameter; index may be removed RSN.

Changed in alsa-driver (Ubuntu):
assignee: nobody → Daniel T Chen (crimsun)
status: Won't Fix → Triaged
Revision history for this message
Reuben Thomas (rrt) wrote :

I sense I am not being very clear, so I will try once more:

As I initially reported, alsa-base already ships /etc/modprobe.d lines that claim to prevent snd-usb-audio devices becoming the default sound device. As I also reported, this works when I have only one snd-usb-audio device, and fails when I have two, one of which is a web cam.

You say that "The proper way to fix this symptom" is [some other way]. But that doing this will "aggravate people wanting their usb headsets to be the default/primary sound device".

Hence, are you suggesting that the current line in /etc/modprobe.d/alsa-base.conf

options snd-usb-audio index=-2

should not be there, as this also prevents (at least, in some situations) a USB headset from being a default/primary sound device?

It seems there's at least one point to clear up here before the bug is closed, as if the order should not be messed with at all, then it follows that the current line should also be removed.

Revision history for this message
Reuben Thomas (rrt) wrote :

Right, so a) I should apply your fix and b) the lines giving option index=-2 should be removed?

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

Yes, and yes. I'll be making the changes to alsa-driver's source package shortly, but they may not be uploaded to Lucid for a bit due to the developer summit occurring this week.

Revision history for this message
Reuben Thomas (rrt) wrote :

With kernel 2.6.31-16, a recent update, the fix

options snd slots=,snd-usb-audio

doesn't seem to work any more: my USB devices once more get sound slots 0 & 1, and the built-in sound card is relegated to 2!

Brad Figg (brad-figg)
tags: added: karmic
Revision history for this message
Marcus Tomlinson (marcustomlinson) wrote :

This release of Ubuntu is no longer receiving maintenance updates. If this is still an issue on a maintained version of Ubuntu please let us know.

Changed in alsa-driver (Ubuntu):
status: Triaged → Incomplete
Revision history for this message
Marcus Tomlinson (marcustomlinson) wrote :

This issue has sat incomplete for more than 60 days now. I'm going to close it as invalid. Please feel free re-open if this is still an issue for you. Thank you.

Changed in alsa-driver (Ubuntu):
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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