Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 171434 - media-sound/alsa-{driver,utils]-1.0.14-rc1 - snd-hda-intel problem initialising sound card on acer 5102WLMi laptop
Summary: media-sound/alsa-{driver,utils]-1.0.14-rc1 - snd-hda-intel problem initialisi...
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Gentoo ALSA team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-03-19 12:17 UTC by Sam Jacobson
Modified: 2007-04-27 00:25 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sam Jacobson 2007-03-19 12:17:02 UTC
The alsa-utils alsasound init script does not initialise the sound card correctly in my Acer 5102WLMi laptop. At first I had it worked about 1 time out of 3. When it fails the sound module loads correctly (snd-hda-intel), but an error is reported when attempting to restore the sound levels. After this point the sound card will not function until the module is unloaded. OTOH if snd-hda-intel is modprobed (by hand), then alsamixer is run, then the levels are restored it works every time. I have "fixed" the alsasound init script for my laptop (diff follows).

I believe this must be an upstream bug, but I'm filing it here JIC. Is there *any* reason that anyone knows about why a mixer needs to be run before an alsactl restore can be run (and if there is should the alsasound init script be doing this?). On the laptop alsactl essentially "breaks" the sound card when run before alsamixer (or amixer).


Reproducible: Sometimes

Steps to Reproduce:
1. Install gentoo
2. Install Alsa
3. Boot laptop
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2007-03-19 13:18:54 UTC
Which alsa-drivers and alsa-utils versions are you using?
Comment 2 Sam Jacobson 2007-03-19 21:59:20 UTC
Originally I was using the kernel drivers (gentoo-sources-2.6.18-r1), and alsa-utils-1.0.11. I upgraded to alsa-utils-1.0.14-rc1, and started using alsa-driver-1.0.14-rc1.

There was no significant change between the kernel drivers, and alsa-driver, both behaved the same.

The change I have made to /etc/init.d/alsasound to make it work follows. With this change it always works. I've restarted about 5 times now, and it's worked every time. Also, while I was trying to work out what was wrong, it was very repeatable; if amixer or alsamixer was run before alsactl (after modprobing snd-hda-intel) it would always work. If alsactl is run first it usually doesn't work. I tried a sleep timeout initially thinking it was a timing problem, but this made no difference.

--- /etc/init.d/alsasound.old   2007-03-20 09:48:41.000000000 +1200
+++ /etc/init.d/alsasound       2007-03-19 12:46:12.000000000 +1200
@@ -171,6 +171,7 @@
 }
 
 restore() {
+       /usr/bin/amixer info 0
        ebegin "Restoring Mixer Levels"
 
        local val=0


For reference here's snippets out of my alsa config (although I don't think this is the problem):

/etc/modules.d/alsa:
options snd-hda-intel model=3stack
# NOTE: I originally used model=acer position_fix=1, but changed it to 3stack while testing, it doesn't seem to make any difference to this problem. (http://gentoo-wiki.com/HARDWARE_Acer_Aspire_5102WLMi)
alias snd-card-0 snd-hda-intel
alias sound-slot-0 snd-hda-intel


/etc/modules.autoload.d/kernel-2.6:
battery
ppp
button
fglrx
snd-hda-intel # not necessary, also works when module isn't autoloaded (ie is loaded by alsasound init later)

Comment 3 Sam Jacobson 2007-03-19 22:04:58 UTC
I should also add, that when I was first trying to get sound working reliably I tried a few different kernel versions:

linux-2.6.17-gentoo-r8
linux-2.6.18-gentoo-r1
linux-2.6.20-gentoo

I came back to 2.6.18 from 2.6.20 because it seemed worse, chances are that it would now work with 2.6.20 (with the modded alsasound init script).

I think there were other kernel versions earlier than 2.6.17, but they've been 'emerge -C'd by now.
Comment 4 Jakub Moc (RETIRED) gentoo-dev 2007-03-19 22:06:27 UTC
Try alsa-driver-1.0.14_rc3 and alsa-utils-1.0.14_rc2-r3; if you still have problems, you should take this upstream...
Comment 5 Daniel Drake (RETIRED) gentoo-dev 2007-03-28 01:10:54 UTC
Occasionally between kernel/driver releases, the format changes and it's not possible to restore the old values.

If you upgrade to the latest alsa-lib/tools/util packages, and use the in-kernel sound drivers from the latest development kernel (currently v2.6.21-rc5), does the issue still exist?
Comment 6 Daniel Drake (RETIRED) gentoo-dev 2007-04-27 00:25:26 UTC
See comment #5