summaryrefslogtreecommitdiff
path: root/include/trace/events/asoc.h
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2015-08-11 22:38:00 +0300
committerMark Brown <broonie@kernel.org>2015-08-13 14:40:16 +0300
commita3423b02cf745c1418f1f199646c450d6fc9ca4e (patch)
treefb31992296571629eebadfcc082802c13602d85a /include/trace/events/asoc.h
parent30abbe7727b23c6661daeea5d36be36ed7a41665 (diff)
downloadlinux-a3423b02cf745c1418f1f199646c450d6fc9ca4e.tar.xz
ASoC: dapm: Consolidate input and output path handling
After the recent cleanups and generalizations of the DAPM algorithm the handling of input and output paths is now fully symmetric. This means by making some slight changes to the data structure and using arrays with one entry for each direction, rather than separate fields, it is possible to create a generic implementation that is capable of handling both input and output paths. Unfortunately this generalization significantly increases the code size on the hot path of is_connected_{input,output}_ep() and dapm_widget_invalidate_{input,output}_paths(), which has a negative impact on the overall performance. The inner loops of those functions are quite small and the generic implementation adds extra pointer arithmetic in a few places. Testing on ARM shows that the combined code size of the specialized functions is about 50% larger than the generalized function in relative numbers. But in absolute numbers its less than 200 bytes, which is still quite small. On the other hand the generalized function increases the execution time of dapm_power_one_widget() by 30%. Given that this function is one of the most often called functions of the DAPM framework the trade-off of getting better performance at expense of generating slightly larger code at seems to be worth it. To avoid this still keep two versions of these functions around, one for input and one for output. But have a generic implementation of the algorithm which gets inlined by those two versions. And then let the compiler take care of optimizing it and removing he extra instructions. This still reduces the source code size as well as the makes making changes to the implementation more straight forward since the same change does no longer need to be done in two separate places. Also on the slow paths we can use a generic implementations that handle both input and output paths. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/trace/events/asoc.h')
0 files changed, 0 insertions, 0 deletions