Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 91050

Summary: alsa-utils-1.0.8 init script does not restore volume levels
Product: Gentoo Linux Reporter: Dieter Verfaillie <dieterv>
Component: Current packagesAssignee: Jeremy Huddleston (RETIRED) <eradicator>
Status: RESOLVED INVALID    
Severity: minor CC: sound
Priority: High    
Version: unspecified   
Hardware: x86   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: patch for alsasount init script

Description Dieter Verfaillie 2005-05-01 06:31:11 UTC
The alsasound init script from alsa-utils-1.0.8 does not restore my volume levels at (re)start. Unchanged, the output looks like this:

* Storing ALSA Mixer Levels...                                           [ ok ] * Unloading ALSA...                                                      [ ok ] * Unloading ALSA modules...                                              [ ok ] * Loading ALSA modules...
 *   Loading: snd-card-0...                                               [ ok ] *   Loading: snd-seq...                                                  [ ok ]


Once i modified the init script's start procedure to the following:

start() {
        if [[ -f /proc/modules ]] ; then
                ebegin "Loading ALSA modules"
                if load_modules ; then
                        eend 0
                else
                        eend 1
                        return 1
                fi
        fi

        restore_mixer
}


output is like this:

* Storing ALSA Mixer Levels...                                           [ ok ] * Unloading ALSA...                                                      [ ok ] * Unloading ALSA modules...                                              [ ok ] * Loading ALSA modules...
 *   Loading: snd-card-0...                                               [ ok ] *   Loading: snd-seq...                                                  [ ok ] * Restoring Mixer Levels...                                              [ ok ]

So, restoring mixer levels works again :-)

Note the extra check around restore_mixer for RESTORE_ON_START in the unmodified script seems not needed anyway: the first thing the restore_mixer procedure does is checking that variable.

Reproducible: Always
Steps to Reproduce:
1. # /etc/init.d/alsasound restart

or

1. # reboot
Actual Results:  
volume levels are not restored

Expected Results:  
restore volume levels
Comment 1 Dieter Verfaillie 2005-05-01 06:31:44 UTC
Created attachment 57734 [details, diff]
patch for alsasount init script
Comment 2 Jeremy Huddleston (RETIRED) gentoo-dev 2005-05-05 11:02:41 UTC
Please use 'diff -Naurp' to create your patches.

What is RESTORE_ON_START set to youu /etc/conf.d/alsasound?
Comment 3 Dieter Verfaillie 2005-05-06 13:40:11 UTC
it is set to "yes",
sorry about the patch, thanks for the tip
Comment 4 Dieter Verfaillie 2005-05-06 13:49:25 UTC
hmmm, cat showed weird charaters in /etc/conf.d/alsasound.
i've recreated it and everything works fine.
sorry, should have seen that earlier.