In the event that any one has had a problem keeping consistant sound settings,
I have been mucking about in the /etc/rc.d/sysinit and /etc/rc.d/inet.d/halt
scripts. Where these scripts save / load sound settings, I find two problems:

        1) there is no /etc/.aumixrc file
        2) there is no /bin/aumix-minimal executable file (or script)

My solution consists of four steps:

        1) create a .aumixrc file by running aumix in a terminal window in
interactive mode as a regular user, and using the [s] command to save the mixer
settings to $HOME/.aumixrc (the default location).

        2) copy the .aumixrc file to /etc (too obvious to include, but I want
to be complete).

        3) edit /etc/rc.d/sysinit to use /usr/bin/aumix rather than
/bin/aumix-minimal.

        4) edit /etc/rc.d/inet.d/halt as in number 3.

I will paste the appropriate parts of the files at the end of this message for
the use of anyone interested. I have included comments etc, and please do not
read any sarcasm into them, as none was intended (I'm simply direct).

If anyone has comment or improvements, please respond.

this is from /etc/rc.d/sysinit

---snip---

# load sound modules
if [ -n "$USEMODULES" ]; then
   if grep -s -q "^alias sound " /etc/conf.modules ; then
      action "Loading sound module" modprobe sound
   fi
   if grep -s -q "^alias midi " /etc/conf.modules ; then
       action "Loading midi module" modprobe midi
   fi
fi

# Load mixer settings
# if grep -q "\(sparcaudio\|sound\)" /proc/devices 2>/dev/null && [ -f /etc/.aumixrc 
-a -x /bin/aumix-minimal ]; then
#       action "Loading mixer settings" /bin/aumix-minimal -f /etc/.aumixrc -L
# fi

# The above does not work.
# There is no /bin/aumix-minimal file, and there is no /etc/.aumixrc file.
# I have run /usr/bin/aumix in interactive mode and saved the desired settings
# with the save command (s), which saves the settings in  the .aumixrc file and
# places the file in the users home folder.
# I next opened the filemanager (superuser mode), and copied the [$HOME}/.aumixrc file
# to /etc/.aumixrc - the following two lines reflect the changes in code which now will
# allow mixer settings to be loaded at srart-up.
# Note that a similar hack to /etc/rc.d/init.d/halt will save settings at shutdown

if grep -q "\(sparcaudio\|sound\)" /proc/devices 2>/dev/null && [ -f /etc/.aumixrc -a 
-x /usr/bin/aumix ]; then
        action "Loading mixer settings" /usr/bin/aumix -f /etc/.aumixrc -L
fi

if [ -f /proc/sys/kernel/modprobe ]; then
   if [ -n "$USEMODULES" ]; then
       echo "/sbin/modprobe" > /proc/sys/kernel/modprobe
   else
       echo "" > /proc/sys/kernel/modprobe
   fi
fi

# Load modules (for backward compatibility with VARs)
if [ -f /etc/rc.d/rc.modules ]; then
        /etc/rc.d/rc.modules
fi

# Add raid devices

---end snip---

this is from /etc/rc.d/inet.d/halt

---snip---

# Save mixer settings, here for lack of a better place.
# See /etc/rc.d/sysinit for an explaination of the following changes.
# Simply put the following code does not work. It points to nonexisting files,
# (namely /etc/.aumixrc [settings] and /bin/aumic-minimal [non-existing]).
# /etc/.aumixrc must be created using aumix, and the script code must be changed
# to use /usr/bin/aumix, then all will be well.
# grep -q "\(sparcaudio\|sound\)" /proc/devices
# if [ $? = 0 -a -x /bin/aumix-minimal ]; then
#   runcmd "Saving mixer settings" /bin/aumix-minimal -f /etc/.aumixrc -S
#fi
grep -q "\(sparcaudio\|sound\)" /proc/devices
if [ $? = 0 -a -x /usr/bin/aumix ]; then
   runcmd "Saving mixer settings" /usr/bin/aumix -f /etc/.aumixrc -S
fi

---end snip---

 -- 

___________________________
Ernie ([EMAIL PROTECTED]

Reply via email to