Subject: PCI-audio & endianness (eso.c/mulaw.c)
To: None <email@example.com>
From: Leo Weppelman <firstname.lastname@example.org>
Date: 10/27/1999 08:33:48
In an effort to test the PCI-bus of my new Hades motherboard, I'm trying as
many PCI-cards as possible. Card of the past days was an ess-solo1.
I ran into 2 endian problems until now (the Hades is an 68060):
1 - dev/sys/pci/eso.c:
This file defines htopci() and pcitoh() macro's that do a bswap32()
when BIG_ENDIAN. This swapped value is than written using
bus_space_write_4() - this is wrong! The bus-functions for a PCI-bus
on a big-endian machine should do the necessary swapping. I'll
remove this endian stuff from this file later this week.
2 - dev/mulaw.c
Here also, endianness is taken into account. However, I can not play
'.au' files when compiling for big-endian. If I compile for the little
endian case, the samples play fine. Now it isn't obvious to me what
is the 'correct' case here. I have absolutely no experience with
audio drivers. From my observation of the eso.c file, it is clear that
the sound-card uses DMA to fetch the data (== no endian conversion) and
from the docs on the Hades PCI-bus it looks that there is no magic
like hardware swaps involved.
Can anybody say something authoritative about case 2? Since .wav files
are not yet working, I expect more problems in the endian field.