On Mon, 15 Jan 2018, Takashi Iwai wrote: > > Ok, my suggestion would be set MAX_DB_UPPER_LIMIT to 90 dB. 90 dB comes > > out as 31622, which still is manageable when shifted up by VOL_SCALE_SHIFT > > (= 16), fitting in a 32-bit int. Thus it works in MULTI_DIV_short() too, > > where it is multiplied with the 16-bit sample value yielding an int. > > > > I'll try it out and prepare a patch. > > Well, but +90dB gain doesn't look like a normal usage pattern. Why do > you have to use softvol plugin for achieving that specific purpose? The usecase we have actually calls for 55 dB of gain maximum, but I was thinking that looking at the code the maths can actually handle 90 dB so it would be good 'reasonable limit' - it's a nice round number and fits in 16 bits (signed). The usecase we have is using digital MEMS microphones ((2S connected, with no integral amplification) and when the sound source is far away, a fair amount of gain can be needed. /Ricard -- Ricard Wolf Wanderlöf ricardw(at)axis.com Axis Communications AB, Lund, Sweden www.axis.com Phone +46 46 272 2016 Fax +46 46 13 61 30 _______________________________________________ Alsa-devel mailing list Alsa-devel@xxxxxxxxxxxxxxxx http://mailman.alsa-project.org/mailman/listinfo/alsa-devel