Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 26874 - ALSA mixer setting not being properly set on reboot
Summary: ALSA mixer setting not being properly set on reboot
Status: RESOLVED CANTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Jeremy Huddleston (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-08-18 11:44 UTC by Charles Phoenix
Modified: 2004-07-31 18:52 UTC (History)
1 user (show)

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 Charles Phoenix 2003-08-18 11:44:59 UTC
This is a strange one, not sure it has anything to do directly with Gentoo but
here goes...

I reboot...
1) When ALSA is loaded I hear a sound (half a second) like when you tap a large
microphone with your finger.

2) I start XMMS, or any program and there is no sound.

3) I check the amixer and the settings are remembered.
Master = 100%  PCM = 19% (normally this is loud enough)
the same as before I rebooted.

4) All I have to do is move ("tap") the Master Volume Control and I have sound
at the previous levels.

or amixer set master 100


During testing I set master to 100 and rebooted. PCM was at %19. This time the
sound was barely audible. This also happen once when I only use amixer (instead
of the GUI mixer) to set the sound levels. Using XMMS and a wheel mouse I slowly
increased the volume, which is set to control PCM. When I hit 100% the volume
instantly increased, about 20 times? (Instantly going from 2 to 10 on a stereo)
   What was %19 and inaudible became the audible level I had before.

Other info...

using 2.4.20-win4lin-r1 build. (had problem with gentoo 2.4.20)
no other sound modules except sound.

unrelated? esound (now disabled) locked up xmms when a song was switching and a
"click" sound from galeon occurred at the same time. Normally the two sources
would mix but not during a song switch. One time put ALSA in double speed mode.

oss emulation works.
Two ALSA sources mix fine.
ALSA and oss emulation mix fine.

sound chip ESS Technology ES1988 using Maestro3 driver



Reproducible: Always
Steps to Reproduce:



Expected Results:  



Portage 2.0.48-r7 (default-x86-1.4, gcc-3.2.3, glibc-2.3.2-r1)
=================================================================
System uname: 2.4.20-win4lin-r1 i686 Pentium II (Deschutes)
GENTOO_MIRRORS="http://gentoo.oregonstate.edu
http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
CONFIG_PROTECT="/etc /var/qmail/control /usr/kde/2/share/config
/usr/kde/3/share/config /usr/X11R6/lib/X11/xkb /usr/kde/3.1/share/config
/usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/
/usr/share/config"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
PORTDIR="/usr/portage"
DISTDIR="/usr/portage/distfiles"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR_OVERLAY="/usr/local/portage"
USE="x86 oss apm avi crypt cups encode foomaticdb gif jpeg libg++ mad mikmod mmx
mpeg ncurses pdflib png quicktime spell truetype xml2 xmms xv zlib gtkhtml alsa
gdbm slang readline tetex bonobo svga java guile X sdl gpm tcpd pam ssl perl
python esd imlib oggvorbis gnome gtk opengl mozilla cdr dnd dumb-allegro dvd
ethereal evo faad flash gb gd gnomedb gtk2 imagemagick jack jikes joystick
libgda mbox mdb memlimit moznoirc moznomail pic plotutils ppds sqlite sse tiff
usb v4l wmf wxwindows xinerama xvid -3dnow -kde -libwww -motif -nls -berkdb
-arts -qt"
COMPILER="gcc3"
CHOST="i686-pc-linux-gnu"
CFLAGS="-march=pentium2 -O3 -pipe -fomit-frame-pointer"
CXXFLAGS="-march=pentium2 -O3 -pipe -fomit-frame-pointer"
ACCEPT_KEYWORDS="x86 ~x86"
MAKEOPTS="-j2"
AUTOCLEAN="yes"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
FEATURES="sandbox ccache"
Comment 1 Brian Harring (RETIRED) gentoo-dev 2004-02-04 16:08:51 UTC
What alsa-utils version is this?
Comment 2 Jeremy Huddleston (RETIRED) gentoo-dev 2004-02-06 21:14:16 UTC
also, make sure you added the 'alsasound' init script to your boot runlevel:

