Hi,
A batch of this patchset is to apply the same idea to mixer feature as I posted in this thread. http://mailman.alsa-project.org/pipermail/alsa-devel/2016-July/110196.html
In short, replacement of alloca() with automatic variables brings us some advantages; better execution performance and saving local storages just for a little.
I can see below effect on my environment (Ubuntu 16.04, amd64) $ git checkout master $ git show HEAD commit 33e946fdd32da2b918e88750fcfd78014ae3e079 ... $ ./gitcompile --with-plugindir=/usr/lib/x86_64-linux-gnu/alsa-lib/ ... $ ls -l src/.libs/libasound.so.2.0.0 -rwxrwxr-x 1 mocchi mocchi 4783080 7月 15 09:08 src/.libs/libasound.so.2.0.0 $ git checkout remove-alloca-mixer $ make ... $ ls -l src/.libs/libasound.so.2.0.0 -rwxrwxr-x 1 mocchi mocchi 4780152 7月 15 09:09 src/.libs/libasound.so.2.0.0 $ gcc -v ... gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.1)
Takashi Sakamoto (29): mixer: include library local header to find layout of structures mixer: change code formatting for elem_read_volume() mixer: remove alloca() from elem_read_volume() mixer: change code formatting for elem_read_route() mixer: remove alloca() from elem_read_route() mixer: change code formatting for elem_read_enum() mixer: remove alloca() from elem_read_enum() mixer: change code formatting for selem_read() mixer: remove alloca() from selem_read() mixer: change code formatting for elem_write_volume() mixer: remove alloca() from elem_write_volume() mixer: change code formatting for elem_write_switch() mixer: remove alloca() from elem_write_switch() mixer: remove alloca() from elem_write_switch_constant() mixer: change code formatting for elem_write_enum() mixer: remove alloca() from elem_write_enum() mixer: change code formatting for elem_write_route() mixer: remove alloca() from elem_write_route() mixer: change code formatting for selem_write_main() mixer: remove alloca() from selem_write_main() mixer: change code formatting for init_db_range() mixer: remove alloca() from init_db_range() mixer: remove alloca() from enum_item_name_ops() mixer: remove alloca() from get_enum_item_ops() mixer: remove alloca() from set_enum_item_ops() mixer: change code formatting for simple_add1() mixer: remove alloca() from simple_add1() mixer: change code formatting for simple_event_add() mixer: remove alloca() from simple_event_add()
src/mixer/simple_none.c | 208 ++++++++++++++++++++++++------------------------ 1 file changed, 106 insertions(+), 102 deletions(-)