Re: [pulseaudio-discuss] [PATCH] Change the default fragment size to 5 ms

2014-10-24 Thread Raymond Yau
>> > > On Ubuntu, since before my time, this has been the default: > > default-fragments = 8 > default-fragment-size-msec = 10 > > ...so 8 x 10 = 80 ms. If you end up with 5 x 4 = 20 ms, I think that's a bit too short/sensitive, we should then increase the number of periods to 16 or at least 8 in t

Re: [pulseaudio-discuss] systemd socket activation support

2014-10-24 Thread Jaska Uimonen
Hello, Colin sorry to drop the comments in pieces... so one more thing: in socket-server.c: in the creation there's always: "s->filename = strdup" but for cleanup you have added: "!s->activated" flag... is the "activated" flag needed for some reason in the cleanup? br, Jaska Quoting Colin G

[pulseaudio-discuss] [PATCH 1/4] bluez5-device: use get_profile_direction

2014-10-24 Thread Wim Taymans
Use the get_profile_direction() helper function to decide when to add a source and a sink instead of enumerating profiles. --- src/modules/bluetooth/module-bluez5-device.c | 32 +--- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/src/modules/bluetooth/modul

[pulseaudio-discuss] [PATCH 3/4] backend-native: add a new native headset backend

2014-10-24 Thread Wim Taymans
Add a simple native headset backend that implements support for the blutooth HSP profile. This allows pulseaudio to output audio to a Headset using the HSP profile. Make the native backend the default. --- configure.ac | 6 +- src/modules/bluetooth/backend-native.c | 4

Re: [pulseaudio-discuss] [PATCH 4/8] socket-server: Add support for systemd socket activation.

