From: Deweloper <deweloper@wp.pl>
To: alsa-devel@alsa-project.org
Subject: hw/sw params API in alsa-lib miscompiled, result: unusable alsa-utils
Date: Mon, 20 Mar 2017 15:19:49 +0100 [thread overview]
Message-ID: <20170320151949.1d7494b6@amazur-u.kat.adbgroup.pl> (raw)
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?
--
next reply other threads:[~2017-03-20 14:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-20 14:19 Deweloper [this message]
2017-03-21 8:10 ` hw/sw params API in alsa-lib miscompiled, result: unusable alsa-utils Clemens Ladisch
2017-03-21 16:33 ` Deweloper
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170320151949.1d7494b6@amazur-u.kat.adbgroup.pl \
--to=deweloper@wp.pl \
--cc=alsa-devel@alsa-project.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).