diff options
Diffstat (limited to 'meta/recipes-multimedia/pulseaudio')
7 files changed, 273 insertions, 109 deletions
diff --git a/meta/recipes-multimedia/pulseaudio/files/0001-libatomic_ops-Aarch64-basic-port.patch b/meta/recipes-multimedia/pulseaudio/files/0001-libatomic_ops-Aarch64-basic-port.patch new file mode 100644 index 0000000000..a563b8b022 --- /dev/null +++ b/meta/recipes-multimedia/pulseaudio/files/0001-libatomic_ops-Aarch64-basic-port.patch @@ -0,0 +1,239 @@ +From aac120d778ae5fc619b2fb8ef18ea18d3d5d20cc Mon Sep 17 00:00:00 2001 +From: Yvan Roux <yvan.roux@linaro.org> +Date: Wed, 23 Jan 2013 17:14:16 +0100 +Subject: [PATCH] Aarch64 basic port + +Adapted-for-OpenEmbedded-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org> + + +Upstream-Status: Backport + +It is original from +https://github.com/ivmai/libatomic_ops/commit/cbbf86330fcb600cfe0f895cb970d922456005d6 + +Signed-off-by: Kai Kang <kai.kang@windriver.com> +--- + src/atomic_ops.h | 4 + src/atomic_ops/sysdeps/Makefile.am | 1 + src/atomic_ops/sysdeps/gcc/aarch64.h | 184 +++++++++++++++++++++++++++++++++++ + 3 files changed, 189 insertions(+) + create mode 100644 src/atomic_ops/sysdeps/gcc/aarch64.h + +--- libatomic_ops-7.2.orig/src/atomic_ops.h ++++ libatomic_ops-7.2/src/atomic_ops.h +@@ -242,10 +242,14 @@ + # endif /* __m68k__ */ + # if defined(__powerpc__) || defined(__ppc__) || defined(__PPC__) \ + || defined(__powerpc64__) || defined(__ppc64__) + # include "atomic_ops/sysdeps/gcc/powerpc.h" + # endif /* __powerpc__ */ ++# if defined(__aarch64__) ++# include "atomic_ops/sysdeps/gcc/aarch64.h" ++# define AO_CAN_EMUL_CAS ++# endif /* __aarch64__ */ + # if defined(__arm__) && !defined(AO_USE_PTHREAD_DEFS) + # include "atomic_ops/sysdeps/gcc/arm.h" + # define AO_CAN_EMUL_CAS + # endif /* __arm__ */ + # if defined(__cris__) || defined(CRIS) +--- libatomic_ops-7.2.orig/src/atomic_ops/sysdeps/Makefile.am ++++ libatomic_ops-7.2/src/atomic_ops/sysdeps/Makefile.am +@@ -24,10 +24,11 @@ nobase_sysdep_HEADERS= generic_pthread.h + standard_ao_double_t.h \ + README \ + \ + armcc/arm_v6.h \ + \ ++ gcc/aarch64.h \ + gcc/alpha.h gcc/arm.h gcc/avr32.h gcc/cris.h \ + gcc/hexagon.h gcc/hppa.h gcc/ia64.h gcc/m68k.h \ + gcc/mips.h gcc/powerpc.h gcc/s390.h \ + gcc/sh.h gcc/sparc.h gcc/x86.h gcc/x86_64.h \ + \ +--- /dev/null ++++ libatomic_ops-7.2/src/atomic_ops/sysdeps/gcc/aarch64.h +@@ -0,0 +1,184 @@ ++/* ++ * Copyright (c) 1991-1994 by Xerox Corporation. All rights reserved. ++ * Copyright (c) 1996-1999 by Silicon Graphics. All rights reserved. ++ * Copyright (c) 1999-2003 by Hewlett-Packard Company. All rights reserved. ++ * ++ * ++ * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED ++ * OR IMPLIED. ANY USE IS AT YOUR OWN RISK. ++ * ++ * Permission is hereby granted to use or copy this program ++ * for any purpose, provided the above notices are retained on all copies. ++ * Permission to modify the code and to distribute modified code is granted, ++ * provided the above notices are retained, and a notice that the code was ++ * modified is included with the above copyright notice. ++ * ++ */ ++ ++#include "../read_ordered.h" ++ ++#include "../test_and_set_t_is_ao_t.h" ++ ++AO_INLINE void ++AO_nop_full(void) ++{ ++# ifndef AO_UNIPROCESSOR ++__sync_synchronize (); ++# endif ++} ++#define AO_HAVE_nop_full ++ ++AO_INLINE AO_t ++AO_load(const volatile AO_t *addr) ++{ ++ return __atomic_load_n (addr, __ATOMIC_RELAXED); ++} ++#define AO_HAVE_load ++ ++AO_INLINE AO_t ++AO_load_acquire(const volatile AO_t *addr) ++{ ++ return __atomic_load_n (addr, __ATOMIC_ACQUIRE); ++} ++#define AO_HAVE_load_acquire ++ ++AO_INLINE void ++ AO_store(volatile AO_t *addr, AO_t value) ++{ ++ __atomic_store_n(addr, value, __ATOMIC_RELAXED); ++} ++#define AO_HAVE_store ++ ++AO_INLINE void ++ AO_store_release(volatile AO_t *addr, AO_t value) ++{ ++ __atomic_store_n(addr, value, __ATOMIC_RELEASE); ++} ++#define AO_HAVE_store_release ++ ++AO_INLINE AO_TS_VAL_t ++AO_test_and_set(volatile AO_TS_t *addr) ++{ ++ return __atomic_test_and_set(addr, __ATOMIC_RELAXED); ++} ++# define AO_HAVE_test_and_set ++ ++AO_INLINE AO_TS_VAL_t ++AO_test_and_set_acquire(volatile AO_TS_t *addr) ++{ ++ return __atomic_test_and_set(addr, __ATOMIC_ACQUIRE); ++} ++# define AO_HAVE_test_and_set_acquire ++ ++AO_INLINE AO_TS_VAL_t ++AO_test_and_set_release(volatile AO_TS_t *addr) ++{ ++ return __atomic_test_and_set(addr, __ATOMIC_RELEASE); ++} ++# define AO_HAVE_test_and_set_release ++ ++AO_INLINE AO_TS_VAL_t ++AO_test_and_set_full(volatile AO_TS_t *addr) ++{ ++ return __atomic_test_and_set(addr, __ATOMIC_SEQ_CST); ++} ++# define AO_HAVE_test_and_set_full ++ ++AO_INLINE AO_t ++AO_fetch_and_add(volatile AO_t *p, AO_t incr) ++{ ++ return __atomic_fetch_add(p, incr, __ATOMIC_RELAXED); ++} ++#define AO_HAVE_fetch_and_add ++ ++AO_INLINE AO_t ++AO_fetch_and_add_acquire(volatile AO_t *p, AO_t incr) ++{ ++ return __atomic_fetch_add(p, incr, __ATOMIC_ACQUIRE); ++} ++#define AO_HAVE_fetch_and_add_acquire ++ ++AO_INLINE AO_t ++AO_fetch_and_add_release(volatile AO_t *p, AO_t incr) ++{ ++ return __atomic_fetch_add(p, incr, __ATOMIC_RELEASE); ++} ++#define AO_HAVE_fetch_and_add_release ++ ++AO_INLINE AO_t ++AO_fetch_and_add_full(volatile AO_t *p, AO_t incr) ++{ ++ return __atomic_fetch_add(p, incr, __ATOMIC_SEQ_CST); ++} ++#define AO_HAVE_fetch_and_add_full ++ ++AO_INLINE AO_t ++AO_fetch_and_add1(volatile AO_t *p) ++{ ++ return __atomic_fetch_add(p, 1, __ATOMIC_RELAXED); ++} ++#define AO_HAVE_fetch_and_add1 ++ ++AO_INLINE AO_t ++AO_fetch_and_add1_acquire(volatile AO_t *p) ++{ ++ return __atomic_fetch_add(p, 1, __ATOMIC_ACQUIRE); ++} ++#define AO_HAVE_fetch_and_add1_acquire ++ ++AO_INLINE AO_t ++AO_fetch_and_add1_release(volatile AO_t *p) ++{ ++ return __atomic_fetch_add(p, 1, __ATOMIC_RELEASE); ++} ++#define AO_HAVE_fetch_and_add1_release ++ ++AO_INLINE AO_t ++AO_fetch_and_add1_full(volatile AO_t *p) ++{ ++ return __atomic_fetch_add(p, 1, __ATOMIC_SEQ_CST); ++} ++#define AO_HAVE_fetch_and_add1_full ++ ++AO_INLINE AO_t ++AO_fetch_and_sub1(volatile AO_t *p) ++{ ++ return __atomic_fetch_sub(p, 1, __ATOMIC_RELAXED); ++} ++#define AO_HAVE_fetch_and_sub1 ++ ++AO_INLINE AO_t ++AO_fetch_and_sub1_acquire(volatile AO_t *p) ++{ ++ return __atomic_fetch_sub(p, 1, __ATOMIC_ACQUIRE); ++} ++#define AO_HAVE_fetch_and_sub1_acquire ++ ++AO_INLINE AO_t ++AO_fetch_and_sub1_release(volatile AO_t *p) ++{ ++ return __atomic_fetch_sub(p, 1, __ATOMIC_RELEASE); ++} ++#define AO_HAVE_fetch_and_sub1_release ++ ++AO_INLINE AO_t ++AO_fetch_and_sub1_full(volatile AO_t *p) ++{ ++ return __atomic_fetch_sub(p, 1, __ATOMIC_SEQ_CST); ++} ++#define AO_HAVE_fetch_and_sub1_full ++ ++/* Returns nonzero if the comparison succeeded. */ ++AO_INLINE int ++AO_compare_and_swap(volatile AO_t *addr, AO_t old_val, AO_t new_val) ++{ ++ return __sync_bool_compare_and_swap(addr, old_val, new_val); ++} ++# define AO_HAVE_compare_and_swap ++ ++AO_INLINE AO_t ++AO_fetch_compare_and_swap(volatile AO_t *addr, AO_t old_val, AO_t new_val) ++{ ++ return __sync_val_compare_and_swap(addr, old_val, new_val); ++} ++# define AO_HAVE_fetch_compare_and_swap diff --git a/meta/recipes-multimedia/pulseaudio/libatomics-ops_7.2.bb b/meta/recipes-multimedia/pulseaudio/libatomics-ops_7.2.bb index 4632d240d2..5a582287b5 100644 --- a/meta/recipes-multimedia/pulseaudio/libatomics-ops_7.2.bb +++ b/meta/recipes-multimedia/pulseaudio/libatomics-ops_7.2.bb @@ -9,6 +9,7 @@ LIC_FILES_CHKSUM = "file://doc/COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ PR = "r1" SRC_URI = "http://www.hpl.hp.com/research/linux/atomic_ops/download/libatomic_ops-${PV}.tar.gz \ + file://0001-libatomic_ops-Aarch64-basic-port.patch \ " SRC_URI[md5sum] = "890acdc83a7cd10e2e9536062d3741c8" diff --git a/meta/recipes-multimedia/pulseaudio/pulseaudio.inc b/meta/recipes-multimedia/pulseaudio/pulseaudio.inc index 99cad76186..d6ddc3b609 100644 --- a/meta/recipes-multimedia/pulseaudio/pulseaudio.inc +++ b/meta/recipes-multimedia/pulseaudio/pulseaudio.inc @@ -5,14 +5,14 @@ SECTION = "libs/multimedia" LICENSE = "GPLv2+ & LGPLv2.1" LIC_FILES_CHKSUM = "file://GPL;md5=4325afd396febcb659c36b49533135d4 \ file://LGPL;md5=2d5025d4aa3495befef8f17206a5b0a1 \ - file://src/pulsecore/resampler.h;beginline=4;endline=23;md5=c3d539b93f8c82a1780bfa3cfa544a95" + file://src/pulsecore/resampler.h;beginline=4;endline=21;md5=09794012ae16912c0270f3280cc8ff84" -DEPENDS = "libatomics-ops liboil libsamplerate0 libsndfile1 libtool" +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" -inherit autotools pkgconfig useradd gettext perlnative +inherit autotools pkgconfig useradd gettext perlnative bluetooth systemd # *.desktop rules wont be generated during configure and build will fail # if using --disable-nls @@ -27,18 +27,20 @@ EXTRA_OECONF = "\ --disable-xen \ --with-database=simple \ --without-fftw \ + --without-zsh-completion-dir \ --with-udev-rules-dir=`pkg-config --variable=udevdir udev`/rules.d \ ac_cv_header_valgrind_memcheck_h=no \ " -PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez4', '', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \ +PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', '${BLUEZ}', '', d)} \ ${@bb.utils.contains('DISTRO_FEATURES', 'zeroconf', 'avahi', '', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}" + ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', '3g', 'ofono', '', d)}" PACKAGECONFIG[bluez4] = "--enable-bluez4,--disable-bluez4,bluez4 sbc" PACKAGECONFIG[bluez5] = "--enable-bluez5,--disable-bluez5,bluez5 sbc" +PACKAGECONFIG[ofono] = "--enable-bluez5-ofono-headset,--disable-bluez5-ofono-headset,ofono" PACKAGECONFIG[gtk] = "--enable-gtk3,--disable-gtk3,gtk+3" -PACKAGECONFIG[systemd] = "--enable-systemd,--disable-systemd,systemd" +PACKAGECONFIG[systemd] = "--enable-systemd-daemon --enable-systemd-login --enable-systemd-journal,--disable-systemd-daemon --disable-systemd-login --disable-systemd-journal,systemd" PACKAGECONFIG[x11] = "--enable-x11,--disable-x11,virtual/libx11 libxtst libice libsm libxcb" PACKAGECONFIG[avahi] = "--enable-avahi,--disable-avahi,avahi" PACKAGECONFIG[jack] = "--enable-jack,--disable-jack,jack" @@ -57,10 +59,6 @@ OE_LT_RPATH_ALLOW[export]="1" do_install_append() { install -d ${D}${sysconfdir}/default/volatiles install -m 0644 ${WORKDIR}/volatiles.04_pulse ${D}${sysconfdir}/default/volatiles/volatiles.04_pulse - - if [ "x${TARGET_PFPU}" = "xsoft" ] ; then - sed -i -e s:\;\ resample-method\ =\ sinc-fastest:resample-method\ =\ trivial: ${D}${sysconfdir}/pulse/daemon.conf - fi } USERADD_PACKAGES = "pulseaudio-server" @@ -83,7 +81,11 @@ PACKAGES_DYNAMIC += "^pulseaudio-lib-.* ^pulseaudio-module-.*" FILES_libpulsecore = "${libdir}/libpulsecore*.so" FILES_libpulsecommon = "${libdir}/pulseaudio/libpulsecommon*.so" -FILES_libpulse = "${libdir}/libpulse.so.*" + +# client.conf configures the behaviour of libpulse, so it belongs in the same +# package. +FILES_libpulse = "${libdir}/libpulse.so.* ${sysconfdir}/pulse/client.conf" + FILES_libpulse-simple = "${libdir}/libpulse-simple.so.*" FILES_libpulse-mainloop-glib = "${libdir}/libpulse-mainloop-glib.so.*" @@ -93,15 +95,21 @@ FILES_${PN}-dev += "${libdir}/pulse-${PV}/modules/*.la ${datadir}/vala ${libdir} FILES_${PN}-conf = "${sysconfdir}" FILES_${PN}-bin += "${sysconfdir}/default/volatiles/volatiles.04_pulse" FILES_${PN}-server = "${bindir}/pulseaudio ${bindir}/start-* ${sysconfdir} ${bindir}/pactl */udev/rules.d/*.rules" + +#SYSTEMD_PACKAGES = "${PN}-server" +SYSTEMD_SERVICE_${PN}-server = "pulseaudio.service" + FILES_${PN}-misc = "${bindir}/* ${libdir}/pulseaudio/libpulsedsp.so" # Allow the pulseaudio package to be created empty as a placeholder (-dbg and -dev depend on it) ALLOW_EMPTY_${PN} = "1" +CONFFILES_libpulse = "${sysconfdir}/pulse/client.conf" + CONFFILES_pulseaudio-server = "\ ${sysconfdir}/pulse/default.pa \ ${sysconfdir}/pulse/daemon.conf \ - ${sysconfdir}/pulse/client.conf \ + ${sysconfdir}/pulse/system.pa \ " pkg_postinst_${PN}-server() { diff --git a/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-configure.ac-Check-only-for-libsystemd-not-libsystem.patch b/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-configure.ac-Check-only-for-libsystemd-not-libsystem.patch deleted file mode 100644 index 467cd2cbd0..0000000000 --- a/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-configure.ac-Check-only-for-libsystemd-not-libsystem.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 002b16f0f2176b4c685e210e335bf69c02563ede Mon Sep 17 00:00:00 2001 -From: Martin Jansa <Martin.Jansa@gmail.com> -Date: Sat, 22 Feb 2014 18:03:10 +0100 -Subject: [PATCH] configure.ac: Check only for libsystemd not libsystemd-login - -* they were merged into libsystemd in systemd-209 - -Upstream-Status: Pending (it would need to be conditional on systemd version for upstream to accept this) - -Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> ---- - configure.ac | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/configure.ac b/configure.ac -index 388fae2..fff7a83 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -1160,7 +1160,7 @@ AC_ARG_ENABLE([systemd], - AS_HELP_STRING([--disable-systemd],[Disable optional systemd support])) - - AS_IF([test "x$enable_systemd" != "xno"], -- [PKG_CHECK_MODULES(SYSTEMD, [ libsystemd-login ], HAVE_SYSTEMD=1, HAVE_SYSTEMD=0)], -+ [PKG_CHECK_MODULES(SYSTEMD, [ libsystemd ], HAVE_SYSTEMD=1, HAVE_SYSTEMD=0)], - HAVE_SYSTEMD=0) - - AS_IF([test "x$enable_systemd" = "xyes" && test "x$HAVE_SYSTEMD" = "x0"], --- -1.8.5.3 - diff --git a/meta/recipes-multimedia/pulseaudio/pulseaudio/CVE-2014-3970.patch b/meta/recipes-multimedia/pulseaudio/pulseaudio/CVE-2014-3970.patch deleted file mode 100644 index d5f33dc42e..0000000000 --- a/meta/recipes-multimedia/pulseaudio/pulseaudio/CVE-2014-3970.patch +++ /dev/null @@ -1,52 +0,0 @@ -Upstream-Status: Backport - -commit 26b9d22dd24c17eb118d0205bf7b02b75d435e3c upstream - -rtp-recv: fix crash on empty UDP packets (CVE-2014-3970) - -On FIONREAD returning 0 bytes, we cannot return success, as the caller -(rtpoll_work_cb in module-rtp-recv.c) would then try to -pa_memblock_unref(chunk.memblock) and, because memblock is NULL, trigger -an assertion. - -Also we have to read out the possible empty packet from the socket, so -that the kernel doesn't tell us again and again about it. - -Signed-off-by: Alexander E. Patrakov <patrakov@gmail.com> - -diff --git a/src/modules/rtp/rtp.c b/src/modules/rtp/rtp.c -index 9195493..c45981e 100644 ---- a/src/modules/rtp/rtp.c -+++ b/src/modules/rtp/rtp.c -@@ -182,8 +182,29 @@ int pa_rtp_recv(pa_rtp_context *c, pa_memchunk *chunk, pa_mempool *pool, struct - goto fail; - } - -- if (size <= 0) -- return 0; -+ if (size <= 0) { -+ /* size can be 0 due to any of the following reasons: -+ * -+ * 1. Somebody sent us a perfectly valid zero-length UDP packet. -+ * 2. Somebody sent us a UDP packet with a bad CRC. -+ * -+ * It is unknown whether size can actually be less than zero. -+ * -+ * In the first case, the packet has to be read out, otherwise the -+ * kernel will tell us again and again about it, thus preventing -+ * reception of any further packets. So let's just read it out -+ * now and discard it later, when comparing the number of bytes -+ * received (0) with the number of bytes wanted (1, see below). -+ * -+ * In the second case, recvmsg() will fail, thus allowing us to -+ * return the error. -+ * -+ * Just to avoid passing zero-sized memchunks and NULL pointers to -+ * recvmsg(), let's force allocation of at least one byte by setting -+ * size to 1. -+ */ -+ size = 1; -+ } - - if (c->memchunk.length < (unsigned) size) { - size_t l; diff --git a/meta/recipes-multimedia/pulseaudio/pulseaudio_5.0.bb b/meta/recipes-multimedia/pulseaudio/pulseaudio_5.0.bb deleted file mode 100644 index 99f0ef3a46..0000000000 --- a/meta/recipes-multimedia/pulseaudio/pulseaudio_5.0.bb +++ /dev/null @@ -1,14 +0,0 @@ -require pulseaudio.inc - -SRC_URI = "http://freedesktop.org/software/pulseaudio/releases/pulseaudio-${PV}.tar.xz \ - file://0001-configure.ac-Check-only-for-libsystemd-not-libsystem.patch \ - file://volatiles.04_pulse \ - file://CVE-2014-3970.patch \ -" -SRC_URI[md5sum] = "c43749838612f4860465e83ed62ca38e" -SRC_URI[sha256sum] = "99c13a8b1249ddbd724f195579df79484e9af6418cecf6a15f003a7f36caf939" - -do_compile_prepend() { - mkdir -p ${S}/libltdl - cp ${STAGING_LIBDIR}/libltdl* ${S}/libltdl -} diff --git a/meta/recipes-multimedia/pulseaudio/pulseaudio_6.0.bb b/meta/recipes-multimedia/pulseaudio/pulseaudio_6.0.bb new file mode 100644 index 0000000000..91027bf654 --- /dev/null +++ b/meta/recipes-multimedia/pulseaudio/pulseaudio_6.0.bb @@ -0,0 +1,12 @@ +require pulseaudio.inc + +SRC_URI = "http://freedesktop.org/software/pulseaudio/releases/${BP}.tar.xz \ + file://volatiles.04_pulse \ +" +SRC_URI[md5sum] = "b691e83b7434c678dffacfa3a027750e" +SRC_URI[sha256sum] = "b50640e0b80b1607600accfad2e45aabb79d379bf6354c9671efa2065477f6f6" + +do_compile_prepend() { + mkdir -p ${S}/libltdl + cp ${STAGING_LIBDIR}/libltdl* ${S}/libltdl +} |