Hello, 
   The following patch is needed to build alsa-libs 0.9beta9 or 
0.9beta10 against the current Linux 2.4.17-rc1 kernel on ppclinux.
The definitions for mb, rmb and wmb are directly from the 
asm-ppc/system.h header in Linux 2.4.16.
This patch has already been accepted by the Debian alsa maintainer.
Can we please get this in the alsa-libs cvs? Thanks in advance.
                              Jack

----------------------------------------------------------------------
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__)
 /* asm/atomic.h is unavailable on sparc and ia64 */
 #define atomic_t int
 #define atomic_read(x) (*(x))
------------------------------------------------------------------------------


_______________________________________________
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel

Reply via email to