From: Abramo Bagnara <abramo.bagnara@libero.it>
To: Jaroslav Kysela <perex@perex.cz>
Cc: ALSA development <alsa-devel@alsa-project.org>
Subject: Re: PCM API update
Date: Sat, 12 Oct 2002 11:12:58 +0200 [thread overview]
Message-ID: <3DA7E79A.B07E264A@libero.it> (raw)
In-Reply-To: Pine.LNX.4.33.0210121049560.1975-100000@pnote.perex-int.cz
Jaroslav Kysela wrote:
>
> On Fri, 11 Oct 2002, Abramo Bagnara wrote:
>
> > I really don't understand why you've added another ioctl and another
> > function to replicate in all PCM classes.
> > snd_pcm_delay existence is enough to implement that.
> > I'm missing something?
>
> You're completely right, but in my eyes, the avail ioctl looks much better
> for kernel space (it's a base value for computing delay, computing avail
> from delay needs twice substractions which doesn't look very good).
> Unfortunately, delay ioctl was first, and we should keep binary
> compatibility for 2.5, so we should leave both ioctls there. In library,
> we can remove the delay operation from chains and use avail to compute it
> as well to simplify code.
No, you can't.
The semantic of snd_pcm_delay is:
"How many frames are current application read/write pointer far away
from 'now' (i.e. real world sound)?"
It's *not* simply equivalent to buffer_size - avail (playback) or avail
(capture). It's designed to take in account also olatencies introduced
by other things (network layer, hardware limits, etc.).
Although I don't understand why you think that snd_pcm_avail is needed
when we have the right (and safe) snd_pcm_avail_update, it can be
implemented calling snd_pcm_delay (so to update hw pointer) and then
computing the avail count using the mmap'ed counters.
Of course this can't work for chained PCM (and this is why we have
snd_pcm_avail_update).
I think you should revert your patch (and to force yourself to believe a
bit more in peer review before important changes although it seems I'm
beating a dead horse here).
--
Abramo Bagnara mailto:abramo.bagnara@libero.it
Opera Unica Phone: +39.546.656023
Via Emilia Interna, 140
48014 Castel Bolognese (RA) - Italy
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
next prev parent reply other threads:[~2002-10-12 9:13 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-10-11 18:43 PCM API update Jaroslav Kysela
2002-10-11 20:13 ` Abramo Bagnara
2002-10-12 8:54 ` Jaroslav Kysela
2002-10-12 9:12 ` Abramo Bagnara [this message]
2002-10-12 9:37 ` Jaroslav Kysela
2002-10-12 9:54 ` Abramo Bagnara
2002-10-12 10:10 ` Jaroslav Kysela
2002-10-12 10:24 ` Abramo Bagnara
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=3DA7E79A.B07E264A@libero.it \
--to=abramo.bagnara@libero.it \
--cc=alsa-devel@alsa-project.org \
--cc=perex@perex.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.