Sound card configuration is a complete mess

Bug #77911 reported by Robert Persson
24
This bug affects 2 people
Affects Status Importance Assigned to Milestone
pulseaudio (Ubuntu)
Fix Released
Wishlist
Unassigned

Bug Description

Sorry about the dramatic summary above, but I don't know how else to describe it. The problem seems to be a combination of inadequate software and inadequate documentation.

A while back I installed dapper on a slightly old computer (a pentium 3 box of some sort) and found that the sound cards would be loaded in random order. I read stuff on the web about putting index=0 somewhere and index=1 somewhere else, but I never got the hang of it and in the end I simply set index=-2 for the internal sound card so that at least something would work.

More recently I installed dapper on a pentium 4 box and then upgraded it to edgy. But I got the same problem. Unfortunately I need both sound cards to work on this machine. I have tried editing /etc/modprobe.d/alsa-base in various ways and now have no sound cards working. I am not sure if I ever had more than one sound card working at a time on this machine since Ubuntu has been installed. Which card that would be appeared to be randomly determined at boot time.

One thing that really puzzles me is that the installer-created /etc/modprobe.d/alsa-base configured an emu10k1 card (which I do have - an Audigy2 to be precise) and a via something or other, which I definitely don't have (I have an ICH5 motherboard with an intel8x0 chip). As far as I remember this was the same setup it left me with on the older computer. In that case I had assumed this to be correct the machine really did have an emu10k1 device (some kind of soundblaster card) while I didn't know what kind of sound chip was on the motherboard and therefore assumed that the installer's selection of the via driver had been correct.

In the past, in other Linux distributions, I would use alsaconf to sort this kind of thing out and it never let me down. The removal of alsaconf from Ubuntu (and presumably from debian as well) has created a much bigger problem than it solves.

To summarise:
1. The installer incorrectly identifies one of the sound cards. Perhaps it doesn't identify them at all and creates a standard alsa-base file regardless?
2. Out of the box, the sound cards seem to load in random order.
3. There are no tools to fix this.
4. There appear to be no instructions readily available to enable even experienced computer users to fix the configuration files themselves.

What SHOULD happen is that configuration of sound cards should be AT LEAST as easy as in Windows. A user should never even have to think about such issues as which driver is going to load first at boot time.

Revision history for this message
Robert Persson (ireneshusband) wrote :

There is a confusing typo above:

"In that case I had assumed this to be correct the machine really did have an emu10k1 device..."

should read

"In that case I had assumed this to be correct because the machine really did have an emu10k1 device..."

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

Thanks for your bug report. Please use a concise summary in the bug report, as it helps us triage your report. Additionally, please file separate bugs for individual issues.

As you peruse the bugs for alsa-utils, please note that someone else has already filed one asking for the reinstatement of alsaconf. This is problematic and doesn't resolve the myriad issues, one of which is ISA cards not properly enumerating MODALIAS info, another of which is that alsaconf is the wrong tool to "configure your sound card" in the first place (alsaconf has not been removed from the Debian alsa-utils source package). The latter point is that udev and Linux need to be doing that. Requiring the usage of alsaconf is in itself a bug.

Moreover, we are working on a tool to simplify the configuration of machines with multiple audio chipsets. Currently one such Python script exists in rudimentary (but functional nonetheless) form, alsaconf. If its documentation is lacking, please file a bug, and we'll address that as quickly as possible.

If, at any time, a user needs to edit /etc/modprobe.d/alsa-base, it's a bug, so please state clearly in a separate bug report your hardware causing the situation. We have attempted to enumerate the most common problematic audio drivers in /etc/modprobe.d/alsa-base's latter half, but obviously this is insufficient. Please let us know your requirements for a tool that will help alleviate this issue.

Finally, let us trawl your report and separate the orthogonal issues that should be reported as such.

1) You appear to have a pci id (either {sub,}{vendor,device}) clash for the via82xx and intel8x0 drivers. I know of one such situation and am tracking it.
2) Having the hardware enumerated (and respective drivers loaded) in seemingly random order is problematic, but a tool/menu such as asoundconf (or GNOME's System> Preferences> Sound) will assist with working around that.
3) There exist tools, but they obviously can be improved. Please assist us with writing specifications/coding/testing.
4) There exists documentation, but it obviously can be improved. Please assist us with writing it.

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

(The Python script is, in reality, named asoundconf not alsaconf.)

Revision history for this message
Robert Persson (ireneshusband) wrote :

Please remember I am not an expert. I'm simply trying to set up a computer so my family can use it. I made the best bug report I could manage given that I wasn't clear where one problem ended and the next began. I can't spend a lot of time writing documentation because (a) I don't have that time and (b) I haven't got a clue how sound card configuration is supposed to work myself so I'm not in a position to explain it to anybody else.

I'm not sure if I interpreted the via82xx thing correctly. I assumed that the line "install snd-via82xx /sbin/modprobe --ignore-install snd-via82xx $CMDLINE_OPTS && { /sbin/modprobe -Qb snd-seq ; }" was in /etc/modprobe.d/alsa-base because the installer had detected it, but on second thoughts it looks like it might be a standard line in all dapper/edgy installations like the saa7134 line below it. As I've said, I'm very confused here.

Revision history for this message
ahro (andrehroussel) wrote :
Download full text (20.0 KiB)

