Volume control in mplayer resetting 50% when starting / stopping
video clips
Antonio Olivares
olivares14031 at gmail.com
Fri Sep 30 02:19:42 UTC 2011
On Thu, Sep 29, 2011 at 8:44 PM, Polytropon <freebsd at edvax.de> wrote:
> 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"
>
I actually have
hint.pcm.0.vol="100"
hint.pcm.1.vol="100"
hint.pcm.2.vol="100"
hint.pcm.0.pcm="100"
hint.pcm.1.pcm="100"
hint.pcm.2.pcm="100"
hint.hdac.0.cad0.nid29.config="as=1 seq=15 device=Headphones"
hint.hdac.0.cad0.nid30.config="as=4 seq=0"
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="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=15082
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. 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.
>
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 at 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=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.
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
More information about the freebsd-questions
mailing list