Skip to contentSkip to conversation

speex, speexdsp: 1.2rc1 -> 1.2rc2/1.2rc3

PATCH New Tanu Kaskinen 1 participant 4 messages Jul 9, 2015

lore
Share & tools
lore
#0 lore raw

v2 cover speex, speexdsp: 1.2rc1 -> 1.2rc2/1.2rc3

Changes in v2:
- Added a patch to alsa-plugins to deal with a changed header location:
speex_types.h -> speexdsp_types.h

The following changes since commit 50a37ee563d9003e21bfb9280f184cd81c62e9bf:

oeqa/bbtests: Fix to ensure DL_DIR is set (2015-07-08 13:03:07 +0100)

are available in the git repository at:

git://git.openembedded.org/openembedded-core-contrib tanuk/speex
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=tanuk/speex

Tanu Kaskinen (3):
speexdsp: initial recipe
speex: 1.2rc1 -> 1.2rc2
alsa-plugins, pulseaudio: depend on speexdsp, not speex

 ...nclude-speexdsp_types.h-not-speex_types.h.patch | 71 ++++++++++++++++++++++
 .../recipes-multimedia/alsa/alsa-plugins_1.0.29.bb |  5 +-
 meta/recipes-multimedia/pulseaudio/pulseaudio.inc  |  2 +-
 meta/recipes-multimedia/speex/speex-fpu.inc        |  4 --
 .../speex/{speex_1.2rc1.bb => speex_1.2rc2.bb}     | 18 +++---
 ...ely-on-HAVE_STDINT_H-et-al.-being-defined.patch | 63 +++++++++++++++++++
 meta/recipes-multimedia/speex/speexdsp_1.2rc3.bb   | 39 ++++++++++++
 7 files changed, 184 insertions(+), 18 deletions(-)
 create mode 100644 meta/recipes-multimedia/alsa/alsa-plugins/0001-include-speexdsp_types.h-not-speex_types.h.patch
 delete mode 100644 meta/recipes-multimedia/speex/speex-fpu.inc
 rename meta/recipes-multimedia/speex/{speex_1.2rc1.bb => speex_1.2rc2.bb} (51%)
 create mode 100644 meta/recipes-multimedia/speex/speexdsp/0001-Don-t-rely-on-HAVE_STDINT_H-et-al.-being-defined.patch
 create mode 100644 meta/recipes-multimedia/speex/speexdsp_1.2rc3.bb
Signature · 1 line
1.9.3
#1 lore raw

PATCH v2 1/3 speexdsp: initial recipe

speexdsp was split off from speex in 1.2rc2, so we need a separate recipe for speexdsp when before we can upgrade speex.

The speex recipe has so far used the --enable-fixed-point configure option unconditionally, but I believe that was a mistake, so I dropped that. The option is still enabled if TARGET_FPU is set to "soft". Commit e8f707f16a38d85535593a32efff6dcbf4ddb203 added the TARGET_FPU check, and I think that commit should have removed --enable-fixed-point from the static configure options, like it removed --disable-float-api.

The NEON code caused a build failure on qemuarm64. As a workaround, I disabled NEON optimizations when building for aarch64.

I added a patch that fixes a build failure in alsa-plugins. Compiling alsa-plugins against the new speexdsp version without the patch resulted in this error:

In file included from .../usr/include/speex/speexdsp_types.h:122:0,

                 from .../usr/include/speex/speex_preprocess.h:46,
                 from .../alsa-plugins-1.0.29/speex/pcm_speex.c:23:

.../usr/include/speex/speexdsp_config_types.h:13:9: error: unknown type name 'uint16_t'

 typedef uint16_t spx_uint16_t;
         ^
---
 ...ely-on-HAVE_STDINT_H-et-al.-being-defined.patch | 63 ++++++++++++++++++++++
 meta/recipes-multimedia/speex/speexdsp_1.2rc3.bb   | 39 ++++++++++++++
 2 files changed, 102 insertions(+)
 create mode 100644 meta/recipes-multimedia/speex/speexdsp/0001-Don-t-rely-on-HAVE_STDINT_H-et-al.-being-defined.patch
 create mode 100644 meta/recipes-multimedia/speex/speexdsp_1.2rc3.bb
