Valeur différentes retournées par amixer et alsamixer, l'explication :
No, both are correct. You are dreaming too much on the world unified
percentage representation smile
The percentage in amixer has nothing to do with dB level.
It's just the percentage of the raw value range of that mixer
element. Thus showing 89% is correct. It's 10% down from 100%
(1% is because of the resolution of the raw values).
Now, alsamixer shows the percentage in a different way. It's
explained well in the source code (alsamixer/volume_mapping.c), but
not mentioned in the man page, unfortunately.
* The mapping is designed so that the position in the interval is proportional
* to the volume as a human ear would perceive it (i.e., the position is the
* cubic root of the linear sample multiplication factor). For controls with
* a small range (24 dB or less), the mapping is linear in the dB values so
* that each step has the same size visually. Only for controls without dB
* information, a linear mapping of the hardware volume register values is used
* (this is the same algorithm as used in the old alsamixer).
The percentage representation in alsamixer corresponds to this
mapping, thus it's neither dB nor linear percent.
Un autre article sur la gestion du son du raspberry avec amixer. J'ai pu améliorer ma lib (https://github.com/arnaudmm/rasp-utils/blob/master/picsound.sh) pour le projet piclodio2 (https://github.com/Sispheor/Piclodio2/)