[alsa-devel] [PATCH v3] ASoC: tas5086: add regulator consumer support

Mark Brown broonie at kernel.org
Thu Jul 3 17:12:29 CEST 2014


On Thu, Jul 03, 2014 at 04:56:43PM +0200, Daniel Mack wrote:
> The TAS5086 has two power domains, DVDD and AVDD. Enable them both as
> long as the codec is in use.
> 
> Also, switch on the power to identify the chip at device probe level,
> and switch it off again afterwards. The codec level will take care for
> power handling later.

Applied, thanks.  One small thing:

> +	/*
> +	 * The chip has been identified, so we can turn off the power
> +	 * again until the dai link is set up.
> +	 */
> +	regulator_bulk_disable(ARRAY_SIZE(priv->supplies), priv->supplies);
> +
> +	if (ret == 0)
> +		ret = snd_soc_register_codec(&i2c->dev, &soc_codec_dev_tas5086,
> +					     &tas5086_dai, 1);

It can be slightly smoother to do the disable after registering so that
if we immediately cause a card to register and that causes the device to
become active again we don't bounce the power.  Nobody is ever likely to
notice the difference though.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20140703/9b394a54/attachment-0001.sig>


More information about the Alsa-devel mailing list