]> git.alsa-project.org Git - alsa-lib.git/commit
Add support for gain in softvol plugin
authorSteve Longerbeam <stevel@embeddedalley.com>
Fri, 18 May 2007 13:04:12 +0000 (15:04 +0200)
committerTakashi Iwai <tiwai@suse.de>
Fri, 18 May 2007 13:04:12 +0000 (15:04 +0200)
commit63e4c591f904abd6699966087a6f0dd41d1101ab
tree7c87d0200217e63f68edeace6a66a89d3910aaec
parent577959ec8739212b3ed65f5f44b2e0bb41db8999
Add support for gain in softvol plugin

This patch allows for gain in the softvol plugin, in addition to attenuation.
The plugin now has a "max_dB" parameter (up to 50 dB) as well as the
original "min_dB" parameter (down to -51 dB). max_dB defaults to 0 dB, so
unless max_dB is specified in a device conf, the behavior of the plugin will
be the same as before (attenuation only).

HDA-Intel.conf is also modified to use softvol for its default capture.
So now, capture is filtered through softvol (range -30 to +30 dB) before
being passed on to dsnoop as before.

The softvol plugin allows a range of -51 to +50 dB, so max_dB could be
increased to 50. But eventually samples are going to get clipped. At 40
dB I was beginning to get clipping when recording a sample sound at a
"reasonably soft" volume using a digital mic on the stac9205 HDA codec.

The motivation for this work is that some HDA codecs have no hardware gain
control for some paths. For instance, the stac9205 has support for digital
mics, but there is no gain control widget for this signal before it is placed
on the Azalia link (only a mute). Therefore gain can only be accomplished
via software.

Signed-off-by: Steve Longerbeam <stevel@embeddedalley.com>
src/conf/cards/HDA-Intel.conf
src/pcm/pcm_softvol.c