alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: John Lindgren <john.lindgren@tds.net>
To: Clemens Ladisch <clemens@ladisch.de>
Cc: alsa-devel@alsa-project.org
Subject: Re: alsa-lib: snd_pcm_delay and friends do not account for a write being currently in progress
Date: Thu, 03 Jun 2010 13:51:41 -0400	[thread overview]
Message-ID: <1275587501.20342.3.camel@satellite> (raw)
In-Reply-To: <4C07E060.9070206@ladisch.de>

On Thu, 2010-06-03 at 19:03 +0200, Clemens Ladisch wrote:
> John Lindgren wrote:
> > I understand that snd_pcm_delay and snd_pcm_writei currently "interfere
> > with each other" in that snd_pcm_delay returns wrong values if called
> > during snd_pcm_writei.  That is the problem my patch tries to correct.
> 
> These values are not wrong; the problem is that your program does not
> have enough information to interpret it correctly.

Same thing.

> > What would be the cleanest way to interrupt snd_pcm_wait when we need to
> > stop the stream?  Will snd_pcm_drop work?
> 
> *sigh*
> This will _not_ work.
> 
> You have to use poll so that you can send your loop a message (through
> a pipe/eventfd/whatever) that tells it to stop.

Ugh.  It seems you are determined to avoid complexity in ALSA at the
expense of complexity in programs that use it.

At any rate, at least I know what needs to be done now, so thanks for
that.

John Lindgren

  reply	other threads:[~2010-06-03 17:51 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-02 21:29 [PATCH] alsa-lib: snd_pcm_delay and friends do not account for a write being currently in progress John Lindgren
2010-06-03  6:40 ` Clemens Ladisch
2010-06-03 14:00   ` John Lindgren
2010-06-03 14:48     ` Clemens Ladisch
2010-06-03 16:16       ` John Lindgren
2010-06-03 17:03         ` Clemens Ladisch
2010-06-03 17:51           ` John Lindgren [this message]
2010-06-03 14:40 ` [PATCH] " James Courtier-Dutton
2010-06-03 16:10   ` John Lindgren
2010-06-03 16:34     ` James Courtier-Dutton
2010-06-03 18:06       ` John Lindgren
2010-06-03 17:40 ` VDR User
2010-06-03 18:08   ` John Lindgren
2010-06-04  6:50   ` Clemens Ladisch

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=1275587501.20342.3.camel@satellite \
    --to=john.lindgren@tds.net \
    --cc=alsa-devel@alsa-project.org \
    --cc=clemens@ladisch.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).