[alsa-devel] [PATCH] ASoC: TWL4030: Add capture source selection and mic gain control

Mark Brown broonie at sirena.org.uk
Tue Dec 2 11:27:18 CET 2008


On Tue, Dec 02, 2008 at 12:15:51PM +0200, Grazvydas Ignotas wrote:
> On Tue, Dec 2, 2008 at 1:26 AM, Mark Brown <broonie at sirena.org.uk> wrote:

> > Hrm.  Disabling the gain like this is likely to cause trouble for jack
> > detect.  However, that's not implemented yet so not a problem currently.

> Well the TRM doesn't mention jack detect at all (except headset detect
> using separate switch connected to GPIO). Or is that some software
> feature?

Hardware normally.

> >> +     SOC_DOUBLE_TLV("Microphone Boost", TWL4030_REG_ANAMIC_GAIN,
> >> +             0, 3, 5, 0, microphone_gain_tlv),

> > Should be "Microphone Boost Volume" or possibly just "Microphone Volume".

> Setting this to 0 still records from MICs, but the signal is rather
> weak, so it looks more like boost to me. This control also affects
> aux/line inputs if they are selected, and causes rather bad

So Microphone Boost Volume then (the addition of Volume is the important
bit here).

> distortions for them if control is not set to 0. Perhaps this control
> could be disabled (or at least automatically set to 0) while aux/line
> inputs are selected? Can that be done?

Yes, have your custom control update it and use snd_ctl_notify() to kick
applications if you update the user visible value.  Even better would be
to do something more fancy and use a custom control to present a
shadowed control to user space so they don't see the adjustment.


More information about the Alsa-devel mailing list