From: Paul Mackerras <paulus@cs.anu.edu.au>
To: jpgarcia@execpc.com
Cc: linuxppc-dev@lists.linuxppc.org
Subject: Re: Broken sound?
Date: Fri, 16 Jul 1999 10:57:48 +1000 [thread overview]
Message-ID: <199907160057.KAA23996@tango.anu.edu.au> (raw)
In-Reply-To: <Pine.SOL.4.10.9907151334160.21552-100000@earth.execpc.com> (message from Joseph Palani Garcia on Thu, 15 Jul 1999 13:44:24 -0500 (CDT))
Joseph Palani Garcia <jpgarcia@execpc.com> wrote:
> this is a known endian problem. ppc archetecure is big endian, while most
> other linux-running platforms are little endian. recent setups, like R5
> implement sound as little endian. not everyone has caught up with this
Not so. The kernel driver can handle either big-endian or
little-endian 16-bit data. The default is 8-bit data, though, for
which endianness doesn't matter.
The AFMT_S16_NE symbol, which says what the native endianness is, is
defined to be the same as AFMT_S16_BE on big-endian platforms like the
PPC. There is a potential problem though because the
linux/soundcard.h include file checks for the existence of the symbol
`PPC' (among others) to test whether the platform is big-endian. If
you compile your program with the -ansi switch to gcc, it defines
__PPC__ and __PPC but not PPC so then you get AFMT_S16_NE defined to
be equal to AFMT_S16_LE. :-(
Paul.
[[ This message was sent via the linuxppc-dev mailing list. Replies are ]]
[[ not forced back to the list, so be sure to Cc linuxppc-dev if your ]]
[[ reply is of general interest. Please check http://lists.linuxppc.org/ ]]
[[ and http://www.linuxppc.org/ for useful information before posting. ]]
next prev parent reply other threads:[~1999-07-16 0:57 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-07-15 18:16 Broken sound? Jerry Quinn
1999-07-15 18:44 ` Joseph Palani Garcia
1999-07-16 0:57 ` Paul Mackerras [this message]
1999-07-15 21:34 ` Peter Handel
1999-07-16 0:49 ` Paul Mackerras
1999-07-19 15:30 ` Jerry Quinn
1999-07-20 6:10 ` Paul Mackerras
1999-07-20 14:23 ` Jerry Quinn
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=199907160057.KAA23996@tango.anu.edu.au \
--to=paulus@cs.anu.edu.au \
--cc=Paul.Mackerras@cs.anu.edu.au \
--cc=jpgarcia@execpc.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).