[alsa-devel] [PATCH 002/002] ASoC: Replace max98090 Device Driver

Mark Brown broonie at opensource.wolfsonmicro.com
Sat Jan 26 08:12:54 CET 2013

On Fri, Jan 25, 2013 at 07:39:45AM -0800, Jerry Wong wrote:
> On Thu, Jan 24, 2013 at 03:28:54PM -0800, Jerry Wong wrote:

> > This is an odd control that is a combination of an enum and a power
> > management widget. The 0 value of the enum  turns power off.
> > Not sure what is another choice. The enum value needs to be
> > saved so it can be restored when DAPM turns the control on.

> > That doesn't appear to be what your control actually does - what happens
> > if someone writes ot the control while the widget is powered down?

> It stores the desired value for DAPM to use when the widget is powered up.

It looks like it's a SOC_ENUM_SINGLE so it should map directly on to the
register map?

> > > +static const struct snd_kcontrol_new max98090_snd_controls[] = {
> > > +       SOC_SINGLE("MIC Bias VCM Bandgap", M98090_REG_BIAS_CNTL,
> > > +               M98090_VCM_MODE_SHIFT, M98090_VCM_MODE_NUM - 1, 0),

> > > Why is this a user visible control?

> > It is not controlled by DAPM. The low power function is taken care of by
> > /SHDN\, so this retains the user choice of bandgap or divider reference.

> > Why would the user want this choice?

> This allows the user to select VCM Bandgap for all their references (higher power
> and higher audio quality when in use), or divider reference (lower power and lower
> audio quality when in use). /SHDN\ prevents power drain when either is not in use.

So in that case I'd recommend doing something like making it an
enmerated control which makes the tradeoff clear.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20130126/343ff18d/attachment-0001.sig>

More information about the Alsa-devel mailing list