[alsa-devel] using the softvol plugin with min_dB > 0

Takashi Iwai tiwai at suse.de
Tue Nov 13 16:28:13 CET 2018


On Tue, 13 Nov 2018 15:23:53 +0100,
Guillermo Rodriguez Garcia wrote:
> 
> Hi all,
> 
> I have a board with a tlv320aic3106 codec and a digital mic. The
> tlv320aic3106 does not support hardware gain for the digital mic, so I
> am using the softvol plugin to provide this via software.
> 
> I would like to setup softvol so that it applies a gain in a range
> that goes from approx +10dB to approx +40dB. The problem is that
> softvol only accepts negative values for min_dB, i.e. assumes that you
> *always* want to do attenuation, and that you might or might not want
> to have gain (max_dB can be zero or negative).
> 
> Is there any reason for this, or is it just historical ? (I am aware
> that the original softvol plugin only supported attenuation, and that
> support for gain was added later)

It's mostly a historical reason.

> Is it possible to setup softvol to accept a positive min_dB value ?

Sure.  You'd need to fix some more codes, not only removing the
negative min_dB check, though.


thanks,

Takashi


More information about the Alsa-devel mailing list