mixer levels on boot

Norberto Meijome freebsd at meijome.net
Mon Sep 17 17:27:24 PDT 2007


On Mon, 17 Sep 2007 16:22:03 -0300
"Harry Doyle" <harry at locals.ca> wrote:

> hello everyone,
> i am running a freebsd server to stream my local campus station's radio
> broadcast to the net. i am using the stock ac97 audio, and using a little
> script in /usr/local/etc/rc.d which uses kldload to load the driver.

it'd be better to simply add to /boot/loader.conf.local (or loader.conf , i
prefer to have it clearly defined)
{DRIVER}_load="YES"

eg, for my Intel HDA i have
snd_hda_load="YES"

> 
> i have to issue mixer rec -83 to get the audio down to a decent level (very
> hot coming out of the mixer but i can't change that for other reasons). i
> have tried to script this mixer command into startup by putting a  sleep
> command and then the mixer command, and also by using the /boot/boot.hints
> file.
> 
> however whenever i reboot the machine the mixer command always shows the
> default level of 90 which clips pretty hard.

either
1)  have a script that sets your levels . mine is saved by the OS,, but
sometimes i need to do it by hand, so i use this script:

[betom at ayiin] [Tue Sep 18 10:23:27 2007]
/usr/home/betom
$ cat bin/set_mixer.sh
#!/bin/sh
## Feedback fixed!!! mic == 0
mixer vol 86:86 pcm 86:86 speaker 49:49 mic 0:0 cd 40:40 rec 100:100 =rec mic
--

of course, your device may be different, so adjust accordingly.

2) to save the values, check /etc/rc.d/mixer. mixer_save is called on stop, so
 a) set your levels
 b) add to /etc/rc.conf  
mixer_enable="YES"      # Run the sound mixer.

 c) run /etc/rc.d/mixer stop
 d) reboot  + verify they are set to the right thing. In theory, they should be
saved everytime to reboot..

( i just realised i dont actually have that line in rc.conf...but my levels are
kept across reboots..so all is good... :)

> 
> also, the sound driver doesn't seem to load until around 2 minutes after i
> can log into a fresh boot (not a problem, just some extra info). how can i
> script my default rec level on boot?

use /boot/loader.conf.local

_________________________
{Beto|Norberto|Numard} Meijome

"The freethinking of one age is the common sense of the next."
   Matthew Arnold

I speak for myself, not my employer. Contents may be hot. Slippery when wet.
Reading disclaimers makes you go blind. Writing them is worse. You have been
Warned.


More information about the freebsd-questions mailing list