[alsa-devel] [PATCH 2/2] ASoC: dapm: Add cache to speed up adding of routes

Mark Brown broonie at kernel.org
Thu May 7 18:33:02 CEST 2015


On Thu, May 07, 2015 at 04:53:34PM +0200, Lars-Peter Clausen wrote:
> On 05/07/2015 02:48 PM, Mark Brown wrote:

> >Should we just have the cache in the dapm context or the card instead of
> >locally?  It's only two pointers at the minute so there doesn't seem to
> >be much cost from keeping it around and it might generate somme more
> >hits for some use cases.  Or to put it another way why is the cache
> >optional and created and re-created here like this?

> I don't think the cache will produce hits anywhere else other then adding
> routes from the same route table. That's the only place were the same widget
> or widgets close to each other are accessed sequentially. I'd prefer to keep
> it locally.

It's probably the overwhelmingly common case with the current
implementation at least, we might get some extras from things like mic
biases on boards and CODECs that handle variants by using multiple
routing tables but they'll be vastly less common than things from the
same table.  My thinking here is more that improving the encapsulation
makes it easier to do a better job later for no meaningful cost now.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: Digital signature
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20150507/b4585e79/attachment.sig>


More information about the Alsa-devel mailing list