Volume control in mplayer resetting 50% when starting / stopping video clips

Polytropon freebsd at edvax.de
Fri Sep 30 01:44:54 UTC 2011

On Thu, 29 Sep 2011 20:33:45 -0500, Antonio Olivares wrote:
> > try 'sysctl hw.snd.vpc_autoreset=0'.
> >
> Question,
> On one of my home machines, I have mixer pcm & vol set to 100% :
> [olivares at tricorehome /usr/home/olivares]$ mixer
> Mixer vol      is currently set to 100:100
> Mixer pcm      is currently set to 100:100
> Mixer line     is currently set to  75:75
> Mixer mic      is currently set to   0:0
> Mixer rec      is currently set to  81:81
> Mixer igain    is currently set to   0:0
> Mixer ogain    is currently set to  50:50
> Mixer monitor  is currently set to  75:75
> Recording source: mic

I've also tried:

First I set the mixer settings to the ones you have, at
least the relevant ones:

	% mixer vol 100
	% mixer pcm 100

>From the last time, I had set mplayer's volume to zero.
Starting mplayer, no sound could be heared - as expected,
even as "mixer" displayed 100 for "pcm" and "vol".

See my conclusion: It seems that mplayer handles volume
setting _separated_ from mixer's "vol" and "pcm".

> in /boot/device.hints
> hint.pcm.0.vol="100"
> hint.pcm.1.vol="100"
> hint.pcm.2.vol="100"

Nice, didn't know about those yet.

Basically, FreeBSD's shutdown saves _current_ mixer settings,
and the startup restores them. So if you leave settings at
100, they should be kept there.

> But when I play with mplayer, the pcm setting is at 48%

Seems to equal my 50% assumption.

> I then increase the sound level by using the (*) key to increase it
> and the (/) key to lower it.  I had reason to believe that once I
> would set up the sound using /boot/device.hints, it would be (set in
> stone) forever, but on starting up the system, mplayer puts it back at
> 48%.

As it has done before here.

I've tried your test with * and /, as well as 9 and 0, and
I don't see any changes in the "mixer" output. However, when
I use the volume keys (that control the "mixer" command) a
setting change can be seen.

So I assume... mplayer does have some kind of internal audio
level setting? As I said: no change in "pcm" or "vol" when
changing volume inside mplayer in the default configuration,
as it was my initial conclusion.

NB: I know that mplayer's keys can be set to change "vol"
instead of "pcm", but that does not seem to be the default

> Will the systcl hw.snd.vpc autoreset=0 command cure this illness as well?

Try it - it seems to be correct, at least from my few testing.

> If it does, do I add it to /boot/device.hints?  and it is a done deal!
> or no deal! :(

I've added it to /etc/sysctl.conf.

> I have always wanted to ask but was not sure it it was freebsd or
> mplayer's configuration.

In ultraworst case, freebsd-question@ is the right list to ask. :-)

Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...

More information about the freebsd-questions mailing list