[alsa-devel] [PATCH] ALSA: ASoc: Add regulator support to CS4270 codec driver
Daniel Mack
daniel at caiaq.de
Fri Nov 27 13:41:39 CET 2009
On Fri, Nov 27, 2009 at 11:25:51AM +0000, Mark Brown wrote:
> On Thu, Nov 26, 2009 at 06:42:45PM +0100, Daniel Mack wrote:
> > +
> > + switch (level) {
> > + case SND_SOC_BIAS_ON:
> > + ret = regulator_enable(cs4270->vd_reg);
> > + if (ret < 0)
> > + return ret;
> > + ret = regulator_enable(cs4270->vlc_reg);
> > + if (ret < 0)
> > + return ret;
> > + /* fall thru */
>
> I'd expect these to just be enabled on OFF->STANDBY (or in the suspend
> code indeed) - you'll need to restore the register cache after the
> digital comes up anyway.
>
> Also, you'll leak references since you only turn them off when going
> into OFF but enable them every time you go to ON.
Ok, agreed. Next try below.
Thanks,
Daniel
More information about the Alsa-devel
mailing list