[alsa-devel] [patch 1/1] sgtl5000: Fix suspend/resume

Mark Brown broonie at opensource.wolfsonmicro.com
Wed Apr 6 01:23:53 CEST 2011


On Tue, Apr 05, 2011 at 09:56:12AM +0200, Arnaud Patard wrote:

> Which means that reg cache size is SGTL5000_MAX_REG_OFFSET / 2 and
> register values stored without any "holes" in the array, except that in
> flat cache case, ASoC does :

> static int snd_soc_flat_cache_read(struct snd_soc_codec *codec,
>                                    unsigned int reg, unsigned int
>                                    *value)
> {
>         *value = snd_soc_get_cache_val(codec->reg_cache, reg,
>                                        codec->driver->reg_word_size);
>         return 0;
> }

> and snd_soc_get_cache_val returns cache[reg] which means that the cache
> size must have a length of SGTL5000_MAX_REG_OFFSET and values stored
> with "holes".

But this means that _get_cache_val() needs to be fixed to take account
of the register cache step size.  We shouldn't just pad the array, that
doesn't help.


More information about the Alsa-devel mailing list