I put a Sweex SC015 cmpci(4) card that I had successfully tested
on amd64 into a sparc64 and got an unaligned access panic.
The problem is that we use bus_space_{read,write}_4() to access a
register at 0x92. Instead, assume it's a 32-bit register at 0x90
like the other registers and in agreement with the Linux driver:
http://lxr.linux.no/#linux+v2.6.39/sound/pci/cmipci.c#L368
With this I can play stereo audio over analog and S/PDIF on the
sparc64.
ok?
Index: cmpcireg.h
===================================================================
RCS file: /cvs/src/sys/dev/pci/cmpcireg.h,v
retrieving revision 1.4
diff -u -p -r1.4 cmpcireg.h
--- cmpcireg.h 6 May 2009 22:25:57 -0000 1.4
+++ cmpcireg.h 4 Jun 2011 19:28:46 -0000
@@ -230,8 +230,8 @@
#define CMPCI_REG_DMA1_BYTES 0x8C
#define CMPCI_REG_DMA1_SAMPLES 0x8E
-#define CMPCI_REG_8768_MISC 0x92
-#define CMPCI_REG_CHB3D8C 0x20
+#define CMPCI_REG_8768_MISC 0x90
+#define CMPCI_REG_CHB3D8C 0x00200000
/* sample rate */
#define CMPCI_REG_RATE_5512 0
--
Christian "naddy" Weisgerber [email protected]