All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/12] ASoC: dapm: Cleanups and speed-ups
@ 2014-10-20 17:36 Lars-Peter Clausen
  2014-10-20 17:36 ` [PATCH 01/12] ASoC: dapm: Reduce number of checked paths in dapm_widget_in_card_paths() Lars-Peter Clausen
                   ` (12 more replies)
  0 siblings, 13 replies; 25+ messages in thread
From: Lars-Peter Clausen @ 2014-10-20 17:36 UTC (permalink / raw)
  To: Mark Brown, Liam Girdwood; +Cc: alsa-devel, Lars-Peter Clausen

Hi,

This series contains a few cleanups and speed-ups for the DAPM
implementation.  It starts with removing some dead or outdated code and
optimizing some lesser used operations.

The first larger change introduced by this series is the categorization of
widgets into sinks, sources, supplies and normal widgets. This is all the
information the main DAPM algorithm needs and using these categories makes
the code simpler and faster and hopefully easier to understand.

The second major change is to use more aggressive caching on the connected
input and output paths of a widget. It takes advantage of the fact that
typically only as subsection of the DAPM graph changes per operation. This
allows to drastically reduce the number of neighbor and path checks for some
DAPM operations. The change is most effective when the system is idle and
when changing the graph routing for a widget with multiple inputs. This e.g.
happens a lot when switching the audio profile. It still has quite good
improvements for other operations as well and typically leads to at least a
50% reduction of path and neighbor checks.

Some before and after DAPM stats. All testing was done with the ADAU1761.
Before is asoc/for-next, After~1 is asoc/for-next + this series except the
last patch, After is asoc/for-next + this series.

Changing a single control on a 5 input mixer while the system is idle:

          Power  Path  Neighbour
Before:   2      25    32
After~1:  2      12    30
After:    2       1     2

Cumulative numbers for switching the audio profile which changes 7 controls
while the system is idle:

          Power  Path  Neighbour
Before:   16     141   188
After~1:  16      80   170
After:    16       7    23

Cumulative numbers for switching the audio profile which changes 7 controls
while playback is active:

          Power  Path  Neighbour
Before:   52     207   297
After~1:  51     123   273
After:    51      29   109

Starting (or stopping) the playback stream:

          Power  Path  Neighbour
Before:   35     80    125
After~1:  34     34    117
After:    34     17     69

- Lars

Lars-Peter Clausen (12):
  ASoC: dapm: Reduce number of checked paths in
    dapm_widget_in_card_paths()
  ASoC: dapm: Remove always true path source/sink checks
  ASoC: dapm: Only mark paths dirty when the connection status changed
  ASoC: dapm: Do not add un-muxed paths to MUX control
  ASoC: dapm: Do not pretend to support controls for non mixer/mux
    widgets
  ASoC: dapm: Remove special DAI widget power check functions
  ASoC: dapm: Remove path 'walked' flag
  ASoC: dapm: Introduce toplevel widget categories
  ASoC: dapm: Add a flag to mark paths connected to supply widgets
  ASoC: dapm: Mark endpoints instead of IO widgets dirty during
    suspend/resume
  ASoC: dapm: Add a few supply widget sanity checks
  ASoC: dapm: Use more aggressive caching

 include/sound/soc-dapm.h |   9 +-
 sound/soc/soc-core.c     |   8 +-
 sound/soc/soc-dapm.c     | 755 +++++++++++++++++++++++++----------------------
 3 files changed, 409 insertions(+), 363 deletions(-)

-- 
1.8.0

^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2014-10-28  0:15 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-20 17:36 [PATCH 00/12] ASoC: dapm: Cleanups and speed-ups Lars-Peter Clausen
2014-10-20 17:36 ` [PATCH 01/12] ASoC: dapm: Reduce number of checked paths in dapm_widget_in_card_paths() Lars-Peter Clausen
2014-10-22 11:02   ` Mark Brown
2014-10-22 11:02   ` Mark Brown
2014-10-20 17:36 ` [PATCH 02/12] ASoC: dapm: Remove always true path source/sink checks Lars-Peter Clausen
2014-10-22 11:02   ` Mark Brown
2014-10-20 17:36 ` [PATCH 03/12] ASoC: dapm: Only mark paths dirty when the connection status changed Lars-Peter Clausen
2014-10-22 11:00   ` Mark Brown
2014-10-22 12:10     ` Lars-Peter Clausen
2014-10-22 15:29       ` Mark Brown
2014-10-20 17:36 ` [PATCH 04/12] ASoC: dapm: Do not add un-muxed paths to MUX control Lars-Peter Clausen
2014-10-20 17:36 ` [PATCH 05/12] ASoC: dapm: Do not pretend to support controls for non mixer/mux widgets Lars-Peter Clausen
2014-10-20 17:36 ` [PATCH 06/12] ASoC: dapm: Remove special DAI widget power check functions Lars-Peter Clausen
2014-10-22 11:12   ` Mark Brown
2014-10-20 17:36 ` [PATCH 07/12] ASoC: dapm: Remove path 'walked' flag Lars-Peter Clausen
2014-10-22 11:10   ` Mark Brown
2014-10-20 17:36 ` [PATCH 08/12] ASoC: dapm: Introduce toplevel widget categories Lars-Peter Clausen
2014-10-20 17:36 ` [PATCH 09/12] ASoC: dapm: Add a flag to mark paths connected to supply widgets Lars-Peter Clausen
2014-10-20 17:36 ` [PATCH 10/12] ASoC: dapm: Mark endpoints instead of IO widgets dirty during suspend/resume Lars-Peter Clausen
2014-10-20 17:36 ` [PATCH 11/12] ASoC: dapm: Add a few supply widget sanity checks Lars-Peter Clausen
2014-10-22 11:21   ` Mark Brown
2014-10-20 17:36 ` [PATCH 12/12] ASoC: dapm: Use more aggressive caching Lars-Peter Clausen
2014-10-22 11:36 ` [PATCH 00/12] ASoC: dapm: Cleanups and speed-ups Mark Brown
2014-10-25 13:58   ` Lars-Peter Clausen
2014-10-28  0:14     ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.