diff --git a/hybris/pulseaudio-modules-droid/0002-Fix-compatibility-with-pulseaudio-13.0.patch b/hybris/pulseaudio-modules-droid/0002-Fix-compatibility-with-pulseaudio-13.0.patch deleted file mode 100644 index 8d3d566df..000000000 --- a/hybris/pulseaudio-modules-droid/0002-Fix-compatibility-with-pulseaudio-13.0.patch +++ /dev/null @@ -1,147 +0,0 @@ -From 78273e5c65600392ad077bd05d6e8703553acae3 Mon Sep 17 00:00:00 2001 -From: Alexey Min -Date: Sun, 6 Oct 2019 23:14:46 +0300 -Subject: [PATCH] Fix compatibility with pulseaudio>=13.0 - -There were some API changes: - - https://gitlab.freedesktop.org/pulseaudio/pulseaudio/commit/878ef440797f0fe319dcb1e866c29cec39b8a36d - - https://gitlab.freedesktop.org/pulseaudio/pulseaudio/commit/6665b466d28ca6f166c22846777f541f5bc9cef7 - -Leading to: - Error relocating /usr/lib/pulse-13.0/modules/libdroid-sink.so: pa_make_realtime: symbol not found - Error relocating /usr/lib/pulse-13.0/modules/libdroid-source.so: pa_make_realtime: symbol not found - Error relocating /usr/lib/pulse-13.0/modules/libdroid-source.so: pa_source_get_state: symbol not found - -Fixes are: - - include , replace pa_make_realtime -> pa_thread_make_realtime - - replace pa_source_get_state(X) -> X->state - - replace pa_sink_get_state(X) -> X->state ---- - src/droid/droid-sink.c | 5 +++++ - src/droid/droid-source.c | 9 +++++++++ - src/droid/module-droid-keepalive.c | 17 +++++++++++++++++ - 3 files changed, 31 insertions(+) - -diff --git a/src/droid/droid-sink.c b/src/droid/droid-sink.c -index a857f6c..1cb290e 100644 ---- a/src/droid/droid-sink.c -+++ b/src/droid/droid-sink.c -@@ -54,6 +54,7 @@ - #include - #include - #include -+#include - - #include "droid-sink.h" - #include -@@ -371,7 +372,11 @@ static void thread_func(void *userdata) { - pa_log_debug("Thread starting up."); - - if (u->core->realtime_scheduling) -+#if (PA_CHECK_VERSION(13,0,0)) -+ pa_thread_make_realtime(u->core->realtime_priority); -+#else - pa_make_realtime(u->core->realtime_priority); -+#endif - - pa_thread_mq_install(&u->thread_mq); - -diff --git a/src/droid/droid-source.c b/src/droid/droid-source.c -index 999060f..55ff99f 100644 ---- a/src/droid/droid-source.c -+++ b/src/droid/droid-source.c -@@ -51,6 +51,7 @@ - #include - #include - #include -+#include - - #include "droid-source.h" - #include -@@ -208,7 +209,11 @@ static void thread_func(void *userdata) { - pa_log_debug("Thread starting up."); - - if (u->core->realtime_scheduling) -+#if (PA_CHECK_VERSION(13,0,0)) -+ pa_thread_make_realtime(u->core->realtime_priority); -+#else - pa_make_realtime(u->core->realtime_priority); -+#endif - - pa_thread_mq_install(&u->thread_mq); - -@@ -366,7 +371,11 @@ static int source_set_port_cb(pa_source *s, pa_device_port *p) { - - pa_log_debug("Source set port %u", data->device); - -+#if (PA_CHECK_VERSION(13,0,0)) -+ if (!PA_SOURCE_IS_OPENED(u->source->state)) -+#else - if (!PA_SOURCE_IS_OPENED(pa_source_get_state(u->source))) -+#endif - do_routing(u, data->device); - else { - pa_asyncmsgq_post(u->source->asyncmsgq, PA_MSGOBJECT(u->source), SOURCE_MESSAGE_DO_ROUTING, PA_UINT_TO_PTR(data->device), 0, NULL, NULL); -diff --git a/src/droid/module-droid-keepalive.c b/src/droid/module-droid-keepalive.c -index 5f0b70a..40b2b9e 100644 ---- a/src/droid/module-droid-keepalive.c -+++ b/src/droid/module-droid-keepalive.c -@@ -31,6 +31,7 @@ - #endif - - #include -+#include - - #include - #include -@@ -86,7 +87,11 @@ static void stop(struct userdata *u) { - return; - - while ((sink = pa_idxset_iterate(u->core->sinks, &state, NULL))) { -+#if (PA_CHECK_VERSION(13,0,0)) -+ if (sink->state != PA_SINK_SUSPENDED) -+#else - if (pa_sink_get_state(sink) != PA_SINK_SUSPENDED) -+#endif - return; - } - -@@ -94,7 +99,11 @@ static void stop(struct userdata *u) { - while ((source = pa_idxset_iterate(u->core->sources, &state, NULL))) { - if (source->monitor_of) - continue; -+#if (PA_CHECK_VERSION(13,0,0)) -+ if (source->state != PA_SOURCE_SUSPENDED) -+#else - if (pa_source_get_state(source) != PA_SOURCE_SUSPENDED) -+#endif - return; - } - -@@ -107,7 +116,11 @@ static void update_sink(pa_sink *sink, struct userdata *u) { - pa_assert(sink); - pa_assert(u); - -+#if (PA_CHECK_VERSION(13,0,0)) -+ if (sink->state != PA_SINK_SUSPENDED) -+#else - if (pa_sink_get_state(sink) != PA_SINK_SUSPENDED) -+#endif - start(u); - else - stop(u); -@@ -119,7 +132,11 @@ static void update_source(pa_source *source, struct userdata *u) { - - /* Don't react on monitor state changes. */ - if (!source->monitor_of) { -+#if (PA_CHECK_VERSION(13,0,0)) -+ if (source->state != PA_SOURCE_SUSPENDED) -+#else - if (pa_source_get_state(source) != PA_SOURCE_SUSPENDED) -+#endif - start(u); - else - stop(u); --- -2.21.0 - diff --git a/hybris/pulseaudio-modules-droid/APKBUILD b/hybris/pulseaudio-modules-droid/APKBUILD index 87b93250c..6f0e376f9 100644 --- a/hybris/pulseaudio-modules-droid/APKBUILD +++ b/hybris/pulseaudio-modules-droid/APKBUILD @@ -5,22 +5,20 @@ pkgname="pulseaudio-modules-droid" pkgver=13.0 # _pkgver used in URL to download tarball # Yes, we can build slightly older modules version against newer pulseaudio, if we are lucky -_pkgver=12.2.79 -pkgrel=1 +_pkgver=12.2.84 +pkgrel=2 pkgdesc="PulseAudio Droid modules by Mer project" url="https://github.com/mer-hybris/pulseaudio-modules-droid" -arch="armv7 aarch64" +arch="armhf armv7 aarch64" license="LGPL-2.1-or-later" depends="pulseaudio" makedepends="autoconf automake libtool m4 intltool dbus-dev expat-dev pulseaudio-dev pulsecore-private-headers android-headers-7.1 android-headers-7.1-caf libhybris-dev libhybris-7.1" options="!check" # No test suite available source=" - $pkgname-$_pkgver.tar.gz::https://github.com/mer-hybris/$pkgname/archive/$_pkgver.tar.gz + $pkgname-$_pkgver.tar.gz::https://github.com/mer-hybris/pulseaudio-modules-droid/archive/$_pkgver.tar.gz 0001-configure-ac-compat.patch - 0002-Fix-compatibility-with-pulseaudio-13.0.patch " install="$pkgname.post-install" -subpackages="" _headers_variants="7.1 7.1-caf" for _ver in $_headers_variants; do subpackages="$subpackages $pkgname-$_ver:_variant" @@ -33,7 +31,6 @@ _list_of_libs=" libdroid-source.so libdroid-util.so module-droid-card.so - module-droid-keepalive.so module-droid-sink.so module-droid-source.so " @@ -76,7 +73,7 @@ build() { make # each variation is installed into a unique temporary directory - make DESTDIR="${_tmppkgdir}/$pkgname-$_ver" install + make DESTDIR="$_tmppkgdir/$pkgname-$_ver" install done } @@ -92,11 +89,10 @@ _variant() { mkdir -p "$subpkgdir" # Copy libs from temp install folder to a proper subpackage dir for _lib in $_list_of_libs; do - install -Dm644 ${_tmppkgdir}/${subpkgname}/usr/lib/pulse-${pkgver}/modules/${_lib} \ - ${subpkgdir}/usr/lib/pulse-${pkgver}/modules/${_lib} + install -Dm644 "$_tmppkgdir/$subpkgname/usr/lib/pulse-$pkgver/modules/$_lib" \ + "$subpkgdir/usr/lib/pulse-$pkgver/modules/$_lib" done } -sha512sums="9190dfd5891e0ed580e3135eebb322a00ec99cd3af708047e75c23bd5bf6681151ac1facda08f933679464afff15d421168e549b0ae84756b0e3c97d52693865 pulseaudio-modules-droid-12.2.79.tar.gz -2aa283c64d8623c035522b89b62c80130d14c145a73e6193e2e98c26525cc12670e50f8db4649029e731b61d08c1e5ab2bd4e1a3dae8ca077bbdabe3a69eaa17 0001-configure-ac-compat.patch -e5cf7c3c11fa096bcd2fbe95c9e4135c0b9c1383b2c8c2c0cf43a554122849cc01d9e2b99cab9ec0ef51375ca013e653c6bdfd5c86145a18b3a70cef8bdf7b3e 0002-Fix-compatibility-with-pulseaudio-13.0.patch" +sha512sums="7a573573bbcfb3a6b3b82a6d75a79506809b00ab2f000b31cd2f81c6fa433daaa81eeb6a7965ab995e2e36ac87c02252dc1aad413447e82e3b70031dfa9d5e82 pulseaudio-modules-droid-12.2.84.tar.gz +2aa283c64d8623c035522b89b62c80130d14c145a73e6193e2e98c26525cc12670e50f8db4649029e731b61d08c1e5ab2bd4e1a3dae8ca077bbdabe3a69eaa17 0001-configure-ac-compat.patch" diff --git a/hybris/pulseaudio-modules-droid/pulseaudio-modules-droid.post-install b/hybris/pulseaudio-modules-droid/pulseaudio-modules-droid.post-install index 49bbfc85b..43e379bcd 100755 --- a/hybris/pulseaudio-modules-droid/pulseaudio-modules-droid.post-install +++ b/hybris/pulseaudio-modules-droid/pulseaudio-modules-droid.post-install @@ -2,19 +2,16 @@ # pulseaudio default config file name DEFAULT_PA=/etc/pulse/default.pa # configuration lines -L1="load-module module-droid-card" - -append_line() { - FN=$1 - LINE=$2 - if ! grep -q "${LINE}" "${FN}"; then - echo "Adding $LINE..." - echo "${LINE}" >> "${FN}" - else - echo "Not adding ${LINE}" - fi -} +PA_LINES=" +.ifexists /etc/pulse/arm_droid_card_custom.pa +.include /etc/pulse/arm_droid_card_custom.pa +.else +load-module module-droid-card +.endif +" if [ -f ${DEFAULT_PA} ]; then - append_line "${DEFAULT_PA}" "${L1}" + if ! grep -q "module-droid-card" $DEFAULT_PA; then + echo "$PA_LINES" >> $DEFAULT_PA + fi fi