]> git.alsa-project.org Git - alsa-lib.git/commitdiff
Added HAVE_SOFT_FLOAT (--with-softfloat)
authorJaroslav Kysela <perex@perex.cz>
Wed, 24 Apr 2002 14:41:55 +0000 (14:41 +0000)
committerJaroslav Kysela <perex@perex.cz>
Wed, 24 Apr 2002 14:41:55 +0000 (14:41 +0000)
INSTALL
acconfig.h
configure.in
include/pcm_plugin.h

diff --git a/INSTALL b/INSTALL
index 2a9991d06591c9aab23d9d4a21bd0336a9fece8c..4939cb29239900c4327664ec6bba6019f2109ad8 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -111,3 +111,11 @@ For platform names in the form cpu-vendor-os (or aliases for this)
 you should look in 'config.guess' script. Target and all paths
 used here are only examples and should not be directly applicable to
 your system.
+
+Configuration for machines without FPU
+--------------------------------------
+
+If your machine does not have FP unit, you should use '--with-softfloat'
+option. This option disables usage of float numbers in PCM route plugin.
+ALSA could then leave much more CPU cycles for your applications, but you 
+could still need some floating point emulator.
index 535d16ff7f17d71627a5a91b077edfc1a37132bc..8200eb508f6475f41275f623a6b36ea8e10013e2 100644 (file)
@@ -12,3 +12,6 @@
 
 /* NDEBUG */
 #undef NDEBUG
+
+/* Do we have FPU on this machine? */
+#undef HAVE_SOFT_FLOAT
index 8e82a804614e48fd1f1351da138fffb50fd4d462..40badb5ee0fa34b3a5c47609f740d549969d0869 100644 (file)
@@ -85,6 +85,7 @@ AC_HEADER_STDC
 AM_CONFIG_HEADER(include/config.h)
 AC_CHECK_HEADERS(sound/asound.h)
 
+
 dnl Checks for typedefs, structures, and compiler characteristics.
 AC_C_CONST
 AC_C_INLINE
@@ -120,6 +121,10 @@ else
   AC_MSG_RESULT(no)
 fi
 
+AC_ARG_WITH(softfloat,
+  [  --with-softfloat        do you have floating point unit on this machine? (optional)],
+  [  AC_DEFINE(HAVE_SOFT_FLOAT, "1")],)
+
 dnl Check for architecture
 AC_MSG_CHECKING(for architecture)
 case "$target" in
index 6cd8acd892d00a8a5ace9fa1e0f34541eadd02a9..e675f15f9521cad8dc61e740086c1cf5276791e1 100644 (file)
@@ -31,6 +31,8 @@
 
 #ifndef __ALSA_PCM_PLUGIN_H
 
+#include "config.h"
+
 /**
  * \defgroup PCM_Plugins PCM Plugins
  * \ingroup PCM
 #define SND_PCM_PLUGIN_RATE_MIN 4000   /**< minimal rate for the rate plugin */
 #define SND_PCM_PLUGIN_RATE_MAX 192000 /**< maximal rate for the rate plugin */
 
+/* ROUTE_FLOAT should be set to 0 for machines without FP unit - like iPAQ */
+#ifdef HAVE_SOFT_FLOAT
+#define SND_PCM_PLUGIN_ROUTE_FLOAT 0      /**< use integers for route plugin */
+#else
 #define SND_PCM_PLUGIN_ROUTE_FLOAT 1      /**< use floats for route plugin */
+#endif
+
 #define SND_PCM_PLUGIN_ROUTE_RESOLUTION 16 /**< integer resolution for route plugin */
 
 #if SND_PCM_PLUGIN_ROUTE_FLOAT