All of lore.kernel.org
 help / color / mirror / Atom feed
From: Carlo Wood <carlo@alinoe.com>
To: Kai Vehmanen <kai.vehmanen@wakkanet.fi>
Cc: alsa-devel@lists.sourceforge.net, xvoice@yahoogroups.com
Subject: Re: Bug in OSS simulation (ALSA 0.9.4)
Date: Fri, 11 Jul 2003 03:41:58 +0200	[thread overview]
Message-ID: <20030711014158.GA29151@alinoe.com> (raw)
In-Reply-To: <Pine.LNX.4.44.0307110251390.5612-100000@ecabase.localdomain>

On Fri, Jul 11, 2003 at 03:05:28AM +0300, Kai Vehmanen wrote:
> One thing to try is the alsa-oss package. This is an alternative
> (user-space) implementation of the OSS emulation layer. It relies on the
> LD_PRELOAD mechanism. You can test it with:
> 
> LD_PRELOAD=/path/to/libaoss.so.0.0.0 ./a.out
> 
> ... where "a.out" is your test program. You should be able to run ViaVoice
> also this way. You can get the alsa-oss package from ALSA CVS or from:
> LD_PRELOAD=~/src/alsa-cvs/alsa-oss/.libs/libaoss.so.0.0.0 ./a.out

Thanks, this is very useful.

I downloaded the source of ALSA from CVS.
It turns out that I cannot compile it: I have kernel 2.5.74
and the alsa source (alsa-drivers and alsa-kernel) is full
of 'spin_lock_*' function calls that do not exist in kernel 2.5.

Nevertheless, I could compile the alsa-oss library.

This turns out not to be blocking anymore - but, the result of
a SNDCTL_DSP_GETISPACE is unfortunately nonsense :(

I now get:

~>LD_PRELOAD=/usr/src/alsa/alsa-oss/.libs/libaoss.so.0.0.0 a.out
Fragment size: 1024
Number of fragments: 32767
Number of channels: 1
Sample rate: 22050
Number of full fragments that can be read or written without blocking: 0
Total number of fragments allocated for buffering: 2
Size of a fragment in bytes: 2048
Number of bytes that can be read or written immediately without blocking: 1024
Number of full fragments that can be read or written without blocking: 0
Total number of fragments allocated for buffering: 2
Size of a fragment in bytes: 2048
Number of bytes that can be read or written immediately without blocking: 1024
Number of full fragments that can be read or written without blocking: 0
Total number of fragments allocated for buffering: 2
Size of a fragment in bytes: 2048
Number of bytes that can be read or written immediately without blocking: 1024
Number of full fragments that can be read or written without blocking: 0
Total number of fragments allocated for buffering: 2
Size of a fragment in bytes: 2048
Number of bytes that can be read or written immediately without blocking: 1024
Number of full fragments that can be read or written without blocking: 1
Total number of fragments allocated for buffering: 2
Size of a fragment in bytes: 2048
Number of bytes that can be read or written immediately without blocking: 3072
Read 1024 bytes.
etc

The size of a fragment is NOT 2048... it is 1024.
It also reports 3072 bytes available, which is more than the total size of the buffer!

I am not sure what the application will do with mis-information like this.

-- 
Carlo Wood <carlo@alinoe.com>


-------------------------------------------------------
This SF.Net email sponsored by: Parasoft
Error proof Web apps, automate testing & more.
Download & eval WebKing and get a free book.
www.parasoft.com/bulletproofapps1

  reply	other threads:[~2003-07-11  1:41 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-10  1:33 Bug in OSS simulation (ALSA 0.9.4) Carlo Wood
2003-07-10  1:51 ` Carlo Wood
2003-07-10 22:54   ` Kai Vehmanen
2003-07-10 23:43     ` Carlo Wood
2003-07-11  0:05       ` Kai Vehmanen
2003-07-11  1:41         ` Carlo Wood [this message]
2003-07-10 13:15 ` James Courtier-Dutton
2003-07-10 22:36   ` Carlo Wood
2003-07-10 22:49 ` Kai Vehmanen
2003-07-10 23:07   ` James Courtier-Dutton
2003-07-11  0:00   ` Carlo Wood
2003-07-11  0:21     ` Kai Vehmanen
2003-07-10 23:09 ` Kai Vehmanen
2003-07-11  0:28   ` Carlo Wood
2003-07-11  0:44     ` Kai Vehmanen
2003-07-11  2:03       ` Carlo Wood

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=20030711014158.GA29151@alinoe.com \
    --to=carlo@alinoe.com \
    --cc=alsa-devel@lists.sourceforge.net \
    --cc=kai.vehmanen@wakkanet.fi \
    --cc=xvoice@yahoogroups.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.