[alsa-devel] Maximum 50 dB gain in ALSA softvol plugin

Jaroslav Kysela perex at perex.cz
Mon Jan 15 15:32:53 CET 2018


Dne 15.1.2018 v 14:49 Ricard Wanderlof napsal(a):
> 
> 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.

Wow, the signal quality from few bits per sample must be really good ;-)
It would be better to use ADC with higher resolution (24-bit) and low
noise floor (but I see the possible costs requirements). This is why we
have such good audio in collaborative conferences :-)

					Jaroslav

-- 
Jaroslav Kysela <perex at perex.cz>
Linux Sound Maintainer; ALSA Project; Red Hat, Inc.


More information about the Alsa-devel mailing list