[alsa-devel] [PATCH 3/4] ASoC: tlv320aic3x: Use regulator notifiers for optimizing the cache sync
broonie at opensource.wolfsonmicro.com
Fri Sep 10 13:58:08 CEST 2010
On Fri, Sep 10, 2010 at 02:23:31PM +0300, Jarkko Nikula wrote:
> Mark, struct aic3x_disable_nb was created for getting pointer to aic3x easily.
> Probably same idea could be applied to wm8962 as well?
Probably. TBH I'd rather fix this in the notifier API - either way it's
> @@ -153,7 +161,7 @@ static int aic3x_write(struct snd_soc_codec *codec, unsigned int reg,
> data = value & 0xff;
> aic3x_write_reg_cache(codec, data, data);
> - if (!aic3x->power ||
> + if (codec->cache_sync ||
> codec->hw_write(codec->control_data, data, 2) == 2)
> return 0;
This isn't the expected use of cache_sync, the idea is that it is a flag
indicating that a cache sync is required - this will happen when writes
are held while the regulators are disabled but the regualators haven't
actually been powered down. This can be nice since we end up not
needing to do I2C I/O during bulk configuration at startup, I'm hoping
that we may be able to exploit this even more in the future.
More information about the Alsa-devel