Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 29 Sep 2011 21:19:40 -0500
From:      Antonio Olivares <olivares14031@gmail.com>
To:        Polytropon <freebsd@edvax.de>
Cc:        FreeBSD Questions <freebsd-questions@freebsd.org>
Subject:   Re: Volume control in mplayer resetting 50% when starting / stopping video clips
Message-ID:  <CAJ5UdcOrMtLkHVimMMTLg2CKewVSAmHKi=F3dGQL7oNZw5n92A@mail.gmail.com>
In-Reply-To: <20110930034451.8b8b51d4.freebsd@edvax.de>
References:  <20110929062327.e2540d4b.freebsd@edvax.de> <20110929172748.GA6639@freebsd.org> <CAJ5UdcOEvmCu86xKVz52WjuTffQsyGu-=jMLBgbFnC=ope=6Bg@mail.gmail.com> <20110930034451.8b8b51d4.freebsd@edvax.de>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Sep 29, 2011 at 8:44 PM, Polytropon <freebsd@edvax.de> wrote:
> On Thu, 29 Sep 2011 20:33:45 -0500, Antonio Olivares wrote:
>> > try 'sysctl hw.snd.vpc_autoreset=3D0'.
>> >
>> Question,
>>
>> On one of my home machines, I have mixer pcm & vol set to 100% :
>>
>> [olivares@tricorehome /usr/home/olivares]$ mixer
>> Mixer vol =A0 =A0 =A0is currently set to 100:100
>> Mixer pcm =A0 =A0 =A0is currently set to 100:100
>> Mixer line =A0 =A0 is currently set to =A075:75
>> Mixer mic =A0 =A0 =A0is currently set to =A0 0:0
>> Mixer rec =A0 =A0 =A0is currently set to =A081:81
>> Mixer igain =A0 =A0is currently set to =A0 0:0
>> Mixer ogain =A0 =A0is currently set to =A050:50
>> Mixer monitor =A0is currently set to =A075:75
>> Recording source: mic
>
> I've also tried:
>
> First I set the mixer settings to the ones you have, at
> least the relevant ones:
>
> =A0 =A0 =A0 =A0% mixer vol 100
> =A0 =A0 =A0 =A0% 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=3D"100"
>> hint.pcm.1.vol=3D"100"
>> hint.pcm.2.vol=3D"100"
>
I actually have

hint.pcm.0.vol=3D"100"
hint.pcm.1.vol=3D"100"
hint.pcm.2.vol=3D"100"
hint.pcm.0.pcm=3D"100"
hint.pcm.1.pcm=3D"100"
hint.pcm.2.pcm=3D"100"
hint.hdac.0.cad0.nid29.config=3D"as=3D1 seq=3D15 device=3DHeadphones"
hint.hdac.0.cad0.nid30.config=3D"as=3D4 seq=3D0"

in /boot/devices.hints.  The last two lines are for Headphone input.
If I am playing music and it is too loud, I plug in the headphones and
the sound goes to the headphones and not to the speakers.
I have snd_hda_load=3D"YES" in /etc/rc.conf and if the sound is hda,
then I used a script by Selven found here:

http://forums.freebsd.org/showthread.php?t=3D15082

I now have sound from headphones, whereas before I did not :)

>
> 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. =A0I 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.
>
I don't know enough about mplayer's internal settings :(, I only know
that there is a conf file in
~/.mplayer/conf where settings are stored, but about sound not much.

[olivares@tricorehome /usr/home/olivares]$ cat .mplayer/config
# Write your default config options here!



>
> 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
> setting!
>
>
>
>> Will the systcl hw.snd.vpc autoreset=3D0 command cure this illness as we=
ll?
>
> Try it - it seems to be correct, at least from my few testing.
>
>
>
>> If it does, do I add it to /boot/device.hints? =A0and it is a done deal!
>> or no deal! :(
>
> I've added it to /etc/sysctl.conf.

Have added it there :)  Will see if it changes the settings(mplayers
internal 48%) or not.
>
>
>
>> 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. :-)
>
>
>
> --
> Polytropon
> Magdeburg, Germany
> Happy FreeBSD user since 4.0
> Andra moi ennepe, Mousa, ...
>

Thank you Polytropon for your valuable input, will check it out later
to see if the settings get saved or not.

Regards,

Antonio



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