1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
|
From: Jack Howarth <howarth@bromo.msbb.uc.edu>
The following patch is needed for alsa-lib 0.9.0beta9-1 to build
on debian sid ppc. Could you please add it to a 0.9.0beta9-2 version
so we can have this package build. I was able to build the alsa-utils
and alsa-drivers against Linux 2.4.16 with no problem and the resulting
kernel module works fine.
Jack
ps The definitions for mb, rmb and wmb are directly from the
asm-ppc/system.h header in Linux 2.4.16.
----------------------------------------------------------------------
diff -uNr alsa-lib-0.9.0beta9/src/pcm/atomic.h alsa-lib-0.9.0beta9.new/src/pcm/atomic.h
--- alsa-lib-0.9.0beta9/src/pcm/atomic.h Thu Dec 27 18:57:41 2001
+++ alsa-lib-0.9.0beta9.new/src/pcm/atomic.h Thu Dec 27 18:33:03 2001
@@ -22,6 +22,10 @@
#define mb() __asm__ __volatile__ ("" : : : "memory")
#define rmb() mb()
#define wmb() mb()
+#elif __powerpc__
+#define mb() __asm__ __volatile__ ("sync" : : : "memory")
+#define rmb() __asm__ __volatile__ ("sync" : : : "memory")
+#define wmb() __asm__ __volatile__ ("eieio" : : : "memory")
#else
#include <asm/system.h>
#endif
diff -uNr alsa-lib-0.9.0beta9/src/pcm/pcm_meter.c alsa-lib-0.9.0beta9.new/src/pcm/pcm_meter.c
--- alsa-lib-0.9.0beta9/src/pcm/pcm_meter.c Thu Dec 27 18:57:41 2001
+++ alsa-lib-0.9.0beta9.new/src/pcm/pcm_meter.c Thu Dec 27 18:48:36 2001
@@ -39,7 +39,7 @@
const char *_snd_module_pcm_meter = "";
#endif
-#if defined(__sparc__) || defined(__ia64__) || defined(__mips__) || defined(__arm__) || defined(__hppa__)
+#if defined(__sparc__) || defined(__ia64__) || defined(__mips__) || defined(__arm__) || defined(__hppa__) || defined(__powerpc__) || defined(__m68000__)
/* asm/atomic.h is unavailable on sparc and ia64 */
#define atomic_t int
#define atomic_read(x) (*(x))
|