Another Magic Media card problem I can't solve. Thank for your help. I have pasted the results of the requested debug commands below. Also, attached is the result of the aadebug command.

~$ lspci -nv
00:00.0 0600: 8086:7190 (rev 03)
        Flags: bus master, medium devsel, latency 64
        Memory at e0000000 (32-bit, prefetchable) [size=64M]
        Capabilities: <access denied>

00:01.0 0604: 8086:7191 (rev 03)
        Flags: bus master, 66MHz, medium devsel, latency 128
        Bus: primary=00, secondary=01, subordinate=01, sec-latency=64
        Memory behind bridge: fe700000-fecfffff
        Prefetchable memory behind bridge: fd000000-fe3fffff

00:04.0 0607: 104c:ac17 (rev 02)
        Subsystem: 1028:008f
        Flags: bus master, medium devsel, latency 168, IRQ 10
        Memory at 28000000 (32-bit, non-prefetchable) [size=4K]
        Bus: primary=00, secondary=02, subordinate=05, sec-latency=176
        Memory window 0: 20000000-21fff000 (prefetchable)
        Memory window 1: 22000000-23fff000
        I/O window 0: 00001000-000010ff
        I/O window 1: 00001400-000014ff
        16-bit legacy interface ports at 0001

00:04.1 0607: 104c:ac17 (rev 02)
        Subsystem: 1028:008f
        Flags: bus master, medium devsel, latency 168, IRQ 10
        Memory at 28001000 (32-bit, non-prefetchable) [size=4K]
        Bus: primary=00, secondary=06, subordinate=09, sec-latency=176
        Memory window 0: 24000000-25fff000 (prefetchable)
        Memory window 1: 26000000-27fff000
        I/O window 0: 00001800-000018ff
        I/O window 1: 00001c00-00001cff
        16-bit legacy interface ports at 0001

00:07.0 0680: 8086:7110 (rev 02)
        Flags: bus master, medium devsel, latency 0

00:07.1 0101: 8086:7111 (rev 01) (prog-if 80)
        Flags: bus master, medium devsel, latency 64
        I/O ports at fcd0 [size=16]

00:07.2 0c03: 8086:7112 (rev 01)
        Flags: bus master, medium devsel, latency 64, IRQ 11
        I/O ports at fce0 [size=32]

00:07.3 0680: 8086:7113 (rev 02)
        Flags: medium devsel, IRQ 9

01:00.0 0300: 10c8:0005 (rev 12)
        Subsystem: 1028:008f
        Flags: bus master, fast Back2Back, medium devsel, latency 128
        Memory at fd000000 (32-bit, prefetchable) [size=16M]
        Memory at fe800000 (32-bit, non-prefetchable) [size=4M]
        Memory at fec00000 (32-bit, non-prefetchable) [size=1M]
        Capabilities: <access denied>

01:00.1 0401: 10c8:8005 (rev 12)
        Subsystem: 1028:008f
        Flags: fast Back2Back, medium devsel, IRQ 11
        Memory at fe000000 (32-bit, prefetchable) [size=4M]
        Memory at fe700000 (32-bit, non-prefetchable) [size=1M]
        Capabilities: <access denied>

~$ alsamixer

alsamixer: function snd_ctl_open failed for default: No such device

~$ tail -2 /proc/asound/oss/sndstat

Mixers: NOT ENABLED IN CONFIG

~$ amixer
amixer: Mixer attach default error: No such device
ahro@ahro-laptop:~$ lspci -nv
00:00.0 0600: 8086:7190 (rev 03)
        Flags: bus master, medium devsel, latency 64
        Memory at e0000000 (32-bit, prefetchable) [size=64M]
        Capabilities: <access denied>

00:01.0 0604: 8086:7191 (rev 03)
        Flags: bus master, 66MHz, medium de...

Revision history for this message
Robert Persson (ireneshusband) wrote :

It's all a bit clearer now. The reason my report was so long and unclear was because I had got bogged down and confused trying to edit a text file. In fact all I needed to do was to add a couple of lines of the form "options snd-emu10k1 index=0" to /etc/modprobe.d/alsa-base to get everything working properly.

The user-friendly way to fix this would be to have a utility in the Gnome System-->Adminstration submenu to allows you to determine which sound card is which.

Revision history for this message
FiNeX (finex) wrote :

I'm on feisty, I've those two audio device:

00:1f.5 Multimedia audio controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) AC'97 Audio Controller (rev 02)
02:01.0 Multimedia audio controller: Creative Labs SB Live! EMU10k1 (rev 08)

This two device are loaded on a random order... k/ubuntu doesn't recognise the card swap, so everytime is a mess....

There are some workaround, maybe a fix should be better.
The problem is present from the first edition of ubuntu I've used (4.10). I've submitted something about a similar problem about the load order of network interfaces long time ago...

I hope this will be fixed!

Thanks!

Revision history for this message
Toby Smithe (tsmithe) wrote :

If you want to select the default sound card, you can install the package asoundconf-gtk on Feisty or Gutsy, and if you are running gutsy, we will shortly be providing QT3 and QT4 versions.

Revision history for this message
unggnu (unggnu) wrote :

This is partly a duplicate of Bug #123601 or vice versa. I have made an upstream bug report for the Gnome sound configuration issue.

Daniel T Chen (crimsun)
Changed in alsa-utils:
status: Confirmed → 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.