From alsa-devel-owner@alsa.jcu.cz  Sun Jan 10 00:01:45 1999
Received: from mb3.mailbank.com (mb3.mailbank.com [209.133.104.8])
	by marvin.jcu.cz (8.9.1a/8.9.1) with ESMTP id AAA27281
	for <alsa-devel@alsa.jcu.cz>; Sun, 10 Jan 1999 00:01:20 +0100
Received: from benjamin.net (bg@dialup084.liege.eunet.be [193.74.147.84])
	by mb3.mailbank.com (8.9.1a/8.9.1) with ESMTP id PAA24819
	for <alsa-devel@alsa.jcu.cz>; Sat, 9 Jan 1999 15:01:10 -0800
Message-ID: <3697DE65.4AF7E076@benjamin.net>
Date: Sat, 09 Jan 1999 22:55:33 +0000
From: Benjamin GOLINVAUX <golinvaux@benjamin.net>
MIME-Version: 1.0
To: alsa-devel@alsa.jcu.cz
Subject: Question : library API
References: <Pine.LNX.3.96.990107194645.2162B-100000@entry.jcu.cz> <3695119A.1F5@erols.com> <3697911A.94B2CD26@benjamin.net>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Reply-To: alsa-devel@alsa.jcu.cz
Sender: alsa-devel-owner@alsa.jcu.cz
Precedence: list

Hi All...

Question 1 :

Is alsa-devel for driver coders and alsa-users for application coders
and regular users, or
should I (with my application related questions) send library API
request to alsa-user ?


Question 2 :

I'm trying to port an audio app from Win32/DirectSound to ALSA...

The model is kinda different and I'd like to know how to check the 'safe
write' position. I mean, let's imagine I have a loop which is called as
fast as possible and which makes some sound data ready for 2 or 3 ms at
each call.... How could I suspend my process till I can send data ? In
DirectSound, one always instantiate a conceptually circular buffer and
could retrieve play and write positions in that buffer (possibly having
to split input data if it crossed the buffer end). One thing that made
me switch to Linux was the delay between readpos/writepos : often more
than 10ms (I suspect it heavily depends on the DMA buffer size...).

Question 3 :

Regarding snd_pcm_write, is there a register-only way to send data to,
let's say, a GUS or SB16 codec ? Is it CPU unfriendly ? ;-) OR is it
possible to change DMA buffer size to lower this latency ?

Question 4 :

Regarding the ALSA architecture, how does it manage the snd_pcm_write
function : What happens if we try to send BIIIIG (let's say, 10 Mb)
chunks of audio to a card ? snd_pcm_write allocs room for it, copies it
then copies it to DMA buffer or does it directly feed dma buffer with
OUR buffer ?

As you see, I'd like to make sure each and every latency caveat is
avoided... I'm pretty sure driver coders did a great job (ALSA
applications seem to be less cpu-intensive than under Win32) but It
would be interesting for me to know more about the dirver architecture
because I'm really a Linux newbie.

Thanks a lot for reading me.

Benjamin.

