From: Ingo Oeser <ingo.oeser@informatik.tu-chemnitz.de>
To: Andreas Mohr <andi@rhlx01.fht-esslingen.de>
Cc: linux-kernel@vger.kernel.org
Subject: Re: SB16: 2.4.18 lockup on odd-numbered 16bit sound input
Date: Sun, 26 May 2002 23:42:24 +0200 [thread overview]
Message-ID: <20020526234224.I635@nightmaster.csn.tu-chemnitz.de> (raw)
In-Reply-To: <20020525132644.GA3095@andi.hausnetz>
On Sat, May 25, 2002 at 03:26:44PM +0200, Andreas Mohr wrote:
> I think the main question that this revolves around is what to do with
> odd-numbered/misaligned write() input in case of multi-byte audio formats.
> Should the kernel
> 1) discard odd remainders
> 2) tell the user program by returning incomplete counts that it discarded it
> 3) buffer unprocessable remainders for use in the next write()
> ?
2) Was the right answer for my own driver set, because it will
not loose data and is a common situation the user space app is
supposed to handle properly.
The only arguable case is if we use a count of 0 after
calculating (count & (align-1)), because we would basically
return EOF here instead of a short read (in the read case).
But it can be worked around by disallowing seeks or contraining the
seeks ;-)
PS: I know, we are talking about (short) writes here, but the
topic needs insight and I just handled these problems recently.
Regards
Ingo Oeser
--
Science is what we can tell a computer. Art is everything else. --- D.E.Knuth
prev parent reply other threads:[~2002-05-26 22:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-05-25 13:26 Andreas Mohr
2002-05-26 21:42 ` Ingo Oeser [this message]
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=20020526234224.I635@nightmaster.csn.tu-chemnitz.de \
--to=ingo.oeser@informatik.tu-chemnitz.de \
--cc=andi@rhlx01.fht-esslingen.de \
--cc=linux-kernel@vger.kernel.org \
/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
all inboxes | Powered by JetHome®