[alsa-devel] [PATCH 1/1] ASoC: core: cache index fix

Takashi Iwai tiwai at suse.de
Wed Aug 3 08:20:56 CEST 2011

At Wed, 3 Aug 2011 14:23:35 +0900,
Mark Brown wrote:
> On Tue, Aug 02, 2011 at 08:06:23PM +0200, Takashi Iwai wrote:
> > example.  So, alternatively, we can put the condition in some generic
> > filter function like readable/writeble things.
> Yes, I suggested that already, these are just unreadable and unwritable
> registers :/

BTW, looking through snd_soc_get_reg_access_index() for *_readable() & 
co , I wonder what would be the merit of using rbtree if this kind of
indexed array is present. If the actual value is also kept in that
array, we can drop the whole complex stuff like rbtree and lzo.

In addition, the default values aren't necessary to be in a flat array
form at all.  What we need is a copy function to expand the data
appropriately to reg_def_copy.
Or, we can consider dropping the flat reg_def_copy since it's just
wasteful to keep the flat array for all types unconditionally, but let
the codec driver provide an iterator and an look-up or such.



More information about the Alsa-devel mailing list