mixer levels on boot
Rob
r17fbsd at xxiii.com
Mon Sep 17 13:22:12 PDT 2007
Harry Doyle wrote:
> however whenever i reboot the machine the mixer command always shows the
> default level of 90 which clips pretty hard.
My 6.2 system saves and restores the mixer settings across boots. Apparently in the file /var/db/mixer0-state However, the file is root owned and 644; perhaps if you create the file and chmod it writable, your settings will stick?
Or you could put the command in your script. "mixer -S" dumps the current settings in a format mixer can read back. I do this in a script that dribbles music on hold to our phone system:
mixer_default="vol 45:45 pcm 40:40"
# Call mixer command to set params specified in conf file, or defaults.
set_mixer() {
if [ -f $home_dir/mixer.conf ]; then
mixer `cat $home_dir/mixer.conf`
echo "set mixer.conf params"
else
mixer $mixer_default
echo "set mixer default values"
fi
}
-RW
More information about the freebsd-questions
mailing list