linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Takashi Oe <toe@unlserve.unl.edu>
To: Brad Midgley <brad@turbolinux.com>
Cc: linuxppc-dev@lists.linuxppc.org
Subject: Re: [patch] little-endian dmasound silently fails
Date: Sun, 06 Feb 2000 02:15:54 -0600	[thread overview]
Message-ID: <389D57C8.F4204CF@unlserve.unl.edu> (raw)
In-Reply-To: Pine.LNX.4.20.0002060210380.16199-100000@mail.turbolinux.com


Hi,

Brad Midgley wrote:
>
> > don't think this is dmasound's fault.  Luckily for us, many "broken"
> > OSS-compatible apps tend to work just fine if we simply modify them to
> > ask for AFMT_S16_NE not *_LE, though performance critical apps should
> > be fixed with more effort.
>
> is the app broken because it tries to use _LE formats?

No, no, no.  There is no problem in trying to use _LE or whatever
formats.  The problem is that many apps *don't* pass the data in
little-endian format when, in fact, they ask the driver to be ready for
little-endian data.  Please have a closer look at any app that you think
should work but fail.  I bet they are genuinely broken (i.e. passing
data in wrong byte order).  Note that, whenever apps use short or long
or int, they must be aware of byte order.

> i agree it's not optimal and reflects laziness on the developer's part to
> try to make everything work as if it's little-endian, but that the api
> allows it, right?

Some sound formats are little endian, and others are big endian.  If the
app can pass the multi-byte data to the driver without byte-swapping in
software, it should, but, of course, it can do in any way.

By the way, dmasound should probably optimize for stereo not mono, and
it should not support _U8/16 variants, perhaps, since AWACS doesn't
support them in hardware.  The format conversion is done in software
(kernel space).


Takashi Oe

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

  reply	other threads:[~2000-02-06  8:15 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-02-04 23:20 [patch] little-endian dmasound silently fails Brad Midgley
2000-02-04 23:59 ` Takashi Oe
2000-02-05  3:55   ` Brad Midgley
2000-02-05  5:56     ` Takashi Oe
2000-02-05 13:26       ` BenH
2000-02-06  4:50         ` Takashi Oe
2000-02-06 13:34           ` BenH
2000-02-06 11:55         ` Brad Boyer
2000-02-06 10:22       ` Brad Midgley
2000-02-06  8:15         ` Takashi Oe [this message]
2000-02-05 19:12 ` Giuliano Pochini

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=389D57C8.F4204CF@unlserve.unl.edu \
    --to=toe@unlserve.unl.edu \
    --cc=brad@turbolinux.com \
    --cc=linuxppc-dev@lists.linuxppc.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;
as well as URLs for NNTP newsgroup(s).