[alsa-devel] [PATCH] ASoC: Suppress restore of default register values for rbtree cache sync

Dimitris Papastamos dp at opensource.wolfsonmicro.com
Mon Jun 6 11:29:49 CEST 2011

On Mon, Jun 06, 2011 at 10:26:12AM +0100, Mark Brown wrote:
> On Mon, Jun 06, 2011 at 10:18:07AM +0100, Dimitris Papastamos wrote:
> > There should be a check for reg_def_copy being NULL, the soc-cache code
> > is also built around the idea that the driver might not provide a
> > register defaults cache at all so this change needs to cope with that.
> Hrm, at this point I'm rather inclined to say that if you're using a
> fancy cache method you should be providing defaults.
> > Also I'd expect the reg_def_copy cache to be freed sooner rather than
> > while unregistering the codec, this is not happening at the moment,
> > which is wasting significant space.  This is the case because it is only
> > used during initialization.
> That's the bit I was saying at the bottom of the commit message about
> putting it into the node itself; since we're currently never freeing it
> we can use it but we should really be copying it into the tree.  The
> memory wasted is a *much* less severe problem than the I/O bandwidth
> consumed rewriting the entire register map on every sync.

Yes, in the previous version of the rbtree code, it was saving it in
the node itself.  I was planning to have a separate block with the
default values for the block based version but haven't yet got around
to that.


More information about the Alsa-devel mailing list