All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Clemens Ladisch <clemens@ladisch.de>
Cc: Jaroslav Kysela <perex@suse.cz>, alsa-devel@lists.sourceforge.net
Subject: Re: MIDI+USB - one way?
Date: Mon, 05 Aug 2002 14:24:10 +0200	[thread overview]
Message-ID: <s5hk7n5ebo5.wl@alsa2.suse.de> (raw)
In-Reply-To: <3D4E5613.96D45644@ladisch.de>

At Mon, 05 Aug 2002 12:40:19 +0200,
Clemens Ladisch wrote:
> 
> To quote one of the standards (I think IEEE 1003.1 is POSIX)
> <http://www.opengroup.org/onlinepubs/007904975/functions/read.html>:
> | When attempting to read a file (other than a pipe or FIFO) that
> | supports non-blocking reads and has no data currently available:
> |
> | If O_NONBLOCK is set, read() shall return -1 and set errno to [EAGAIN].
> |
> | If O_NONBLOCK is clear, read() shall block the calling thread until
> | some data becomes available.
> |
> | The use of the O_NONBLOCK flag has no effect if there is some data
> | available.
> | [...]
> | Upon successful completion, where nbyte is greater than 0, read()
> | (...) shall return the number of bytes read. This number shall never
> | be greater than nbyte. The value returned may be less than nbyte if
> | (...) the file is a (...) special file and has fewer than nbyte bytes
> | immediately available for reading. For example, a read() from a file
> | associated with a terminal may return one typed line of data.

ok, it's clearly mentioned here.
then we should fix this behavior.


> 
> > (and i believe that no applications suffer by this change.)
> 
> Yes, because applications expect the OSS behaviour.
> 
> I didn't really look at the OSS PCM read() implementation, but the
> sequencer read() already implements the correct POSIX behaviour.

i don't think that the oss pcm interface ever suffices the definition
of posix above.  but we cannot change it since most of applications
assume that the read aligned in a block size.

in the case of alsa, this low-level behavior can be changed, because
the difference can be absorbed inside the alsa-lib.  but i see no good
reason to change this now.


Takashi


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

  reply	other threads:[~2002-08-05 12:24 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-02  5:15 MIDI+USB - one way? Michal Seta
2002-08-02 11:06 ` Clemens Ladisch
2002-08-02 13:35   ` Michal Seta
2002-08-02 13:07     ` Clemens Ladisch
2002-08-02 16:17     ` Pedro Lopez-Cabanillas
2002-08-02 17:08       ` Clemens Ladisch
2002-08-02 19:03         ` Patrick Shirkey
2002-08-02 19:34           ` Patrick Shirkey
2002-08-02 23:28           ` Pedro Lopez-Cabanillas
2002-08-03  0:21             ` Martin Langer
2002-08-04 12:07               ` Pedro Lopez-Cabanillas
2002-08-03 15:56             ` Patrick Shirkey
2002-08-04 18:50         ` Jaroslav Kysela
2002-08-05  8:43           ` Clemens Ladisch
2002-08-05 10:07             ` Takashi Iwai
2002-08-05 10:40               ` Clemens Ladisch
2002-08-05 12:24                 ` Takashi Iwai [this message]
2002-08-05 12:54                   ` Clemens Ladisch
2002-08-05 16:37                   ` Jaroslav Kysela
2002-08-05 14:22               ` MIDI+USB - back on track Michal Seta
2002-08-07 13:38                 ` Michal Seta

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=s5hk7n5ebo5.wl@alsa2.suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@lists.sourceforge.net \
    --cc=clemens@ladisch.de \
    --cc=perex@suse.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.