From: Abramo Bagnara <abramo@alsa-project.org>
To: Kai Vehmanen <kai.vehmanen@wakkanet.fi>
Cc: jackit-devel@lists.sourceforge.net,
"alsa-devel@lists.sourceforge.net"
<alsa-devel@lists.sourceforge.net>
Subject: Re: Re: [Jackit-devel] Re: should i be able to abortin the middle of snd_pcm_mmap_{begin,commit} ?
Date: Fri, 15 Feb 2002 15:02:47 +0100 [thread overview]
Message-ID: <3C6D1507.D1672C26@alsa-project.org> (raw)
In-Reply-To: Pine.LNX.4.44.0202141941020.3739-100000@ecabase.localdomain
Kai Vehmanen wrote:
>
> On Thu, 14 Feb 2002, Jaroslav Kysela wrote:
>
> >> - ALSA is unable to detect xruns inside mmap_begin()->mmap_commit()
> >> code block
> > I wonder why you say this. There is really very short time period in which
> > the hardware pointer can cross the application pointer and PCM code won't
> > react on this situation. There are no locks for the xrun detection between
> > mmap_begin() and mmap_commit().
>
> Quoting Paul: "i recall abramo saying that if the xrun happens within an
> mmap_begin/commit pair, the driver can't detect it, or something like
> that."
Caution here... Paul is not very accurate quoting me, I'll try to
rephrase.
Take as an example HW PCM case, snd_pcm_mmap_begin and commit don't
enter kernel space and don't check for anything.
Note also that it's very hard to know if an xrun is actually happened or
not. We might use a conservative approach (i.e. all frames are
considered written on buffer only at commit call) a less severe one
(i.e. all frames are considered written at begin call), or a mixed
approach.
Current assumption is that between snd_pcm_avail_update call and
snd_pcm_mmap_commit we always put more data than hardware can read
(playback case)
Of course preemption can give us surpries, but that's life...
--
Abramo Bagnara mailto:abramo@alsa-project.org
Opera Unica Phone: +39.546.656023
Via Emilia Interna, 140
48014 Castel Bolognese (RA) - Italy
ALSA project http://www.alsa-project.org
It sounds good!
_______________________________________________
Alsa-devel mailing list
Alsa-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-devel
next prev parent reply other threads:[~2002-02-15 14:02 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-02-13 17:27 should i be able to abort in the middle of snd_pcm_mmap_{begin,commit} ? Paul Davis
2002-02-13 17:44 ` Jaroslav Kysela
2002-02-13 17:53 ` Paul Davis
2002-02-13 18:07 ` Jaroslav Kysela
2002-02-13 18:10 ` Paul Davis
2002-02-14 13:01 ` Kai Vehmanen
2002-02-14 13:35 ` Kai Vehmanen
2002-02-14 13:50 ` [Jackit-devel] " Paul Davis
2002-02-14 17:09 ` Kai Vehmanen
2002-02-14 17:37 ` Jaroslav Kysela
2002-02-14 17:48 ` Kai Vehmanen
2002-02-15 14:02 ` Abramo Bagnara [this message]
2002-02-14 17:39 ` Kai Vehmanen
2002-02-14 17:57 ` Jaroslav Kysela
2002-02-14 18:12 ` Kai Vehmanen
2002-02-14 20:59 ` Re: [Jackit-devel] " Paul Davis
2002-02-19 2:04 ` Kai Vehmanen
2002-02-19 7:15 ` Jaroslav Kysela
2002-02-21 6:21 ` Kai Vehmanen
2002-02-21 8:14 ` Jaroslav Kysela
2002-02-21 8:50 ` Jaroslav Kysela
2002-02-21 9:02 ` Re: should i be able to abort in the middle ofsnd_pcm_mmap_{begin,commit} ? Abramo Bagnara
2002-02-21 9:39 ` Kai Vehmanen
2002-02-21 10:00 ` Abramo Bagnara
2002-02-21 10:12 ` Jaroslav Kysela
2002-02-21 10:42 ` Abramo Bagnara
2002-02-21 10:06 ` Jaroslav Kysela
2002-02-21 10:25 ` Re: should i be able to abort in the middle of snd_pcm_mmap_{begin,commit} ? Kai Vehmanen
2002-02-21 10:35 ` Jaroslav Kysela
2002-02-21 12:08 ` Kai Vehmanen
2002-02-21 8:35 ` Kai Vehmanen
2002-02-13 17:47 ` 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=3C6D1507.D1672C26@alsa-project.org \
--to=abramo@alsa-project.org \
--cc=alsa-devel@lists.sourceforge.net \
--cc=jackit-devel@lists.sourceforge.net \
--cc=kai.vehmanen@wakkanet.fi \
/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.