You are not logged in.

#1 2021-08-08 22:52:30

SecondComing
Member
From: Eureka Springs, AR
Registered: 2020-10-25
Posts: 18
Website

Adjusting volume with amixer has unexpected & inaccurate results

I've bound three key combos to amixer commands in .xbindkeysrc as such:

"amixer sset Master 5%+"
    m:0x8 + c:21
    Alt + equal
"amixer sset Master 5%-"
    m:0x8 + c:20
    Alt + minus
"amixer sset Master 80%"
    m:0x8 + c:17
    Alt + 8

And pressing those key combos has the following effects:

Alt + equal: Raises volume by an amount greater than 5% (~16% max.) when volume is already at a high percent, and by an amount lower than 5% (~2% min.) when volume is already at a low percent; in other words, it raises the volume by a greater amount the higher the volume already is

Alt + minus: Does the same as above, but decreases by those amounts

Alt + 8: Sets volume to 50%, not 80%

What gives? (I have tried "set" instead of "sset" in .xbindkeysrc.)

Last edited by SecondComing (2021-08-08 22:53:43)

Offline

#2 2021-08-09 01:27:55

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,444
Website

Re: Adjusting volume with amixer has unexpected & inaccurate results

How are you determining the actual percentage change?  Please show the complete output.

Also note that percents in amixer are prone to substantial rounding error in amixer as they are converted to a integer scale (at least on my current system from 0-87).


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#3 2021-08-09 03:50:23

SecondComing
Member
From: Eureka Springs, AR
Registered: 2020-10-25
Posts: 18
Website

Re: Adjusting volume with amixer has unexpected & inaccurate results

Trilby wrote:

How are you determining the actual percentage change?  Please show the complete output.

I'm just looking at alsamixer as I do it. Not sure how pressing a key binding would produce output.

Offline

#4 2021-08-09 13:52:02

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,444
Website

Re: Adjusting volume with amixer has unexpected & inaccurate results

I meant the output of whatever you were using to determine how much the volume changed.  You can run the amixer commands and get the output and share it here so we can see what's actually happening.

On that, does this happen when you run the amixer commands from the key bindings manually?  Or does this only happen when using the key bindings?


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

Board footer

Powered by FluxBB