[alsa-devel] hw/sw params API in alsa-lib miscompiled, result: unusable alsa-utils
Deweloper
deweloper at wp.pl
Mon Mar 20 15:19:49 CET 2017
Hi,
I built alsa-lib and alsa-utils (v.1.1.3) from sources, using GCC 6.
When I tried launching arecord, it failed due to lack of memory.
During analysis I found out that:
- the message is printed because realloc(buf, period_size) returns NULL
- realloc() returns NULL because period_size is 0
- period_size is 0 because snd_pcm_hw_params_get_period_size() puts 0
to *frames (instead of 32768) and returns 32768 (instead of 0)
- snd_pcm_hw_params_get_period_size() misbehaves in this way because
although a NEW API header is used, the OLD API implementation is
actually called
So it seems that I've run into exactly the same problem which was
described by John Spencer in August 2013:
http://mailman.alsa-project.org/pipermail/alsa-devel/2013-August/065031.html
> my problem is that the old version is getting called instead of the
> new one
Did anything change in this matter since August, 2013?
--
More information about the Alsa-devel
mailing list