$ rc-update add alsasound boot
Comment 3 Jeremy Huddleston (RETIRED) gentoo-dev 2004-02-08 20:47:30 UTC
Closing due to lack of response and un-reproduceability.  If the solution I mention above doesn't address the problem, please reopen the bug.
Comment 4 Charles Phoenix 2004-06-17 04:03:39 UTC
Finally annoyed to the point to track down the cause.
Gentoo the DIY distro :)

Found the cause... 
 there is an enable=1 option for the card

For some reason when Master Volume is set to 100
it "enables" the card otherwise the above behavior exists

so adding the line 
options snd-maestro3 enable=1
to 
/etc/modules.d/alsa

fix the problem, tested with reboot
Comment 5 Charles Phoenix 2004-06-25 18:24:43 UTC
I spoke too soon... I must of did something by accident.

Let's get the obvious answered, updated to alsa-utils-1.05

Also this behavior seems to be independent of kernel (2.4.20->2.6.6), or gentoo versions (the past year), or alsa versions (I think I started with 0.9.x), or even cpus (i686 and Athlon XP). It seems to be related to the maestro3 driver and/or the card itself.

/etc/asound.state saves the settings okay.

Okay now I have a repeatable test scenario.

bash-2.05b# /etc/init.d/alsasound restart
 * WARNING:  you are stopping a boot service.
 * Unloading ALSA...
 * Storing ALSA Mixer Levels
 * Unloading modules                                                     [ ok ]
 * Loading ALSA drivers...
 * Using ALSA OSS emulation
 * Loading: snd-mixer-oss
 * Loading: snd-pcm-oss
 * Loading: snd-seq-oss
 * Running card-dependent scripts
 * Restoring Mixer Levels                                                [ ok ]

----- note I can hear the speakers as they reset.
I learned this is the power on/off command.

bash-2.05b# aplay /usr/kde/3.2/share/sounds/pop.wav
Playing WAVE '/usr/kde/3.2/share/sounds/pop.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Mono

------ no sound

bash-2.05b# amixer sget "Master"
Simple mixer control 'Master',0
  Capabilities: pvolume pswitch pswitch-joined
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Front Left: Playback 26 [84%] [on]
  Front Right: Playback 26 [84%] [on]

----- needed for the next stage

bash-2.05b# amixer sset "Master" 26
Simple mixer control 'Master',0
  Capabilities: pvolume pswitch pswitch-joined
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Front Left: Playback 26 [84%] [on]
  Front Right: Playback 26 [84%] [on]
bash-2.05b# aplay /usr/kde/3.2/share/sounds/pop.wav
Playing WAVE '/usr/kde/3.2/share/sounds/pop.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Mono

----- no sound

bash-2.05b# amixer sset "Master" 25
Simple mixer control 'Master',0
  Capabilities: pvolume pswitch pswitch-joined
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Front Left: Playback 25 [81%] [on]
  Front Right: Playback 25 [81%] [on]
bash-2.05b# aplay /usr/kde/3.2/share/sounds/pop.wav
Playing WAVE '/usr/kde/3.2/share/sounds/pop.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Mono

----- this time I hear the pop

----- 

I can reliably repeat this so long and the number I set Master with is the not the previous one. This is exactly the same thing I was doing with KDE's mixer - 'tapping' the Master Volume control. 

These bugs are getting stranger as time goes on, anybody have a clue what is going on? 
Comment 6 Jeremy Huddleston (RETIRED) gentoo-dev 2004-06-26 01:02:32 UTC
wow... this is a big "WTF" to me... it sounds like something that is best solved upstream by the alsa developers.  Please create a bug there (http://www.alsa-project.org) and provide a link to that bug report so I can track it.

Thanks.
Comment 8 Jeremy Huddleston (RETIRED) gentoo-dev 2004-07-31 18:18:36 UTC
out of curiosity, what happens if you use 'aumix' to save/restore volumes instead?
Comment 9 Charles Phoenix 2004-07-31 18:52:27 UTC
I am going to to put this one to sleep.
I gave up on it and it is now sitting in another computer.
Resetting that computer (Asus Slot 1, via chipset) and it works.
Restarting the script and it goes silent.

Never tried...aumix.

Thanks for the trouble.