Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 17 Sep 2007 16:21:54 -0400
From:      Rob <r17fbsd@xxiii.com>
To:        Harry Doyle <harry@locals.ca>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: mixer levels on boot
Message-ID:  <46EEE1E2.7080106@xxiii.com>
In-Reply-To: <950c85d80709171222o596ef293p75a793d87b45f38b@mail.gmail.com>
References:  <950c85d80709171222o596ef293p75a793d87b45f38b@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?46EEE1E2.7080106>