Skip to contentSkip to conversation

webrtc-audio-processing: initial recipe

PATCH New Tanu Kaskinen 1 participant 1 message Jul 6, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 webrtc-audio-processing: initial recipe

PulseAudio has multiple alternative echo canceller implementations. Probably the best one is the "webrtc" echo canceller, which depends on this library.

I added some patches to fix building on MIPS and PowerPC. The first three patches are taken from upstream, the other three patches are my own. I have only tested that the code builds on all architectures, not that the code actually works.

---
 ...ild-Protect-against-unsupported-CPU-types.patch |  29 ++++++
 .../0002-build-Add-ARM-64bit-support.patch         |  30 ++++++
 .../0003-build-fix-architecture-detection.patch    |  96 +++++++++++++++++
 ...add-support-for-64-bit-and-big-endian-MIP.patch |  41 ++++++++
 .../0005-typedefs.h-add-support-for-PowerPC.patch  |  28 +++++
 ...o-implement-endianness-conversion-in-wav-.patch | 116 +++++++++++++++++++++
 .../webrtc-audio-processing_0.3.bb                 |  25 +++++
 7 files changed, 365 insertions(+)
 create mode 100644 meta-multimedia/recipes-multimedia/webrtc-audio-processing/webrtc-audio-processing/0001-build-Protect-against-unsupported-CPU-types.patch
 create mode 100644 meta-multimedia/recipes-multimedia/webrtc-audio-processing/webrtc-audio-processing/0002-build-Add-ARM-64bit-support.patch
 create mode 100644 meta-multimedia/recipes-multimedia/webrtc-audio-processing/webrtc-audio-processing/0003-build-fix-architecture-detection.patch
 create mode 100644 meta-multimedia/recipes-multimedia/webrtc-audio-processing/webrtc-audio-processing/0004-typedefs.h-add-support-for-64-bit-and-big-endian-MIP.patch
 create mode 100644 meta-multimedia/recipes-multimedia/webrtc-audio-processing/webrtc-audio-processing/0005-typedefs.h-add-support-for-PowerPC.patch
 create mode 100644 meta-multimedia/recipes-multimedia/webrtc-audio-processing/webrtc-audio-processing/0006-common_audio-implement-endianness-conversion-in-wav-.patch
 create mode 100644 meta-multimedia/recipes-multimedia/webrtc-audio-processing/webrtc-audio-processing_0.3.bb
meta-multimedia/recipes-multimedia/webrtc-audio-processing/webrtc-audio-processing/0001-build-Protect-against-unsupported-CPU-types.patch new file +29 -0
new file mode 100644
index 000000000..7668df35d
@@ -0,0 +1,29 @@
+From 4945dca11bc4ddec60bd858f45212dc8f39638e0 Mon Sep 17 00:00:00 2001
+From: Nicolas Dufresne <[email protected]>
+Date: Tue, 5 Jul 2016 18:07:45 -0400
+Subject: [PATCH 1/6] build: Protect against unsupported CPU types
+
+Signed-off-by: Tanu Kaskinen <[email protected]>
+Upstream-Status: Accepted [expected in 0.4]
+---
+ configure.ac | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 6f9553b..f5304b8 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -70,8 +70,9 @@ AS_CASE(["${host_cpu}"],
+         [
+          HAVE_ARM=1
+          ARCH_CFLAGS="-DWEBRTC_ARCH_ARM"
+-        ]
++        ],
+     # FIXME: Add MIPS support, see webrtc/BUILD.gn for defines
++    [AC_MSG_ERROR([Unsupported CPU type $host_cpu])]
+ )
+ AM_CONDITIONAL(HAVE_X86, [test "x${HAVE_X86}" = "x1"])
+ AM_CONDITIONAL(HAVE_ARM, [test "x${HAVE_ARM}" = "x1"])
+-- 
+2.11.0
+
meta-multimedia/recipes-multimedia/webrtc-audio-processing/webrtc-audio-processing/0002-build-Add-ARM-64bit-support.patch new file +30 -0
new file mode 100644
index 000000000..2e202b03c
@@ -0,0 +1,30 @@
+From b5bda3431159b6505dcd069641c863018c4d4309 Mon Sep 17 00:00:00 2001
+From: Nicolas Dufresne <[email protected]>
+Date: Wed, 6 Jul 2016 15:18:15 -0400
+Subject: [PATCH 2/6] build: Add ARM 64bit support
+
+Signed-off-by: Tanu Kaskinen <[email protected]>
+Upstream-Status: Accepted [expected in 0.4]
+---
+ configure.ac | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/configure.ac b/configure.ac
+index f5304b8..be20514 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -71,6 +71,11 @@ AS_CASE(["${host_cpu}"],
+          HAVE_ARM=1
+          ARCH_CFLAGS="-DWEBRTC_ARCH_ARM"
+         ],
++    [aarch64*],
++        [
++         HAVE_NEON=1
++         ARCH_CFLAGS="-DWEBRTC_HAS_NEON -DWEBRTC_ARCH_ARM64"
++        ],
+     # FIXME: Add MIPS support, see webrtc/BUILD.gn for defines
+     [AC_MSG_ERROR([Unsupported CPU type $host_cpu])]
+ )
+-- 
+2.11.0
+
meta-multimedia/recipes-multimedia/webrtc-audio-processing/webrtc-audio-processing/0003-build-fix-architecture-detection.patch new file +96 -0

