[alsa-devel] [PATCH] ASoC: Fix wm8753 register cache size and initialization

Mark Brown broonie at opensource.wolfsonmicro.com
Fri Jul 3 11:32:50 CEST 2009

On Fri, Jul 03, 2009 at 12:46:08AM +0200, Lars-Peter Clausen wrote:

> The register cache size is of by one. There are 63 registers in use but the
> register cache size has only space for 62.

Only 62 of the registers are cached - please see the register cache
access code.

> Furthermore the codec's reg_cache_size is of by another one. Since the wm8753
> register cache uses one-based indexing we have to add one to its size.

I'm not 100% sure what you mean here but I suspect you're misreading the
register cache access code?

> Register cache initialization only copied the first sizeof(void*) elements leaving the others
> uninitialized. Fix it by using the size of the reg cache template.

This fix is good (but should use wm8753->reg_cache for the size).  I'll
fix this.

More information about the Alsa-devel mailing list