From aa0b4aecad6d837099b1c7256a4eb46a75365d5e Mon Sep 17 00:00:00 2001 From: Andreas Müller Date: Wed, 17 Jan 2018 09:34:18 +0100 Subject: fluidsynth: update 1.1.8 -> 1.1.9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 0001-avoid-buffer-overrun-in-fluid_synth_nwrite_float.patch was applied upstream Signed-off-by: Andreas Müller Signed-off-by: Armin Kuster --- ...N-accelaration-for-float-multithreaded-se.patch | 76 ++++++++++++++++++++++ ...uffer-overrun-in-fluid_synth_nwrite_float.patch | 32 --------- ...N-accelaration-for-float-multithreaded-se.patch | 76 ---------------------- .../fluidsynth/fluidsynth_1.1.8.bb | 25 ------- .../fluidsynth/fluidsynth_1.1.9.bb | 24 +++++++ 5 files changed, 100 insertions(+), 133 deletions(-) create mode 100644 meta-multimedia/recipes-multimedia/fluidsynth/files/0001-Use-ARM-NEON-accelaration-for-float-multithreaded-se.patch delete mode 100644 meta-multimedia/recipes-multimedia/fluidsynth/files/0001-avoid-buffer-overrun-in-fluid_synth_nwrite_float.patch delete mode 100644 meta-multimedia/recipes-multimedia/fluidsynth/files/0002-Use-ARM-NEON-accelaration-for-float-multithreaded-se.patch delete mode 100644 meta-multimedia/recipes-multimedia/fluidsynth/fluidsynth_1.1.8.bb create mode 100644 meta-multimedia/recipes-multimedia/fluidsynth/fluidsynth_1.1.9.bb (limited to 'meta-multimedia') diff --git a/meta-multimedia/recipes-multimedia/fluidsynth/files/0001-Use-ARM-NEON-accelaration-for-float-multithreaded-se.patch b/meta-multimedia/recipes-multimedia/fluidsynth/files/0001-Use-ARM-NEON-accelaration-for-float-multithreaded-se.patch new file mode 100644 index 0000000000..0e1846e31c --- /dev/null +++ b/meta-multimedia/recipes-multimedia/fluidsynth/files/0001-Use-ARM-NEON-accelaration-for-float-multithreaded-se.patch @@ -0,0 +1,76 @@ +From 2de7e128fbdf528716b500cf27ed9a4358c931c9 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andreas=20M=C3=BCller?= +Date: Fri, 24 Nov 2017 00:05:35 +0100 +Subject: [PATCH 2/2] Use ARM-NEON accelaration for float-multithreaded setups +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Upstream-Status: Pending + +Signed-off-by: Andreas Müller +--- + src/rvoice/fluid_rvoice_mixer.c | 26 ++++++++++++++++++++++++++ + 1 file changed, 26 insertions(+) + +diff --git a/src/rvoice/fluid_rvoice_mixer.c b/src/rvoice/fluid_rvoice_mixer.c +index 9616518..dbf8057 100644 +--- a/src/rvoice/fluid_rvoice_mixer.c ++++ b/src/rvoice/fluid_rvoice_mixer.c +@@ -27,6 +27,10 @@ + #include "fluid_ladspa.h" + #include "fluid_synth.h" + ++#if defined(__ARM_NEON__) ++#include "arm_neon.h" ++#endif ++ + + #define ENABLE_MIXER_THREADS 1 + +@@ -794,20 +798,42 @@ fluid_mixer_buffers_mix(fluid_mixer_buffers_t* dest, fluid_mixer_buffers_t* src) + if (minbuf > src->buf_count) + minbuf = src->buf_count; + for (i=0; i < minbuf; i++) { ++#if defined(__ARM_NEON__) && defined(WITH_FLOAT) ++ for (j=0; j < scount; j+=4) { ++ float32x4_t vleft = vld1q_f32(&dest->left_buf[i][j]); ++ float32x4_t vright = vld1q_f32(&dest->right_buf[i][j]); ++ vleft = vaddq_f32(vleft, vld1q_f32(&src->left_buf[i][j])); ++ vright = vaddq_f32(vright, vld1q_f32(&src->right_buf[i][j])); ++ vst1q_f32(&dest->left_buf[i][j], vleft); ++ vst1q_f32(&dest->right_buf[i][j], vright); ++ } ++#else + for (j=0; j < scount; j++) { + dest->left_buf[i][j] += src->left_buf[i][j]; + dest->right_buf[i][j] += src->right_buf[i][j]; + } ++#endif + } + + minbuf = dest->fx_buf_count; + if (minbuf > src->fx_buf_count) + minbuf = src->fx_buf_count; + for (i=0; i < minbuf; i++) { ++#if defined(__ARM_NEON__) && defined(WITH_FLOAT) ++ for (j=0; j < scount; j+=4) { ++ float32x4_t vleft = vld1q_f32(&dest->fx_left_buf[i][j]); ++ float32x4_t vright = vld1q_f32(&dest->fx_right_buf[i][j]); ++ vleft = vaddq_f32(vleft, vld1q_f32(&src->fx_left_buf[i][j])); ++ vright = vaddq_f32(vright, vld1q_f32(&src->fx_right_buf[i][j])); ++ vst1q_f32(&dest->fx_left_buf[i][j], vleft); ++ vst1q_f32(&dest->fx_right_buf[i][j], vright); ++ } ++#else + for (j=0; j < scount; j++) { + dest->fx_left_buf[i][j] += src->fx_left_buf[i][j]; + dest->fx_right_buf[i][j] += src->fx_right_buf[i][j]; + } ++#endif + } + } + +-- +2.9.5 + diff --git a/meta-multimedia/recipes-multimedia/fluidsynth/files/0001-avoid-buffer-overrun-in-fluid_synth_nwrite_float.patch b/meta-multimedia/recipes-multimedia/fluidsynth/files/0001-avoid-buffer-overrun-in-fluid_synth_nwrite_float.patch deleted file mode 100644 index dda76cfee6..0000000000 --- a/meta-multimedia/recipes-multimedia/fluidsynth/files/0001-avoid-buffer-overrun-in-fluid_synth_nwrite_float.patch +++ /dev/null @@ -1,32 +0,0 @@ -From a13cb63103aa56b5e8bad816c7d13d6e01c0cd9f Mon Sep 17 00:00:00 2001 -From: derselbst -Date: Sun, 26 Nov 2017 22:12:12 +0100 -Subject: [PATCH 1/2] avoid buffer overrun in fluid_synth_nwrite_float() - -Upstream-Status: Backport [1] - -[1] https://github.com/FluidSynth/fluidsynth/commit/a13cb63103aa56b5e8bad816c7d13d6e01c0cd9f ---- - src/synth/fluid_synth.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/src/synth/fluid_synth.c b/src/synth/fluid_synth.c -index 266d759..14f6b21 100644 ---- a/src/synth/fluid_synth.c -+++ b/src/synth/fluid_synth.c -@@ -2752,10 +2752,10 @@ fluid_synth_nwrite_float(fluid_synth_t* synth, int len, - { - #ifdef WITH_FLOAT - if(fx_left != NULL) -- FLUID_MEMCPY(fx_left[i + count], fx_left_in[i], bytes); -+ FLUID_MEMCPY(fx_left[i] + count, fx_left_in[i], bytes); - - if(fx_right != NULL) -- FLUID_MEMCPY(fx_right[i + count], fx_right_in[i], bytes); -+ FLUID_MEMCPY(fx_right[i] + count, fx_right_in[i], bytes); - #else //WITH_FLOAT - int j; - if(fx_left != NULL) { --- -2.9.5 - diff --git a/meta-multimedia/recipes-multimedia/fluidsynth/files/0002-Use-ARM-NEON-accelaration-for-float-multithreaded-se.patch b/meta-multimedia/recipes-multimedia/fluidsynth/files/0002-Use-ARM-NEON-accelaration-for-float-multithreaded-se.patch deleted file mode 100644 index 0e1846e31c..0000000000 --- a/meta-multimedia/recipes-multimedia/fluidsynth/files/0002-Use-ARM-NEON-accelaration-for-float-multithreaded-se.patch +++ /dev/null @@ -1,76 +0,0 @@ -From 2de7e128fbdf528716b500cf27ed9a4358c931c9 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Andreas=20M=C3=BCller?= -Date: Fri, 24 Nov 2017 00:05:35 +0100 -Subject: [PATCH 2/2] Use ARM-NEON accelaration for float-multithreaded setups -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Upstream-Status: Pending - -Signed-off-by: Andreas Müller ---- - src/rvoice/fluid_rvoice_mixer.c | 26 ++++++++++++++++++++++++++ - 1 file changed, 26 insertions(+) - -diff --git a/src/rvoice/fluid_rvoice_mixer.c b/src/rvoice/fluid_rvoice_mixer.c -index 9616518..dbf8057 100644 ---- a/src/rvoice/fluid_rvoice_mixer.c -+++ b/src/rvoice/fluid_rvoice_mixer.c -@@ -27,6 +27,10 @@ - #include "fluid_ladspa.h" - #include "fluid_synth.h" - -+#if defined(__ARM_NEON__) -+#include "arm_neon.h" -+#endif -+ - - #define ENABLE_MIXER_THREADS 1 - -@@ -794,20 +798,42 @@ fluid_mixer_buffers_mix(fluid_mixer_buffers_t* dest, fluid_mixer_buffers_t* src) - if (minbuf > src->buf_count) - minbuf = src->buf_count; - for (i=0; i < minbuf; i++) { -+#if defined(__ARM_NEON__) && defined(WITH_FLOAT) -+ for (j=0; j < scount; j+=4) { -+ float32x4_t vleft = vld1q_f32(&dest->left_buf[i][j]); -+ float32x4_t vright = vld1q_f32(&dest->right_buf[i][j]); -+ vleft = vaddq_f32(vleft, vld1q_f32(&src->left_buf[i][j])); -+ vright = vaddq_f32(vright, vld1q_f32(&src->right_buf[i][j])); -+ vst1q_f32(&dest->left_buf[i][j], vleft); -+ vst1q_f32(&dest->right_buf[i][j], vright); -+ } -+#else - for (j=0; j < scount; j++) { - dest->left_buf[i][j] += src->left_buf[i][j]; - dest->right_buf[i][j] += src->right_buf[i][j]; - } -+#endif - } - - minbuf = dest->fx_buf_count; - if (minbuf > src->fx_buf_count) - minbuf = src->fx_buf_count; - for (i=0; i < minbuf; i++) { -+#if defined(__ARM_NEON__) && defined(WITH_FLOAT) -+ for (j=0; j < scount; j+=4) { -+ float32x4_t vleft = vld1q_f32(&dest->fx_left_buf[i][j]); -+ float32x4_t vright = vld1q_f32(&dest->fx_right_buf[i][j]); -+ vleft = vaddq_f32(vleft, vld1q_f32(&src->fx_left_buf[i][j])); -+ vright = vaddq_f32(vright, vld1q_f32(&src->fx_right_buf[i][j])); -+ vst1q_f32(&dest->fx_left_buf[i][j], vleft); -+ vst1q_f32(&dest->fx_right_buf[i][j], vright); -+ } -+#else - for (j=0; j < scount; j++) { - dest->fx_left_buf[i][j] += src->fx_left_buf[i][j]; - dest->fx_right_buf[i][j] += src->fx_right_buf[i][j]; - } -+#endif - } - } - --- -2.9.5 - diff --git a/meta-multimedia/recipes-multimedia/fluidsynth/fluidsynth_1.1.8.bb b/meta-multimedia/recipes-multimedia/fluidsynth/fluidsynth_1.1.8.bb deleted file mode 100644 index 406bbf7688..0000000000 --- a/meta-multimedia/recipes-multimedia/fluidsynth/fluidsynth_1.1.8.bb +++ /dev/null @@ -1,25 +0,0 @@ -SUMMARY = "Fluidsynth is a software synthesizer" -HOMEPAGE = "http://www.fluidsynth.org/" -SECTION = "libs/multimedia" -LICENSE = "LGPL-2.1" -LIC_FILES_CHKSUM = "file://LICENSE;md5=fc178bcd425090939a8b634d1d6a9594" - -DEPENDS = "alsa-lib ncurses glib-2.0" - -SRC_URI = " \ - git://github.com/FluidSynth/fluidsynth.git;branch=1.1.x \ - file://0001-avoid-buffer-overrun-in-fluid_synth_nwrite_float.patch \ - file://0002-Use-ARM-NEON-accelaration-for-float-multithreaded-se.patch \ -" -SRCREV = "12e7afe3a806a6b397f28e0ca4bc6bab9ebe7047" -S = "${WORKDIR}/git" - -inherit cmake pkgconfig lib_package - -EXTRA_OECMAKE = "-Denable-floats=ON -DLIB_SUFFIX=${@d.getVar('baselib').replace('lib', '')}" - -PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'pulseaudio', d)}" -PACKAGECONFIG[sndfile] = "-Denable-libsndfile-support=ON,-Denable-libsndfile-support=OFF,libsndfile1" -PACKAGECONFIG[jack] = "-Denable-jack-support=ON,-Denable-jack-support=OFF,jack" -PACKAGECONFIG[pulseaudio] = "-Denable-pulseaudio=ON,--Denable-pulseaudio=OFF,pulseaudio" -PACKAGECONFIG[portaudio] = "-Denable-portaudio=ON,-Denable-portaudio=OFF,portaudio-v19" diff --git a/meta-multimedia/recipes-multimedia/fluidsynth/fluidsynth_1.1.9.bb b/meta-multimedia/recipes-multimedia/fluidsynth/fluidsynth_1.1.9.bb new file mode 100644 index 0000000000..fffbf0cae3 --- /dev/null +++ b/meta-multimedia/recipes-multimedia/fluidsynth/fluidsynth_1.1.9.bb @@ -0,0 +1,24 @@ +SUMMARY = "Fluidsynth is a software synthesizer" +HOMEPAGE = "http://www.fluidsynth.org/" +SECTION = "libs/multimedia" +LICENSE = "LGPL-2.1" +LIC_FILES_CHKSUM = "file://LICENSE;md5=fc178bcd425090939a8b634d1d6a9594" + +DEPENDS = "alsa-lib ncurses glib-2.0" + +SRC_URI = " \ + git://github.com/FluidSynth/fluidsynth.git;branch=1.1.x \ + file://0001-Use-ARM-NEON-accelaration-for-float-multithreaded-se.patch \ +" +SRCREV = "fe37923393d6a76f42ed044aa56dadc66ec909ce" +S = "${WORKDIR}/git" + +inherit cmake pkgconfig lib_package + +EXTRA_OECMAKE = "-Denable-floats=ON -DLIB_SUFFIX=${@d.getVar('baselib').replace('lib', '')}" + +PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'pulseaudio', d)}" +PACKAGECONFIG[sndfile] = "-Denable-libsndfile-support=ON,-Denable-libsndfile-support=OFF,libsndfile1" +PACKAGECONFIG[jack] = "-Denable-jack-support=ON,-Denable-jack-support=OFF,jack" +PACKAGECONFIG[pulseaudio] = "-Denable-pulseaudio=ON,--Denable-pulseaudio=OFF,pulseaudio" +PACKAGECONFIG[portaudio] = "-Denable-portaudio=ON,-Denable-portaudio=OFF,portaudio-v19" -- cgit 1.2.3-korg