96 lines not on this page · raw message

meta-multimedia/recipes-multimedia/webrtc-audio-processing/webrtc-audio-processing/0004-typedefs.h-add-support-for-64-bit-and-big-endian-MIP.patch new file +41 -0

41 lines not on this page · raw message

meta-multimedia/recipes-multimedia/webrtc-audio-processing/webrtc-audio-processing/0005-typedefs.h-add-support-for-PowerPC.patch new file +28 -0
new file mode 100644
index 000000000..e16b57ecb
@@ -0,0 +1,28 @@
+From db5f570e928c8ca5b0b8dc702e1af0a57277f092 Mon Sep 17 00:00:00 2001
+From: Tanu Kaskinen <[email protected]>
+Date: Mon, 3 Jul 2017 16:20:08 +0300
+Subject: [PATCH 5/6] typedefs.h: add support for PowerPC
+
+Upstream-Status: Pending
+Signed-off-by: Tanu Kaskinen <[email protected]>
+---
+ webrtc/typedefs.h | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/webrtc/typedefs.h b/webrtc/typedefs.h
+index d1b2f54..6e34d9e 100644
+--- a/webrtc/typedefs.h
++++ b/webrtc/typedefs.h
+@@ -53,6 +53,9 @@
+ #else
+ #define WEBRTC_ARCH_BIG_ENDIAN
+ #endif
++#elif defined(__powerpc__)
++#define WEBRTC_ARCH_32_BITS
++#define WEBRTC_ARCH_BIG_ENDIAN
+ #elif defined(__pnacl__)
+ #define WEBRTC_ARCH_32_BITS
+ #define WEBRTC_ARCH_LITTLE_ENDIAN
+-- 
+2.11.0
+
meta-multimedia/recipes-multimedia/webrtc-audio-processing/webrtc-audio-processing/0006-common_audio-implement-endianness-conversion-in-wav-.patch new file +116 -0

116 lines not on this page · raw message

meta-multimedia/recipes-multimedia/webrtc-audio-processing/webrtc-audio-processing_0.3.bb new file +25 -0
new file mode 100644
index 000000000..eb9a30466
@@ -0,0 +1,25 @@
+DESCRIPTION = "Audio processing bits of the WebRTC reference implementation"
+HOMEPAGE = "https://www.freedesktop.org/software/pulseaudio/webrtc-audio-processing/"
+SECTION = "audio"
+
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://COPYING;md5=da08a38a32a340c5d91e13ee86a118f2 \
+                    file://webrtc/common.h;beginline=1;endline=9;md5=41f7322d91deabaf0acbbd0b8d0bc548 \
+"
+
+# Note that patch 3 effectively reverts patches 1 and 2. The only reason
+# why patches 1 and 2 are included is that otherwise patch 3 wouldn't
+# apply cleanly.
+SRC_URI = "http://freedesktop.org/software/pulseaudio/webrtc-audio-processing/${BP}.tar.xz \
+           file://0001-build-Protect-against-unsupported-CPU-types.patch \
+           file://0002-build-Add-ARM-64bit-support.patch \
+           file://0003-build-fix-architecture-detection.patch \
+           file://0004-typedefs.h-add-support-for-64-bit-and-big-endian-MIP.patch \
+           file://0005-typedefs.h-add-support-for-PowerPC.patch \
+           file://0006-common_audio-implement-endianness-conversion-in-wav-.patch \
+"
+
+SRC_URI[md5sum] = "336ae032f608e65808ac577cde0ab72c"
+SRC_URI[sha256sum] = "756e291d4f557d88cd50c4fe3b8454ec238362d22cedb3e6173240d90f0a80fa"
+
+inherit autotools
Signature · 1 line
2.11.0