Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 Sep 2007 10:27:10 +1000
From:      Norberto Meijome <freebsd@meijome.net>
To:        "Harry Doyle" <harry@locals.ca>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: mixer levels on boot
Message-ID:  <20070918102710.068465da@localhost>
In-Reply-To: <950c85d80709171222o596ef293p75a793d87b45f38b@mail.gmail.com>
References:  <950c85d80709171222o596ef293p75a793d87b45f38b@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 17 Sep 2007 16:22:03 -0300
"Harry Doyle" <harry@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@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.



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