From: bugtrack@alsa-project.org Subject: [ALSA - lib 0000483]: alsa-libs samplerate-conversion causes assertion frames <= snd_pcm_mmap_avail Date: Mon, 6 Sep 2004 11:39:07 +0200 (CEST) Sender: alsa-devel-admin@lists.sourceforge.net Message-ID: <20040906093907.E00A63A008@server.perex-int.cz> Content-Type: text/plain; charset=iso-8859-1 Return-path: Received: from mail.perex.cz (gate.perex.cz [82.113.61.162]) by alsa.alsa-project.org (ALSA's E-mail Delivery System) with ESMTP id 480C726B for ; Mon, 6 Sep 2004 11:39:08 +0200 (MEST) Received: from server.perex-int.cz (server.perex-int.cz [192.168.100.2]) by gate.perex-int.cz (Perex's E-mail Delivery System) with ESMTP id 014D12025A for ; Mon, 6 Sep 2004 11:39:08 +0200 (MEST) Errors-To: alsa-devel-admin@lists.sourceforge.net List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , List-Archive: To: alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org The following bug has been SUBMITTED. ====================================================================== https://bugtrack.alsa-project.org/alsa-bug/bug_view_page.php?bug_id=0000483 ====================================================================== Reported By: jwrdegoede Assigned To: ====================================================================== Project: ALSA - lib Bug ID: 483 Category: ordinary pcm Reproducibility: always Severity: crash Priority: normal Status: new ====================================================================== Date Submitted: 09-06-2004 11:39 CEST Last Modified: 09-06-2004 11:39 CEST ====================================================================== Summary: alsa-libs samplerate-conversion causes assertion frames <= snd_pcm_mmap_avail Description: When running xmame (x.mame.net) with alsa selected for sound output on my es1688. I get the following error: pcm.c:5957: snd_pcm_mmap_commit: Assertion frames <= snd_pcm_mmap_avail(pcm)' failed. I checked the source for the alsa driver (I'm one of the xmame developers) and the number of frames it is passing to snd_pcm_writei is always smaller then or equal to the value returned by: err = snd_pcm_status(priv->pcm_handle, status); /* check err */ frames = snd_pcm_status_get_avail(status); After some more testing I noticed that alsa returns 22050 as the actual acquired samplerate, but I know from the oss days that my card can only do 22095 not 22050. So I thought this error might be caused by the alsa-lib-samplerate conversion code, which appearantly is default enabled (Fedora feature?) To test my hypothesis I tried creating an almost empty .asoundrc: pcm.!default { type hw card 0 } ctl.!default { type hw card 0 } And now alsa-lib returns 22095 as the acquired samplerate and everything works fine! So IMHO this problem is clearly somewhere in alsa-libs samplerate conversion. I've searched the internet for this assertion and I believe this bug has bitten more people and applications and needs fixing ASAP. (note I'm not saying this because I need it fixed, since the .asoundrc workaround works fine for me, but I'm saying this in the general interest) ====================================================================== Bug History Date Modified Username Field Change ====================================================================== 09-06-04 11:39 jwrdegoede New Bug ====================================================================== ------------------------------------------------------- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click