Re: amixer usage

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Le 23 sept. 2013 05:20, "John Davis" <davisjf@xxxxxxxxx> a écrit :
>
> Hello

Hi!

>
> I am trying to get my multimedia volume up and down buttons to work.  I am
> reading various notes on amixer usage
> and it seems for others they can adjust current volume settings up and
> down.  For me, i can only adjust to a fixed value.

You forgot to read the man page...

>
> For example, this will set my volume to 50%
>
> [davis@x200 ~]$ amixer -c 0 cset numid=15,iface=MIXER,name='Master
Playback
> Volume' 50%
> numid=15,iface=MIXER,name='Master Playback Volume'
>   ; type=INTEGER,access=rw---R--,values=1,min=0,max=74,step=0
>   : values=37
>   | dBscale-min=-74.00dB,step=1.00dB,mute=0
>
> But then if I want to adjust it by 2dB it will not adjust up or down by
2dB
> instead it sets the value to 2.
>
>  If I set it to 2dB+ or simply the value 2 it does the same thing.

Yes, this is correct and it's not a bug.

>
> [davis@x200 ~]$ amixer -c 0 cset numid=15,iface=MIXER,name='Master
Playback
> Volume' 2dB-
> numid=15,iface=MIXER,name='Master Playback Volume'
>   ; type=INTEGER,access=rw---R--,values=1,min=0,max=74,step=0
>   : values=2
>   | dBscale-min=-74.00dB,step=1.00dB,mute=0
>
> [davis@x200 ~]$ amixer -c 0 cset numid=15,iface=MIXER,name='Master
Playback
> Volume' 2dB
> numid=15,iface=MIXER,name='Master Playback Volume'
>   ; type=INTEGER,access=rw---R--,values=1,min=0,max=74,step=0
>   : values=2
>   | dBscale-min=-74.00dB,step=1.00dB,mute=0
> dB up, it will instead set the value to 2 instead of 39.
>
> [davis@x200 ~]$ amixer -c 0 cset numid=15,iface=MIXER,name='Master
Playback
> Volume' 2dB+
> numid=15,iface=MIXER,name='Master Playback Volume'
>   ; type=INTEGER,access=rw---R--,values=1,min=0,max=74,step=0
>   : values=2
>   | dBscale-min=-74.00dB,step=1.00dB,mute=0
>
>
> It appears the parser is ignoring dB and or +/- and only recognizing %.
>

If you look at the man page, you'll notice that only set and sset take a
suffix, but not cset.
If you really need cset instead of set, you'll have to compute the final
value yourself.

>
> --
> John F. Davis
> 6 Kandes Court
> Durham, NC 27713
> 919-888-8358
>
> 独树一帜

Have a nice day!

Joan Rieu


[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux