[pulseaudio-discuss] [PATCH v2] Don't build module-equalizer-sink by default

Alexander E. Patrakov patrakov at gmail.com
Fri Mar 7 22:01:27 PST 2014


Also print a scary warning if one attempts to build or use the module,
as suggested by David Henningsson.
---
 configure.ac                        | 22 ++++++++++++++++++++--
 src/modules/module-equalizer-sink.c |  7 ++++++-
 src/pulse/proplist.h                |  4 ++--
 3 files changed, 28 insertions(+), 5 deletions(-)

diff --git a/configure.ac b/configure.ac
index e75973f..8ca6238 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1077,9 +1077,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 very bad code]))
 
-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)
 
@@ -1551,3 +1551,21 @@ part of PulseAudio on that platform.
 ===== WARNING WARNING WARNING WARNING WARNING WARNING WARNING =====
 "
 fi
+
+if test "${ENABLE_FFTW}" = "yes" ; then
+    echo "
+===== WARNING WARNING WARNING WARNING WARNING WARNING WARNING =====
+You have fftw support enabled. It is strongly recommended that you
+reconsider. fftw is used only by module-equalizer-sink, which has
+horrible C code and wrong DSP logic. See details at
+
+http://lists.freedesktop.org/archives/pulseaudio-discuss/2014-March/020174.html
+
+The module will be removed if nobody steps up to rewrite it. A
+better replacement is already available in the form of
+module-ladspa-sink + mbeq (from swh-plugins) + veromix. If you
+object to the pending removal, please send an e-mail to the
+pulseaudio-discuss list and explain why.
+===== 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 bcaaecd..0b3865d 100644
--- a/src/modules/module-equalizer-sink.c
+++ b/src/modules/module-equalizer-sink.c
@@ -69,7 +69,7 @@
 #include "module-equalizer-sink-symdef.h"
 
 PA_MODULE_AUTHOR("Jason Newton");
-PA_MODULE_DESCRIPTION(_("General Purpose Equalizer"));
+PA_MODULE_DESCRIPTION(_("General Purpose Equalizer [BROKEN]"));
 PA_MODULE_VERSION(PACKAGE_VERSION);
 PA_MODULE_LOAD_ONCE(false);
 PA_MODULE_USAGE(
@@ -1096,6 +1096,11 @@ int pa__init(pa_module*m) {
 
     pa_assert(m);
 
+    pa_log("module-equalizer-sink has horrible C code and broken DSP logic, and will be removed if nobody steps up to fix it.");
+    pa_log("For now, it is recommended to use module-ladspa-sink + mbeq (from swh-plugins) + veromix instead.");
+    pa_log("If this module works for you and the above combination doesn't, please notify the pulseaudio-discuss mailing list.");
+    pa_log("See details at http://lists.freedesktop.org/archives/pulseaudio-discuss/2014-March/020174.html");
+
     if (!(ma = pa_modargs_new(m->argument, valid_modargs))) {
         pa_log("Failed to parse module arguments.");
         goto fail;
diff --git a/src/pulse/proplist.h b/src/pulse/proplist.h
index e55a479..6a494dd 100644
--- a/src/pulse/proplist.h
+++ b/src/pulse/proplist.h
@@ -65,10 +65,10 @@ PA_C_DECL_BEGIN
 /** For streams: logic role of this media. One of the strings "video", "music", "game", "event", "phone", "animation", "production", "a11y", "test" */
 #define PA_PROP_MEDIA_ROLE                     "media.role"
 
-/** For streams: the name of a filter that is desired, e.g.\ "echo-cancel" or "equalizer-sink". PulseAudio may choose to not apply the filter if it does not make sense (for example, applying echo-cancellation on a Bluetooth headset probably does not make sense. \since 1.0 */
+/** For streams: the name of a filter that is desired, e.g.\ "echo-cancel". PulseAudio may choose to not apply the filter if it does not make sense (for example, applying echo-cancellation on a Bluetooth headset probably does not make sense. \since 1.0 */
 #define PA_PROP_FILTER_WANT                    "filter.want"
 
-/** For streams: the name of a filter that is desired, e.g.\ "echo-cancel" or "equalizer-sink". Differs from PA_PROP_FILTER_WANT in that it forces PulseAudio to apply the filter, regardless of whether PulseAudio thinks it makes sense to do so or not. If this is set, PA_PROP_FILTER_WANT is ignored. In other words, you almost certainly do not want to use this. \since 1.0 */
+/** For streams: the name of a filter that is desired, e.g.\ "echo-cancel". Differs from PA_PROP_FILTER_WANT in that it forces PulseAudio to apply the filter, regardless of whether PulseAudio thinks it makes sense to do so or not. If this is set, PA_PROP_FILTER_WANT is ignored. In other words, you almost certainly do not want to use this. \since 1.0 */
 #define PA_PROP_FILTER_APPLY                   "filter.apply"
 
 /** For streams: the name of a filter that should specifically suppressed (i.e.\ overrides PA_PROP_FILTER_WANT). Useful for the times that PA_PROP_FILTER_WANT is automatically added (e.g. echo-cancellation for phone streams when $VOIP_APP does its own, internal AEC) \since 1.0 */
-- 
1.8.5.2



More information about the pulseaudio-discuss mailing list