From: Paul Davis <paul@linuxaudiosystems.com>
To: Adam Tla/lka <atlka@pg.gda.pl>
Cc: Jaroslav Kysela <perex@suse.cz>, alsa-devel@alsa-project.org
Subject: Re: Re: [Alsa-user] AD1985 full-duplex(?)
Date: Fri, 10 Sep 2004 07:44:55 -0400 [thread overview]
Message-ID: <200409101144.i8ABit16014190@localhost.localdomain> (raw)
In-Reply-To: Your message of "Fri, 10 Sep 2004 09:16:14 +0200." <20040910071614.GH4584@sunrise.pg.gda.pl>
>> Actually, ALSA PCM API meets all these points.
>Yes, but mmaped mode is different then it seems to be. If I just don't
>use it all is perfect. I am waiting for example of good working user app
>using this mode.
as mentioned previously, JACK uses mmap mode and supports latencies as
low as the hardware can support. it never tries to rewrite existing
data, and i believe this is the correct design. if you say you care
about latency, then you should just do what JACK does - use the ASIO
double buffered model (the app works on one half of the hardware
buffer while the hardware works on the other), and set the size of the
buffer to be small enough that you never need to rewrite
already-written data. given that we use JACK with latencies on the
order of 2-5ms, this is clearly feasible.
i do recognize that the approach that game programmers have typically
taken has some benefits. working with large buffer sizes but then
being able to retroactively overwrite data anywhere in the buffer does
mean that realtime scheduling becomes less necessary and reduces the
CPU load associated with audio processing somewhat. if you want to do
that then jaroslav's (a) option will provide the equivalent, but it
will not be portable to non-hardware devices or hardware that doesn't
implement its hardware buffer in the way that this design
assumes. why? precisely because there really *isn't* a single
contiguous hardware buffer that works in the way that this programming
model assumes.
>Unified API for all modes means that some functionality of mmaped mode
>is lost because we must push the appl_pointer forward so snd_pcm_delay
i don't agree with this. your model of "full functionality" for mmaped
mode is based on a single conception of the hardware buffer for the
device the application is talking to. as explained by both myself and
jaroslav, ALSA supports devices where this conception is invalid. if
you want to work with such devices, you have to modify your conception
of what the hardware buffer is and how it works, and thats precisely
what mmap_begin/commit/avail_update/forward/rewind are there to assist
with.
--p
-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php
next prev parent reply other threads:[~2004-09-10 11:45 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-31 8:52 Re: [Alsa-user] AD1985 full-duplex(?) Peter Zubaj
2004-08-31 9:39 ` Jaroslav Kysela
2004-09-06 20:45 ` Adam Tla/lka
2004-09-07 9:05 ` Jaroslav Kysela
2004-09-07 10:34 ` Adam Tla/lka
2004-09-07 13:23 ` Paul Davis
2004-09-07 13:40 ` Jaroslav Kysela
2004-09-08 17:15 ` Adam Tla/lka
[not found] ` <20040909122253.GE4584@sunrise.pg.gda.pl>
[not found] ` <Pine.LNX.4.58.0409091728420.4150@server.perex-int.cz>
2004-09-10 6:46 ` Adam Tla/lka
2004-09-09 5:52 ` Adam Tla/lka
2004-09-09 12:59 ` Paul Davis
2004-09-09 13:28 ` Adam Tla/lka
2004-09-09 15:14 ` Jaroslav Kysela
2004-09-10 7:16 ` Adam Tla/lka
2004-09-10 11:44 ` Paul Davis [this message]
2004-09-10 19:04 ` Adam Tla/lka
2004-09-13 13:05 ` Paul Davis
2004-09-13 17:24 ` Adam Tla/lka
2004-09-26 22:21 ` Adam Tlałka
2004-09-27 3:00 ` Paul Davis
2004-09-27 6:38 ` Adam Tlałka
2004-09-27 12:43 ` Jaroslav Kysela
2004-09-28 5:11 ` Adam Tlałka
2004-09-28 14:47 ` Paul Davis
2004-09-29 5:51 ` Adam Tlałka
2004-09-27 20:14 ` Paul Davis
2004-09-28 6:10 ` Adam Tlałka
[not found] <200409281113.i8SBDo5U021462@localhost.localdomain>
2004-09-28 13:22 ` Adam Tlałka
2004-09-28 14:48 ` Jaroslav Kysela
2004-09-28 14:57 ` Paul Davis
2004-09-28 15:21 ` Takashi Iwai
2004-09-29 6:15 ` Adam Tlałka
[not found] <Pine.HPX.4.33n.0408181538550.24798-100000@studcom.urz.uni-halle.de>
[not found] ` <1092842830.13603.3.camel@localhost.localdomain>
[not found] ` <20040818181350.2b38e875@mango.fruits.de>
2004-08-18 17:37 ` Jaroslav Kysela
2004-08-18 18:15 ` Florian Schmidt
2004-08-19 8:58 ` Jaroslav Kysela
2004-08-19 9:46 ` Takashi Iwai
2004-08-19 10:28 ` Jaroslav Kysela
2004-08-23 11:36 ` Adam Tlałka
2004-08-23 11:54 ` Jaroslav Kysela
2004-08-23 12:34 ` Adam Tlałka
2004-08-23 14:39 ` Jaroslav Kysela
2004-08-24 6:01 ` Adam Tla/lka
2004-08-23 15:30 ` Takashi Iwai
2004-08-28 19:10 ` Adam Tlałka
2004-08-29 9:54 ` Jaroslav Kysela
2004-08-29 18:35 ` Adam Tlałka
2004-08-31 8:09 ` Jaroslav Kysela
2004-08-19 9:48 ` Florian Schmidt
2004-08-20 10:58 ` Jaroslav Kysela
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=200409101144.i8ABit16014190@localhost.localdomain \
--to=paul@linuxaudiosystems.com \
--cc=alsa-devel@alsa-project.org \
--cc=atlka@pg.gda.pl \
--cc=perex@suse.cz \
/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.