On Thu, 10.06.10 17:11, Colin Guthrie (gmane@colin.guthr.ie) wrote:
'Twas brillig, and Raymond Yau at 10/06/10 04:16 did gyre and gimble:
Can you explain how PA handle the volume controls of ac97 codec ?
PCM -34.5dB to +*12* dB Master -46.5dB to 0dB
The total dB range (PCM + MASTER) is -81dB to +*12*dB
Most user concern about recording without distrotion. (i.e. best result when Capture Volume at 0dB , PCM and Master Volume at 0dB ) and they need where are 0dB points
I'm not 100% sure how this is handled, but I know it's not ignored. You'll have to ask Lennart directly or dig in the code to see for sure.
If the ALSA volume range is -x dB to +y dB, then the PA volume range will be -x-y dB to 0dB (i.e. shifted by -y dB). On top of that most volume controls should then mark the ALSA 0dB point as "base" volume on the slider, at what PA then calls -y dB.
That way we will expose 0dB as maximum hw amplitude uniformly on all sound cards and have a special point on the slider that is hinted to be the "comfort" point.
This is all explained on http://pulseaudio.org/wiki/WritingVolumeControlUIs#BaseVolumes
Lennart