Bug 136480 - kudzu and/or initscripts fail to support two sound cards
Summary: kudzu and/or initscripts fail to support two sound cards
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: kudzu
Version: 2
Hardware: i686
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-10-20 12:50 UTC by Leszek Matok
Modified: 2014-03-17 02:49 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2005-03-02 20:21:27 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Leszek Matok 2004-10-20 12:50:19 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3)
Gecko/20040922

Description of problem:
First of all, I really hope someone will understand me. I confess I
don't speak English every day, but the problem is real and please read
it anyhow, thanks in advance :)

I have two sound cards in my computer. First is built into my
mainboard, it's made by SiS (ALSA mixer reports it as SiS SI7012), but
the chip is really C-Media (OSS emulated mixer calls it C-Media
Electronics CMI9738). Second is Creative Sound Blaster 128, called
Ensoniq AudioPCI by ALSA mixer and Cirrus Logic CS4297A by OSS Mixer.
The system was installed with only the on-board card presentm but I
wasn't happy with the cards capabilities (PCM volume having only two
states, on and off, and the only supported frequency being 48KHz), so
I disabled it in the BIOS and put the SB 128 in. Everything got
detected and worked great for a long time, until I decided to try out
Skype. I decided to use the on-board card only for Skype (which only
supports OSS sound and would collide with ESD using the same device,
besides, it's just nice to have headphones connected to this card
instead of using additional cables and plugging it to the speakers all
the time). Then the problems came up.

Kudzu detected the second card and asked if I want to "configure" it.
It configured the card by itself, so the option should be rather
"enable", but that's still not the problem I was going to talk about.
System booted up, XMMS worked with no problem at all after changing
output plugin to OSS and switching it to use /dev/dsp1. (As you can
see, the PCI SB 128 is the first card and the on-board SiS is the second)

My first problem was being unable to use the microphone without using
text-mode alsamixer; I'm going to report that in a moment in another
component. But once I got over it, I thought everything will work from
that moment. Unfortunately, the next day my second card was silent
(the first played as usual with the volume restored as expected). It
turned out all the volume controls was at 0 with some of them muted. I
know I have to use alsamixer and I can make the card play sound again.
Still, it's very annoying when I have to use alsamixer to wind up all
the volume controls after every boot (that is, every day).

The first guess is that saving and restoring mixer settings doesn't
work as it should. I checked and here are the results:
Excerpt from /etc/modprobe.conf (interesting lines only):
remove snd-intel8x0 { /usr/sbin/alsactl store >/dev/null 2>&1 || : ;
}; /sbin/modprobe -r --ignore-remove snd-intel8x0
alias snd-card-0 snd-ens1371
install snd-ens1371 /sbin/modprobe --ignore-install snd-ens1371 &&
/usr/sbin/alsactl restore >/dev/null 2>&1 || :
remove snd-ens1371 { /usr/sbin/alsactl store >/dev/null 2>&1 || : ; };
/sbin/modprobe -r --ignore-remove snd-ens1371
alias snd-card-1 snd-intel8x0
As you can see, there is absolutely no "restore" line for my second
card, but there is one with "store".
Still, I believe this "store" lines are not in effect (I don't do
rmmod and nothing seems to rmmod those modules upon halting system),
instead /etc/rc.d/init.d/halt does:
runcmd $"Saving mixer settings" alsactl store
Now, it looks like it is storing both cards' settings
(/etc/asound.state confirms this), but restores the settings when only
one card is supported by the kernel (lsmod confirms that snd_intel8x0
is loaded as the last module upon bootup, few modules after snd_ens1371).

A workaraound, and in my opinion the resolution, would be using
alsactl to save the driver state (as it is done now) and restoring it
not from modprobe, but after loading all the sound modules (if they
are loaded in initscripts, not on demand), or saving state of every
card (if there is alias snd-card-X, then you can just run alsactl
store X > /etc/asound.state.card-X) and restore every cards settings
upon loading specific module.

Version-Release number of selected component (if applicable):
kudzu-1.1.68.2-1, initscripts-7.55.1-1

How reproducible:
Always

Comment 1 Bill Nottingham 2004-10-20 17:58:41 UTC
This should work better in FC3test3 and later; there were various bugs
fixed in these areas.

Comment 2 Leszek Matok 2005-03-02 18:41:08 UTC
Visiting Bugzilla I see this one is still "NEW", so let me just say it works in
FC3 so it's okay to close the bug as fixed in "CURRENTRELEASE" or something.
Thanks :)


Note You need to log in before you can comment on or make changes to this bug.