Mixer default values not restored
John Baldwin
jhb at freebsd.org
Mon Jan 7 12:23:15 PST 2008
On Monday 07 January 2008 08:32:49 am Jouke Witteveen wrote:
> On Jan 7, 2008 7:30 AM, John Baldwin <jhb at freebsd.org> wrote:
> >
> > On Wednesday 02 January 2008 08:35:40 am Jouke Witteveen wrote:
> > > Hello,
> > >
> > > I'm running FreeBSD 7.0 RC1 with the following in my kernel
configuration:
> > > ---
> > > device sound
> > > device snd_emu10kx
> > > ---
> > > My soundcard is a Soundblaster Live!
> > >
> > > In trying to make the rear-channel volume default to "100" I added the
> > > following to my /boot/device.hints:
> > > ---
> > > hint.pcm.1.vol="100"
> > > hint.pcm.1.pcm="100"
> > > ---
> > > This method is suggested on page 164 (section 7.2.4) of the Handbook.
> > >
> > > The problem is that these mixer levels do not apply:
> > > ---
> > > $ mixer -f /dev/mixer1
> > > Mixer vol is currently set to 75:75
> > > Mixer pcm is currently set to 75:75
> > > ---
> > > There is no problem however in manualy settig these values.
> > >
> > > Any help is welcome. My machine can - may it be needed - be used as a
testbase.
> >
> > Hmm, probably /etc/rc.d/mixer is overriding the tunables as it is
restoring the settings
> > to those from the previous boot. You can disable the mixer script
perhaps.
> >
> > --
> > John Baldwin
> >
>
> Like I said; initialy I had the script disabled.
> Can someone please test de kernel tunables (hints) on his/her machine?
Err, I don't see anywhere in your message where you disabled it. You would
need to add 'mixer_enable="NO"' to /etc/rc.conf. The hints are honored in
the mixer_init() function in sys/dev/sound/pcm/mixer.c here:
for (i = 0; i < SOUND_MIXER_NRDEVICES; i++) {
v = snd_mixerdefaults[i];
if (resource_int_value(device_get_name(dev),
device_get_unit(dev), snd_mixernames[i], &val) == 0) {
if (val >= 0 && val <= 100) {
v = (u_int16_t) val;
}
}
mixer_set(m, i, v | (v << 8));
}
--
John Baldwin
More information about the freebsd-stable
mailing list