Noted. The method for attaining base and shifting the dB scale makes good sense. On Sat, May 23, 2009 at 7:08 PM, Lennart Poettering <lennart at poettering.net> wrote: > On Sat, 23.05.09 18:42, Jud Craft (craftjml at gmail.com) wrote: > >> >> Hmm. ?I assume that when you say that ALSA gives no reference point >> for 0dB on a card, this is because the cards themselves have no such >> reference point, correct? > > The ALSA drivers simply expose the dB information that is documented > in the hardware documentation. Often that documentation mentions > relative to which reference level those dB values are. However, ALSA > doesn't encode that information in any way. Also, a lot of > hardware/documentation does *not* document the reference level, for > example the USB spec doesn't do that at all. > > We had longer discussions on alsa-devel about this. Ideally all > 'inner' mixer sliders set 0dB to 'same amplitude on input as on output > of the element in question'. And all 'outer' mixer sliders set 0dB to > some defined reference voltage. However, realisitically it is an > incredible amount of work if not impossible to do that. For many cards > (especially cheaper ones) we'd have to physically measure the output > voltage. We'd then have to create a huge quirk database that includes > all that measured data. And then, what would we do about integrated > speakers (i.e. speakers with an USB cable)? Measure sound pressure? > > Given the limited manpower, the lacking equipment and the fact that we > have better things to do then spending all days with measuring sound > cards this is unlikely to be added. > > But of course, you are welcome to contribute work in this area! > >> Next question, for the curious: ?how does PA know how to shift the dB >> scale to where 0dB matches maximum amplification, if ALSA itself >> doesn't know? > > For a specific driver ALSA tells us that the volume control range goes > from (as an example) -64dB to +7dB. We have no clue what 0dB means in > this range data. However, what we know is that we can shift this to > -71dB to 0dB and then we know that 0dB is max hw amplification, -71dB > is min hw attenutation and -7dB is the 'base' volume. > > Of course, this shifting doesn't add any information we didn't have > before. However it unifies behaviour across different sound cards a > bit and also makes the mixer a bit more like your stereo where 0dB is > max amplification too. > >> So what you've said is basically -- "Yes, we know this is weird, but >> we have a new volume scaling formula in the current tree that should >> help balance out your volume control a little bit." ?Right? > > What I said is basically that it is *not* weird and *does* make a lot > of sense, although the 'percent' to loudness mapping in 0.9.15 can be > improved. Which I did in PA git. And that you should stick to the dB > information when comparing volume slider settings, and ignore the > 'percentage' data, because it is very arbitrarily mapped. > > Lennart > > -- > Lennart Poettering ? ? ? ? ? ? ? ? ? ? ? ?Red Hat, Inc. > lennart [at] poettering [dot] net > http://0pointer.net/lennart/ ? ? ? ? ? GnuPG 0x1A015CC4 > _______________________________________________ > pulseaudio-discuss mailing list > pulseaudio-discuss at mail.0pointer.de > https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss >