Getting a microphone to work

Chris Hodgins chodgins at cis.strath.ac.uk
Wed Feb 2 15:03:53 PST 2005


Steven Friedrich wrote:
> On Wednesday 02 February 2005 04:44 pm, Tom Huppi wrote:
> 
>>BTW, does anyone know off-hand how to set 'mixer' settings as
>>default (so I would not have to re-set them after a re-boot?)
>>
> 
> I don't know how you could do it automagically, but when you want to save the 
> settings, you could:
> echo -n "mixer " > mixer.def && mixer -s >> mixer.def
> 
> then do a chmod +x mixer.def
> 
> and then load default setting by invoking ./mixer.def
> 
> HTH

Wrote a little shell script to drop into /usr/local/etc/rc.d.  I hope 
someone finds it useful. :)

Chris

#!/bin/sh

MIXERCMD=/usr/sbin/mixer
DEVICE=/dev/mixer0
#OUTPUT=/dev/null
OUTPUT=/dev/stdout

# Set the mixer values here.
VOL="vol 25:25"
PCM="pcm 75:75"
LINE="line 75:75"
MIC="mic 0:0"
CD="cd 75:75"
REC="rec 0:0"
OGAIN="ogain 50:50"
LINE1="line1 50:50"
PHIN="phin 0:0"
PHOUT="phout 0:0"

$MIXERCMD -f $DEVICE \
	$VOL $PCM $LINE $MIC $CD $REC \
	$OGAIN $LINE1 $PHIN $PHOUT > $OUTPUT


More information about the freebsd-questions mailing list