2014-10-24 Thread Tanu Kaskinen
On Sat, 2014-10-18 at 20:43 +0200, Colin Guthrie wrote: > --- a/src/pulsecore/socket-server.c > +++ b/src/pulsecore/socket-server.c > pa_socket_server* pa_socket_server_new_unix(pa_mainloop_api *m, const char > *filename) { > -int fd = -1; > +int n, fd = -1; > +bool activated = false;

Re: [pulseaudio-discuss] [PATCH] Change the default fragment size to 5 ms

2014-10-24 Thread Alexander E. Patrakov
24.10.2014 12:06, David Henningsson wrote: On Ubuntu, since before my time, this has been the default: default-fragments = 8 default-fragment-size-msec = 10 ...so 8 x 10 = 80 ms. If you end up with 5 x 4 = 20 ms, I think that's a bit too short/sensitive, we should then increase the number of pe

Re: [pulseaudio-discuss] systemd socket activation support

2014-10-24 Thread Colin Guthrie
Jaska Uimonen wrote on 24/10/14 06:46: > And thanks for the patches, I really need these for Tizen IVI. > > In my initial testing they seem to work fine, however couple > of observations: > > in socket-server.c the systemd headers are behind the systemd > enabler flags (like they should be), but

Re: [pulseaudio-discuss] [PATCH] launch: Add systemd units for launching pulseaudio user instances

2014-10-24 Thread Tanu Kaskinen
On Mon, 2014-10-20 at 11:54 +0100, Colin Guthrie wrote: > --- > configure.ac | 11 +++ > src/Makefile.am | 12 +++- > src/daemon/systemd/user/pulseaudio.service.in | 10 ++ > src/daemon/systemd/user/pulseaudio.s

Re: [pulseaudio-discuss] [PATCH 4/8] socket-server: Add support for systemd socket activation.

2014-10-24 Thread Colin Guthrie
Tanu Kaskinen wrote on 24/10/14 09:35: > On Sat, 2014-10-18 at 20:43 +0200, Colin Guthrie wrote: >> --- a/src/pulsecore/socket-server.c >> +++ b/src/pulsecore/socket-server.c >> pa_socket_server* pa_socket_server_new_unix(pa_mainloop_api *m, const char >> *filename) { >> -int fd = -1; >> +

Re: [pulseaudio-discuss] [PATCH 7/8] launch: Disable autospawn by default when systemd daemon support is enabled.

2014-10-24 Thread Tanu Kaskinen
On Sat, 2014-10-18 at 20:43 +0200, Colin Guthrie wrote: > This method is prefered over pulseaudio's built in systems so we should > try our best to ensure that it cannot be spawned outside of the mechanisms > desired. Would it make sense to disable all autospawn related code when HAVE_SYSTEMD_DAEM

Re: [pulseaudio-discuss] [PATCH] launch: Add systemd units for launching pulseaudio user instances

2014-10-24 Thread Colin Guthrie
Tanu Kaskinen wrote on 24/10/14 10:28: > On Mon, 2014-10-20 at 11:54 +0100, Colin Guthrie wrote: >> --- >> configure.ac | 11 +++ >> src/Makefile.am | 12 +++- >> src/daemon/systemd/user/pulseaudio.service.in | 10 +

Re: [pulseaudio-discuss] [PATCH 7/8] launch: Disable autospawn by default when systemd daemon support is enabled.

2014-10-24 Thread David Henningsson
On 2014-10-24 11:42, Tanu Kaskinen wrote: On Sat, 2014-10-18 at 20:43 +0200, Colin Guthrie wrote: This method is prefered over pulseaudio's built in systems so we should try our best to ensure that it cannot be spawned outside of the mechanisms desired. Would it make sense to disable all aut

Re: [pulseaudio-discuss] [PATCH 7/8] launch: Disable autospawn by default when systemd daemon support is enabled.

2014-10-24 Thread Colin Guthrie
Tanu Kaskinen wrote on 24/10/14 10:42: > On Sat, 2014-10-18 at 20:43 +0200, Colin Guthrie wrote: >> This method is prefered over pulseaudio's built in systems so we should >> try our best to ensure that it cannot be spawned outside of the mechanisms >> desired. > > Would it make sense to disable a

Re: [pulseaudio-discuss] [PATCH 7/8] launch: Disable autospawn by default when systemd daemon support is enabled.

2014-10-24 Thread Colin Guthrie
David Henningsson wrote on 24/10/14 11:12: > > > On 2014-10-24 11:42, Tanu Kaskinen wrote: >> On Sat, 2014-10-18 at 20:43 +0200, Colin Guthrie wrote: >>> This method is prefered over pulseaudio's built in systems so we should >>> try our best to ensure that it cannot be spawned outside of the >>>

Re: [pulseaudio-discuss] [PATCH] launch: Add systemd units for launching pulseaudio user instances

2014-10-24 Thread Tanu Kaskinen
On Fri, 2014-10-24 at 11:00 +0100, Colin Guthrie wrote: > Tanu Kaskinen wrote on 24/10/14 10:28: > > On Mon, 2014-10-20 at 11:54 +0100, Colin Guthrie wrote: > >> --- > >> configure.ac | 11 +++ > >> src/Makefile.am | 12 +++

Re: [pulseaudio-discuss] [PATCH 7/8] launch: Disable autospawn by default when systemd daemon support is enabled.

2014-10-24 Thread Tanu Kaskinen
On Fri, 2014-10-24 at 11:47 +0100, Colin Guthrie wrote: > David Henningsson wrote on 24/10/14 11:12: > > > > > > On 2014-10-24 11:42, Tanu Kaskinen wrote: > >> On Sat, 2014-10-18 at 20:43 +0200, Colin Guthrie wrote: > >>> This method is prefered over pulseaudio's built in systems so we should > >

Re: [pulseaudio-discuss] [PATCH 7/8] launch: Disable autospawn by default when systemd daemon support is enabled.

2014-10-24 Thread Tanu Kaskinen
On Fri, 2014-10-24 at 11:14 +0100, Colin Guthrie wrote: > Tanu Kaskinen wrote on 24/10/14 10:42: > > "Disable the manual override" doesn't sound like a good idea... Does > > this mean that "systemctl --user disable pulseaudio.socket" doesn't > > work? > > Yes, but it also has the advantage that ev

Re: [pulseaudio-discuss] [PATCH] launch: Add systemd units for launching pulseaudio user instances

2014-10-24 Thread Colin Guthrie
Tanu Kaskinen wrote on 24/10/14 11:55: >>> The convention in PA seems to be to use more dashes: >>> --with-systemd-user-unit-dir >> >> This has been merged into a lot of other projects without the dashes >> (including alsa-utils) and it's also the name of the variable that us >> used in the pkg-co

Re: [pulseaudio-discuss] [PATCH 7/8] launch: Disable autospawn by default when systemd daemon support is enabled.

2014-10-24 Thread Colin Guthrie
Tanu Kaskinen wrote on 24/10/14 12:08: > On Fri, 2014-10-24 at 11:14 +0100, Colin Guthrie wrote: >> Tanu Kaskinen wrote on 24/10/14 10:42: >>> "Disable the manual override" doesn't sound like a good idea... Does >>> this mean that "systemctl --user disable pulseaudio.socket" doesn't >>> work? >> >

Re: [pulseaudio-discuss] [PATCH] launch: Add systemd units for launching pulseaudio user instances

2014-10-24 Thread Tanu Kaskinen
On Fri, 2014-10-24 at 12:53 +0100, Colin Guthrie wrote: > Tanu Kaskinen wrote on 24/10/14 11:55: > +[Install] > +Also=pulseaudio.socket > +WantedBy=default.target > >>> > >>> Given that we have socket activation, what is the benefit of starting > >>> PulseAudio unconditionally as par

Re: [pulseaudio-discuss] [PATCH] launch: Add systemd units for launching pulseaudio user instances

2014-10-24 Thread Colin Guthrie
Tanu Kaskinen wrote on 24/10/14 13:36: > On Fri, 2014-10-24 at 12:53 +0100, Colin Guthrie wrote: >> Tanu Kaskinen wrote on 24/10/14 11:55: >> +[Install] >> +Also=pulseaudio.socket >> +WantedBy=default.target > > Given that we have socket activation, what is the benefit of start

Re: [pulseaudio-discuss] [PATCH] Change the default fragment size to 5 ms

2014-10-24 Thread Alexander E. Patrakov
24.10.2014 01:44, Andrew Eikum wrote: On Fri, Oct 24, 2014 at 12:38:16AM +0600, Alexander E. Patrakov wrote: 24.10.2014 00:08, Andrew Eikum wrote: I have a patch in-hand which improves the current driver significantly, but it isn't enough to fix the USB devices problem. If someone wants to revi

[pulseaudio-discuss] [PATCH] Alsa: Correct port availability with multiple jacks

2014-10-24 Thread Sjoerd Simons
In case there are two independent jacks for one port (e.g. Dock Headphone Jack and Headphone Jack), the availability ends up being incorrect for one of the first was _NO (not plugged) and the second gets _YES (plugged). Also pulse complains about the state being inconsistent which isn't true. Fix

[pulseaudio-discuss] [PATCH RFC 12/17] pstream: #define PA_PSTREAM_SHM_SIZE

2014-10-24 Thread Peter Meerwald
From: Peter Meerwald Signed-off-by: Peter Meerwald --- src/pulsecore/pstream.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pulsecore/pstream.c b/src/pulsecore/pstream.c index 111899d..3a6b5f7 100644 --- a/src/pulsecore/pstream.c +++ b/src/pulsecore/pstream.c @@

[pulseaudio-discuss] [PATCH RFC 08/17] packet: Introduce pa_packet_new_data() to copy data into a newly created packet

2014-10-24 Thread Peter Meerwald
From: Peter Meerwald Signed-off-by: Peter Meerwald --- src/pulsecore/packet.c | 9 + src/pulsecore/packet.h | 4 src/pulsecore/pstream-util.c | 2 +- 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/pulsecore/packet.c b/src/pulsecore/packet.c index 091

[pulseaudio-discuss] [PATCH RFC 06/17] packet: Hide internals of pa_packet, introduce pa_packet_data()

2014-10-24 Thread Peter Meerwald
From: Peter Meerwald Signed-off-by: Peter Meerwald --- src/pulsecore/packet.c | 18 ++ src/pulsecore/packet.h | 11 +++ src/pulsecore/pdispatch.c | 9 + src/pulsecore/pstream.c | 15 +-- src/tests/srbchannel-test.c | 21 ++

[pulseaudio-discuss] [PATCH RFC 09/17] packet: Use flist to save calls to malloc()/free()

2014-10-24 Thread Peter Meerwald
From: Peter Meerwald a separate free-list is used to recycle memory of fixed-sized packets with up to MAX_APPENDED_SIZE of data Signed-off-by: Peter Meerwald --- src/pulsecore/packet.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/pulsecore/packet.c b/src

[pulseaudio-discuss] [PATCH RFC 13/17] pstream: Duplicate assignment, write.data is always NULL

2014-10-24 Thread Peter Meerwald
From: Peter Meerwald Signed-off-by: Peter Meerwald --- src/pulsecore/pstream.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/pulsecore/pstream.c b/src/pulsecore/pstream.c index 3a6b5f7..fd8f5d5 100644 --- a/src/pulsecore/pstream.c +++ b/src/pulsecore/pstream.c @@ -619,7 +619,6 @@ stati

[pulseaudio-discuss] [PATCH RFC 03/17] tagstruct: Get rid of pa_tagstruct_free_data()

2014-10-24 Thread Peter Meerwald
From: Peter Meerwald pa_tagstruct_free_data() is used in only one place to pass data from a tagstruct to a packet this patch is a temporary solution which introduces an extra malloc(); will be resolved shortly... Signed-off-by: Peter Meerwald --- src/pulsecore/pstream-util.c | 9 ++--- s

[pulseaudio-discuss] [PATCH RFC 17/17] iochannel: Fix channel enable

2014-10-24 Thread Peter Meerwald
--- src/pulsecore/iochannel.c | 35 +++ 1 file changed, 11 insertions(+), 24 deletions(-) diff --git a/src/pulsecore/iochannel.c b/src/pulsecore/iochannel.c index 6b1fc7a..dd88208 100644 --- a/src/pulsecore/iochannel.c +++ b/src/pulsecore/iochannel.c @@ -82,35 +82,

[pulseaudio-discuss] [PATCH RFC 15/17] pstream: Split up do_read()

2014-10-24 Thread Peter Meerwald
From: Peter Meerwald no functional change, just using several funtion to break up that monstrosity Signed-off-by: Peter Meerwald --- src/pulsecore/pstream.c | 400 1 file changed, 204 insertions(+), 196 deletions(-) diff --git a/src/pulsecore/p

[pulseaudio-discuss] [PATCH RFC 10/17] pstream: Unionize item_info

2014-10-24 Thread Peter Meerwald
From: Peter Meerwald item_info has per-type fields which should be within a union to save space Signed-off-by: Peter Meerwald --- src/pulsecore/pstream.c | 117 +++- 1 file changed, 65 insertions(+), 52 deletions(-) diff --git a/src/pulsecore/pstrea

[pulseaudio-discuss] [PATCH RFC 02/17] tagstruct: Replace dynamic flag with type

2014-10-24 Thread Peter Meerwald
From: Peter Meerwald ... in order to prepare for a new type _APPENDED remove the assert() for dynamic in pa_tagstruct_data() as the function makes sense for all tagstruct types (and the returned pointer is const) Signed-off-by: Peter Meerwald --- src/pulsecore/tagstruct.c | 16 +--

[pulseaudio-discuss] [PATCH RFC 05/17] tagstruct: Use flist to potentially save calls to malloc()/free()

2014-10-24 Thread Peter Meerwald
From: Peter Meerwald Signed-off-by: Peter Meerwald --- src/pulsecore/tagstruct.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/pulsecore/tagstruct.c b/src/pulsecore/tagstruct.c index d2efffa..9b240dd 100644 --- a/src/pulsecore/tagstruct.c +++ b/src/pulseco

[pulseaudio-discuss] [PATCH RFC 16/17] pstream: Use small minibuffer to combine several read()s if possible

2014-10-24 Thread Peter Meerwald
From: Peter Meerwald idea is similar to b4342845d, Optimize write of smaller packages, but for read Signed-off-by: Peter Meerwald --- src/pulsecore/pstream.c | 90 +++-- 1 file changed, 73 insertions(+), 17 deletions(-) diff --git a/src/pulsecore/ps

[pulseaudio-discuss] [PATCH RFC 14/17] pstream: Only reset memchunk if it has been used

2014-10-24 Thread Peter Meerwald
From: Peter Meerwald Signed-off-by: Peter Meerwald --- src/pulsecore/pstream.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pulsecore/pstream.c b/src/pulsecore/pstream.c index fd8f5d5..400df42 100644 --- a/src/pulsecore/pstream.c +++ b/src/pulsecore/pstream.c @@

[pulseaudio-discuss] [PATCH RFC 07/17] packet: Make pa_packet_new() create fixed-size packets

2014-10-24 Thread Peter Meerwald
From: Peter Meerwald if length exceeds maximum appended size, create a packet of type dynamic instead of type appended this is a preparation to use a separate free-list for packets document semantics of pa_packet_new_*() functions Signed-off-by: Peter Meerwald --- src/pulsecore/packet.c | 16

[pulseaudio-discuss] [PATCH RFC 11/17] pstream: Add pa_pstream_send_tagstruct()

2014-10-24 Thread Peter Meerwald
From: Peter Meerwald don't encapsulate a tagstruct in a packet anymore, allow to pass the tagstruct directly to the pstream this removes the ugly macro pa_pstream_send_tagstruct() in pstream-util.h and calls the new function pa_pstream_send_tagstruct() causing the addition of a NULL parameters i

Re: [pulseaudio-discuss] [RFC PATCH] alsa-sink: Reduce hardware pointer update syscalls

2014-10-24 Thread Raymond Yau
> > Without patch, with a latency of 48 ms What is the meaning of 48ms at 44100Hz? > With the patch, I get the same assertion failed as Peter ("frames > 0"). > With Peter's change, I get this: http://pastebin.com/dWx6fiwT, even with > no client connected. The reported delay is -5 * default-fragme

[pulseaudio-discuss] [PATCH] tunnel-sink-new: Limit the maximum latency to 200 ms

2014-10-24 Thread Tanu Kaskinen
The default maximum latency is 10 seconds, which is not good, especially since the tunnel sink doesn't support rewinding. Due to the lack of rewinding, e.g. volume changes take a long time with large latencies. Change-Id: I13753d30a17598ebc9e6a3eda3db4096ff6fcf4e --- src/modules/module-tunnel-sin

[pulseaudio-discuss] [PATCH 6/8] launch: Add systemd units for launching pulseaudio user instances

2014-10-24 Thread Colin Guthrie
--- configure.ac | 11 +++ src/Makefile.am | 12 +++- src/daemon/systemd/user/pulseaudio.service.in | 10 ++ src/daemon/systemd/user/pulseaudio.socket | 10 ++ 4 files changed, 42 insertions(+), 1 de

[pulseaudio-discuss] [PATCH 0/2] A couple of Zsh completion patches

2014-10-24 Thread Tanu Kaskinen
Tanu Kaskinen (2): shell-completion: zsh: Mark a variable as local shell-completion: zsh: Rework pactl completion shell-completion/zsh/_pulseaudio | 266 +-- 1 file changed, 231 insertions(+), 35 deletions(-) -- 1.9.3

Re: [pulseaudio-discuss] [PATCH 0/7] misc cleanup

2014-10-24 Thread Alexander E. Patrakov
23.10.2014 21:33, Peter Meerwald wrote: From: Peter Meerwald misc. trivial cleanups queued up while working on 'real stuff' I have looked at and agree with all 7 patches. Remove link to CIA from README Cleanup !! for bool mainloop: Fix typo modules: Fix )== typos alsa-sink: C

[pulseaudio-discuss] [PATCH 6/7] tests: Make global variables static in srbchannel-test

2014-10-24 Thread Peter Meerwald
From: Peter Meerwald Signed-off-by: Peter Meerwald --- src/tests/srbchannel-test.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/tests/srbchannel-test.c b/src/tests/srbchannel-test.c index 78a401b..7fd793f 100644 --- a/src/tests/srbchannel-test.c +++ b/src/tes

[pulseaudio-discuss] [PATCH 2/4] bluez5-util: add dispose function

2014-10-24 Thread Wim Taymans
Add a dispose function to the transport that is called before freeing the transport. Useful for cleaning up extra userdata. --- src/modules/bluetooth/bluez5-util.c | 2 ++ src/modules/bluetooth/bluez5-util.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/modules/bluetooth/bluez5-util.c

[pulseaudio-discuss] [PATCH RFC 00/17] memory optimizations

2014-10-24 Thread Peter Meerwald
this patch series aims to save memory allocations and some system calls related to PA's client/server protocol implementation patches 1 to 5 ('tagstruct:') introduce a new tagstruct type _APPENDED which can hold tagstruct data up to a certain size; tagstructs are now kept in a specific free-list

[pulseaudio-discuss] [PATCH 4/4] backend-native: implement volume control

2014-10-24 Thread Wim Taymans
Parse the gain changed AT commands from the headset and fire 2 new hooks as a result. The device will connect to those hooks and change the source/sink volumes. When the source/sink volume changes, set the gain on the microphone or speaker respectively. Make sure we do nothing if the transport can

Re: [pulseaudio-discuss] [PATCH 3/3] protocol-native: Fail if trying to push unaligned memblock into queue

2014-10-24 Thread Arun Raghavan
On 20 October 2014 16:52, David Henningsson wrote: > > > On 2014-10-17 12:06, Arun Raghavan wrote: >> >> On Thu, 2014-10-16 at 11:41 +0200, David Henningsson wrote: >>> >>> We will just ignore the memblock if this happens. We already have >>> a check for this in the client library, so this one is

[pulseaudio-discuss] [PATCH RFC 04/17] tagstruct: Add type _APPENDED

2014-10-24 Thread Peter Meerwald
From: Peter Meerwald add 128 bytes of storage in each tagstruct that will initially be used; if this storage is exceeded the type changes to _DYNAMIC Signed-off-by: Peter Meerwald --- src/pulsecore/tagstruct.c | 21 - 1 file changed, 16 insertions(+), 5 deletions(-) diff -

[pulseaudio-discuss] [PATCH 0/4] Add simple HSP support in new native backend v3

2014-10-24 Thread Wim Taymans
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 b

[pulseaudio-discuss] [PATCH RFC 01/17] tagstruct: Distinguish pa_tagstruct_new() use cases

2014-10-24 Thread Peter Meerwald
From: Peter Meerwald pa_tagstruct_new() is called either with no data, i.e. (NULL, 0) to create a dynamic tagstruct or with a pointer to fixed data introduce a new function pa_tagstruct_new_fixed() for the latter case Signed-off-by: Peter Meerwald --- src/modules/module-card-restore.c | 4

[pulseaudio-discuss] [PATCH 1/2] configure: Move path to modules to /usr/lib/pulseaudio/modules-x.y

2014-10-24 Thread David Henningsson
The path /usr/lib/pulse-x.y is non-standard, both considering that other software more often than not have a non-versioned directory under /usr/lib, and that we ourselves don't use "pulse-x.y" anywhere else. It could still be reasonable to have more than one version of PA installed, so let's have

Re: [pulseaudio-discuss] [PATCH 0/3] resamplers

2014-10-24 Thread Alexander E. Patrakov
07.09.2014 15:48, Tanu Kaskinen wrote: Do we have some kind of a conclusion about whether the soxr and libavresample resamplers should be merged? If I understood correctly, the libavresample resampler appears to be somehow broken, so I guess that should not be merged until the brokenness is fixed