meta/recipes-multimedia/speex/speexdsp/0001-Don-t-rely-on-HAVE_STDINT_H-et-al.-being-defined.patch new file +63 -0
new file mode 100644
index 0000000..c7067da
@@ -0,0 +1,63 @@
+From c73370ceafd138becee8ca3c688ba75756830bfe Mon Sep 17 00:00:00 2001
+From: Tanu Kaskinen <[email protected]>
+Date: Sun, 5 Jul 2015 17:48:16 +0300
+Subject: [PATCH] Don't rely on HAVE_STDINT_H et al. being defined
+
+Not everyone who includes speexdsp_config_types.h will have a test
+which defines those, and if we've chosen to use the stdint types at
+configure time then we know exactly which header(s) are available, so
+just choose the best one then and generate the header to use it.
+
+This patch, including the above text, is copied from a commit in the
+speex repository[1]. The original commit for speex was made by Ron
+<[email protected]>.
+
+[1] https://git.xiph.org/?p=speex.git;a=commitdiff;h=774c87d6cb7dd8dabdd17677fc6da753ecf4aa87
+
+Upstream-Status: Backport
+
+Signed-off-by: Tanu Kaskinen <[email protected]>
+---
+ configure.ac                             | 6 ++++++
+ include/speex/speexdsp_config_types.h.in | 8 +-------
+ 2 files changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 2cd2d1e..1de0c23 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -334,6 +334,12 @@ AC_SUBST([USIZE16])
+ AC_SUBST([SIZE32])
+ AC_SUBST([USIZE32])
+ 
++AS_IF([test "$ac_cv_header_stdint_h" = "yes"],    [INCLUDE_STDINT="#include <stdint.h>"],
++      [test "$ac_cv_header_inttypes_h" = "yes"],  [INCLUDE_STDINT="#include <inttypes.h>"],
++      [test "$ac_cv_header_sys_types_h" = "yes"], [INCLUDE_STDINT="#include <sys/types.h>"])
++
++AC_SUBST([INCLUDE_STDINT])
++
+ AC_CONFIG_FILES([
+            Makefile libspeexdsp/Makefile doc/Makefile SpeexDSP.spec
+            include/Makefile include/speex/Makefile speexdsp.pc
+diff --git a/include/speex/speexdsp_config_types.h.in b/include/speex/speexdsp_config_types.h.in
+index 02b82fd..5ea7b55 100644
+--- a/include/speex/speexdsp_config_types.h.in
++++ b/include/speex/speexdsp_config_types.h.in
+@@ -1,13 +1,7 @@
+ #ifndef __SPEEX_TYPES_H__
+ #define __SPEEX_TYPES_H__
+ 
+-#if defined HAVE_STDINT_H
+-#  include <stdint.h>
+-#elif defined HAVE_INTTYPES_H
+-#  include <inttypes.h>
+-#elif defined HAVE_SYS_TYPES_H
+-#  include <sys/types.h>
+-#endif
++@INCLUDE_STDINT@
+ 
+ typedef @SIZE16@ spx_int16_t;
+ typedef @USIZE16@ spx_uint16_t;
+-- 
+1.9.3
+
meta/recipes-multimedia/speex/speexdsp_1.2rc3.bb new file +39 -0
new file mode 100644
index 0000000..6b1aced
@@ -0,0 +1,39 @@
+SUMMARY = "A patent-free DSP library"
+DESCRIPTION = "SpeexDSP is a patent-free, Open Source/Free Software DSP library."
+HOMEPAGE = "http://www.speex.org"
+SECTION = "libs"
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://COPYING;md5=314649d8ba9dd7045dfb6683f298d0a8"
+
+SRC_URI = "http://downloads.xiph.org/releases/speex/speexdsp-${PV}.tar.gz \
+           file://0001-Don-t-rely-on-HAVE_STDINT_H-et-al.-being-defined.patch"
+
+SRC_URI[md5sum] = "70d9d31184f7eb761192fd1ef0b73333"
+SRC_URI[sha256sum] = "4ae688600039f5d224bdf2e222d2fbde65608447e4c2f681585e4dca6df692f1"
+
+inherit autotools pkgconfig
+
+EXTRA_OECONF = "\
+        --disable-examples \
+        ${@bb.utils.contains('TARGET_FPU', 'soft', '--enable-fixed-point --disable-float-api', '', d)} \
+"
+
+# Workaround for a build failure when building with MACHINE=qemuarm64. I think
+# aarch64 is supposed to support NEON just fine, but building for qemuarm64
+# fails in NEON code:
+#
+# .../speexdsp-1.2rc3/libspeexdsp/resample_neon.h:148:5: error: impossible constraint in 'asm'
+#      asm volatile ("  cmp %[len], #0\n"
+#      ^
+#
+# I sent an email about the issue to speex-dev. At the time of writing there
+# are no responses yet:
+# http://thread.gmane.org/gmane.comp.audio.compression.speex.devel/7360
+EXTRA_OECONF += "${@bb.utils.contains('TUNE_FEATURES', 'aarch64', '--disable-neon', '', d)}"
+
+# speexdsp was split off from speex in 1.2rc2. Older versions of speex can't
+# be installed together with speexdsp, since they contain overlapping files.
+RCONFLICTS_${PN} = "speex (< 1.2rc2)"
+RCONFLICTS_${PN}-dbg = "speex-dbg (< 1.2rc2)"
+RCONFLICTS_${PN}-dev = "speex-dev (< 1.2rc2)"
+RCONFLICTS_${PN}-staticdev = "speex-staticdev (< 1.2rc2)"
Signature · 1 line
1.9.3
#2 lore raw

PATCH v2 2/3 speex: 1.2rc1 -> 1.2rc2

Dropped speex-fpu.inc, since it's simpler to put the logic directly in the .bb file.

LIC_FILES_CHKSUM changed due to whitespace changes only.

Dropped PR.

Added a dependency on speexdsp. The speexdsp functionality used to be included in speex, but upstream split the speexdsp package off into a separate source tree. speexdsp could otherwise be an optional dependency, but the upstream configure script doesn't support disabling it explicitly, and relying on automatic detection would make builds nondeterministic, so it's better to always enable it.

--enable-fixed-point was previously included in the configure options unconditionally, but the option should be used only when TARGET_FPU is set to "soft".

--with-ogg-libraries, --with-ogg-includes and --disable-oggtest aren't supported anymore, since speex now uses pkg-config to find libogg.

---
 meta/recipes-multimedia/speex/speex-fpu.inc            |  4 ----
 .../speex/{speex_1.2rc1.bb => speex_1.2rc2.bb}         | 18 +++++++-----------
 2 files changed, 7 insertions(+), 15 deletions(-)
 delete mode 100644 meta/recipes-multimedia/speex/speex-fpu.inc
 rename meta/recipes-multimedia/speex/{speex_1.2rc1.bb => speex_1.2rc2.bb} (51%)
meta/recipes-multimedia/speex/speex-fpu.inc deleted +0 -4
deleted file mode 100644
index 2571d32..0000000
@@ -1,4 +0,0 @@
-def get_speex_fpu_setting(bb, d):
-     if bb.data.getVar('TARGET_FPU', d, 1) in [ 'soft' ]:
-             return "--enable-fixed-point --disable-float-api --disable-vbr"
-     return ""
meta/recipes-multimedia/speex/speex_1.2rc2.bb renamed from meta/recipes-multimedia/speex/speex_1.2rc1.bb +7 -11
similarity index 51%
rename from meta/recipes-multimedia/speex/speex_1.2rc1.bb
rename to meta/recipes-multimedia/speex/speex_1.2rc2.bb
index 5ff50b7..f7d23db 100644
@@ -4,20 +4,16 @@ HOMEPAGE = "http://www.speex.org"
 SECTION = "libs"
 LICENSE = "BSD"
 LIC_FILES_CHKSUM = "file://COPYING;md5=314649d8ba9dd7045dfb6683f298d0a8 \
-                    file://include/speex/speex.h;beginline=1;endline=34;md5=a68129f78d7fe66e07163f73aba143b3"
-DEPENDS = "libogg"
-
-PR = "r2"
+                    file://include/speex/speex.h;beginline=1;endline=34;md5=ef8c8ea4f7198d71cf3509c6ed05ea50"
+DEPENDS = "libogg speexdsp"
 
 SRC_URI = "http://downloads.us.xiph.org/releases/speex/speex-${PV}.tar.gz"
 
-SRC_URI[md5sum] = "c4438b22c08e5811ff10e2b06ee9b9ae"
-SRC_URI[sha256sum] = "342f30dc57bd4a6dad41398365baaa690429660b10d866b7d508e8f1179cb7a6"
+SRC_URI[md5sum] = "6ae7db3bab01e1d4b86bacfa8ca33e81"
+SRC_URI[sha256sum] = "caa27c7247ff15c8521c2ae0ea21987c9e9710a8f2d3448e8b79da9806bce891"
 
 inherit autotools pkgconfig lib_package
 
-EXTRA_OECONF = " --enable-fixed-point --with-ogg-libraries=${STAGING_LIBDIR} \
-                 --with-ogg-includes=${STAGING_INCDIR} --disable-oggtest"
-
-require speex-fpu.inc
-EXTRA_OECONF += "${@get_speex_fpu_setting(bb, d)}"
+EXTRA_OECONF = "\
+        ${@bb.utils.contains('TARGET_FPU', 'soft', '--enable-fixed-point --disable-float-api --disable-vbr', '', d)} \
+"
Signature · 1 line
1.9.3
#3 lore raw

PATCH v2 3/3 alsa-plugins, pulseaudio: depend on speexdsp, not speex

In reply to Tanu Kaskinen

Speexdsp was split off from speex, and alsa-plugins and pulseaudio only depend on the speexdsp library.

alsa-plugins needs also a patch, because it has so far relied on speex_types.h, which was renamed to speexdsp_types.h when speexdsp was split off, to not collide with the file that is included in speex.

---
 ...nclude-speexdsp_types.h-not-speex_types.h.patch | 71 ++++++++++++++++++++++
 .../recipes-multimedia/alsa/alsa-plugins_1.0.29.bb |  5 +-
 meta/recipes-multimedia/pulseaudio/pulseaudio.inc  |  2 +-
 3 files changed, 75 insertions(+), 3 deletions(-)
 create mode 100644 meta/recipes-multimedia/alsa/alsa-plugins/0001-include-speexdsp_types.h-not-speex_types.h.patch
meta/recipes-multimedia/alsa/alsa-plugins/0001-include-speexdsp_types.h-not-speex_types.h.patch new file +71 -0
new file mode 100644
index 0000000..e5199fb
@@ -0,0 +1,71 @@
+From ca41e96a49a568128354f65f90a769debf5435f1 Mon Sep 17 00:00:00 2001
+From: Tanu Kaskinen <[email protected]>
+Date: Thu, 9 Jul 2015 11:58:12 +0300
+Subject: [PATCH] include speexdsp_types.h, not speex_types.h
+
+Speexdsp was separated from speex in 1.2rc2. speex_types.h is not
+shipped by speexdsp, so alsa-plugins shouldn't use that file. speexdsp
+has speexdsp_types.h, which has the same contents as speex_types.h.
+
+speexdsp_types.h is a new file introduced in 1.2rc2, so this change
+bumps the minimum supported speexdsp version. The version check in
+configure.ac will actually break if speexdsp 1.2 ever gets released,
+because pkg-config thinks that "1.2" < "1.2rc2", but I think it's
+useful to fail if the installed speexdsp version is 1.2rc1 (which I
+believe is very common on current distributions). If a non-rc version
+of speexdsp will ever get released, I hope version number 1.2 will be
+skipped for this reason. (A non-rc version seems unlikely, since
+1.2rc1 was released years ago, so it's pretty likely that the project
+is stuck on so called "release candidates" forever...)
+
+Upstream-Status: Submitted (http://thread.gmane.org/gmane.linux.alsa.devel/141149)
+
+Signed-off-by: Tanu Kaskinen <[email protected]>
+---
+ configure.ac          | 2 +-
+ pph/arch.h            | 2 +-
+ pph/speex_resampler.h | 2 +-
+ 3 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 902a6d7..c554d22 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -108,7 +108,7 @@ AC_SUBST(AVCODEC_CFLAGS)
+ AC_SUBST(AVCODEC_LIBS)
+ AC_SUBST(AVCODEC_HEADER)
+ 
+-PKG_CHECK_MODULES(speexdsp, [speexdsp >= 1.2], [HAVE_SPEEXDSP="yes"], [HAVE_SPEEXDSP=""])
++PKG_CHECK_MODULES(speexdsp, [speexdsp >= 1.2rc2], [HAVE_SPEEXDSP="yes"], [HAVE_SPEEXDSP=""])
+ AM_CONDITIONAL(HAVE_SPEEXDSP, test "$HAVE_SPEEXDSP" = "yes")
+ 
+ AC_ARG_WITH([speex],
+diff --git a/pph/arch.h b/pph/arch.h
+index e2d731a..a07d0d9 100644
+--- a/pph/arch.h
++++ b/pph/arch.h
+@@ -36,7 +36,7 @@
+ #define ARCH_H
+ 
+ #ifndef OUTSIDE_SPEEX
+-#include "speex/speex_types.h"
++#include "speex/speexdsp_types.h"
+ #endif
+ 
+ #define ABS(x) ((x) < 0 ? (-(x)) : (x))      /**< Absolute integer value. */
+diff --git a/pph/speex_resampler.h b/pph/speex_resampler.h
+index c44fbcd..aa85abb 100644
+--- a/pph/speex_resampler.h
++++ b/pph/speex_resampler.h
+@@ -82,7 +82,7 @@
+       
+ #else /* OUTSIDE_SPEEX */
+ 
+-#include "speex/speex_types.h"
++#include "speex/speexdsp_types.h"
+ 
+ #endif /* OUTSIDE_SPEEX */
+ 
+-- 
+1.9.3
+
meta/recipes-multimedia/alsa/alsa-plugins_1.0.29.bb +3 -2
index 85df8bf..c928618 100644
@@ -19,6 +19,7 @@ LIC_FILES_CHKSUM = "\
 
 SRC_URI = "ftp://ftp.alsa-project.org/pub/plugins/${BP}.tar.bz2 \
            file://0001-arcam-av-Include-sys-select.h-for-fd_set-definition.patch \
+           file://0001-include-speexdsp_types.h-not-speex_types.h.patch \
 "
 SRC_URI[md5sum] = "a66797b4471e3cbe96575207bfbe252c"
 SRC_URI[sha256sum] = "325d85cac285f632b83e0191ae3f348bad03c1f007b937042f164abb81ea6532"
@@ -29,7 +30,7 @@ inherit autotools pkgconfig
 
 PACKAGECONFIG ??= "\
         samplerate \
-        speex \
+        speexdsp \
         ${@bb.utils.contains('DISTRO_FEATURES', 'pulseaudio', 'pulseaudio', '', d)} \
 "
 PACKAGECONFIG[avcodec] = "--enable-avcodec,--disable-avcodec,libav"
@@ -38,7 +39,7 @@ PACKAGECONFIG[maemo-plugin] = "--enable-maemo-plugin,--disable-maemo-plugin"
 PACKAGECONFIG[maemo-resource-manager] = "--enable-maemo-resource-manager,--disable-maemo-resource-manager,dbus"
 PACKAGECONFIG[pulseaudio] = "--enable-pulseaudio,--disable-pulseaudio,pulseaudio"
 PACKAGECONFIG[samplerate] = "--enable-samplerate,--disable-samplerate,libsamplerate0"
-PACKAGECONFIG[speex] = "--with-speex=lib,--with-speex=no,speex"
+PACKAGECONFIG[speexdsp] = "--with-speex=lib,--with-speex=no,speexdsp"
 
 PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'pulseaudio', 'alsa-plugins-pulseaudio-conf', '', d)}"
 
meta/recipes-multimedia/pulseaudio/pulseaudio.inc +1 -1
index 30fe221..b309d26 100644
@@ -10,7 +10,7 @@ LIC_FILES_CHKSUM = "file://GPL;md5=4325afd396febcb659c36b49533135d4 \
 DEPENDS = "libatomics-ops liboil libsndfile1 libtool"
 # optional
 DEPENDS += "udev alsa-lib glib-2.0 dbus gconf"
-DEPENDS += "json-c gdbm speex libxml-parser-perl-native libcap"
+DEPENDS += "json-c gdbm speexdsp libxml-parser-perl-native libcap"
 
 inherit autotools pkgconfig useradd gettext perlnative bluetooth systemd
 
Signature · 1 line
1.9.3