This is an automated email from the git hooks/post-receive script. themuso-guest pushed a commit to branch ubuntu in repository pulseaudio.
commit 53710cd954933051f0109214c4ad127639eb3a8d Author: Luke Yelavich <them...@ubuntu.com> Date: Fri Jan 6 10:30:56 2017 +1100 refresh patches --- debian/patches/0001-volume-config-changes.patch | 4 +- ...rapper-Quit-daemon-if-pid-file-is-removed.patch | 6 +- debian/patches/0202-dont-probe-ucm.patch | 2 +- ...0203-card-Add-hook-before-profile-changes.patch | 10 +-- debian/patches/0207-Enable-pulseaudio-droid.patch | 16 ++--- ...tooth-device-Allow-leaving-transport-runn.patch | 10 +-- ...-corking-a-sink-input-stream-when-stalled.patch | 14 ++-- .../0407-access-Add-access-control-hooks.patch | 4 +- .../0408-protocol-native-add-access-checks.patch | 78 ++++++++++------------ debian/patches/0409-Trust-store-patch.patch | 30 ++++----- .../0417-increase-timeout-check-apparmor.patch | 2 +- ...luez5-ofono-add-support-for-HFP-gateway-r.patch | 68 +++++++++---------- ...th-bluez5-bring-back-SCO-over-PCM-support.patch | 78 +++++++++------------- ...luetooth-bluez5-add-support-for-both-mode.patch | 35 +++++----- ...luez5-let-user-specify-a-default-profile-.patch | 12 ++-- ...luez5-prevent-SCO-sink-source-to-be-suspe.patch | 14 ++-- ...luez5-drop-save-restore-of-SCO-sink-sourc.patch | 6 +- ...luez5-add-guards-to-prevent-HFP-and-HSP-c.patch | 17 ++--- ...luez5-don-t-reactivate-default-profile-wh.patch | 2 +- ...Further-fixes-for-HFP-A2DP-with-BlueZ-5.x.patch | 18 ++--- ...with-upstream-for-Android-5-support-and-b.patch | 12 ++-- .../0700-modules-add-snappy-policy-module.patch | 12 ++-- 22 files changed, 211 insertions(+), 239 deletions(-) diff --git a/debian/patches/0001-volume-config-changes.patch b/debian/patches/0001-volume-config-changes.patch index 4dd6837..bd4d01b 100644 --- a/debian/patches/0001-volume-config-changes.patch +++ b/debian/patches/0001-volume-config-changes.patch @@ -2,7 +2,7 @@ Index: pulseaudio/src/daemon/daemon.conf.in =================================================================== --- pulseaudio.orig/src/daemon/daemon.conf.in +++ pulseaudio/src/daemon/daemon.conf.in -@@ -57,7 +57,7 @@ ifelse(@HAVE_DBUS@, 1, [dnl +@@ -58,7 +58,7 @@ ifelse(@HAVE_DBUS@, 1, [dnl ; enable-lfe-remixing = no ; lfe-crossover-freq = 0 @@ -11,7 +11,7 @@ Index: pulseaudio/src/daemon/daemon.conf.in ifelse(@HAVE_SYS_RESOURCE_H@, 1, [dnl ; rlimit-fsize = -1 -@@ -87,5 +87,5 @@ ifelse(@HAVE_SYS_RESOURCE_H@, 1, [dnl +@@ -88,5 +88,5 @@ ifelse(@HAVE_SYS_RESOURCE_H@, 1, [dnl ; default-fragment-size-msec = 25 ; enable-deferred-volume = yes diff --git a/debian/patches/0022-inotify-wrapper-Quit-daemon-if-pid-file-is-removed.patch b/debian/patches/0022-inotify-wrapper-Quit-daemon-if-pid-file-is-removed.patch index 87d8d70..8900a8d 100644 --- a/debian/patches/0022-inotify-wrapper-Quit-daemon-if-pid-file-is-removed.patch +++ b/debian/patches/0022-inotify-wrapper-Quit-daemon-if-pid-file-is-removed.patch @@ -29,7 +29,7 @@ Index: pulseaudio/src/Makefile.am =================================================================== --- pulseaudio.orig/src/Makefile.am +++ pulseaudio/src/Makefile.am -@@ -946,6 +946,7 @@ libpulsecore_@PA_MAJORMINOR@_la_SOURCES +@@ -960,6 +960,7 @@ libpulsecore_@PA_MAJORMINOR@_la_SOURCES pulsecore/core-subscribe.c pulsecore/core-subscribe.h \ pulsecore/core.c pulsecore/core.h \ pulsecore/hook-list.c pulsecore/hook-list.h \ @@ -81,7 +81,7 @@ Index: pulseaudio/src/daemon/main.c int autospawn_fd = -1; bool autospawn_locked = false; #ifdef HAVE_DBUS -@@ -1024,6 +1034,9 @@ int main(int argc, char *argv[]) { +@@ -1023,6 +1033,9 @@ int main(int argc, char *argv[]) { goto finish; } @@ -91,7 +91,7 @@ Index: pulseaudio/src/daemon/main.c c->default_sample_spec = conf->default_sample_spec; c->alternate_sample_rate = conf->alternate_sample_rate; c->default_channel_map = conf->default_channel_map; -@@ -1164,6 +1177,9 @@ finish: +@@ -1163,6 +1176,9 @@ finish: pa_autospawn_lock_done(false); } diff --git a/debian/patches/0202-dont-probe-ucm.patch b/debian/patches/0202-dont-probe-ucm.patch index dd8c1b9..223b60f 100644 --- a/debian/patches/0202-dont-probe-ucm.patch +++ b/debian/patches/0202-dont-probe-ucm.patch @@ -2,7 +2,7 @@ Index: pulseaudio/src/modules/alsa/alsa-ucm.c =================================================================== --- pulseaudio.orig/src/modules/alsa/alsa-ucm.c +++ pulseaudio/src/modules/alsa/alsa-ucm.c -@@ -1619,7 +1619,8 @@ pa_alsa_profile_set* pa_alsa_ucm_add_pro +@@ -1617,7 +1617,8 @@ pa_alsa_profile_set* pa_alsa_ucm_add_pro ucm_create_profile(ucm, ps, verb, verb_name, verb_desc); } diff --git a/debian/patches/0203-card-Add-hook-before-profile-changes.patch b/debian/patches/0203-card-Add-hook-before-profile-changes.patch index 08172cb..5c06da7 100644 --- a/debian/patches/0203-card-Add-hook-before-profile-changes.patch +++ b/debian/patches/0203-card-Add-hook-before-profile-changes.patch @@ -14,20 +14,20 @@ Index: pulseaudio/src/pulsecore/card.c =================================================================== --- pulseaudio.orig/src/pulsecore/card.c +++ pulseaudio/src/pulsecore/card.c -@@ -303,6 +303,8 @@ int pa_card_set_profile(pa_card *c, pa_c +@@ -308,6 +308,8 @@ int pa_card_set_profile(pa_card *c, pa_c return 0; } + pa_hook_fire(&c->core->hooks[PA_CORE_HOOK_CARD_PROFILE_CHANGING], profile); + - if ((r = c->set_profile(c, profile)) < 0) - return r; - + /* If we're setting the initial profile, we shouldn't call set_profile(), + * because the implementations don't expect that (for historical reasons). + * We should just set c->active_profile, and the implementations will Index: pulseaudio/src/pulsecore/core.h =================================================================== --- pulseaudio.orig/src/pulsecore/core.h +++ pulseaudio/src/pulsecore/core.h -@@ -122,6 +122,7 @@ typedef enum pa_core_hook { +@@ -123,6 +123,7 @@ typedef enum pa_core_hook { PA_CORE_HOOK_CARD_UNLINK, PA_CORE_HOOK_CARD_PREFERRED_PORT_CHANGED, PA_CORE_HOOK_CARD_PROFILE_CHANGED, diff --git a/debian/patches/0207-Enable-pulseaudio-droid.patch b/debian/patches/0207-Enable-pulseaudio-droid.patch index efeda4a..edb53af 100644 --- a/debian/patches/0207-Enable-pulseaudio-droid.patch +++ b/debian/patches/0207-Enable-pulseaudio-droid.patch @@ -2,7 +2,7 @@ Index: pulseaudio/configure.ac =================================================================== --- pulseaudio.orig/configure.ac +++ pulseaudio/configure.ac -@@ -847,6 +847,21 @@ AM_CONDITIONAL([HAVE_ALSA], [test "x$HAV +@@ -843,6 +843,21 @@ AM_CONDITIONAL([HAVE_ALSA], [test "x$HAV AS_IF([test "x$HAVE_ALSA" = "x1"], AC_DEFINE([HAVE_ALSA], 1, [Have ALSA?])) AS_IF([test "x$HAVE_ALSA_UCM" = "x1"], AC_DEFINE([HAVE_ALSA_UCM], 1, [Have ALSA UCM?])) @@ -24,7 +24,7 @@ Index: pulseaudio/configure.ac #### EsounD support (optional) #### AC_ARG_ENABLE([esound], -@@ -1567,6 +1582,7 @@ AS_IF([test "x$HAVE_X11" = "x1"], ENABLE +@@ -1542,6 +1557,7 @@ AS_IF([test "x$HAVE_X11" = "x1"], ENABLE AS_IF([test "x$HAVE_OSS_OUTPUT" = "x1"], ENABLE_OSS_OUTPUT=yes, ENABLE_OSS_OUTPUT=no) AS_IF([test "x$HAVE_OSS_WRAPPER" = "x1"], ENABLE_OSS_WRAPPER=yes, ENABLE_OSS_WRAPPER=no) AS_IF([test "x$HAVE_ALSA" = "x1"], ENABLE_ALSA=yes, ENABLE_ALSA=no) @@ -32,7 +32,7 @@ Index: pulseaudio/configure.ac AS_IF([test "x$HAVE_COREAUDIO" = "x1"], ENABLE_COREAUDIO=yes, ENABLE_COREAUDIO=no) AS_IF([test "x$HAVE_SOLARIS" = "x1"], ENABLE_SOLARIS=yes, ENABLE_SOLARIS=no) AS_IF([test "x$HAVE_WAVEOUT" = "x1"], ENABLE_WAVEOUT=yes, ENABLE_WAVEOUT=no) -@@ -1630,6 +1646,7 @@ echo " +@@ -1604,6 +1620,7 @@ echo " Enable OSS Wrapper: ${ENABLE_OSS_WRAPPER} Enable EsounD: ${ENABLE_ESOUND} Enable Alsa: ${ENABLE_ALSA} @@ -44,7 +44,7 @@ Index: pulseaudio/src/Makefile.am =================================================================== --- pulseaudio.orig/src/Makefile.am +++ pulseaudio/src/Makefile.am -@@ -1281,6 +1281,16 @@ modlibexec_LTLIBRARIES += \ +@@ -1296,6 +1296,16 @@ modlibexec_LTLIBRARIES += \ module-alsa-source.la \ module-alsa-card.la @@ -61,9 +61,9 @@ Index: pulseaudio/src/Makefile.am dist_alsaprofilesets_DATA = \ modules/alsa/mixer/profile-sets/default.conf \ modules/alsa/mixer/profile-sets/force-speaker.conf \ -@@ -1551,6 +1561,13 @@ SYMDEF_FILES = \ - module-filter-apply-symdef.h \ - module-filter-heuristics-symdef.h +@@ -1560,6 +1570,13 @@ SYMDEF_FILES = \ + module-filter-heuristics-symdef.h \ + module-allow-passthrough-symdef.h +if HAVE_ANDROID +SYMDEF_FILES += \ @@ -75,7 +75,7 @@ Index: pulseaudio/src/Makefile.am if HAVE_ESOUND SYMDEF_FILES += \ module-esound-protocol-tcp-symdef.h \ -@@ -1860,6 +1877,44 @@ libalsa_util_la_LIBADD += $(DBUS_LIBS) +@@ -1869,6 +1886,44 @@ libalsa_util_la_LIBADD += $(DBUS_LIBS) libalsa_util_la_CFLAGS += $(DBUS_CFLAGS) endif diff --git a/debian/patches/0208-module-bluetooth-device-Allow-leaving-transport-runn.patch b/debian/patches/0208-module-bluetooth-device-Allow-leaving-transport-runn.patch index 43790e7..6d4cabc 100644 --- a/debian/patches/0208-module-bluetooth-device-Allow-leaving-transport-runn.patch +++ b/debian/patches/0208-module-bluetooth-device-Allow-leaving-transport-runn.patch @@ -39,7 +39,7 @@ Index: pulseaudio/src/modules/bluetooth/bluez4-util.c struct pa_bluez4_discovery { PA_REFCNT_DECLARE; -@@ -504,6 +507,9 @@ static int parse_audio_property(pa_bluez +@@ -487,6 +490,9 @@ static int parse_audio_property(pa_bluez DBusMessageIter variant_i; bool is_audio_interface; pa_bluez4_profile_t p = PA_BLUEZ4_PROFILE_OFF; @@ -49,8 +49,8 @@ Index: pulseaudio/src/modules/bluetooth/bluez4-util.c pa_assert(d); pa_assert(interface); -@@ -535,6 +541,23 @@ static int parse_audio_property(pa_bluez - pa_bluez4_transport_state_t old_state; +@@ -517,6 +523,23 @@ static int parse_audio_property(pa_bluez + pa_bluez4_audio_state_t state = audio_state_from_string(value); pa_log_debug("Device %s interface %s property 'State' changed to value '%s'", d->path, interface, value); + /* Device may change state again (e.g. suspend itself) before previous state change @@ -197,7 +197,7 @@ Index: pulseaudio/src/modules/bluetooth/module-bluez4-device.c } if (u->sink) { -@@ -2509,6 +2583,10 @@ int pa__init(pa_module *m) { +@@ -2547,6 +2621,10 @@ int pa__init(pa_module *m) { pa_hook_connect(pa_bluez4_discovery_hook(u->discovery, PA_BLUEZ4_HOOK_TRANSPORT_SPEAKER_GAIN_CHANGED), PA_HOOK_NORMAL, (pa_hook_cb_t) transport_speaker_gain_changed_cb, u); @@ -208,7 +208,7 @@ Index: pulseaudio/src/modules/bluetooth/module-bluez4-device.c /* Add the card structure. This will also initialize the default profile */ if (add_card(u) < 0) goto fail; -@@ -2588,6 +2666,9 @@ void pa__done(pa_module *m) { +@@ -2626,6 +2704,9 @@ void pa__done(pa_module *m) { if (u->transport_speaker_changed_slot) pa_hook_slot_free(u->transport_speaker_changed_slot); diff --git a/debian/patches/0211-corking-a-sink-input-stream-when-stalled.patch b/debian/patches/0211-corking-a-sink-input-stream-when-stalled.patch index 4b32451..2c5a329 100644 --- a/debian/patches/0211-corking-a-sink-input-stream-when-stalled.patch +++ b/debian/patches/0211-corking-a-sink-input-stream-when-stalled.patch @@ -44,7 +44,7 @@ Index: pulseaudio/src/pulsecore/protocol-native.c }; enum { -@@ -843,6 +849,18 @@ static int playback_stream_process_msg(p +@@ -691,6 +697,18 @@ static int playback_stream_process_msg(p break; } @@ -63,7 +63,7 @@ Index: pulseaudio/src/pulsecore/protocol-native.c case PLAYBACK_STREAM_MESSAGE_UNDERFLOW: { pa_tagstruct *t; -@@ -1195,6 +1213,12 @@ static playback_stream* playback_stream_ +@@ -1043,6 +1061,12 @@ static playback_stream* playback_stream_ s->sink_input = sink_input; s->is_underrun = true; s->drain_request = false; @@ -76,20 +76,20 @@ Index: pulseaudio/src/pulsecore/protocol-native.c pa_atomic_store(&s->missing, 0); s->buffer_attr_req = *a; s->adjust_latency = adjust_latency; -@@ -1440,6 +1464,12 @@ static void handle_seek(playback_stream +@@ -1283,6 +1307,12 @@ static void handle_seek(playback_stream /* We just ended an underrun, let's ask the sink * for a complete rewind rewrite */ + /* First make sure the stream is not stalled (corked in our case) */ + if (s->cork_stalled && s->stalled) { + s->stalled = false; -+ pa_asyncmsgq_post(pa_thread_mq_get()->outq, PA_MSGOBJECT(s), PLAYBACK_STREAM_MESSAGE_UNCORK, NULL, NULL, NULL, NULL); ++ pa_asyncmsgq_post(pa_thread_mq_get()->outq, PA_MSGOBJECT(s), PLAYBACK_STREAM_MESSAGE_UNCORK, NULL, 0, NULL, NULL); + } + pa_log_debug("Requesting rewind due to end of underrun."); pa_sink_input_request_rewind(s->sink_input, (size_t) (s->sink_input->thread_info.underrun_for == (uint64_t) -1 ? 0 : -@@ -1619,6 +1649,15 @@ static int sink_input_process_msg(pa_msg +@@ -1462,6 +1492,15 @@ static int sink_input_process_msg(pa_msg return pa_sink_input_process_msg(o, code, userdata, offset, chunk); } @@ -98,14 +98,14 @@ Index: pulseaudio/src/pulsecore/protocol-native.c + if (s->is_underrun && s->sink_input->thread_info.underrun_for > 500000) { + pa_log_debug("Marking '%s' as stalled", pa_strnull(pa_proplist_gets(s->sink_input->proplist, PA_PROP_MEDIA_NAME))); + s->stalled = true; -+ pa_asyncmsgq_post(pa_thread_mq_get()->outq, PA_MSGOBJECT(s), PLAYBACK_STREAM_MESSAGE_CORK, NULL, NULL, NULL, NULL); ++ pa_asyncmsgq_post(pa_thread_mq_get()->outq, PA_MSGOBJECT(s), PLAYBACK_STREAM_MESSAGE_CORK, NULL, 0, NULL, NULL); + } +} + static bool handle_input_underrun(playback_stream *s, bool force) { bool send_drain; -@@ -1670,6 +1709,9 @@ static int sink_input_pop_cb(pa_sink_inp +@@ -1513,6 +1552,9 @@ static int sink_input_pop_cb(pa_sink_inp if (!handle_input_underrun(s, false)) s->is_underrun = false; diff --git a/debian/patches/0407-access-Add-access-control-hooks.patch b/debian/patches/0407-access-Add-access-control-hooks.patch index 5b7b07b..fc9ccd7 100644 --- a/debian/patches/0407-access-Add-access-control-hooks.patch +++ b/debian/patches/0407-access-Add-access-control-hooks.patch @@ -16,7 +16,7 @@ Index: pulseaudio/src/Makefile.am =================================================================== --- pulseaudio.orig/src/Makefile.am +++ pulseaudio/src/Makefile.am -@@ -643,6 +643,7 @@ commonlib_LTLIBRARIES = \ +@@ -656,6 +656,7 @@ commonlib_LTLIBRARIES = \ # to the existing libpulse being linked to libpulsecommon). Duplicating the # code allows us to prevent this circular linking. libpulsecommon_@PA_MAJORMINOR@_la_SOURCES = \ @@ -166,7 +166,7 @@ Index: pulseaudio/src/pulsecore/core.h typedef enum pa_server_type { PA_SERVER_TYPE_UNSET, -@@ -211,6 +212,8 @@ struct pa_core { +@@ -212,6 +213,8 @@ struct pa_core { /* hooks */ pa_hook hooks[PA_CORE_HOOK_MAX]; diff --git a/debian/patches/0408-protocol-native-add-access-checks.patch b/debian/patches/0408-protocol-native-add-access-checks.patch index ed96213..07efbba 100644 --- a/debian/patches/0408-protocol-native-add-access-checks.patch +++ b/debian/patches/0408-protocol-native-add-access-checks.patch @@ -24,18 +24,12 @@ Index: pulseaudio/src/pulsecore/protocol-native.c =================================================================== --- pulseaudio.orig/src/pulsecore/protocol-native.c +++ pulseaudio/src/pulsecore/protocol-native.c -@@ -309,6 +309,7 @@ static void command_set_sink_or_source_p - static void command_set_port_latency_offset(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata); - static void command_enable_srbchannel(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata); - static void command_register_memfd_shmid(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata); -+static pa_hook_result_t check_access(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata, uint32_t idx, pa_subscription_event_type_t event, const char *name); - - static const pa_pdispatch_cb_t command_table[PA_COMMAND_MAX] = { - [PA_COMMAND_ERROR] = NULL, -@@ -2029,6 +2030,23 @@ if (!(expression)) { \ +@@ -1872,6 +1872,25 @@ if (!(expression)) { \ } \ } while(0); ++static pa_hook_result_t check_access(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata, uint32_t idx, pa_subscription_event_type_t event, const char *name); ++ +#define CHECK_ACCESS_STMT(c, command, tag, idx, name, async, denied) { \ + pa_hook_result_t res = check_access(pd, command, tag, t, userdata, idx, 0, name); \ + if (res == PA_HOOK_STOP) { \ @@ -56,7 +50,7 @@ Index: pulseaudio/src/pulsecore/protocol-native.c static pa_tagstruct *reply_new(uint32_t tag) { pa_tagstruct *reply; -@@ -2106,6 +2124,8 @@ static void command_create_playback_stre +@@ -1949,6 +1968,8 @@ static void command_create_playback_stre CHECK_VALIDITY_GOTO(c->pstream, !sink_name || sink_index == PA_INVALID_INDEX, tag, PA_ERR_INVALID, finish); CHECK_VALIDITY_GOTO(c->pstream, pa_cvolume_valid(&volume), tag, PA_ERR_INVALID, finish); @@ -65,7 +59,7 @@ Index: pulseaudio/src/pulsecore/protocol-native.c p = pa_proplist_new(); if (name) -@@ -2427,6 +2447,8 @@ static void command_create_record_stream +@@ -2270,6 +2291,8 @@ static void command_create_record_stream CHECK_VALIDITY_GOTO(c->pstream, source_index == PA_INVALID_INDEX || !source_name, tag, PA_ERR_INVALID, finish); CHECK_VALIDITY_GOTO(c->pstream, !source_name || source_index == PA_INVALID_INDEX, tag, PA_ERR_INVALID, finish); @@ -74,7 +68,7 @@ Index: pulseaudio/src/pulsecore/protocol-native.c p = pa_proplist_new(); if (name) -@@ -2632,6 +2654,7 @@ static void command_exit(pa_pdispatch *p +@@ -2475,6 +2498,7 @@ static void command_exit(pa_pdispatch *p } CHECK_VALIDITY(c->pstream, c->authorized, tag, PA_ERR_ACCESS); @@ -82,7 +76,7 @@ Index: pulseaudio/src/pulsecore/protocol-native.c ret = pa_core_exit(c->protocol->core, false, 0); CHECK_VALIDITY(c->pstream, ret >= 0, tag, PA_ERR_ACCESS); -@@ -3028,6 +3051,7 @@ static void command_stat(pa_pdispatch *p +@@ -2877,6 +2901,7 @@ static void command_stat(pa_pdispatch *p } CHECK_VALIDITY(c->pstream, c->authorized, tag, PA_ERR_ACCESS); @@ -90,7 +84,7 @@ Index: pulseaudio/src/pulsecore/protocol-native.c stat = pa_mempool_get_stat(c->protocol->core->mempool); -@@ -3154,6 +3178,8 @@ static void command_create_upload_stream +@@ -3003,6 +3028,8 @@ static void command_create_upload_stream CHECK_VALIDITY(c->pstream, (length % pa_frame_size(&ss)) == 0 && length > 0, tag, PA_ERR_INVALID); CHECK_VALIDITY(c->pstream, length <= PA_SCACHE_ENTRY_SIZE_MAX, tag, PA_ERR_TOOLARGE); @@ -99,7 +93,7 @@ Index: pulseaudio/src/pulsecore/protocol-native.c p = pa_proplist_new(); if ((c->version >= 13 && pa_tagstruct_get_proplist(t, p) < 0) || -@@ -3252,6 +3278,8 @@ static void command_play_sample(pa_pdisp +@@ -3101,6 +3128,8 @@ static void command_play_sample(pa_pdisp CHECK_VALIDITY(c->pstream, sink, tag, PA_ERR_NOENTITY); @@ -108,7 +102,7 @@ Index: pulseaudio/src/pulsecore/protocol-native.c p = pa_proplist_new(); if ((c->version >= 13 && pa_tagstruct_get_proplist(t, p) < 0) || -@@ -3295,6 +3323,8 @@ static void command_remove_sample(pa_pdi +@@ -3144,6 +3173,8 @@ static void command_remove_sample(pa_pdi CHECK_VALIDITY(c->pstream, c->authorized, tag, PA_ERR_ACCESS); CHECK_VALIDITY(c->pstream, name && pa_namereg_is_valid_name(name), tag, PA_ERR_INVALID); @@ -117,7 +111,7 @@ Index: pulseaudio/src/pulsecore/protocol-native.c if (pa_scache_remove_item(c->protocol->core, name) < 0) { pa_pstream_send_error(c->pstream, tag, PA_ERR_NOENTITY); return; -@@ -3743,6 +3773,8 @@ static void command_get_info(pa_pdispatc +@@ -3592,6 +3623,8 @@ static void command_get_info(pa_pdispatc return; } @@ -126,7 +120,7 @@ Index: pulseaudio/src/pulsecore/protocol-native.c reply = reply_new(tag); if (sink) sink_fill_tagstruct(c, reply, sink); -@@ -3803,6 +3835,8 @@ static void command_get_info_list(pa_pdi +@@ -3652,6 +3685,8 @@ static void command_get_info_list(pa_pdi if (i) { PA_IDXSET_FOREACH(p, i, idx) { @@ -135,7 +129,7 @@ Index: pulseaudio/src/pulsecore/protocol-native.c if (command == PA_COMMAND_GET_SINK_INFO_LIST) sink_fill_tagstruct(c, reply, p); else if (command == PA_COMMAND_GET_SOURCE_INFO_LIST) -@@ -3825,6 +3859,11 @@ static void command_get_info_list(pa_pdi +@@ -3674,6 +3709,11 @@ static void command_get_info_list(pa_pdi } pa_pstream_send_tagstruct(c->pstream, reply); @@ -147,7 +141,7 @@ Index: pulseaudio/src/pulsecore/protocol-native.c } static void command_get_server_info(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) { -@@ -3845,6 +3884,15 @@ static void command_get_server_info(pa_p +@@ -3694,6 +3734,15 @@ static void command_get_server_info(pa_p CHECK_VALIDITY(c->pstream, c->authorized, tag, PA_ERR_ACCESS); @@ -163,7 +157,7 @@ Index: pulseaudio/src/pulsecore/protocol-native.c reply = reply_new(tag); pa_tagstruct_puts(reply, PACKAGE_NAME); pa_tagstruct_puts(reply, PACKAGE_VERSION); -@@ -3860,9 +3908,7 @@ static void command_get_server_info(pa_p +@@ -3709,9 +3758,7 @@ static void command_get_server_info(pa_p fixup_sample_spec(c, &fixed_ss, &c->protocol->core->default_sample_spec); pa_tagstruct_put_sample_spec(reply, &fixed_ss); @@ -173,7 +167,7 @@ Index: pulseaudio/src/pulsecore/protocol-native.c pa_tagstruct_puts(reply, def_source ? def_source->name : NULL); pa_tagstruct_putu32(reply, c->protocol->core->cookie); -@@ -3981,6 +4027,8 @@ static void command_set_volume( +@@ -3830,6 +3877,8 @@ static void command_set_volume( client_name = pa_strnull(pa_proplist_gets(c->client->proplist, PA_PROP_APPLICATION_PROCESS_BINARY)); @@ -182,7 +176,7 @@ Index: pulseaudio/src/pulsecore/protocol-native.c if (sink) { CHECK_VALIDITY(c->pstream, volume.channels == 1 || pa_cvolume_compatible(&volume, &sink->sample_spec), tag, PA_ERR_INVALID); -@@ -4076,6 +4124,8 @@ static void command_set_mute( +@@ -3925,6 +3974,8 @@ static void command_set_mute( CHECK_VALIDITY(c->pstream, si || so || sink || source, tag, PA_ERR_NOENTITY); @@ -191,7 +185,7 @@ Index: pulseaudio/src/pulsecore/protocol-native.c client_name = pa_strnull(pa_proplist_gets(c->client->proplist, PA_PROP_APPLICATION_PROCESS_BINARY)); if (sink) { -@@ -4539,6 +4589,7 @@ static void command_set_default_sink_or_ +@@ -4388,6 +4439,7 @@ static void command_set_default_sink_or_ source = pa_namereg_get(c->protocol->core, s, PA_NAMEREG_SOURCE); CHECK_VALIDITY(c->pstream, source, tag, PA_ERR_NOENTITY); @@ -199,7 +193,7 @@ Index: pulseaudio/src/pulsecore/protocol-native.c pa_namereg_set_default_source(c->protocol->core, source); } else { -@@ -4547,6 +4598,7 @@ static void command_set_default_sink_or_ +@@ -4396,6 +4448,7 @@ static void command_set_default_sink_or_ sink = pa_namereg_get(c->protocol->core, s, PA_NAMEREG_SINK); CHECK_VALIDITY(c->pstream, sink, tag, PA_ERR_NOENTITY); @@ -207,7 +201,7 @@ Index: pulseaudio/src/pulsecore/protocol-native.c pa_namereg_set_default_sink(c->protocol->core, sink); } -@@ -4614,6 +4666,7 @@ static void command_kill(pa_pdispatch *p +@@ -4463,6 +4516,7 @@ static void command_kill(pa_pdispatch *p client = pa_idxset_get_by_index(c->protocol->core->clients, idx); CHECK_VALIDITY(c->pstream, client, tag, PA_ERR_NOENTITY); @@ -215,7 +209,7 @@ Index: pulseaudio/src/pulsecore/protocol-native.c pa_native_connection_ref(c); pa_client_kill(client); -@@ -4623,6 +4676,7 @@ static void command_kill(pa_pdispatch *p +@@ -4472,6 +4526,7 @@ static void command_kill(pa_pdispatch *p s = pa_idxset_get_by_index(c->protocol->core->sink_inputs, idx); CHECK_VALIDITY(c->pstream, s, tag, PA_ERR_NOENTITY); @@ -223,7 +217,7 @@ Index: pulseaudio/src/pulsecore/protocol-native.c pa_native_connection_ref(c); pa_sink_input_kill(s); -@@ -4633,6 +4687,7 @@ static void command_kill(pa_pdispatch *p +@@ -4482,6 +4537,7 @@ static void command_kill(pa_pdispatch *p s = pa_idxset_get_by_index(c->protocol->core->source_outputs, idx); CHECK_VALIDITY(c->pstream, s, tag, PA_ERR_NOENTITY); @@ -231,7 +225,7 @@ Index: pulseaudio/src/pulsecore/protocol-native.c pa_native_connection_ref(c); pa_source_output_kill(s); -@@ -4662,6 +4717,8 @@ static void command_load_module(pa_pdisp +@@ -4511,6 +4567,8 @@ static void command_load_module(pa_pdisp CHECK_VALIDITY(c->pstream, name && *name && pa_utf8_valid(name) && !strchr(name, '/'), tag, PA_ERR_INVALID); CHECK_VALIDITY(c->pstream, !argument || pa_utf8_valid(argument), tag, PA_ERR_INVALID); @@ -240,7 +234,7 @@ Index: pulseaudio/src/pulsecore/protocol-native.c if (!(m = pa_module_load(c->protocol->core, name, argument))) { pa_pstream_send_error(c->pstream, tag, PA_ERR_MODINITFAILED); return; -@@ -4690,6 +4747,8 @@ static void command_unload_module(pa_pdi +@@ -4539,6 +4597,8 @@ static void command_unload_module(pa_pdi m = pa_idxset_get_by_index(c->protocol->core->modules, idx); CHECK_VALIDITY(c->pstream, m, tag, PA_ERR_NOENTITY); @@ -249,7 +243,7 @@ Index: pulseaudio/src/pulsecore/protocol-native.c pa_module_unload_request(m, false); pa_pstream_send_simple_ack(c->pstream, tag); } -@@ -4728,6 +4787,7 @@ static void command_move_stream(pa_pdisp +@@ -4577,6 +4637,7 @@ static void command_move_stream(pa_pdisp sink = pa_namereg_get(c->protocol->core, name_device, PA_NAMEREG_SINK); CHECK_VALIDITY(c->pstream, si && sink, tag, PA_ERR_NOENTITY); @@ -257,7 +251,7 @@ Index: pulseaudio/src/pulsecore/protocol-native.c if (pa_sink_input_move_to(si, sink, true) < 0) { pa_pstream_send_error(c->pstream, tag, PA_ERR_INVALID); -@@ -4747,6 +4807,7 @@ static void command_move_stream(pa_pdisp +@@ -4596,6 +4657,7 @@ static void command_move_stream(pa_pdisp source = pa_namereg_get(c->protocol->core, name_device, PA_NAMEREG_SOURCE); CHECK_VALIDITY(c->pstream, so && source, tag, PA_ERR_NOENTITY); @@ -265,7 +259,7 @@ Index: pulseaudio/src/pulsecore/protocol-native.c if (pa_source_output_move_to(so, source, true) < 0) { pa_pstream_send_error(c->pstream, tag, PA_ERR_INVALID); -@@ -4782,6 +4843,8 @@ static void command_suspend(pa_pdispatch +@@ -4631,6 +4693,8 @@ static void command_suspend(pa_pdispatch if (idx == PA_INVALID_INDEX && name && !*name) { @@ -274,7 +268,7 @@ Index: pulseaudio/src/pulsecore/protocol-native.c pa_log_debug("%s all sinks", b ? "Suspending" : "Resuming"); if (pa_sink_suspend_all(c->protocol->core, b, PA_SUSPEND_USER) < 0) { -@@ -4798,6 +4861,8 @@ static void command_suspend(pa_pdispatch +@@ -4647,6 +4711,8 @@ static void command_suspend(pa_pdispatch CHECK_VALIDITY(c->pstream, sink, tag, PA_ERR_NOENTITY); @@ -283,7 +277,7 @@ Index: pulseaudio/src/pulsecore/protocol-native.c pa_log_debug("%s of sink %s requested by client %" PRIu32 ".", b ? "Suspending" : "Resuming", sink->name, c->client->index); -@@ -4812,6 +4877,8 @@ static void command_suspend(pa_pdispatch +@@ -4661,6 +4727,8 @@ static void command_suspend(pa_pdispatch if (idx == PA_INVALID_INDEX && name && !*name) { @@ -292,7 +286,7 @@ Index: pulseaudio/src/pulsecore/protocol-native.c pa_log_debug("%s all sources", b ? "Suspending" : "Resuming"); if (pa_source_suspend_all(c->protocol->core, b, PA_SUSPEND_USER) < 0) { -@@ -4829,6 +4896,8 @@ static void command_suspend(pa_pdispatch +@@ -4678,6 +4746,8 @@ static void command_suspend(pa_pdispatch CHECK_VALIDITY(c->pstream, source, tag, PA_ERR_NOENTITY); @@ -301,7 +295,7 @@ Index: pulseaudio/src/pulsecore/protocol-native.c pa_log_debug("%s of source %s requested by client %" PRIu32 ".", b ? "Suspending" : "Resuming", source->name, c->client->index); -@@ -4872,6 +4941,8 @@ static void command_extension(pa_pdispat +@@ -4721,6 +4791,8 @@ static void command_extension(pa_pdispat CHECK_VALIDITY(c->pstream, m, tag, PA_ERR_NOEXTENSION); CHECK_VALIDITY(c->pstream, m->load_once || idx != PA_INVALID_INDEX, tag, PA_ERR_INVALID); @@ -310,7 +304,7 @@ Index: pulseaudio/src/pulsecore/protocol-native.c cb = (pa_native_protocol_ext_cb_t) (unsigned long) pa_hashmap_get(c->protocol->extensions, m); CHECK_VALIDITY(c->pstream, cb, tag, PA_ERR_NOEXTENSION); -@@ -4914,6 +4985,8 @@ static void command_set_card_profile(pa_ +@@ -4763,6 +4835,8 @@ static void command_set_card_profile(pa_ CHECK_VALIDITY(c->pstream, profile, tag, PA_ERR_NOENTITY); @@ -319,7 +313,7 @@ Index: pulseaudio/src/pulsecore/protocol-native.c if ((ret = pa_card_set_profile(card, profile, true)) < 0) { pa_pstream_send_error(c->pstream, tag, -ret); return; -@@ -4954,6 +5027,8 @@ static void command_set_sink_or_source_p +@@ -4803,6 +4877,8 @@ static void command_set_sink_or_source_p CHECK_VALIDITY(c->pstream, sink, tag, PA_ERR_NOENTITY); @@ -328,7 +322,7 @@ Index: pulseaudio/src/pulsecore/protocol-native.c if ((ret = pa_sink_set_port(sink, port, true)) < 0) { pa_pstream_send_error(c->pstream, tag, -ret); return; -@@ -4970,6 +5045,8 @@ static void command_set_sink_or_source_p +@@ -4819,6 +4895,8 @@ static void command_set_sink_or_source_p CHECK_VALIDITY(c->pstream, source, tag, PA_ERR_NOENTITY); @@ -337,7 +331,7 @@ Index: pulseaudio/src/pulsecore/protocol-native.c if ((ret = pa_source_set_port(source, port, true)) < 0) { pa_pstream_send_error(c->pstream, tag, -ret); return; -@@ -5014,6 +5091,8 @@ static void command_set_port_latency_off +@@ -4863,6 +4941,8 @@ static void command_set_port_latency_off port = pa_hashmap_get(card->ports, port_name); CHECK_VALIDITY(c->pstream, port, tag, PA_ERR_NOENTITY); @@ -346,7 +340,7 @@ Index: pulseaudio/src/pulsecore/protocol-native.c pa_device_port_set_latency_offset(port, offset); pa_pstream_send_simple_ack(c->pstream, tag); -@@ -5556,3 +5635,136 @@ pa_client* pa_native_connection_get_clie +@@ -5514,3 +5594,136 @@ pa_client* pa_native_connection_get_clie return c->client; } diff --git a/debian/patches/0409-Trust-store-patch.patch b/debian/patches/0409-Trust-store-patch.patch index c9c6f4b..d1862bc 100644 --- a/debian/patches/0409-Trust-store-patch.patch +++ b/debian/patches/0409-Trust-store-patch.patch @@ -26,7 +26,7 @@ Index: pulseaudio/configure.ac =================================================================== --- pulseaudio.orig/configure.ac +++ pulseaudio/configure.ac -@@ -1444,6 +1444,19 @@ AS_IF([test "x$enable_adrian_aec" != "xn +@@ -1419,6 +1419,19 @@ AS_IF([test "x$enable_adrian_aec" != "xn [HAVE_ADRIAN_EC=1]) AM_CONDITIONAL([HAVE_ADRIAN_EC], [test "x$HAVE_ADRIAN_EC" = "x1"]) @@ -46,7 +46,7 @@ Index: pulseaudio/configure.ac ################################### -@@ -1614,6 +1627,7 @@ AS_IF([test "x$HAVE_ADRIAN_EC" = "x1"], +@@ -1588,6 +1601,7 @@ AS_IF([test "x$HAVE_ADRIAN_EC" = "x1"], AS_IF([test "x$HAVE_SPEEX" = "x1"], ENABLE_SPEEX=yes, ENABLE_SPEEX=no) AS_IF([test "x$HAVE_SOXR" = "x1"], ENABLE_SOXR=yes, ENABLE_SOXR=no) AS_IF([test "x$HAVE_WEBRTC" = "x1"], ENABLE_WEBRTC=yes, ENABLE_WEBRTC=no) @@ -54,7 +54,7 @@ Index: pulseaudio/configure.ac AS_IF([test "x$HAVE_TDB" = "x1"], ENABLE_TDB=yes, ENABLE_TDB=no) AS_IF([test "x$HAVE_GDBM" = "x1"], ENABLE_GDBM=yes, ENABLE_GDBM=no) AS_IF([test "x$HAVE_SIMPLEDB" = "x1"], ENABLE_SIMPLEDB=yes, ENABLE_SIMPLEDB=no) -@@ -1679,6 +1693,7 @@ echo " +@@ -1652,6 +1666,7 @@ echo " Enable speex (resampler, AEC): ${ENABLE_SPEEX} Enable soxr (resampler): ${ENABLE_SOXR} Enable WebRTC echo canceller: ${ENABLE_WEBRTC} @@ -66,7 +66,7 @@ Index: pulseaudio/src/Makefile.am =================================================================== --- pulseaudio.orig/src/Makefile.am +++ pulseaudio/src/Makefile.am -@@ -1085,6 +1085,10 @@ if HAVE_WEBRTC +@@ -1099,6 +1099,10 @@ if HAVE_WEBRTC modlibexec_LTLIBRARIES += libwebrtc-util.la endif @@ -77,9 +77,9 @@ Index: pulseaudio/src/Makefile.am if HAVE_ESOUND modlibexec_LTLIBRARIES += \ libprotocol-esound.la -@@ -1209,6 +1213,11 @@ modlibexec_LTLIBRARIES += \ - module-filter-heuristics.la \ - module-role-ducking.la +@@ -1224,6 +1228,11 @@ modlibexec_LTLIBRARIES += \ + module-role-ducking.la \ + module-allow-passthrough.la +if HAVE_TRUST_STORE +modlibexec_LTLIBRARIES += \ @@ -89,7 +89,7 @@ Index: pulseaudio/src/Makefile.am if HAVE_ESOUND modlibexec_LTLIBRARIES += \ module-esound-protocol-tcp.la \ -@@ -1535,6 +1544,7 @@ SYMDEF_FILES = \ +@@ -1543,6 +1552,7 @@ SYMDEF_FILES = \ module-intended-roles-symdef.h \ module-suspend-on-idle-symdef.h \ module-echo-cancel-symdef.h \ @@ -97,7 +97,7 @@ Index: pulseaudio/src/Makefile.am module-hal-detect-symdef.h \ module-udev-detect-symdef.h \ module-systemd-login-symdef.h \ -@@ -2129,6 +2139,20 @@ module_echo_cancel_la_CFLAGS += -DHAVE_W +@@ -2130,6 +2140,20 @@ module_echo_cancel_la_CFLAGS += -DHAVE_W module_echo_cancel_la_LIBADD += libwebrtc-util.la endif @@ -522,7 +522,7 @@ Index: pulseaudio/src/pulsecore/iochannel.c u->pid = getpid(); if (ucred) { u->uid = ucred->uid; -@@ -437,6 +438,7 @@ ssize_t pa_iochannel_read_with_ancil_dat +@@ -439,6 +440,7 @@ ssize_t pa_iochannel_read_with_ancil_dat ancil_data->creds.gid = u.gid; ancil_data->creds.uid = u.uid; @@ -534,7 +534,7 @@ Index: pulseaudio/src/pulsecore/protocol-native.c =================================================================== --- pulseaudio.orig/src/pulsecore/protocol-native.c +++ pulseaudio/src/pulsecore/protocol-native.c -@@ -2866,6 +2866,13 @@ static void command_auth(pa_pdispatch *p +@@ -2710,6 +2710,13 @@ static void command_auth(pa_pdispatch *p do_shm = false; #ifdef HAVE_CREDS @@ -548,7 +548,7 @@ Index: pulseaudio/src/pulsecore/protocol-native.c if (do_shm) { /* Only enable SHM if both sides are owned by the same * user. This is a security measure because otherwise data -@@ -5715,6 +5722,7 @@ typedef struct pa_protocol_native_access +@@ -5674,6 +5681,7 @@ typedef struct pa_protocol_native_access } pa_protocol_native_access_data; static void check_access_finish_cb(pa_access_data *data, bool res) { @@ -556,7 +556,7 @@ Index: pulseaudio/src/pulsecore/protocol-native.c pa_protocol_native_access_data *d = (pa_protocol_native_access_data *) data; pa_native_connection *c = PA_NATIVE_CONNECTION(d->userdata); -@@ -5723,6 +5731,11 @@ static void check_access_finish_cb(pa_ac +@@ -5682,6 +5690,11 @@ static void check_access_finish_cb(pa_ac goto finish; } @@ -572,10 +572,10 @@ Index: pulseaudio/po/POTFILES.in =================================================================== --- pulseaudio.orig/po/POTFILES.in +++ pulseaudio/po/POTFILES.in -@@ -23,6 +23,7 @@ src/modules/gconf/module-gconf.c - src/modules/jack/module-jack-sink.c +@@ -24,6 +24,7 @@ src/modules/jack/module-jack-sink.c src/modules/jack/module-jack-source.c src/modules/macosx/module-coreaudio-device.c + src/modules/module-allow-passthrough.c +src/modules/trust-store/module-trust-store.c src/modules/module-always-sink.c src/modules/module-cli.c diff --git a/debian/patches/0417-increase-timeout-check-apparmor.patch b/debian/patches/0417-increase-timeout-check-apparmor.patch index 5c544e7..0a48912 100644 --- a/debian/patches/0417-increase-timeout-check-apparmor.patch +++ b/debian/patches/0417-increase-timeout-check-apparmor.patch @@ -91,7 +91,7 @@ Index: pulseaudio/src/Makefile.am =================================================================== --- pulseaudio.orig/src/Makefile.am +++ pulseaudio/src/Makefile.am -@@ -2148,7 +2148,7 @@ libtruststore_util_la_LIBADD = libpulsec +@@ -2149,7 +2149,7 @@ libtruststore_util_la_LIBADD = libpulsec libtruststore_util_la_LDFLAGS = -avoid-version module_trust_store_la_SOURCES = modules/trust-store/module-trust-store.c diff --git a/debian/patches/0501-bluetooth-bluez5-ofono-add-support-for-HFP-gateway-r.patch b/debian/patches/0501-bluetooth-bluez5-ofono-add-support-for-HFP-gateway-r.patch index 46c9802..82f933f 100644 --- a/debian/patches/0501-bluetooth-bluez5-ofono-add-support-for-HFP-gateway-r.patch +++ b/debian/patches/0501-bluetooth-bluez5-ofono-add-support-for-HFP-gateway-r.patch @@ -10,10 +10,10 @@ Subject: [PATCH 501/507] bluetooth: bluez5: ofono: add support for HFP gateway src/modules/bluetooth/bluez5-util.h | 1 + 3 files changed, 73 insertions(+), 30 deletions(-) -diff --git a/src/modules/bluetooth/backend-ofono.c b/src/modules/bluetooth/backend-ofono.c -index 755df9e..c77be54 100644 ---- a/src/modules/bluetooth/backend-ofono.c -+++ b/src/modules/bluetooth/backend-ofono.c +Index: pulseaudio/src/modules/bluetooth/backend-ofono.c +=================================================================== +--- pulseaudio.orig/src/modules/bluetooth/backend-ofono.c ++++ pulseaudio/src/modules/bluetooth/backend-ofono.c @@ -37,6 +37,7 @@ #define OFONO_SERVICE "org.ofono" #define HF_AUDIO_AGENT_INTERFACE OFONO_SERVICE ".HandsfreeAudioAgent" @@ -40,7 +40,7 @@ index 755df9e..c77be54 100644 pa_assert_se(m = dbus_message_new_method_call(t->owner, t->path, "org.ofono.HandsfreeAudioCard", "Connect")); pa_assert_se(dbus_connection_send(pa_dbus_connection_get(card->backend->connection), m, NULL)); -@@ -176,12 +179,6 @@ static int hf_audio_agent_transport_acquire(pa_bluetooth_transport *t, bool opti +@@ -176,12 +179,6 @@ static int hf_audio_agent_transport_acqu t->codec = card->codec; @@ -53,7 +53,7 @@ index 755df9e..c77be54 100644 return card->fd; } -@@ -190,18 +187,28 @@ static void hf_audio_agent_transport_release(pa_bluetooth_transport *t) { +@@ -190,18 +187,28 @@ static void hf_audio_agent_transport_rel pa_assert(card); @@ -70,16 +70,16 @@ index 755df9e..c77be54 100644 + if (card->fd > 0) { + pa_log_debug("Transport available for card %s (fd %d), releasing now", + card->path, card->fd); ++ ++ /* shutdown to make sure connection is dropped immediately */ ++ shutdown(card->fd, SHUT_RDWR); ++ close(card->fd); ++ card->fd = -1; - /* shutdown to make sure connection is dropped immediately */ - shutdown(card->fd, SHUT_RDWR); - close(card->fd); - card->fd = -1; -+ /* shutdown to make sure connection is dropped immediately */ -+ shutdown(card->fd, SHUT_RDWR); -+ close(card->fd); -+ card->fd = -1; -+ + pa_log_debug("Successfully released transport for card %s", card->path); + + pa_bluetooth_transport_set_state(t, PA_BLUETOOTH_TRANSPORT_STATE_IDLE); @@ -88,7 +88,7 @@ index 755df9e..c77be54 100644 } static void hf_audio_agent_card_found(pa_bluetooth_backend *backend, const char *path, DBusMessageIter *props_i) { -@@ -209,6 +216,7 @@ static void hf_audio_agent_card_found(pa_bluetooth_backend *backend, const char +@@ -209,6 +216,7 @@ static void hf_audio_agent_card_found(pa const char *key, *value; struct hf_audio_card *card; pa_bluetooth_device *d; @@ -96,7 +96,7 @@ index 755df9e..c77be54 100644 pa_assert(backend); pa_assert(path); -@@ -227,23 +235,30 @@ static void hf_audio_agent_card_found(pa_bluetooth_backend *backend, const char +@@ -227,22 +235,29 @@ static void hf_audio_agent_card_found(pa dbus_message_iter_next(&i); dbus_message_iter_recurse(&i, &value_i); @@ -106,7 +106,8 @@ index 755df9e..c77be54 100644 - } + if ((c = dbus_message_iter_get_arg_type(&value_i)) == DBUS_TYPE_STRING) { + dbus_message_iter_get_basic(&value_i, &value); -+ + +- dbus_message_iter_get_basic(&value_i, &value); + if (pa_streq(key, "Type")) { + if (pa_streq(value, "gateway")) + profile = PA_BLUETOOTH_PROFILE_HEADSET_HEAD_UNIT; @@ -120,27 +121,25 @@ index 755df9e..c77be54 100644 + card->local_address = pa_xstrdup(value); + } -- dbus_message_iter_get_basic(&value_i, &value); -+ pa_log_debug("%s: %s", key, value); - - if (pa_streq(key, "RemoteAddress")) { - pa_xfree(card->remote_address); - card->remote_address = pa_xstrdup(value); - } else if (pa_streq(key, "LocalAddress")) { - pa_xfree(card->local_address); - card->local_address = pa_xstrdup(value); +- } ++ pa_log_debug("%s: %s", key, value); + +- pa_log_debug("%s: %s", key, value); + } else if ((c = dbus_message_iter_get_arg_type(&value_i)) == DBUS_TYPE_UINT16) { + /* Ignore for now */ + } else { + pa_log_error("Invalid properties for %s: expected 's' or 'q', received '%c'", path, c); - } ++ } -- pa_log_debug("%s: %s", key, value); -- dbus_message_iter_next(props_i); } - -@@ -253,7 +268,7 @@ static void hf_audio_agent_card_found(pa_bluetooth_backend *backend, const char +@@ -253,7 +268,7 @@ static void hf_audio_agent_card_found(pa goto fail; } @@ -149,7 +148,7 @@ index 755df9e..c77be54 100644 card->transport->acquire = hf_audio_agent_transport_acquire; card->transport->release = hf_audio_agent_transport_release; card->transport->userdata = card; -@@ -529,12 +544,25 @@ static DBusMessage *hf_audio_agent_new_connection(DBusConnection *c, DBusMessage +@@ -529,12 +544,25 @@ static DBusMessage *hf_audio_agent_new_c card = pa_hashmap_get(backend->cards, path); @@ -177,11 +176,11 @@ index 755df9e..c77be54 100644 pa_log_debug("New audio connection on card %s (fd=%d, codec=%d)", path, fd, codec); card->fd = fd; -diff --git a/src/modules/bluetooth/bluez5-util.c b/src/modules/bluetooth/bluez5-util.c -index 03c76bf..2f2f277 100644 ---- a/src/modules/bluetooth/bluez5-util.c -+++ b/src/modules/bluetooth/bluez5-util.c -@@ -1158,6 +1158,20 @@ const char *pa_bluetooth_profile_to_string(pa_bluetooth_profile_t profile) { +Index: pulseaudio/src/modules/bluetooth/bluez5-util.c +=================================================================== +--- pulseaudio.orig/src/modules/bluetooth/bluez5-util.c ++++ pulseaudio/src/modules/bluetooth/bluez5-util.c +@@ -1273,6 +1273,20 @@ const char *pa_bluetooth_profile_to_stri return NULL; } @@ -202,11 +201,11 @@ index 03c76bf..2f2f277 100644 static DBusMessage *endpoint_set_configuration(DBusConnection *conn, DBusMessage *m, void *userdata) { pa_bluetooth_discovery *y = userdata; pa_bluetooth_device *d; -diff --git a/src/modules/bluetooth/bluez5-util.h b/src/modules/bluetooth/bluez5-util.h -index d66e8a3..df44c01 100644 ---- a/src/modules/bluetooth/bluez5-util.h -+++ b/src/modules/bluetooth/bluez5-util.h -@@ -151,6 +151,7 @@ pa_bluetooth_device* pa_bluetooth_discovery_get_device_by_address(pa_bluetooth_d +Index: pulseaudio/src/modules/bluetooth/bluez5-util.h +=================================================================== +--- pulseaudio.orig/src/modules/bluetooth/bluez5-util.h ++++ pulseaudio/src/modules/bluetooth/bluez5-util.h +@@ -153,6 +153,7 @@ pa_bluetooth_device* pa_bluetooth_discov pa_hook* pa_bluetooth_discovery_hook(pa_bluetooth_discovery *y, pa_bluetooth_hook_t hook); const char *pa_bluetooth_profile_to_string(pa_bluetooth_profile_t profile); @@ -214,6 +213,3 @@ index d66e8a3..df44c01 100644 #define HEADSET_BACKEND_OFONO 0 #define HEADSET_BACKEND_NATIVE 1 --- -2.6.2 - diff --git a/debian/patches/0502-bluetooth-bluez5-bring-back-SCO-over-PCM-support.patch b/debian/patches/0502-bluetooth-bluez5-bring-back-SCO-over-PCM-support.patch index b0cc8b0..b993a9e 100644 --- a/debian/patches/0502-bluetooth-bluez5-bring-back-SCO-over-PCM-support.patch +++ b/debian/patches/0502-bluetooth-bluez5-bring-back-SCO-over-PCM-support.patch @@ -165,7 +165,7 @@ Index: pulseaudio/src/modules/bluetooth/module-bluez5-device.c static void setup_stream(struct userdata *u) { struct pollfd *pollfd; int one; -@@ -943,46 +990,52 @@ static int add_source(struct userdata *u +@@ -943,46 +990,53 @@ static int add_source(struct userdata *u pa_assert(u->transport); @@ -173,7 +173,7 @@ Index: pulseaudio/src/modules/bluetooth/module-bluez5-device.c - data.module = u->module; - data.card = u->card; - data.driver = __FILE__; -- data.name = pa_sprintf_malloc("bluez_source.%s", u->device->address); +- data.name = pa_sprintf_malloc("bluez_source.%s.%s", u->device->address, pa_bluetooth_profile_to_string(u->profile)); - data.namereg_fail = false; - pa_proplist_sets(data.proplist, "bluetooth.protocol", pa_bluetooth_profile_to_string(u->profile)); - pa_source_new_data_set_sample_spec(&data, &u->sample_spec); @@ -189,7 +189,7 @@ Index: pulseaudio/src/modules/bluetooth/module-bluez5-device.c + data.module = u->module; + data.card = u->card; + data.driver = __FILE__; -+ data.name = pa_sprintf_malloc("bluez_source.%s", u->device->address); ++ data.name = pa_sprintf_malloc("bluez_source.%s.%s", u->device->address, pa_bluetooth_profile_to_string(u->profile)); + data.namereg_fail = false; + pa_proplist_sets(data.proplist, "bluetooth.protocol", pa_bluetooth_profile_to_string(u->profile)); + pa_source_new_data_set_sample_spec(&data, &u->sample_spec); @@ -198,7 +198,7 @@ Index: pulseaudio/src/modules/bluetooth/module-bluez5-device.c + + connect_ports(u, &data, PA_DIRECTION_INPUT); + -+ if (!u->transport_acquired) ++ if (!u->transport_acquired) { + switch (u->profile) { + case PA_BLUETOOTH_PROFILE_A2DP_SOURCE: + case PA_BLUETOOTH_PROFILE_HEADSET_AUDIO_GATEWAY: @@ -210,6 +210,7 @@ Index: pulseaudio/src/modules/bluetooth/module-bluez5-device.c + pa_assert_not_reached(); + break; + } ++ } - if (!u->transport_acquired) - switch (u->profile) { @@ -249,7 +250,7 @@ Index: pulseaudio/src/modules/bluetooth/module-bluez5-device.c return 0; } -@@ -1100,52 +1153,67 @@ static int add_sink(struct userdata *u) +@@ -1100,52 +1154,67 @@ static int add_sink(struct userdata *u) pa_assert(u->transport); @@ -257,16 +258,16 @@ Index: pulseaudio/src/modules/bluetooth/module-bluez5-device.c - data.module = u->module; - data.card = u->card; - data.driver = __FILE__; -- data.name = pa_sprintf_malloc("bluez_sink.%s", u->device->address); +- data.name = pa_sprintf_malloc("bluez_sink.%s.%s", u->device->address, pa_bluetooth_profile_to_string(u->profile)); - data.namereg_fail = false; - pa_proplist_sets(data.proplist, "bluetooth.protocol", pa_bluetooth_profile_to_string(u->profile)); - pa_sink_new_data_set_sample_spec(&data, &u->sample_spec); - if (u->profile == PA_BLUETOOTH_PROFILE_HEADSET_HEAD_UNIT) - pa_proplist_sets(data.proplist, PA_PROP_DEVICE_INTENDED_ROLES, "phone"); +- +- connect_ports(u, &data, PA_DIRECTION_OUTPUT); + if (USE_SCO_OVER_PCM(u)) { + pa_proplist *p; - -- connect_ports(u, &data, PA_DIRECTION_OUTPUT); + u->sink = u->hsp.sco_sink; + p = pa_proplist_new(); + pa_proplist_sets(p, "bluetooth.protocol", pa_bluetooth_profile_to_string(u->profile)); @@ -277,7 +278,7 @@ Index: pulseaudio/src/modules/bluetooth/module-bluez5-device.c + data.module = u->module; + data.card = u->card; + data.driver = __FILE__; -+ data.name = pa_sprintf_malloc("bluez_sink.%s", u->device->address); ++ data.name = pa_sprintf_malloc("bluez_sink.%s.%s", u->device->address, pa_bluetooth_profile_to_string(u->profile)); + data.namereg_fail = false; + pa_proplist_sets(data.proplist, "bluetooth.protocol", pa_bluetooth_profile_to_string(u->profile)); + pa_sink_new_data_set_sample_spec(&data, &u->sample_spec); @@ -286,7 +287,7 @@ Index: pulseaudio/src/modules/bluetooth/module-bluez5-device.c + + connect_ports(u, &data, PA_DIRECTION_OUTPUT); + -+ if (!u->transport_acquired) ++ if (!u->transport_acquired) { + switch (u->profile) { + case PA_BLUETOOTH_PROFILE_HEADSET_AUDIO_GATEWAY: + data.suspend_cause = PA_SUSPEND_USER; @@ -299,6 +300,7 @@ Index: pulseaudio/src/modules/bluetooth/module-bluez5-device.c + pa_assert_not_reached(); + break; + } ++ } - if (!u->transport_acquired) - switch (u->profile) { @@ -348,7 +350,7 @@ Index: pulseaudio/src/modules/bluetooth/module-bluez5-device.c if (u->profile == PA_BLUETOOTH_PROFILE_HEADSET_HEAD_UNIT || u->profile == PA_BLUETOOTH_PROFILE_HEADSET_AUDIO_GATEWAY) { u->sample_spec.format = PA_SAMPLE_S16LE; u->sample_spec.channels = 1; -@@ -1264,11 +1332,18 @@ static int setup_transport(struct userda +@@ -1264,11 +1333,18 @@ static int setup_transport(struct userda pa_bluetooth_transport *t; pa_assert(u); @@ -368,7 +370,7 @@ Index: pulseaudio/src/modules/bluetooth/module-bluez5-device.c if (!t || t->state <= PA_BLUETOOTH_TRANSPORT_STATE_DISCONNECTED) { pa_log_warn("Profile has no transport"); return -1; -@@ -1305,11 +1380,16 @@ static int init_profile(struct userdata +@@ -1305,11 +1381,16 @@ static int init_profile(struct userdata pa_assert(u); pa_assert(u->profile != PA_BLUETOOTH_PROFILE_OFF); @@ -385,7 +387,7 @@ Index: pulseaudio/src/modules/bluetooth/module-bluez5-device.c if (get_profile_direction (u->profile) & PA_DIRECTION_OUTPUT) if (add_sink(u) < 0) r = -1; -@@ -1517,6 +1597,63 @@ finish: +@@ -1517,6 +1598,63 @@ finish: pa_log_debug("IO thread shutting down"); } @@ -449,9 +451,9 @@ Index: pulseaudio/src/modules/bluetooth/module-bluez5-device.c /* Run from main thread */ static int start_thread(struct userdata *u) { pa_assert(u); -@@ -1527,6 +1664,25 @@ static int start_thread(struct userdata - u->rtpoll = pa_rtpoll_new(); - pa_thread_mq_init(&u->thread_mq, u->core->mainloop, u->rtpoll); +@@ -1531,6 +1669,25 @@ static int start_thread(struct userdata + return -1; + } + if (USE_SCO_OVER_PCM(u)) { + if (sco_over_pcm_state_update(u, false) < 0) @@ -475,7 +477,7 @@ Index: pulseaudio/src/modules/bluetooth/module-bluez5-device.c if (!(u->thread = pa_thread_new("bluetooth", thread_func, u))) { pa_log_error("Failed to create IO thread"); return -1; -@@ -1557,10 +1713,10 @@ static int start_thread(struct userdata +@@ -1561,10 +1718,10 @@ static int start_thread(struct userdata static void stop_thread(struct userdata *u) { pa_assert(u); @@ -488,7 +490,7 @@ Index: pulseaudio/src/modules/bluetooth/module-bluez5-device.c pa_source_unlink(u->source); if (u->thread) { -@@ -1840,6 +1997,22 @@ static pa_card_profile *create_card_prof +@@ -1854,6 +2011,22 @@ static pa_card_profile *create_card_prof return cp; } @@ -511,7 +513,7 @@ Index: pulseaudio/src/modules/bluetooth/module-bluez5-device.c /* Run from main thread */ static int set_profile_cb(pa_card *c, pa_card_profile *new_profile) { struct userdata *u; -@@ -1851,6 +2024,10 @@ static int set_profile_cb(pa_card *c, pa +@@ -1865,6 +2038,10 @@ static int set_profile_cb(pa_card *c, pa p = PA_CARD_PROFILE_DATA(new_profile); @@ -522,7 +524,7 @@ Index: pulseaudio/src/modules/bluetooth/module-bluez5-device.c if (*p != PA_BLUETOOTH_PROFILE_OFF) { const pa_bluetooth_device *d = u->device; -@@ -1957,6 +2134,11 @@ static int add_card(struct userdata *u) +@@ -1987,6 +2164,11 @@ static int add_card(struct userdata *u) p = PA_CARD_PROFILE_DATA(u->card->active_profile); u->profile = *p; @@ -534,7 +536,7 @@ Index: pulseaudio/src/modules/bluetooth/module-bluez5-device.c return 0; } -@@ -1966,13 +2148,15 @@ static void handle_transport_state_chang +@@ -1996,13 +2178,15 @@ static void handle_transport_state_chang bool release = false; pa_card_profile *cp; pa_device_port *port; @@ -552,7 +554,7 @@ Index: pulseaudio/src/modules/bluetooth/module-bluez5-device.c pa_card_profile_set_available(cp, transport_state_to_availability(t->state)); /* Update port availability */ -@@ -1983,9 +2167,13 @@ static void handle_transport_state_chang +@@ -2013,9 +2197,13 @@ static void handle_transport_state_chang /* Acquire or release transport as needed */ acquire = (t->state == PA_BLUETOOTH_TRANSPORT_STATE_PLAYING && u->profile == t->profile); @@ -567,7 +569,7 @@ Index: pulseaudio/src/modules/bluetooth/module-bluez5-device.c if (u->source) { pa_log_debug("Resuming source %s because its transport state changed to playing", u->source->name); -@@ -2013,6 +2201,9 @@ static void handle_transport_state_chang +@@ -2043,6 +2231,9 @@ static void handle_transport_state_chang * BlueZ should probably release the transport automatically, and in * that case we would just mark the transport as released */ @@ -577,7 +579,7 @@ Index: pulseaudio/src/modules/bluetooth/module-bluez5-device.c /* Remote side closed the stream so we consider it PA_SUSPEND_USER */ if (u->source) { pa_log_debug("Suspending source %s because the remote end closed the stream", u->source->name); -@@ -2045,6 +2236,10 @@ static pa_hook_result_t transport_state_ +@@ -2075,6 +2266,10 @@ static pa_hook_result_t transport_state_ pa_assert(t); pa_assert(u); @@ -588,7 +590,7 @@ Index: pulseaudio/src/modules/bluetooth/module-bluez5-device.c if (t == u->transport && t->state <= PA_BLUETOOTH_TRANSPORT_STATE_DISCONNECTED) pa_assert_se(pa_card_set_profile(u->card, pa_hashmap_get(u->card->profiles, "off"), false) >= 0); -@@ -2102,6 +2297,36 @@ static pa_hook_result_t transport_microp +@@ -2132,6 +2327,36 @@ static pa_hook_result_t transport_microp return PA_HOOK_OK; } @@ -625,8 +627,8 @@ Index: pulseaudio/src/modules/bluetooth/module-bluez5-device.c /* Run from main thread context */ static int device_process_msg(pa_msgobject *obj, int code, void *data, int64_t offset, pa_memchunk *chunk) { struct bluetooth_msg *m = BLUETOOTH_MSG(obj); -@@ -2144,6 +2369,18 @@ int pa__init(pa_module* m) { - goto fail; +@@ -2175,6 +2400,18 @@ int pa__init(pa_module* m) { + goto fail_free_modargs; } + if (pa_modargs_get_value(ma, "sco_sink", NULL) && @@ -644,8 +646,8 @@ Index: pulseaudio/src/modules/bluetooth/module-bluez5-device.c if ((u->discovery = pa_shared_get(u->core, "bluetooth-discovery"))) pa_bluetooth_discovery_ref(u->discovery); else { -@@ -2156,7 +2393,7 @@ int pa__init(pa_module* m) { - goto fail; +@@ -2187,7 +2424,7 @@ int pa__init(pa_module* m) { + goto fail_free_modargs; } - pa_modargs_free(ma); @@ -653,21 +655,7 @@ Index: pulseaudio/src/modules/bluetooth/module-bluez5-device.c u->device_connection_changed_slot = pa_hook_connect(pa_bluetooth_discovery_hook(u->discovery, PA_BLUETOOTH_HOOK_DEVICE_CONNECTION_CHANGED), -@@ -2172,6 +2409,13 @@ int pa__init(pa_module* m) { - u->transport_microphone_gain_changed_slot = - pa_hook_connect(pa_bluetooth_discovery_hook(u->discovery, PA_BLUETOOTH_HOOK_TRANSPORT_MICROPHONE_GAIN_CHANGED), PA_HOOK_NORMAL, (pa_hook_cb_t) transport_microphone_gain_changed_cb, u); - -+ u->sink_state_changed_slot = -+ pa_hook_connect(&u->core->hooks[PA_CORE_HOOK_SINK_STATE_CHANGED], -+ PA_HOOK_NORMAL, (pa_hook_cb_t) sink_state_changed_cb, u); -+ -+ u->source_state_changed_slot = -+ pa_hook_connect(&u->core->hooks[PA_CORE_HOOK_SOURCE_STATE_CHANGED], -+ PA_HOOK_NORMAL, (pa_hook_cb_t) source_state_changed_cb, u); - - if (add_card(u) < 0) - goto fail; -@@ -2231,12 +2475,20 @@ void pa__done(pa_module *m) { +@@ -2263,12 +2500,20 @@ void pa__done(pa_module *m) { if (u->transport_microphone_gain_changed_slot) pa_hook_slot_free(u->transport_microphone_gain_changed_slot); @@ -688,7 +676,7 @@ Index: pulseaudio/src/modules/bluetooth/module-bluez5-device.c if (u->msg) pa_xfree(u->msg); -@@ -2249,6 +2501,8 @@ void pa__done(pa_module *m) { +@@ -2281,6 +2526,8 @@ void pa__done(pa_module *m) { pa_xfree(u->output_port_name); pa_xfree(u->input_port_name); diff --git a/debian/patches/0504-bluetooth-bluez5-add-support-for-both-mode.patch b/debian/patches/0504-bluetooth-bluez5-add-support-for-both-mode.patch index 90a5796..9b27653 100644 --- a/debian/patches/0504-bluetooth-bluez5-add-support-for-both-mode.patch +++ b/debian/patches/0504-bluetooth-bluez5-add-support-for-both-mode.patch @@ -9,11 +9,11 @@ Subject: [PATCH 504/507] bluetooth: bluez5: add support for both mode src/modules/bluetooth/module-bluez5-discover.c | 10 ++++++++-- 3 files changed, 12 insertions(+), 3 deletions(-) -diff --git a/src/modules/bluetooth/bluez5-util.c b/src/modules/bluetooth/bluez5-util.c -index 2f2f277..747384a 100644 ---- a/src/modules/bluetooth/bluez5-util.c -+++ b/src/modules/bluetooth/bluez5-util.c -@@ -915,7 +915,9 @@ static void get_managed_objects_reply(DBusPendingCall *pending, void *userdata) +Index: pulseaudio/src/modules/bluetooth/bluez5-util.c +=================================================================== +--- pulseaudio.orig/src/modules/bluetooth/bluez5-util.c ++++ pulseaudio/src/modules/bluetooth/bluez5-util.c +@@ -1030,7 +1030,9 @@ static void get_managed_objects_reply(DB if (!y->ofono_backend && y->headset_backend != HEADSET_BACKEND_NATIVE) y->ofono_backend = pa_bluetooth_ofono_backend_new(y->core, y); @@ -24,11 +24,11 @@ index 2f2f277..747384a 100644 y->native_backend = pa_bluetooth_native_backend_new(y->core, y); finish: -diff --git a/src/modules/bluetooth/bluez5-util.h b/src/modules/bluetooth/bluez5-util.h -index df44c01..3f97de7 100644 ---- a/src/modules/bluetooth/bluez5-util.h -+++ b/src/modules/bluetooth/bluez5-util.h -@@ -156,6 +156,7 @@ const char *pa_bluetooth_transport_state_to_string(pa_bluetooth_transport_state_ +Index: pulseaudio/src/modules/bluetooth/bluez5-util.h +=================================================================== +--- pulseaudio.orig/src/modules/bluetooth/bluez5-util.h ++++ pulseaudio/src/modules/bluetooth/bluez5-util.h +@@ -158,6 +158,7 @@ const char *pa_bluetooth_transport_state #define HEADSET_BACKEND_OFONO 0 #define HEADSET_BACKEND_NATIVE 1 #define HEADSET_BACKEND_AUTO 2 @@ -36,11 +36,11 @@ index df44c01..3f97de7 100644 pa_bluetooth_discovery* pa_bluetooth_discovery_get(pa_core *core, int headset_backend); pa_bluetooth_discovery* pa_bluetooth_discovery_ref(pa_bluetooth_discovery *y); -diff --git a/src/modules/bluetooth/module-bluez5-discover.c b/src/modules/bluetooth/module-bluez5-discover.c -index 40ce562..831e9e2 100644 ---- a/src/modules/bluetooth/module-bluez5-discover.c -+++ b/src/modules/bluetooth/module-bluez5-discover.c -@@ -37,7 +37,7 @@ PA_MODULE_DESCRIPTION("Detect available BlueZ 5 Bluetooth audio devices and load +Index: pulseaudio/src/modules/bluetooth/module-bluez5-discover.c +=================================================================== +--- pulseaudio.orig/src/modules/bluetooth/module-bluez5-discover.c ++++ pulseaudio/src/modules/bluetooth/module-bluez5-discover.c +@@ -37,7 +37,7 @@ PA_MODULE_DESCRIPTION("Detect available PA_MODULE_VERSION(PACKAGE_VERSION); PA_MODULE_LOAD_ONCE(true); PA_MODULE_USAGE( @@ -49,7 +49,7 @@ index 40ce562..831e9e2 100644 "sco_sink=<name of sink> " "sco_source=<name of source> " ); -@@ -106,7 +106,11 @@ static pa_hook_result_t device_connection_changed_cb(pa_bluetooth_discovery *y, +@@ -106,7 +106,11 @@ static pa_hook_result_t device_connectio } #ifdef HAVE_BLUEZ_5_NATIVE_HEADSET @@ -73,6 +73,3 @@ index 40ce562..831e9e2 100644 goto fail; } --- -2.6.2 - diff --git a/debian/patches/0505-bluetooth-bluez5-let-user-specify-a-default-profile-.patch b/debian/patches/0505-bluetooth-bluez5-let-user-specify-a-default-profile-.patch index a4be85b..e8460b7 100644 --- a/debian/patches/0505-bluetooth-bluez5-let-user-specify-a-default-profile-.patch +++ b/debian/patches/0505-bluetooth-bluez5-let-user-specify-a-default-profile-.patch @@ -36,7 +36,7 @@ Index: pulseaudio/src/modules/bluetooth/module-bluez5-device.c bool transport_acquire_pending; pa_io_event *stream_event; }; -@@ -2068,6 +2071,7 @@ static int add_card(struct userdata *u) +@@ -2098,6 +2101,7 @@ static int add_card(struct userdata *u) pa_bluetooth_profile_t *p; const char *uuid; void *state; @@ -44,7 +44,7 @@ Index: pulseaudio/src/modules/bluetooth/module-bluez5-device.c pa_assert(u); pa_assert(u->device); -@@ -2120,6 +2124,16 @@ static int add_card(struct userdata *u) +@@ -2149,6 +2153,16 @@ static int add_card(struct userdata *u) *p = PA_BLUETOOTH_PROFILE_OFF; pa_hashmap_put(data.profiles, cp->name, cp); @@ -61,8 +61,8 @@ Index: pulseaudio/src/modules/bluetooth/module-bluez5-device.c u->card = pa_card_new(u->core, &data); pa_card_new_data_done(&data); if (!u->card) { -@@ -2131,6 +2145,15 @@ static int add_card(struct userdata *u) - u->card->set_profile = set_profile_cb; +@@ -2162,6 +2176,15 @@ static int add_card(struct userdata *u) + pa_card_put(u->card); p = PA_CARD_PROFILE_DATA(u->card->active_profile); + @@ -77,7 +77,7 @@ Index: pulseaudio/src/modules/bluetooth/module-bluez5-device.c u->profile = *p; if (USE_SCO_OVER_PCM(u)) -@@ -2245,6 +2268,11 @@ static pa_hook_result_t transport_state_ +@@ -2276,6 +2299,11 @@ static pa_hook_result_t transport_state_ if (t->device == u->device) handle_transport_state_change(u, t); @@ -89,7 +89,7 @@ Index: pulseaudio/src/modules/bluetooth/module-bluez5-device.c return PA_HOOK_OK; } -@@ -2502,6 +2530,10 @@ void pa__done(pa_module *m) { +@@ -2528,6 +2556,10 @@ void pa__done(pa_module *m) { if (u->modargs) pa_modargs_free(u->modargs); diff --git a/debian/patches/0506-bluetooth-bluez5-prevent-SCO-sink-source-to-be-suspe.patch b/debian/patches/0506-bluetooth-bluez5-prevent-SCO-sink-source-to-be-suspe.patch index 96e0350..a121314 100644 --- a/debian/patches/0506-bluetooth-bluez5-prevent-SCO-sink-source-to-be-suspe.patch +++ b/debian/patches/0506-bluetooth-bluez5-prevent-SCO-sink-source-to-be-suspe.patch @@ -34,7 +34,7 @@ Index: pulseaudio/src/modules/bluetooth/module-bluez5-device.c pa_bluetooth_discovery *discovery; pa_bluetooth_device *device; pa_bluetooth_transport *transport; -@@ -1042,6 +1046,69 @@ static int add_source(struct userdata *u +@@ -1043,6 +1047,69 @@ static int add_source(struct userdata *u return 0; } @@ -104,7 +104,7 @@ Index: pulseaudio/src/modules/bluetooth/module-bluez5-device.c /* Run from IO thread */ static int sink_process_msg(pa_msgobject *o, int code, void *data, int64_t offset, pa_memchunk *chunk) { struct userdata *u = PA_SINK(o)->userdata; -@@ -2035,6 +2102,13 @@ static int set_profile_cb(pa_card *c, pa +@@ -2050,6 +2117,13 @@ static int set_profile_cb(pa_card *c, pa if (!d->transports[*p] || d->transports[*p]->state <= PA_BLUETOOTH_TRANSPORT_STATE_DISCONNECTED) { pa_log_warn("Refused to switch profile to %s: Not connected", new_profile->name); @@ -118,7 +118,7 @@ Index: pulseaudio/src/modules/bluetooth/module-bluez5-device.c return -PA_ERR_IO; } } -@@ -2161,6 +2235,7 @@ static int add_card(struct userdata *u) +@@ -2192,6 +2266,7 @@ static int add_card(struct userdata *u) pa_log_debug("Created card (current profile %s)", pa_bluetooth_profile_to_string(u->profile)); @@ -126,9 +126,9 @@ Index: pulseaudio/src/modules/bluetooth/module-bluez5-device.c return 0; } -@@ -2444,6 +2519,10 @@ int pa__init(pa_module* m) { - pa_hook_connect(&u->core->hooks[PA_CORE_HOOK_SOURCE_STATE_CHANGED], - PA_HOOK_NORMAL, (pa_hook_cb_t) source_state_changed_cb, u); +@@ -2468,6 +2543,10 @@ int pa__init(pa_module* m) { + u->transport_microphone_gain_changed_slot = + pa_hook_connect(pa_bluetooth_discovery_hook(u->discovery, PA_BLUETOOTH_HOOK_TRANSPORT_MICROPHONE_GAIN_CHANGED), PA_HOOK_NORMAL, (pa_hook_cb_t) transport_microphone_gain_changed_cb, u); + u->sco_sink_proplist_changed_slot = + pa_hook_connect(&u->core->hooks[PA_CORE_HOOK_SINK_PROPLIST_CHANGED], @@ -137,7 +137,7 @@ Index: pulseaudio/src/modules/bluetooth/module-bluez5-device.c if (add_card(u) < 0) goto fail; -@@ -2507,6 +2586,10 @@ void pa__done(pa_module *m) { +@@ -2533,6 +2612,10 @@ void pa__done(pa_module *m) { if (u->source_state_changed_slot) pa_hook_slot_free(u->source_state_changed_slot); diff --git a/debian/patches/0507-bluetooth-bluez5-drop-save-restore-of-SCO-sink-sourc.patch b/debian/patches/0507-bluetooth-bluez5-drop-save-restore-of-SCO-sink-sourc.patch index 4dfa37b..06f7823 100644 --- a/debian/patches/0507-bluetooth-bluez5-drop-save-restore-of-SCO-sink-sourc.patch +++ b/debian/patches/0507-bluetooth-bluez5-drop-save-restore-of-SCO-sink-sourc.patch @@ -23,7 +23,7 @@ Index: pulseaudio/src/modules/bluetooth/module-bluez5-device.c }; struct userdata { -@@ -2066,22 +2064,6 @@ static pa_card_profile *create_card_prof +@@ -2081,22 +2079,6 @@ static pa_card_profile *create_card_prof return cp; } @@ -46,7 +46,7 @@ Index: pulseaudio/src/modules/bluetooth/module-bluez5-device.c /* Run from main thread */ static int set_profile_cb(pa_card *c, pa_card_profile *new_profile) { struct userdata *u; -@@ -2230,9 +2212,6 @@ static int add_card(struct userdata *u) +@@ -2261,9 +2243,6 @@ static int add_card(struct userdata *u) p = PA_CARD_PROFILE_DATA(u->card->active_profile); u->profile = *p; @@ -56,7 +56,7 @@ Index: pulseaudio/src/modules/bluetooth/module-bluez5-device.c pa_log_debug("Created card (current profile %s)", pa_bluetooth_profile_to_string(u->profile)); -@@ -2596,9 +2575,6 @@ void pa__done(pa_module *m) { +@@ -2622,9 +2601,6 @@ void pa__done(pa_module *m) { if (u->sbc_info.sbc_initialized) sbc_finish(&u->sbc_info.sbc); diff --git a/debian/patches/0508-bluetooth-bluez5-add-guards-to-prevent-HFP-and-HSP-c.patch b/debian/patches/0508-bluetooth-bluez5-add-guards-to-prevent-HFP-and-HSP-c.patch index e96ca34..7f3b85b 100644 --- a/debian/patches/0508-bluetooth-bluez5-add-guards-to-prevent-HFP-and-HSP-c.patch +++ b/debian/patches/0508-bluetooth-bluez5-add-guards-to-prevent-HFP-and-HSP-c.patch @@ -8,11 +8,11 @@ Subject: [PATCH] bluetooth: bluez5: add guards to prevent HFP and HSP src/modules/bluetooth/backend-native.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) -diff --git a/src/modules/bluetooth/backend-native.c b/src/modules/bluetooth/backend-native.c -index 8d9d95c..1f65146 100644 ---- a/src/modules/bluetooth/backend-native.c -+++ b/src/modules/bluetooth/backend-native.c -@@ -340,6 +340,23 @@ static DBusMessage *profile_new_connection(DBusConnection *conn, DBusMessage *m, +Index: pulseaudio/src/modules/bluetooth/backend-native.c +=================================================================== +--- pulseaudio.orig/src/modules/bluetooth/backend-native.c ++++ pulseaudio/src/modules/bluetooth/backend-native.c +@@ -342,6 +342,23 @@ static DBusMessage *profile_new_connecti goto fail; } @@ -36,14 +36,11 @@ index 8d9d95c..1f65146 100644 pa_assert_se(dbus_message_iter_next(&arg_i)); pa_assert(dbus_message_iter_get_arg_type(&arg_i) == DBUS_TYPE_UNIX_FD); -@@ -349,7 +366,6 @@ static DBusMessage *profile_new_connection(DBusConnection *conn, DBusMessage *m, +@@ -351,7 +368,6 @@ static DBusMessage *profile_new_connecti sender = dbus_message_get_sender(m); - p = PA_BLUETOOTH_PROFILE_HEADSET_HEAD_UNIT; pathfd = pa_sprintf_malloc ("%s/fd%d", path, fd); - d->transports[p] = t = pa_bluetooth_transport_new(d, sender, pathfd, p, NULL, 0); + t = pa_bluetooth_transport_new(d, sender, pathfd, p, NULL, 0); pa_xfree(pathfd); --- -2.1.4 - diff --git a/debian/patches/0509-bluetooth-bluez5-don-t-reactivate-default-profile-wh.patch b/debian/patches/0509-bluetooth-bluez5-don-t-reactivate-default-profile-wh.patch index 1279291..bd9435e 100644 --- a/debian/patches/0509-bluetooth-bluez5-don-t-reactivate-default-profile-wh.patch +++ b/debian/patches/0509-bluetooth-bluez5-don-t-reactivate-default-profile-wh.patch @@ -12,7 +12,7 @@ Index: pulseaudio/src/modules/bluetooth/module-bluez5-device.c =================================================================== --- pulseaudio.orig/src/modules/bluetooth/module-bluez5-device.c +++ pulseaudio/src/modules/bluetooth/module-bluez5-device.c -@@ -2322,11 +2322,6 @@ static pa_hook_result_t transport_state_ +@@ -2353,11 +2353,6 @@ static pa_hook_result_t transport_state_ if (t->device == u->device) handle_transport_state_change(u, t); diff --git a/debian/patches/0510-Further-fixes-for-HFP-A2DP-with-BlueZ-5.x.patch b/debian/patches/0510-Further-fixes-for-HFP-A2DP-with-BlueZ-5.x.patch index 133bc68..c99f4ee 100644 --- a/debian/patches/0510-Further-fixes-for-HFP-A2DP-with-BlueZ-5.x.patch +++ b/debian/patches/0510-Further-fixes-for-HFP-A2DP-with-BlueZ-5.x.patch @@ -14,7 +14,7 @@ Index: pulseaudio/src/modules/bluetooth/backend-native.c =================================================================== --- pulseaudio.orig/src/modules/bluetooth/backend-native.c +++ pulseaudio/src/modules/bluetooth/backend-native.c -@@ -351,7 +351,8 @@ static DBusMessage *profile_new_connecti +@@ -353,7 +353,8 @@ static DBusMessage *profile_new_connecti goto fail; } @@ -28,7 +28,7 @@ Index: pulseaudio/src/modules/bluetooth/bluez5-util.c =================================================================== --- pulseaudio.orig/src/modules/bluetooth/bluez5-util.c +++ pulseaudio/src/modules/bluetooth/bluez5-util.c -@@ -299,6 +299,12 @@ bool pa_bluetooth_device_any_transport_c +@@ -411,6 +411,12 @@ bool pa_bluetooth_device_any_transport_c return false; } @@ -45,7 +45,7 @@ Index: pulseaudio/src/modules/bluetooth/bluez5-util.h =================================================================== --- pulseaudio.orig/src/modules/bluetooth/bluez5-util.h +++ pulseaudio/src/modules/bluetooth/bluez5-util.h -@@ -144,6 +144,8 @@ void pa_bluetooth_transport_unlink(pa_bl +@@ -146,6 +146,8 @@ void pa_bluetooth_transport_unlink(pa_bl void pa_bluetooth_transport_free(pa_bluetooth_transport *t); bool pa_bluetooth_device_any_transport_connected(const pa_bluetooth_device *d); @@ -67,7 +67,7 @@ Index: pulseaudio/src/modules/bluetooth/module-bluez5-device.c }; typedef enum pa_bluetooth_form_factor { -@@ -2084,13 +2086,6 @@ static int set_profile_cb(pa_card *c, pa +@@ -2099,13 +2101,6 @@ static int set_profile_cb(pa_card *c, pa if (!d->transports[*p] || d->transports[*p]->state <= PA_BLUETOOTH_TRANSPORT_STATE_DISCONNECTED) { pa_log_warn("Refused to switch profile to %s: Not connected", new_profile->name); @@ -81,7 +81,7 @@ Index: pulseaudio/src/modules/bluetooth/module-bluez5-device.c return -PA_ERR_IO; } } -@@ -2208,6 +2203,10 @@ static int add_card(struct userdata *u) +@@ -2239,6 +2234,10 @@ static int add_card(struct userdata *u) u->card->active_profile = pa_hashmap_get(u->card->profiles, "off"); u->card->save_profile = false; } @@ -92,7 +92,7 @@ Index: pulseaudio/src/modules/bluetooth/module-bluez5-device.c p = PA_CARD_PROFILE_DATA(u->card->active_profile); u->profile = *p; -@@ -2307,6 +2306,23 @@ static pa_hook_result_t device_connectio +@@ -2338,6 +2337,23 @@ static pa_hook_result_t device_connectio return PA_HOOK_OK; } @@ -116,7 +116,7 @@ Index: pulseaudio/src/modules/bluetooth/module-bluez5-device.c /* Run from main thread */ static pa_hook_result_t transport_state_changed_cb(pa_bluetooth_discovery *y, pa_bluetooth_transport *t, struct userdata *u) { pa_assert(t); -@@ -2316,7 +2332,13 @@ static pa_hook_result_t transport_state_ +@@ -2347,7 +2363,13 @@ static pa_hook_result_t transport_state_ pa_bluetooth_profile_to_string(t->profile), pa_bluetooth_transport_state_to_string(t->state)); @@ -131,7 +131,7 @@ Index: pulseaudio/src/modules/bluetooth/module-bluez5-device.c pa_assert_se(pa_card_set_profile(u->card, pa_hashmap_get(u->card->profiles, "off"), false) >= 0); if (t->device == u->device) -@@ -2503,6 +2525,9 @@ int pa__init(pa_module* m) { +@@ -2527,6 +2549,9 @@ int pa__init(pa_module* m) { if (!(u->msg = pa_msgobject_new(bluetooth_msg))) goto fail; @@ -141,7 +141,7 @@ Index: pulseaudio/src/modules/bluetooth/module-bluez5-device.c u->msg->parent.process_msg = device_process_msg; u->msg->card = u->card; -@@ -2588,6 +2613,9 @@ void pa__done(pa_module *m) { +@@ -2614,6 +2639,9 @@ void pa__done(pa_module *m) { if (u->default_profile) pa_xfree(u->default_profile); diff --git a/debian/patches/0600-droid-sync-with-upstream-for-Android-5-support-and-b.patch b/debian/patches/0600-droid-sync-with-upstream-for-Android-5-support-and-b.patch index 50fcb63..834133c 100644 --- a/debian/patches/0600-droid-sync-with-upstream-for-Android-5-support-and-b.patch +++ b/debian/patches/0600-droid-sync-with-upstream-for-Android-5-support-and-b.patch @@ -31,7 +31,7 @@ Index: pulseaudio/configure.ac =================================================================== --- pulseaudio.orig/configure.ac +++ pulseaudio/configure.ac -@@ -862,6 +862,23 @@ AS_IF([test "x$enable_android_hal" = "xy +@@ -858,6 +858,23 @@ AS_IF([test "x$enable_android_hal" = "xy AM_CONDITIONAL([HAVE_ANDROID], [test "x$HAVE_ANDROID" = "x1"]) AS_IF([test "x$HAVE_ANDROID" = "x1"], AC_DEFINE([HAVE_ANDROID], 1, [Have Android Audio HAL?])) @@ -55,7 +55,7 @@ Index: pulseaudio/configure.ac #### EsounD support (optional) #### AC_ARG_ENABLE([esound], -@@ -1596,6 +1613,8 @@ AS_IF([test "x$HAVE_OSS_OUTPUT" = "x1"], +@@ -1571,6 +1588,8 @@ AS_IF([test "x$HAVE_OSS_OUTPUT" = "x1"], AS_IF([test "x$HAVE_OSS_WRAPPER" = "x1"], ENABLE_OSS_WRAPPER=yes, ENABLE_OSS_WRAPPER=no) AS_IF([test "x$HAVE_ALSA" = "x1"], ENABLE_ALSA=yes, ENABLE_ALSA=no) AS_IF([test "x$HAVE_ANDROID" = "x1"], ENABLE_ANDROID=yes, ENABLE_ANDROID=no) @@ -64,7 +64,7 @@ Index: pulseaudio/configure.ac AS_IF([test "x$HAVE_COREAUDIO" = "x1"], ENABLE_COREAUDIO=yes, ENABLE_COREAUDIO=no) AS_IF([test "x$HAVE_SOLARIS" = "x1"], ENABLE_SOLARIS=yes, ENABLE_SOLARIS=no) AS_IF([test "x$HAVE_WAVEOUT" = "x1"], ENABLE_WAVEOUT=yes, ENABLE_WAVEOUT=no) -@@ -1661,6 +1680,8 @@ echo " +@@ -1635,6 +1654,8 @@ echo " Enable EsounD: ${ENABLE_ESOUND} Enable Alsa: ${ENABLE_ALSA} Enable Android Audio HAL: ${ENABLE_ANDROID} @@ -77,7 +77,7 @@ Index: pulseaudio/src/Makefile.am =================================================================== --- pulseaudio.orig/src/Makefile.am +++ pulseaudio/src/Makefile.am -@@ -1293,12 +1293,25 @@ modlibexec_LTLIBRARIES += \ +@@ -1308,12 +1308,25 @@ modlibexec_LTLIBRARIES += \ if HAVE_ANDROID modlibexec_LTLIBRARIES += \ @@ -109,7 +109,7 @@ Index: pulseaudio/src/Makefile.am endif dist_alsaprofilesets_DATA = \ -@@ -1574,9 +1587,19 @@ SYMDEF_FILES = \ +@@ -1583,9 +1596,19 @@ SYMDEF_FILES = \ if HAVE_ANDROID SYMDEF_FILES += \ @@ -132,7 +132,7 @@ Index: pulseaudio/src/Makefile.am endif if HAVE_ESOUND -@@ -1889,42 +1912,86 @@ libalsa_util_la_CFLAGS += $(DBUS_CFLAGS) +@@ -1898,42 +1921,86 @@ libalsa_util_la_CFLAGS += $(DBUS_CFLAGS) endif if HAVE_ANDROID diff --git a/debian/patches/0700-modules-add-snappy-policy-module.patch b/debian/patches/0700-modules-add-snappy-policy-module.patch index 1b1088e..c35e085 100644 --- a/debian/patches/0700-modules-add-snappy-policy-module.patch +++ b/debian/patches/0700-modules-add-snappy-policy-module.patch @@ -14,7 +14,7 @@ Index: pulseaudio/src/Makefile.am =================================================================== --- pulseaudio.orig/src/Makefile.am +++ pulseaudio/src/Makefile.am -@@ -1224,6 +1224,11 @@ modlibexec_LTLIBRARIES += \ +@@ -1239,6 +1239,11 @@ modlibexec_LTLIBRARIES += \ module-esound-sink.la endif @@ -26,7 +26,7 @@ Index: pulseaudio/src/Makefile.am # See comment at librtp.la above if !OS_IS_WIN32 modlibexec_LTLIBRARIES += \ -@@ -1611,6 +1616,11 @@ SYMDEF_FILES += \ +@@ -1620,6 +1625,11 @@ SYMDEF_FILES += \ module-esound-sink-symdef.h endif @@ -38,7 +38,7 @@ Index: pulseaudio/src/Makefile.am EXTRA_DIST += $(SYMDEF_FILES) BUILT_SOURCES += $(SYMDEF_FILES) builddirs -@@ -2220,6 +2230,14 @@ module_trust_store_la_LIBADD = $(MODULE_ +@@ -2221,6 +2231,14 @@ module_trust_store_la_LIBADD = $(MODULE_ module_trust_store_la_CFLAGS = $(AM_CFLAGS) -DHAVE_TRUST_STORE=1 endif @@ -160,7 +160,7 @@ Index: pulseaudio/configure.ac =================================================================== --- pulseaudio.orig/configure.ac +++ pulseaudio/configure.ac -@@ -1475,6 +1475,19 @@ AS_IF([test "x$enable_trust_store" = "xy +@@ -1450,6 +1450,19 @@ AS_IF([test "x$enable_trust_store" = "xy AM_CONDITIONAL([HAVE_TRUST_STORE], [test "x$HAVE_TRUST_STORE" = "x1"]) @@ -180,7 +180,7 @@ Index: pulseaudio/configure.ac ################################### # Output # -@@ -1655,6 +1668,8 @@ AS_IF([test "x$HAVE_ESOUND" = "x1" -a "x +@@ -1629,6 +1642,8 @@ AS_IF([test "x$HAVE_ESOUND" = "x1" -a "x AS_IF([test "x$HAVE_GCOV" = "x1"], ENABLE_GCOV=yes, ENABLE_GCOV=no) AS_IF([test "x$HAVE_LIBCHECK" = "x1"], ENABLE_TESTS=yes, ENABLE_TESTS=no) AS_IF([test "x$enable_legacy_database_entry_format" != "xno"], ENABLE_LEGACY_DATABASE_ENTRY_FORMAT=yes, ENABLE_LEGACY_DATABASE_ENTRY_FORMAT=no) @@ -189,7 +189,7 @@ Index: pulseaudio/configure.ac echo " ---{ $PACKAGE_NAME $VERSION }--- -@@ -1715,6 +1730,8 @@ echo " +@@ -1688,6 +1703,8 @@ echo " Enable soxr (resampler): ${ENABLE_SOXR} Enable WebRTC echo canceller: ${ENABLE_WEBRTC} Enable Ubuntu trust store: ${ENABLE_TRUST_STORE} -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-pulseaudio/pulseaudio.git _______________________________________________ pkg-pulseaudio-devel mailing list pkg-pulseaudio-devel@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-pulseaudio-devel