On Wed, 2011-03-09 at 12:53 +0200, David Henningsson wrote: > On 2011-03-04 16:42, Tanu Kaskinen wrote: > > Here's a pile of patches. The first two implement the concept of "decibel > > fixes" for alsa devices. A decibel fix is basically a table that maps the > > raw volume steps of a mixer element to manually configured decibel values. > > Hmm, taking Lennart's hat on, shouldn't bad decibel information be fixed > in the kernel, rather than in Pulseaudio? Then other non-PA applications > would benefit from the change as well. Yes, the fixes should be pushed to alsa. Maybe the DecibelFix documentation in profile-sets/default.conf should even say that if you're using this feature and not actively pushing the fixes to alsa, then you're doing it wrong. But if the kernel driver is already correct in the sense that it follows the chip specifications, then I believe this feature is useful for convincing the alsa developers to fix the driver - if the decibel mapping has been tested in Pulseaudio already, we can give a ready-made table to the alsa devs and they don't need to bother with the measurement part. I think measuring the correct levels is quite practical to do with pulseaudio: the flat volume and sync volume features make it possible to easily compare the subjective volume difference between hw attenuation and with sw attenuation. If you play a quiet stream (eg. "pacat --volume=10000 < /dev/urandom") and then play short clips of silence at full volume, the flat volume feature switches smoothly between hw and sw attenuation for the quiet stream, and incorrect dB information is easy to observe. Based on some personal experience, I believe subjective measurement is even more accurate than measuring the levels using an oscilloscope - at low volume levels the background noise can make getting an accurate measurement really hard with an oscilloscope. It's possible that this feature will lead to lowered pressure to report dB problems to alsa, and if that means less fixes in alsa, then these patches should be removed. But since anyone can try out tweaking the dB values in pulseaudio's configuration easily (relative to hacking alsa drivers), maybe this will actually increase the amount of fixes in alsa... These patches are old (only now I got around to polishing them and sending them to upstream), and I've actually already asked Lennart's opinion of this feature about a year ago. At that time he ok'd the concept. -- Tanu