[alsa-devel] [PATCH] ASoC: tpa6130a2: Support for limiting gain

Peter Ujfalusi peter.ujfalusi at nokia.com
Thu May 6 13:21:28 CEST 2010

On Thursday 06 May 2010 12:49:42 ext Mark Brown wrote:
> On Thu, May 06, 2010 at 10:37:18AM +0300, Peter Ujfalusi wrote:
> > Add support for platform dependent gain limiting on the
> > tpa6130a2 (and tpa6140a2) Headset amplifier.
> > 
> > Signed-off-by: Peter Ujfalusi <peter.ujfalusi at nokia.com>
> Acked-by: Mark Brown <broonie at opensource.wolfsonmicro.com>


> but we should really provide a generic implementation of this.

Yeah, would be really useful.
What I was wondering about is the cases when you have a codec + amp in a 
If we take for example twl4030 and the tpa6130 connected together:
than we have 4 levels of gain control inside of twl, than one additional level 
on the tpa side.
What would be nice is to somehow limit the whole chain, but it seams really 
complicated thing because of the big amount of combinations that you can 
actually achieve the same level at the output.

So the gain-chain limitation is really holistic problem IMHO.

But I guess the core could gain support for limiting individual volume controls.
Some soc-limit-gain("kcontrol name", min, max)
Than it goes through the controls on the card, finds the kcontrol, and fixers up 
the limits..
So machine drivers can fix up the gain limits on their cards with ease, and no 
additional support from the codec/amp drivers are going to be needed
Hmm, this would be neat!

Sounds  interesting, I might look at this ;)


More information about the Alsa-devel mailing list