All of lore.kernel.org
 help / color / mirror / Atom feed
From: James Courtier-Dutton <James@superbug.demon.co.uk>
To: Clemens Ladisch <clemens@ladisch.de>
Cc: alsa-devel@lists.sourceforge.net
Subject: Re: Why do I get broken pipe on write to a pcm instatePREPARED?
Date: Wed, 09 Oct 2002 23:28:11 +1000	[thread overview]
Message-ID: <3DA42EEB.2030208@superbug.demon.co.uk> (raw)
In-Reply-To: Pine.HPX.4.33n.0210090843120.2463-100000@studcom.urz.uni-halle.de

Clemens Ladisch wrote:

>The behaviour of polling during capture is just fine:
>
>RUNNING: block until avail_min is available, then return POLLIN
>DRAINING: return POLLIN until buffer is empty, then return POLLERR
>(other states: POLLERR)
>
>The current behaviour for playback is:
>
>PREPARED: return POLLOUT until the buffer is full, then return POLLERR
>
Why would the buffer get full in PREPARED state ?
Surely any sensible, "start_threshold" should cause the state to change 
to RUNNING before the buffer is full.
I can't see any reason to not to use "start_threshold" in order to get 
from PREPARED to RUNNING.

>RUNNING: block until avail_min can be written, then return POLLOUT
>DRAINING: block (until state changes)
>(other states: POLLERR)
>
>I want the behaviour in the PREPARED state to be similar to the RUNNING
>state, i.e. return POLLOUT until the buffer is full, then block.
>
>My reason for this is that a buffer overflow in the PREPARED state is
>similar to a pipe connected to an application which currently doesn't read
>from the pipe (-> blocking), and not a pipe which isn't connected at all
>(-> EPIPE). And as Anders pointed out at the start of this thread, there
>are situations where this case isn't an error.
>
>
>Regards,
>Clemens
>
>  
>

Cheers
James




-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

  parent reply	other threads:[~2002-10-09 13:28 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <3D98769A00183382@ims5a.libero.it>
2002-10-08  6:06 ` Why do I get broken pipe on write to a pcm in statePREPARED? Abramo Bagnara
2002-10-08  7:30   ` Clemens Ladisch
2002-10-08 18:50     ` Why do I get broken pipe on write to a pcm instatePREPARED? Abramo Bagnara
2002-10-09  7:52       ` Clemens Ladisch
2002-10-09 10:48         ` Anders Torger
2002-10-09 18:54           ` Abramo Bagnara
2002-10-09 13:28         ` James Courtier-Dutton [this message]
2002-10-09 13:54           ` Anders Torger
2002-10-10  2:15             ` James Courtier-Dutton
2002-10-10  3:51               ` Anders Torger
2002-10-10 14:21                 ` Jaroslav Kysela
2002-10-10 15:03                   ` Anders Torger
2002-10-09 14:39           ` Tim Goetze
2002-10-09 18:53         ` Why do I get broken pipe on write to a pcminstatePREPARED? Abramo Bagnara
2002-10-09 19:33           ` 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=3DA42EEB.2030208@superbug.demon.co.uk \
    --to=james@superbug.demon.co.uk \
    --cc=alsa-devel@lists.sourceforge.net \
    --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 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.