volume: get the normalized volume like alsamixer and DE's indicator

Or the percentage value will be different from alsamixer or desktop
environment's indicator, which confuses users.

Quote from amixer's manpage, "Use the mapped volume for evaluating the
percentage representation like alsamixer, to be more natural for human
ear."

ref:
http://git.alsa-project.org/?p=alsa-utils.git;a=blob;f=alsamixer/volume_mapping.c

Signed-off-by: Adam Lee <adam8157@gmail.com>
Signed-off-by: Adrian C. (anrxc) <anrxc@sysphere.org>
This commit is contained in:
Adam Lee 2013-12-04 09:32:14 +01:00 committed by Adrian C. (anrxc)
parent 3ef0f11d8e
commit bfbc1bdd51
1 changed files with 1 additions and 1 deletions

View File

@ -26,7 +26,7 @@ local function worker(format, warg)
}
-- Get mixer control contents
local f = io.popen("amixer get " .. warg)
local f = io.popen("amixer -M get " .. warg)
local mixer = f:read("*all")
f:close()