[pulseaudio-discuss] [PATCH] Warn on attempts to build and load module-equalizer-sink

Alexander E. Patrakov patrakov at gmail.com
Mon Dec 1 08:14:15 PST 2014


Also, don't build it by default.

Signed-off-by: Alexander E. Patrakov <patrakov at gmail.com>
---
 configure.ac                        | 24 +++++++++++++++++++++---
 src/modules/module-equalizer-sink.c |  4 ++++
 2 files changed, 25 insertions(+), 3 deletions(-)

diff --git a/configure.ac b/configure.ac
index fe8423f..930593b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1113,9 +1113,9 @@ AS_IF([test "x$HAVE_OPENSSL" = "x1"], AC_DEFINE([HAVE_OPENSSL], 1, [Have OpenSSL
 #### FFTW (optional) ####
 
 AC_ARG_WITH([fftw],
-    AS_HELP_STRING([--without-fftw],[Omit FFTW-using modules (equalizer)]))
+    AS_HELP_STRING([--with-fftw],[Build FFTW-using module (equalizer). Note: the module has known-wrong DSP logic]))
 
-AS_IF([test "x$with_fftw" != "xno"],
+AS_IF([test "x$with_fftw" = "xyes"],
     [PKG_CHECK_MODULES(FFTW, [ fftw3f ], HAVE_FFTW=1, HAVE_FFTW=0)],
     HAVE_FFTW=0)
 
@@ -1526,7 +1526,7 @@ AS_IF([test "x$HAVE_TCPWRAP" = "x1"], ENABLE_TCPWRAP=yes, ENABLE_TCPWRAP=no)
 AS_IF([test "x$HAVE_LIBSAMPLERATE" = "x1"], ENABLE_LIBSAMPLERATE="yes (DEPRECATED)", ENABLE_LIBSAMPLERATE=no)
 AS_IF([test "x$HAVE_IPV6" = "x1"], ENABLE_IPV6=yes, ENABLE_IPV6=no)
 AS_IF([test "x$HAVE_OPENSSL" = "x1"], ENABLE_OPENSSL=yes, ENABLE_OPENSSL=no)
-AS_IF([test "x$HAVE_FFTW" = "x1"], ENABLE_FFTW=yes, ENABLE_FFTW=no)
+AS_IF([test "x$HAVE_FFTW" = "x1"], ENABLE_FFTW="yes (BAD IDEA)", ENABLE_FFTW=no)
 AS_IF([test "x$HAVE_ORC" = "xyes"], ENABLE_ORC=yes, ENABLE_ORC=no)
 AS_IF([test "x$HAVE_ADRIAN_EC" = "x1"], ENABLE_ADRIAN_EC=yes, ENABLE_ADRIAN_EC=no)
 AS_IF([test "x$HAVE_SPEEX" = "x1"], ENABLE_SPEEX=yes, ENABLE_SPEEX=no)
@@ -1647,3 +1647,21 @@ part of PulseAudio on that platform.
 ===== WARNING WARNING WARNING WARNING WARNING WARNING WARNING =====
 "
 fi
+
+if test "${ENABLE_FFTW}" != "no" ; then
+    echo "
+===== WARNING WARNING WARNING WARNING WARNING WARNING WARNING =====
+You have fftw support enabled. fftw is used only by
+module-equalizer-sink, which has many bugs, including wrong DSP
+logic. See details at:
+
+http://lists.freedesktop.org/archives/pulseaudio-discuss/2014-March/020174.html
+https://bugs.freedesktop.org/show_bug.cgi?id=41465
+https://bugs.freedesktop.org/show_bug.cgi?id=54881
+https://bugs.freedesktop.org/show_bug.cgi?id=69229
+
+It is suggested that you reconsider, unless you are a DSP
+specialist willing to fix or rewrite the code and submit patches.
+===== WARNING WARNING WARNING WARNING WARNING WARNING WARNING =====
+"
+fi
diff --git a/src/modules/module-equalizer-sink.c b/src/modules/module-equalizer-sink.c
index 811bbc2..8963e36 100644
--- a/src/modules/module-equalizer-sink.c
+++ b/src/modules/module-equalizer-sink.c
@@ -1096,6 +1096,10 @@ int pa__init(pa_module*m) {
 
     pa_assert(m);
 
+    pa_log_warn("A number of serious DSP issues have been found in module-equalizer-sink.");
+    pa_log_warn("See http://lists.freedesktop.org/archives/pulseaudio-discuss/2014-March/020174.html");
+    pa_log_warn("Patches (or a rewrite) from DSP specialists are welcome.");
+
     if (!(ma = pa_modargs_new(m->argument, valid_modargs))) {
         pa_log("Failed to parse module arguments.");
         goto fail;
-- 
2.1.3



More information about the pulseaudio-discuss mailing list