[alsa-devel] [PATCH 4/4] ASoC: tlv320aic3x: Let the codec hit SND_SOC_BIAS_OFF when idle

Jarkko Nikula jhnikula at gmail.com
Fri Sep 10 14:42:38 CEST 2010


On Fri, 10 Sep 2010 13:00:17 +0100
Mark Brown <broonie at opensource.wolfsonmicro.com> wrote:

> On Fri, Sep 10, 2010 at 02:23:32PM +0300, Jarkko Nikula wrote:
> 
> > -	regulator_bulk_disable(ARRAY_SIZE(aic3x->supplies), aic3x->supplies);
> > +	if (aic3x->power)
> > +		regulator_bulk_disable(ARRAY_SIZE(aic3x->supplies),
> > +				       aic3x->supplies);
> 
> This looks suspicious - doesn't it mean that the enable/disables won't
> be balanced any more?  I'd expect to either see the disable being
> uncondtional or the power flag being updated.  I could be missing
> something, though.

I agree.

This is actually due the current implementation where the regulators are
enabled in aic3x_i2c_probe and disabled in aic3x_probe. So this disable
is needed only if the driver is removed without aic3x_probe being
called.

I'll cook up one patch more that moves regulator setup to aic3x_probe
as most of the codec drivers are doing. (side issue: it's hard to probe
a chip if voltages are missing but doing regulator setup in i2c probe is
not any better either).


-- 
Jarkko


More information about the Alsa-devel mailing list