All of lore.kernel.org
 help / color / mirror / Atom feed
From: Abramo Bagnara <abramo.bagnara@libero.it>
To: Tim Goetze <tim@quitte.de>
Cc: Abramo Bagnara <abbagnara@racine.ra.it>,
	"alsa-devel@lists.sourceforge.net"
	<alsa-devel@lists.sourceforge.net>
Subject: Re: Why do I get broken pipe on write to a pcm in   statePREPARED?
Date: Tue, 17 Sep 2002 10:21:22 +0200	[thread overview]
Message-ID: <3D86E602.E1466721@libero.it> (raw)
In-Reply-To: Pine.LNX.4.21.0209162345440.584-100000@summer.quitte

Tim Goetze wrote:
> 
> Abramo Bagnara wrote:
> 
> >> >I think that the best behaviour is the current and it's also the
> >> >simplest to describe and to understand: poll/select never blocks when
> >> >there is nothing to wait.
> >> >
> >> >... and in PREPARED state definitely there's nothing to wait from sound
> >> >card.
> >>
> >> you know that linux supports multi-threading, don't you?
> >
> >Oh, yes... and easy message passing between threads too.
> >
> >You get the point now?
> >
> >The usual rule of thumb is: "don't make in kernel space what is feasible
> >in user space"
> 
> if you really believed in this rule, i'd expect you to start work on
> moving the sequencer out of ring 0 asap. ;)
> 
> let's imagine:
> 
> * a single-threaded app. if the coder omits starting the stream before
> poll, he'll quickly find out that nothing is played/recorded, and that
> poll will hit the timeout, and consequently revise his code logic.

It would be definitely not easy for the app. to detect *why* poll is
blocking and it'd needs time. I think it would be a bad solution.

> 
> * a multi-threaded app. it is *very* convenient not to do the 'easy'
> message passing for starting/stopping streams in many, many
> applications. all you have to do in the 'engine' thread is poll and
> process. i wonder if you can imagine how much easier things get when
> things work this way.

This argument might be applied to every message passing need between
threads. Do we want to change an useful semantic to have just another
way to do an already easy task? I don't believe so.

> i mean, alsa is great, but why do you have to make it a pita to code
> for?

I suppose you're exaggerating the thing to support your arguments, don't
you ;-)

-- 
Abramo Bagnara                       mailto:abramo.bagnara@libero.it

Opera Unica                          Phone: +39.546.656023
Via Emilia Interna, 140
48014 Castel Bolognese (RA) - Italy


-------------------------------------------------------
Sponsored by: AMD - Your access to the experts on Hammer Technology! 
Open Source & Linux Developers, register now for the AMD Developer 
Symposium. Code: EX8664 http://www.developwithamd.com/developerlab

  reply	other threads:[~2002-09-17  8:21 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <3D8638F6.AC6DE0C2@racine.ra.it>
2002-09-16 22:04 ` Why do I get broken pipe on write to a pcm in statePREPARED? Tim Goetze
2002-09-17  8:21   ` Abramo Bagnara [this message]
2002-09-17  9:21     ` Tim Goetze
     [not found] <3D98769A00183382@ims5a.libero.it>
2002-10-08  6:06 ` Abramo Bagnara
2002-10-08  7:30   ` Clemens Ladisch
     [not found] <3D98769A000FAA05@ims5a.libero.it>
2002-10-05  7:45 ` Abramo Bagnara
     [not found] <200209171301.g8HD1Ww01231@mother.ludd.luth.se>
2002-09-17 13:04 ` Anders Torger
2002-09-13  9:41 Why do I get broken pipe on write to a pcm in state PREPARED? Jaroslav Kysela
2002-09-15 17:56 ` Why do I get broken pipe on write to a pcm in statePREPARED? Abramo Bagnara
2002-09-16 10:46   ` Takashi Iwai
2002-09-16 13:18     ` Tim Goetze
2002-09-16 14:31       ` Takashi Iwai
2002-09-16 19:31     ` Abramo Bagnara
2002-09-16 19:49       ` Tim Goetze
2002-09-16 20:14       ` Anders Torger
2002-09-17  8:12         ` Abramo Bagnara
2002-09-17  9:03           ` Anders Torger
2002-09-17 13:04           ` Paul Davis
2002-09-17  9:05         ` Clemens Ladisch
2002-09-17 10:09           ` Anders Torger
2002-09-17 11:09           ` Takashi Iwai
2002-09-17 11:55             ` tomasz motylewski
2002-09-17 12:52               ` Takashi Iwai
2002-09-17 13:01                 ` Anders Torger
2002-09-17 14:40                   ` Clemens Ladisch
2002-09-18 19:57                     ` Anders Torger
2002-10-04  8:14                       ` Anders Torger
2002-10-04 12:58                         ` Takashi Iwai
2002-10-04 18:04                           ` Abramo Bagnara
2002-10-07 10:15                             ` Takashi Iwai
2002-10-07 12:07                               ` Abramo Bagnara
2002-10-07 13:19                                 ` Anders Torger
2002-10-07 17:46                                   ` Abramo Bagnara
2002-10-08  9:54                                     ` Takashi Iwai
2002-10-07 13:57                                 ` Tim Goetze
2002-10-09 18:13                             ` Jack O'Quin
2002-09-17 13:03           ` Paul Davis

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=3D86E602.E1466721@libero.it \
    --to=abramo.bagnara@libero.it \
    --cc=abbagnara@racine.ra.it \
    --cc=alsa-devel@lists.sourceforge.net \
    --cc=tim@quitte.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.