[alsa-devel] [PATCH 00/12] ASoC: dapm: Cleanups and speed-ups

Mark Brown broonie at kernel.org
Tue Oct 28 01:14:35 CET 2014


On Sat, Oct 25, 2014 at 03:58:21PM +0200, Lars-Peter Clausen wrote:

> There are two patches in this series which have direct impact on the stats.
> The first one is the one that marks paths from a supply as a supply path.
> Those paths are skipped in is_connected_{input,output}_ep and hence supply
> widgets no longer appear in the path checks stat. While this might look
> pretty good in the stats the actual performance improvement is not that big
> since is_connected_{input,output_ep} will return right away if it encounters
> a supply widget. The change is still worth doing since the check if a path
> is connected to a supply comes essentially for free and we can also remove
> the code that handles supply widgets from is_connected_{input,output_ep}.

> The second change is the last patch in this series which caches the
> connected input and output path numbers between multiple runs of
> dapm_power_widgets() and only re-calculates those numbers if they could have
> changed. Since per DAPM operation typically only either changes the number
> of inputs or outputs the number of path checks is reduced by 50%. The number
> of neighbor checks is also reduced about the same percentage, but since the
> number of neighbors encountered when walking from sink to source is not the
> same as when walking from source to sink the actual numbers will slightly
> vary from card to card (e.g. for a mixer we see 1 neighbor when walking from
> source to sink, but the number of inputs neighbors when walking from source
> to sink).

Right, I get all this - my point was more that I had to think about it
rather than being able to see it from the changelog and with performance
it's particularly important since it's the sort of thing people end up
looking for when they run into problems in production so giving them a
helping hand is good.
-------------- 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/20141028/1065a238/attachment.sig>


More information about the Alsa-devel mailing list