Luiz Augusto von Dentz | 17 Sep 12:04 2014

[PATCH 1/2] bluetooth: Switch transport state to idle in case of HUP

From: João Paulo Rechi Vita <jprvita <at>>

In case the socket HUP the transport state should be set to idle which
will indicate the profile is no longer available.
 src/modules/bluetooth/module-bluez5-device.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/modules/bluetooth/module-bluez5-device.c b/src/modules/bluetooth/module-bluez5-device.c
index fdf4078..48e498b 100644
--- a/src/modules/bluetooth/module-bluez5-device.c
+++ b/src/modules/bluetooth/module-bluez5-device.c
 <at>  <at>  -1980,6 +1980,7  <at>  <at>  static pa_hook_result_t transport_state_changed_cb(pa_bluetooth_discovery
*y, pa
 /* 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);
+    struct userdata *u = m->card->userdata;

     switch (code) {
 <at>  <at>  -1990,6 +1991,7  <at>  <at>  static int device_process_msg(pa_msgobject *obj, int code, void *data, int64_t o
             pa_assert_se(pa_card_set_profile(m->card, pa_hashmap_get(m->card->profiles, "off"), false) >= 0);
+            pa_bluetooth_transport_set_state(u->transport, PA_BLUETOOTH_TRANSPORT_STATE_IDLE);

(Continue reading)

David Henningsson | 17 Sep 09:06 2014

[PATCH] srbchannel: Defer reading when setting up read callback

Calling the callback while setting it up can make things
complicated for clients, as the callback can do arbitrarily

In this case, a protocol error caused the srbchannel to be
owned by both the pstream and the native connection.

Now the read callback is deferred, making sure the callback
is called from a cleaner context where errors are handled

Reported-by: Tanu Kaskinen <tanu.kaskinen <at>>
Signed-off-by: David Henningsson <david.henningsson <at>>
 src/pulsecore/srbchannel.c | 22 +++++++++++++++++++---
 src/pulsecore/srbchannel.h |  3 ---
 2 files changed, 19 insertions(+), 6 deletions(-)

Hi Tanu, can you check that this patch resolves your problem,
as it seems to require your "unfinished code" to replicate?

diff --git a/src/pulsecore/srbchannel.c b/src/pulsecore/srbchannel.c
index 3f81e25..b9b8f1e 100644
--- a/src/pulsecore/srbchannel.c
+++ b/src/pulsecore/srbchannel.c
 <at>  <at>  -86,6 +86,7  <at>  <at>  struct pa_srbchannel {
     pa_srbchannel_cb_t callback;

     pa_io_event *read_event;
+    pa_defer_event *defer_event;
(Continue reading)

Martin Steigerwald | 16 Sep 22:25 2014

PulseAudio and OpenAL games: AL lib: pulseaudio.c:331: PulseAudio returned minreq > tlength/2; expect break up


Any solution for this?

When playing PlaneShift through Pulseaudio while PlaneShift is setup to use 
OpenAL as sound renderer  I get:

AL lib: pulseaudio.c:331: PulseAudio returned minreq > tlength/2; expect break 

and well badly stuttering sound.

No matter whether trying with internal Intel HDA audio in ThinkPad T520 or 
really nicely sounding JBL Pebbles USB speakers.

The have a aux in cinch. But when I try this Pulseaudio mutes audio while 
setting to headphone.

Without Pulseaudio neither phonon backend gstreamer and vlc work with the 
speakers. Gstreamer just says they are not working. VLC plays from internal 
laptop audio.

This is just a short description.

I can try to provide more information, but first I would like to know, is there 
any suggestion regarding unstutter openal games? I did not found many hits for 
this via search machine, but a forum entry at steam forum just suggested 
switching openal output to alsa.

(Continue reading)

Wim Taymans | 16 Sep 15:13 2014

[PATCH 0/3] Add simple HSP support in new native backend

This set of patches adds a simple handler for the HSP profile to bluez
and makes a new card for each connected device. This makes it possible to
send audio to a Headset. The profile is implemented in a new native
headset backend.

The first 2 patches are mostly some very small cleanups and little bits to
implement the last patch.

The patch also switches the default backend from ofono to native.

This patch replaces the previously posted native backend patches and
incorporates the suggestions I received.

Wim Taymans (3):
  bluez5-device: use get_profile_direction
  bluez5-util: add dispose function
  backend-native: add a new native headset backend                                 |   6 +-
 src/modules/bluetooth/backend-native.c       | 443 +++++++++++++++++++++++++++
 src/modules/bluetooth/bluez5-util.c          |   2 +
 src/modules/bluetooth/bluez5-util.h          |   2 +
 src/modules/bluetooth/module-bluez5-device.c |  32 +-
 5 files changed, 465 insertions(+), 20 deletions(-)
 create mode 100644 src/modules/bluetooth/backend-native.c


Colin Leroy | 16 Sep 09:40 2014

Re: Pulseaudio's RAOP2 support

On Tue, 16 Sep 2014 00:30:21 -0500, Hajime Fujita
<crisp.fujita <at>> wrote:

> Hello Colin and Martin,


(Changing the recipient to the mailing-list so everyone interested can
chime in if necessary)

> I'm really sorry to say that I've been blocking all the progress on
> this project. If I remember correctly Martin sent me a series of
> patches to me and I promised to review and merge them into my tree.
> However my life gets so busier and busier that I could not find a
> time for this project so far.

Life happens! :) 

> I think the big items right now are:
> - merge Martin's patch into the tree

OK, could you send it to me, Martin ?

> - rebase the current tree onto PA 5.0 (perhaps you did it already)

Yes, I've done so at

I hope I've done it the easiest way for upstream integration, I
pulled from PA's master and then integrated your raop2-for-merge2
(Continue reading)

Vinod Rayapudi | 16 Sep 07:21 2014

who will trigger pa__init() function in pulseaudio

I would like to know some details like,
who will trigger pa--Init() function in pulseaudio ?
This function will present in each and every module in pulseaudio.

Can anyone help me, how this pa__init() will be triggered ?

Tanu Kaskinen | 15 Sep 12:14 2014

Patch review status wiki page updated

Patch review status updated:


* 2014-09-15
   * 112 patches are pending review.
   * The oldest pending patch is 299 days old.

* 2014-09-07
   * 140 patches are pending review.
   * The oldest pending patch is 291 days old.

* 2014-08-24
   * 131 patches are pending review.
   * The oldest pending patch is 277 days old.

* 2014-08-17
   * 133 patches are pending review (not counting the "in a github 
branch" patches).
   * The oldest pending patch is 270 days old.

* 2014-08-11
   * 121 patches are pending review (not counting the "in a github 
branch" patches).
   * The oldest pending patch is 264 days old.

* 2014-07-28
   * 117 patches are pending review (not counting the "in a github 
branch" patches).
(Continue reading)

Luiz Augusto von Dentz | 15 Sep 12:02 2014

[PATCH 0/3] bluetooth: Changes for oFono backend

From: Luiz Augusto von Dentz <luiz.von.dentz <at>>

This adds handling for NewConnection and auto suspend in case the socket
HUP along with a change to policy to select 'off' when it is suitable.

João Paulo Rechi Vita (2):
  bluetooth: Implement org.ofono.HandsfreeAudioAgent.NewConnection()
  bluetooth: Suspend the source/sink the HFP-oFono stream fd HUP

Luiz Augusto von Dentz (1):
  bluetooth: Allow policy module to pick 'off' profile

 src/modules/bluetooth/backend-ofono.c           | 32 +++++++++++++++++++++++--
 src/modules/bluetooth/module-bluetooth-policy.c |  9 ++++---
 src/modules/bluetooth/module-bluez5-device.c    |  6 +++++
 3 files changed, 40 insertions(+), 7 deletions(-)



pulseaudio-discuss mailing list
pulseaudio-discuss <at>
Hui Wang | 15 Sep 11:49 2014

[PATCH] module-switch-on-connect: add an argument for conditionally connecting

On a machine without fixed connecting audio devices like internal
microphone or internal speaker, and when there is no external audio
devices plugging in, the default source/sink is alsa_input/alsa_output
and there is no input devices/output devices listed in the gnome

Under this situation, if we connect a bluetooth headset, the gnome
sound-setting will list bluez input/output devices, but they are not
active devices by default. This looks very weird that sound-setting
lists only one input device and one output device, but they are not
active. To change this situation, we add an argument, the policy is
if a new source/sink is connected and current default source/sink's
active_port is AVAILABLE_NO, we let the new added one switch to
default one.

Signed-off-by: Hui Wang < <at>>
 src/modules/module-switch-on-connect.c | 21 ++++++++++++++++++++-
 1 file changed, 20 insertions(+), 1 deletion(-)

diff --git a/src/modules/module-switch-on-connect.c b/src/modules/module-switch-on-connect.c
index d9275d3..658f0141 100644
--- a/src/modules/module-switch-on-connect.c
+++ b/src/modules/module-switch-on-connect.c
 <at>  <at>  -38,11 +38,15  <at>  <at> 
 #include "module-switch-on-connect-symdef.h"

 PA_MODULE_AUTHOR("Michael Terry");
-PA_MODULE_DESCRIPTION("When a sink/source is added, switch to it");
(Continue reading)

Tanu Kaskinen | 14 Sep 21:06 2014

[PATCH] protocol-native: Fix srbchannel double-freeing

I was able to trigger a crash with some unfinished code that caused
a protocol error. The error was handled while
pa_pstream_set_srbchannel() had not yet finished, so
pa_native_connection.srbpending and pa_pstream.srbpending were both
non-NULL. During the error handling, native_connection_unlink() freed
the srbchannel, and then pa_pstream_unlink() tried to free it for the
second time, causing an assertion error in mainloop_io_free().
 src/pulsecore/protocol-native.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/src/pulsecore/protocol-native.c b/src/pulsecore/protocol-native.c
index 6ec65d6..012c41a 100644
--- a/src/pulsecore/protocol-native.c
+++ b/src/pulsecore/protocol-native.c
 <at>  <at>  -2639,13 +2639,25  <at>  <at>  static void setup_srbchannel(pa_native_connection *c) {

 static void command_enable_srbchannel(pa_pdispatch *pd, uint32_t command, uint32_t tag,
pa_tagstruct *t, void *userdata) {
     pa_native_connection *c = PA_NATIVE_CONNECTION(userdata);
+    pa_srbchannel *tmp;

     if (tag != (uint32_t) (size_t) c->srbpending)

     pa_log_debug("Client enabled srbchannel.");
-    pa_pstream_set_srbchannel(c->pstream, c->srbpending);
+    /* We must set c->sbpending to NULL before calling
+     * pa_pstream_set_srbchannel(), because otherwise there is a time window
(Continue reading)

David Henningsson | 12 Sep 10:10 2014

[PATCH] module-mmkbd-evdev: Don't crash on failure to close fd

If the keyboard is unplugged, it looks like the kernel is reporting
back -ENODEV when trying to close the fd. This is probably a kernel
error, but still, it's better to complain than to crash.

Reported-by: Stelios Bounanos
Signed-off-by: David Henningsson <david.henningsson <at>>
 src/modules/module-mmkbd-evdev.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/modules/module-mmkbd-evdev.c b/src/modules/module-mmkbd-evdev.c
index 9ab7eb9..0b04f0f 100644
--- a/src/modules/module-mmkbd-evdev.c
+++ b/src/modules/module-mmkbd-evdev.c
 <at>  <at>  -256,8 +256,11  <at>  <at>  void pa__done(pa_module*m) {
     if (u->io)

-    if (u->fd >= 0)
-        pa_assert_se(pa_close(u->fd) == 0);
+    if (u->fd >= 0) {
+        int r = pa_close(u->fd);
+        if (r < 0) /* */
+            pa_log("Closing fd failed: %s", pa_cstrerror(errno));
+    }


(Continue reading)