[pulseaudio-discuss] [PATCH v3] bluez5-device: Fix memory leak in sco_process_render()

2018-04-26 Thread Georg Chini
sco_process_render does not unref the memblock when it encounters an error. This patch fixes the issue. It also changes the return value to 1 in the case of EAGAIN. Because the data was already rendered and cannot be re-sent, we have to discard the block. Because the modified EAGAIN handling

Re: [pulseaudio-discuss] [PATCH] core: Expose API to elevate a thread to realtime priority

2018-04-21 Thread Georg Chini
On 21.04.2018 06:21, Arun Raghavan wrote: This should make it easier for clients to elevate their audio threads to real time priority without having to dig through much through specific system internals. --- src/modules/alsa/alsa-sink.c | 3 +- src/modules/alsa/alsa-source.c

Re: [pulseaudio-discuss] [PATCH v3 00/12] Add module-gsettings

2018-04-19 Thread Georg Chini
On 19.04.2018 13:06, Tanu Kaskinen wrote: On Wed, 2018-04-18 at 19:29 +0200, Georg Chini wrote: On 17.04.2018 08:07, Tanu Kaskinen wrote: Here are the PulseAudio patches for the GConf -> GSettings migration. The first patch is the original patch from Sylvain Baubeau, rebased on current mas

Re: [pulseaudio-discuss] [PATCH v3 00/12] Add module-gsettings

2018-04-18 Thread Georg Chini
On 17.04.2018 08:07, Tanu Kaskinen wrote: Here are the PulseAudio patches for the GConf -> GSettings migration. The first patch is the original patch from Sylvain Baubeau, rebased on current master, and the rest of the patch set are various fixups (mostly very simple stuff). The first patch

[pulseaudio-discuss] [PATCH v2] bluez5-device: Fix memory leak in sco_process_render()

2018-04-10 Thread Georg Chini
sco_process_render does not unref the memblock when it encounters an error. This patch fixes the issue. It also changes the return value to 1 in the case of EAGAIN. Because the data was already rendered and cannot be re-sent, we have to discard the block. --- Changes in v2: Save errno before

Re: [pulseaudio-discuss] [PATCH] bluez5-device, bluez5-discover: add hsp_source_buffer_msec argument

2018-04-10 Thread Georg Chini
On 10.04.2018 14:52, Luiz Augusto von Dentz wrote: Hi George, On Mon, Apr 9, 2018 at 7:16 PM, Georg Chini <ge...@chini.tk> wrote: Currently the PA bluetooth code calls source_push() for each HSP source packet. The default HSP MTU is 48 bytes, this means that source_push() is called eve

Re: [pulseaudio-discuss] [PATCH] bluez5-device: Fix memory leak in sco_process_render()

2018-04-10 Thread Georg Chini
On 10.04.2018 13:04, Raman Shishniou wrote: Hello, On 04/10/2018 01:38 PM, Georg Chini wrote: On 10.04.2018 10:21, Raman Shishniou wrote: Hello, On 04/09/2018 07:15 PM, Georg Chini wrote: sco_process_render does not unref the memblock when it encounters an error. This patch fixes the issue

Re: [pulseaudio-discuss] [PATCH] bluez5-device: Fix memory leak in sco_process_render()

2018-04-10 Thread Georg Chini
On 10.04.2018 10:21, Raman Shishniou wrote: Hello, On 04/09/2018 07:15 PM, Georg Chini wrote: sco_process_render does not unref the memblock when it encounters an error. This patch fixes the issue. It also changes the return value to 1 in the case of EAGAIN. Because the data was already

[pulseaudio-discuss] [PATCH 3/3] core: prefer available devices during default source/sink selection

2018-04-09 Thread Georg Chini
Because ports with disabled jack detection are set to availability unknown by default, available ports should be preferred over ports with unknown availability. --- src/pulsecore/core.c | 20 ++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/src/pulsecore/core.c

[pulseaudio-discuss] [PATCH 1/3] card: add infrastructure to enable/disable jack detection

2018-04-09 Thread Georg Chini
This patch adds a card message handler which will be used to enable or disable jack detection on a per port basis. Only the necessary variables and functions are added without changing functionality. --- src/pulsecore/card.c| 129 +++-

[pulseaudio-discuss] [PATCH 0/3] card: Add messages to control jack detection

2018-04-09 Thread Georg Chini
switching off jack detection for that port. Because the set depends on the not yet reviewed messaging patches it only implements the basic functionality and does not provide pactl commands. Georg Chini (3): card: add infrastructure to enable/disable jack detection device-port: Add messages

[pulseaudio-discuss] [PATCH 2/3] device-port: Add messages to enable/disable jack detection

2018-04-09 Thread Georg Chini
With this patch, messages can be sent to the cards to enable/disable jack detection for the whole card or single ports, manually set a port state and to retrieve the current state of jack detection and port availability. --- doc/messaging_api.txt| 22

[pulseaudio-discuss] [PATCH 0/3] core: Add signal sending/receiving

2018-04-09 Thread Georg Chini
This patch set adds signal sending capability to the core. This is used to send signals when message handlers are added/removed or when the description changes. This patch set depends on the messaging patch set. Georg Chini (3): protocol-native: Add signal receiving capability pactl: Add

[pulseaudio-discuss] [PATCH 2/3] pactl: Add signal receiver

2018-04-09 Thread Georg Chini
--- man/pactl.1.xml.in | 2 +- src/utils/pactl.c | 20 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/man/pactl.1.xml.in b/man/pactl.1.xml.in index 66c0bda9..5279791b 100644 --- a/man/pactl.1.xml.in +++ b/man/pactl.1.xml.in @@ -254,7 +254,7 @@ License along

[pulseaudio-discuss] [PATCH 1/3] protocol-native: Add signal receiving capability

2018-04-09 Thread Georg Chini
This patch extends the client subscription API, so that signals sent from PulseAudio can be processed. Within PulseAudio, a signal can be emitted using pa_signal_post(). The interface can be used to notify the client of events that are not covered by the subscription API (for example a button

[pulseaudio-discuss] [PATCH 3/3] message-handler: Send signal on handler events

2018-04-09 Thread Georg Chini
--- src/pulsecore/message-handler.c | 25 + 1 file changed, 25 insertions(+) diff --git a/src/pulsecore/message-handler.c b/src/pulsecore/message-handler.c index 75310667..a983e136 100644 --- a/src/pulsecore/message-handler.c +++ b/src/pulsecore/message-handler.c @@ -23,6

[pulseaudio-discuss] [PATCH 7/8] message-params: Add read/write functions for various simple data types

2018-04-09 Thread Georg Chini
See doc/messaging_api.txt for the added functions. All read functions return 1 on success, 0 if end of string is found and -1 on parse error. Additionally, for the numeric/boolean read functions, 2 is returned if the list element is empty. --- doc/messaging_api.txt | 15 +++- src/map-file

[pulseaudio-discuss] [PATCH 6/8] message-params: Allow parameter strings to contain escaped curly braces

2018-04-09 Thread Georg Chini
The patch adds the possibility to escape curly braces within parameter strings and introduces several new functions that can be used for writing parameters. For writing, the structure pa_message_param, which is a wrapper for pa_strbuf has been created. Following new write functions are available:

[pulseaudio-discuss] [PATCH 2/8] protocol-native: add message sending capability

2018-04-09 Thread Georg Chini
This patch adds the PA_COMMAND_SEND_OBJECT_MESSAGE command to protocol-native so that clients can use the messaging feature introduced in the previous patch. Sending messages can in effect replace the extension system for modules. The approach is more flexible than the extension interface because

[pulseaudio-discuss] [PATCH 8/8] message-params: Add read functions for arrays

2018-04-09 Thread Georg Chini
--- doc/messaging_api.txt | 5 ++ src/map-file | 4 + src/pulse/message-params.c | 202 + src/pulse/message-params.h | 12 +++ 4 files changed, 223 insertions(+) diff --git a/doc/messaging_api.txt b/doc/messaging_api.txt index

[pulseaudio-discuss] [PATCH 4/8] core: add message handler

2018-04-09 Thread Georg Chini
This patch adds a small message handler to the core which enables clients to list available handlers via the list-handlers message. Command: pacmd send-message /core list-handlers pactl can be used with the same parameters. The patch also introduces a convention for the return string. It consists

[pulseaudio-discuss] [PATCH 0/8] core: Add message sending/receiving

2018-04-09 Thread Georg Chini
This is a re-base of the messaging patches. It does not contain changes. The first two patches have already been reviewed, I nevertheless included them for completeness. Georg Chini (8): core: add simple message interface protocol-native: add message sending capability pactl, pacmd, cli

[pulseaudio-discuss] [PATCH 5/8] pactl: Implement list message-handlers

2018-04-09 Thread Georg Chini
For better readability, "pactl list message-handlers" is introduced which prints a formatted output of "pactl send-message /core list-handlers". The patch also adds the functions pa_message_param_split_list() and pa_message_param_read_string() for easy parsing of the message response string.

[pulseaudio-discuss] [PATCH 1/8] core: add simple message interface

2018-04-09 Thread Georg Chini
This patch adds a new feature to the core which allows to send messages to objects. An object can register/unregister a message handler with pa_message_handler_{register, unregister}() while a message can be sent to the handler using the pa_message_handler_send_message() function. A message has 4

[pulseaudio-discuss] [PATCH 3/8] pactl, pacmd, cli-command: Add send-message command

2018-04-09 Thread Georg Chini
The patch also adds some API documentation. --- doc/messaging_api.txt| 15 ++ man/pactl.1.xml.in | 7 +++ man/pulse-cli-syntax.5.xml.in| 7 +++ shell-completion/bash/pulseaudio | 5 +++-- shell-completion/zsh/_pulseaudio | 2 ++

[pulseaudio-discuss] [PATCH 09/10] loopback: Add adjust_time_msec parameter to allow adjust times below 1s

2018-04-09 Thread Georg Chini
A new parameter is introduced to allow specifying smaller adjust_time values than 1s. This may be useful for a better latency control, although with alsa devices and the current smoother code no improvement could be found. This patch also changes the default adjust time to 1s, the old value of 10s

[pulseaudio-discuss] [PATCH 05/10] loopback: Track prediction error; debug and cosmetic changes

2018-04-09 Thread Georg Chini
-loopback.c @@ -36,7 +36,7 @@ #include #include -PA_MODULE_AUTHOR("Pierre-Louis Bossart"); +PA_MODULE_AUTHOR("Pierre-Louis Bossart, Georg Chini"); PA_MODULE_DESCRIPTION("Loopback from source to sink"); PA_MODULE_VERSION(PACKAGE_VERSION); PA_MODULE_LOAD_ONCE(false

[pulseaudio-discuss] [PATCH 08/10] loopback: Add low_device_latency parameter

2018-04-09 Thread Georg Chini
For USB devices the latency jitter strongly depends on device latency. Therefore a boolean low_device_latency parameter is introduced to half the device latency. Normally 1/3 of the configured end-to-end latency is used, with the parameter this is changed to 1/6. In many situations the parameter

[pulseaudio-discuss] [PATCH 06/10] loopback: Add adjust_threshold_usec parameter

2018-04-09 Thread Georg Chini
In many situations, the P-controller is too sensitive and therefore exhibits rate hunting. To avoid rate hunting, the sensibility of the controller is set by the new parameter adjust_threshold_usec. The parameter value is the deviation from the target latency in usec which is needed to produce

[pulseaudio-discuss] [PATCH 10/10] loopback: Add log_interval and log_interval_msec parameter

2018-04-09 Thread Georg Chini
Add a log_interval parameter to control the amount of logging. Default is no logging. Like for adjust_time, two parameters exist: log_interval specifies the interval in seconds while log_interval_msec is in ms. If the log interval is too small, logging will occur on every iteration. ---

[pulseaudio-discuss] [PATCH 07/10] loopback: Only use controller weight after target latency has been crossed twice

2018-04-09 Thread Georg Chini
The previous patch slows down initial convergence. Therefore do not use the controller weight until we can assume that we reached an equilibrium. Because it takes some time before the reported latency values are reliable, assume that a steady state is reached when the target latency has been

[pulseaudio-discuss] [PATCH 03/10] loopback: Optimize adaptive re-sampling

2018-04-09 Thread Georg Chini
The current code assumes that the time domains of source and sink are equal. This leads to a saw-tooth characteristics of the resulting end to end latency. This patch adds an iterative calculation of an optimum rate which accounts for the difference between the source and sink time domains,

[pulseaudio-discuss] [PATCH 01/10] loopback: Do not detect underruns during initial latency adjustments

2018-04-09 Thread Georg Chini
Currently module-loopback detects underruns even if sink_input_pop_cb() was not yet called twice and initial latency adjustments are active. This leads to unnecessary rewind requests. This patch delays detecting underruns until the initial adjustments are done. --- src/modules/module-loopback.c

[pulseaudio-discuss] [PATCH 04/10] loopback: Add latency prediction and Kalman filter

2018-04-09 Thread Georg Chini
A Kalman filter is added to further reduce noise. The Kalman filter needs a latency prediction as input, so estimate the next expected latency as well. Again, theory is at https://www.freedesktop.org/software/pulseaudio/misc/rate_estimator.odt --- src/modules/module-loopback.c | 67

[pulseaudio-discuss] [PATCH 02/10] loopback: Limit controller step size to 2.01‰

2018-04-09 Thread Georg Chini
The current loopback controller can produce a rate jump of up to 1% at startup, which may be audible. To prevent large initial jumps, a second controller is introduced, which produces a rate, that is not more than 2‰ away from the last rate. Only during the startup phase, the rates produced by

[pulseaudio-discuss] [PATCH 00/10] loopback: Optimize latency stabilization

2018-04-09 Thread Georg Chini
This is a re-base of the remaining patches from the loopback series I sent in February 2017. There are no major changes to the series. Georg Chini (10): loopback: Do not detect underruns during initial latency adjustments loopback: Limit controller step size to 2.01‰ loopback: Optimize

[pulseaudio-discuss] [PATCH 07/10] tunnel: Allow module-tunnel to use alternative smoother code

2018-04-09 Thread Georg Chini
--- src/modules/module-tunnel.c | 72 +++-- 1 file changed, 69 insertions(+), 3 deletions(-) diff --git a/src/modules/module-tunnel.c b/src/modules/module-tunnel.c index 2068deca..99aba68c 100644 --- a/src/modules/module-tunnel.c +++

[pulseaudio-discuss] [PATCH 09/10] raop-sink: Allow module-raop-sink to use alternative smoother code

2018-04-09 Thread Georg Chini
This is untested. --- src/modules/raop/raop-sink.c | 40 +++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/src/modules/raop/raop-sink.c b/src/modules/raop/raop-sink.c index ec6f8262..5103e8e7 100644 --- a/src/modules/raop/raop-sink.c +++

[pulseaudio-discuss] [PATCH 10/10] solaris: Allow module-solaris to use alternative smoother code

2018-04-09 Thread Georg Chini
This is untested. --- src/modules/module-solaris.c | 43 +++ 1 file changed, 43 insertions(+) diff --git a/src/modules/module-solaris.c b/src/modules/module-solaris.c index 240ed855..4642446a 100644 --- a/src/modules/module-solaris.c +++

[pulseaudio-discuss] [PATCH 06/10] combine-sink: Allow module-combine-sink to use alternative smoother code

2018-04-09 Thread Georg Chini
--- src/modules/module-combine-sink.c | 52 --- 1 file changed, 48 insertions(+), 4 deletions(-) diff --git a/src/modules/module-combine-sink.c b/src/modules/module-combine-sink.c index 79b4c6d9..1e719f8f 100644 --- a/src/modules/module-combine-sink.c +++

[pulseaudio-discuss] [PATCH 04/10] bluetooth: Allow bluetooth to use alternative smoother code

2018-04-09 Thread Georg Chini
--- src/modules/bluetooth/module-bluez5-device.c | 57 ++-- 1 file changed, 53 insertions(+), 4 deletions(-) diff --git a/src/modules/bluetooth/module-bluez5-device.c b/src/modules/bluetooth/module-bluez5-device.c index d40bbb0c..935ee2ce 100644 ---

[pulseaudio-discuss] [PATCH 08/10] esound-sink: Allow module-esound-sink to use alternative smoother code

2018-04-09 Thread Georg Chini
This is untested. --- src/modules/module-esound-sink.c | 51 +++- 1 file changed, 50 insertions(+), 1 deletion(-) diff --git a/src/modules/module-esound-sink.c b/src/modules/module-esound-sink.c index 5ff04516..52bfa496 100644 ---

[pulseaudio-discuss] [PATCH 02/10] Add configure option --enable-smoother-2 to enable alternative smoother code

2018-04-09 Thread Georg Chini
--- configure.ac | 7 +++ 1 file changed, 7 insertions(+) diff --git a/configure.ac b/configure.ac index b0855a46..57cb3a92 100644 --- a/configure.ac +++ b/configure.ac @@ -1399,7 +1399,14 @@ AS_IF([test "x$os_is_win32" != "x1"], AS_IF([test "x$ax_pthread_ok" = "xyes"],

[pulseaudio-discuss] [PATCH 05/10] stream: Allow stream.c to use alternative smoother code

2018-04-09 Thread Georg Chini
--- src/pulse/internal.h | 10 ++ src/pulse/stream.c | 52 +++- 2 files changed, 61 insertions(+), 1 deletion(-) diff --git a/src/pulse/internal.h b/src/pulse/internal.h index 01d2b6e4..0d18aa71 100644 --- a/src/pulse/internal.h +++

[pulseaudio-discuss] [PATCH 00/10] pulsecore: Add new time smoother

2018-04-09 Thread Georg Chini
of the time smoother. A configure option is used to switch between the two smoother implementations. It is currently disabled by default but should be enabled once some broader testing was done. The last three patches could not be tested, so any tests would be appreciated. Georg Chini (10

[pulseaudio-discuss] [PATCH 03/10] alsa sink/source: Allow alsa to use alternative smoother code

2018-04-09 Thread Georg Chini
--- src/modules/alsa/alsa-sink.c | 86 -- src/modules/alsa/alsa-source.c | 67 ++-- 2 files changed, 146 insertions(+), 7 deletions(-) diff --git a/src/modules/alsa/alsa-sink.c b/src/modules/alsa/alsa-sink.c index

[pulseaudio-discuss] [PATCH 01/10] pulsecore: Add alternative time smoother implementation

2018-04-09 Thread Georg Chini
This patch adds an alternative time smoother implementation based on the theory found at https://www.freedesktop.org/software/pulseaudio/misc/rate_estimator.odt. The functions were written to replace the current smoother functions nearly on a one-to-one basis, though there are a few differences:

[pulseaudio-discuss] [PATCH 4/6] combine-sink: Use configured resampler, reduce update time to 1s

2018-04-09 Thread Georg Chini
Currently the combine-sink uses the trivial resampler by default. This patch changes the default to the configured resampler. Also the default update time is changed from 10s to 1s to achieve faster convergence and higher precision. --- src/modules/module-combine-sink.c | 5 +++-- 1 file

[pulseaudio-discuss] [PATCH 5/6] tunnel: Fix latency calculations

2018-04-09 Thread Georg Chini
Currently module-tunnel uses only a rough estimate of the current stream latency and reports wrong latencies in certain situations. This leads to very inexact and unstable latency reports for the virtual sink. This patch fixes the issue by introducing latency snapshots like they are used in

[pulseaudio-discuss] [PATCH 6/6] tunnel: Make fixed latency configurable

2018-04-09 Thread Georg Chini
Currently, module-tunnel uses the default fixed latency of 250ms as fixed latency. There is no reason for such a large latency. This patch adds a parameter latency_msec to the module to set the fixed latency at load time of the module. The parameter can range from 5 to 500 milliseconds. With this

[pulseaudio-discuss] [PATCH 1/6] combine-sink: Fix latency calculations

2018-04-09 Thread Georg Chini
Currently module-combine-sink uses only a rough estimate of the current slave sink latencies to calculate the rate for the various sink inputs. This leads to very inexact and unstable latency reports for the virtual sink. This patch fixes the issue by introducing latency snapshots like they are

[pulseaudio-discuss] [PATCH 3/6] combine-sink: Improve initial latency reports

2018-04-09 Thread Georg Chini
Currently, it takes one adjust time before the smoother is updated after an unsuspend. Before the first update, the smoother will not be aware of the slave sink latencies, leading to incorrect latency reports. This patch moves the first smoother update to one latency time after the sink was

[pulseaudio-discuss] [PATCH 0/6] combine-sink, tunnel-sink: Latency fixes

2018-04-09 Thread Georg Chini
which seems unnecessary high. The fixed latency can now be configured. Default adjust times are updated to reflect the increased reliability of the latency reports. Georg Chini (6): combine-sink: Fix latency calculations combine-sink: Add rate controller combine-sink: Improve initial

[pulseaudio-discuss] [PATCH] bluez5-device, bluez5-discover: add hsp_source_buffer_msec argument

2018-04-09 Thread Georg Chini
Currently the PA bluetooth code calls source_push() for each HSP source packet. The default HSP MTU is 48 bytes, this means that source_push() is called every 3ms, which leads to increased CPU load especially on embedded systems. This patch adds a hsp_source_buffer_msec argument to

[pulseaudio-discuss] [PATCH] bluez5-device: Fix memory leak in sco_process_render()

2018-04-09 Thread Georg Chini
sco_process_render does not unref the memblock when it encounters an error. This patch fixes the issue. It also changes the return value to 1 in the case of EAGAIN. Because the data was already rendered and cannot be re-sent, we have to discard the block. ---

[pulseaudio-discuss] [PATCH] null-source: fix multiple bugs

2018-04-09 Thread Georg Chini
The current null-source implementation has several bugs: 1) The latency reported is the negative of the correct latency. 2) The memchunk passed to pa_source_post() is not initialized with silence. 3) In PA_SOURCE_MESSAGE_SET_STATE the timestamp is always set when the source transitions to RUNNING

Re: [pulseaudio-discuss] [PATCH] man: unify pactl and pacmd suspend command documentation

2018-04-09 Thread Georg Chini
On 08.04.2018 12:23, Tanu Kaskinen wrote: The suspend-sink and suspend-source documentation for pacmd was quite terse, so I copied the more complete documentation from pactl. I couldn't resist doing some other minor edits along the way too. Bug-link:

Re: [pulseaudio-discuss] [PATCH v10 2/3] pipe-source: respect frame boundaries

2018-04-09 Thread Georg Chini
On 20.03.2018 13:27, Raman Shyshniou wrote: Currently pipe-source doesn't track frame boundaries while posting data. This can lead to assertion failure in source-output for any sample specs except s8/u8 mono. The simplest way to reproduce is to write s24le format to pipe: $ pacat -r -d null

Re: [pulseaudio-discuss] [PATCH] alsa-util: Set ALSA report_delay flag in pa_alsa_safe_delay()

2018-04-04 Thread Georg Chini
On 04.04.2018 08:01, Takashi Iwai wrote: On Wed, 04 Apr 2018 00:35:24 +0200, Pierre-Louis Bossart wrote: On 4/2/18 3:14 PM, Georg Chini wrote: On 02.04.2018 21:35, Pierre-Louis Bossart wrote: On 04/02/2018 07:54 AM, Georg Chini wrote: The current code does not call

Re: [pulseaudio-discuss] [PATCH] alsa-util: Set ALSA report_delay flag in pa_alsa_safe_delay()

2018-04-03 Thread Georg Chini
On 04.04.2018 00:35, Pierre-Louis Bossart wrote: On 4/2/18 3:14 PM, Georg Chini wrote: On 02.04.2018 21:35, Pierre-Louis Bossart wrote: On 04/02/2018 07:54 AM, Georg Chini wrote: The current code does not call snd_pcm_status_set_audio_htstamp_config() to configure the way timestamps

Re: [pulseaudio-discuss] [PATCH] alsa-util: Set ALSA report_delay flag in pa_alsa_safe_delay()

2018-04-02 Thread Georg Chini
On 02.04.2018 21:35, Pierre-Louis Bossart wrote: On 04/02/2018 07:54 AM, Georg Chini wrote: The current code does not call snd_pcm_status_set_audio_htstamp_config() to configure the way timestamps are updated in ALSA. This leads to incorrect time stamps in the status object returned

[pulseaudio-discuss] [PATCH] alsa-util: Set ALSA report_delay flag in pa_alsa_safe_delay()

2018-04-02 Thread Georg Chini
The current code does not call snd_pcm_status_set_audio_htstamp_config() to configure the way timestamps are updated in ALSA. This leads to incorrect time stamps in the status object returned by snd_pcm_status(), so the computed latencies are wrong. This patch uses

Re: [pulseaudio-discuss] [PATCH v2] bluez5-device: Rewrite of thread function, reduce send buffer size for a2dp sink

2018-03-29 Thread Georg Chini
On 29.03.2018 15:33, Georg Chini wrote: The rewrite of the thread function does not change functionality much, most of it is only cleanup, minor bug fixing and documentation work. This patch also changes the send buffer size for a2dp sink to avoid lags after temporary connection drops

[pulseaudio-discuss] [PATCH v2] bluez5-device: Rewrite of thread function, reduce send buffer size for a2dp sink

2018-03-29 Thread Georg Chini
The rewrite of the thread function does not change functionality much, most of it is only cleanup, minor bug fixing and documentation work. This patch also changes the send buffer size for a2dp sink to avoid lags after temporary connection drops, following the proof-of-concept patch posted by

Re: [pulseaudio-discuss] [PATCH v2] bluez5-device: Rewrite of thread function, reduce send buffer size for a2dp sink

2018-03-29 Thread Georg Chini
On 24.03.2018 18:13, Tanu Kaskinen wrote: On Mon, 2018-03-05 at 08:49 +0100, Georg Chini wrote: The rewrite of the thread function does not change functionality much, most of it is only cleanup, minor bug fixing and documentation work. This patch also changes the send buffer size for a2dp

Re: [pulseaudio-discuss] [PATCH v2] bluez5-device: Rewrite of thread function, reduce send buffer size for a2dp sink

2018-03-29 Thread Georg Chini
On 25.03.2018 15:48, Tanu Kaskinen wrote: On Sun, 2018-03-25 at 14:36 +0200, Georg Chini wrote: On 25.03.2018 09:44, Georg Chini wrote: On 25.03.2018 08:34, Tanu Kaskinen wrote: On Sat, 2018-03-24 at 19:27 +0100, Georg Chini wrote: On 24.03.2018 18:13, Tanu Kaskinen wrote: On Mon, 2018-03

Re: [pulseaudio-discuss] [PATCH v2] bluez5-device: Rewrite of thread function, reduce send buffer size for a2dp sink

2018-03-25 Thread Georg Chini
On 25.03.2018 09:44, Georg Chini wrote: On 25.03.2018 08:34, Tanu Kaskinen wrote: On Sat, 2018-03-24 at 19:27 +0100, Georg Chini wrote: On 24.03.2018 18:13, Tanu Kaskinen wrote: On Mon, 2018-03-05 at 08:49 +0100, Georg Chini wrote: The rewrite of the thread function does not change

Re: [pulseaudio-discuss] [PATCH v2] bluez5-device: Rewrite of thread function, reduce send buffer size for a2dp sink

2018-03-25 Thread Georg Chini
On 25.03.2018 08:34, Tanu Kaskinen wrote: On Sat, 2018-03-24 at 19:27 +0100, Georg Chini wrote: On 24.03.2018 18:13, Tanu Kaskinen wrote: On Mon, 2018-03-05 at 08:49 +0100, Georg Chini wrote: The rewrite of the thread function does not change functionality much, most of it is only cleanup

Re: [pulseaudio-discuss] [PATCH v2] bluez5-device: Rewrite of thread function, reduce send buffer size for a2dp sink

2018-03-24 Thread Georg Chini
On 24.03.2018 18:13, Tanu Kaskinen wrote: On Mon, 2018-03-05 at 08:49 +0100, Georg Chini wrote: The rewrite of the thread function does not change functionality much, most of it is only cleanup, minor bug fixing and documentation work. This patch also changes the send buffer size for a2dp

Re: [pulseaudio-discuss] Bluetooth HSP handling on pulseaudio

2018-03-22 Thread Georg Chini
On 22.03.2018 13:51, David Woodhouse wrote: On Thu, 2018-03-22 at 13:16 +0100, Georg Chini wrote: I had written a patch for the BT headset button, but it was rejected at the time. See https://patchwork.freedesktop.org/patch/143572/ Maybe we can pick this up again, when we are able to send

Re: [pulseaudio-discuss] Bluetooth HSP handling on pulseaudio

2018-03-22 Thread Georg Chini
On 22.03.2018 13:00, David Woodhouse wrote: RING and CKPD are ignored by PulseAudio, so you can't currently get notifications about those, unfortunately. Hm... if I wanted to get notifications about those, how would I do so? I've just written a plugin for Pidgin which works with USB headsets

Re: [pulseaudio-discuss] [PATCH v3 0/2] State change refactoring, port change crash fix

2018-03-20 Thread Georg Chini
On 19.03.2018 22:11, Tanu Kaskinen wrote: Here are the last two patches that are required for fixing https://bugs.freedesktop.org/show_bug.cgi?id=104761 Changes in v3: - I simplified the variable assignments in sink/source_set_state() after a failed resume. - I reduced the

Re: [pulseaudio-discuss] [PATCH v2 4/5] pass pa_suspend_cause_t to set_state_in_io_thread() callbacks

2018-03-16 Thread Georg Chini
On 16.03.2018 19:26, Tanu Kaskinen wrote: On Fri, 2018-03-16 at 11:15 +0100, Georg Chini wrote: On 13.03.2018 18:40, Tanu Kaskinen wrote: The suspend cause isn't yet used by any of the callbacks. The alsa sink and source will use it to sync the mixer when the SESSION suspend cause is removed

Re: [pulseaudio-discuss] [PATCH v2 5/5] fix a call to pa_sink_suspend() from an incorrect thread

2018-03-16 Thread Georg Chini
On 13.03.2018 18:40, Tanu Kaskinen wrote: The alsa sink calls pa_sink_suspend() from the set_port() callback. pa_sink_suspend() can only be called from the main thread, but the set_port() callback was often called from the IO thread. That caused an assertion to be hit in pa_sink_suspend() when

Re: [pulseaudio-discuss] [PATCH v2 4/5] pass pa_suspend_cause_t to set_state_in_io_thread() callbacks

2018-03-16 Thread Georg Chini
On 13.03.2018 18:40, Tanu Kaskinen wrote: The suspend cause isn't yet used by any of the callbacks. The alsa sink and source will use it to sync the mixer when the SESSION suspend cause is removed. Currently the syncing is done in pa_sink/source_suspend(), and I want to change that, because

Re: [pulseaudio-discuss] [PATCH v2 3/5] replace sink/source SET_STATE handlers with callbacks

2018-03-16 Thread Georg Chini
On 13.03.2018 18:40, Tanu Kaskinen wrote: There are no behaviour changes, the code from almost all the SET_STATE handlers is moved with minimal changes to the newly introduced set_state_in_io_thread() callback. The only exception is module-tunnel, which has to call pa_sink_render() after

Re: [pulseaudio-discuss] [PATCH v2 2/5] oss: don't fail resume if trigger() fails

2018-03-16 Thread Georg Chini
On 13.03.2018 18:40, Tanu Kaskinen wrote: The previous code made the SET_STATE message fail if trigger() failed. However, trigger() was called after pa_sink/source_process_msg(), which meant that the main thread that sent the SET_STATE thought that resuming failed, but nothing was undone in the

Re: [pulseaudio-discuss] [PATCH v2 1/5] sink, source: rename set_state() to set_state_in_main_thread()

2018-03-15 Thread Georg Chini
On 13.03.2018 18:40, Tanu Kaskinen wrote: There will be a new callback named set_state_in_io_thread(). It seems like a good idea to have a similar name for the main thread variant. --- src/modules/alsa/alsa-sink.c | 4 ++-- src/modules/alsa/alsa-source.c | 4

Re: [pulseaudio-discuss] [PATCH v2] bluez5-device: Rewrite of thread function, reduce send buffer size for a2dp sink

2018-03-09 Thread Georg Chini
On 09.03.2018 10:20, Luiz Augusto von Dentz wrote: Hi George, On Mon, Mar 5, 2018 at 9:49 AM, Georg Chini <ge...@chini.tk> wrote: The rewrite of the thread function does not change functionality much, most of it is only cleanup, minor bug fixing and documentation work. This patc

Re: [pulseaudio-discuss] [PATCH v2] set exit_idle_time to 0 when we detect a session

2018-03-07 Thread Georg Chini
On 06.03.2018 14:09, Tanu Kaskinen wrote: As the comments explain, this fixes relogin problems on some systems that remove our sockets on logout without terminating the daemon. --- Changes in v2: - added man page updates man/pulse-daemon.conf.5.xml.in | 15 ---

[pulseaudio-discuss] [PATCH v2] bluez5-device: Rewrite of thread function, reduce send buffer size for a2dp sink

2018-03-04 Thread Georg Chini
The rewrite of the thread function does not change functionality much, most of it is only cleanup, minor bug fixing and documentation work. This patch also changes the send buffer size for a2dp sink to avoid lags after temporary connection drops, following the proof-of-concept patch posted by

[pulseaudio-discuss] [PATCH v2] bluez5-device: Rewrite of thread function, reduce send buffer size for a2dp sink

2018-03-04 Thread Georg Chini
The rewrite of the thread function does not change functionality much, most of it is only cleanup, minor bug fixing and documentation work. This patch also changes the send buffer size for a2dp sink to avoid lags after temporary connection drops, following the proof-of-concept patch posted by

Re: [pulseaudio-discuss] [PATCH] bluez5-device: Rewrite of thread function, reduce send buffer size for a2dp sink

2018-03-04 Thread Georg Chini
On 05.03.2018 07:53, Luiz Augusto von Dentz wrote: Hi George, On Sun, Mar 4, 2018 at 11:56 PM, Georg Chini <ge...@chini.tk> wrote: The rewrite of the thread function does not change functionality much, most of it is only cleanup, minor bug fixing and documentation work. This patc

[pulseaudio-discuss] [PATCH] bluez5-device: Rewrite of thread function, reduce send buffer size for a2dp sink

2018-03-04 Thread Georg Chini
The rewrite of the thread function does not change functionality much, most of it is only cleanup, minor bug fixing and documentation work. This patch also changes the send buffer size for a2dp sink to avoid lags after temporary connection drops, following the proof-of-concept patch posted by

Re: [pulseaudio-discuss] [PATCH v9] pipe-source: [DRAFT] implement autosuspend behavior

2018-02-23 Thread Georg Chini
On 23.02.2018 13:54, Raman Shishniou wrote: On 02/23/2018 01:26 PM, Georg Chini wrote: On 23.02.2018 11:03, Raman Shishniou wrote: On 02/23/2018 11:38 AM, Georg Chini wrote: But now I have another issue: You are polling the pipe and running the loop even if the source is user suspended

Re: [pulseaudio-discuss] [PATCH v9] pipe-source: [DRAFT] implement autosuspend behavior

2018-02-23 Thread Georg Chini
On 23.02.2018 11:03, Raman Shishniou wrote: On 02/23/2018 11:38 AM, Georg Chini wrote: But now I have another issue: You are polling the pipe and running the loop even if the source is user suspended. This seems like a waste of CPU (even more than accepting some POLLIN spam during wakeup

Re: [pulseaudio-discuss] [PATCH v9] pipe-source: [DRAFT] implement autosuspend behavior

2018-02-23 Thread Georg Chini
On 22.02.2018 22:01, Raman Shishniou wrote: On 02/22/2018 10:18 PM, Georg Chini wrote: -/* Hmm, nothing to do. Let's sleep */ -pollfd->events = (short) (u->source->thread_info.state == PA_SOURCE_RUNNING ? POLLIN : 0); +/* Post data to source, discard dat

Re: [pulseaudio-discuss] [PATCH v9] pipe-source: [DRAFT] implement autosuspend behavior

2018-02-22 Thread Georg Chini
On 22.02.2018 20:18, Georg Chini wrote: On 22.02.2018 17:15, Raman Shyshniou wrote: Currently the pipe-source will remain running even if no writer is connected and therefore no data is produced. This patch prevets this by auto-suspending source when all writers are disconnected. ---   src

Re: [pulseaudio-discuss] [PATCH v9] pipe-source: [DRAFT] implement autosuspend behavior

2018-02-22 Thread Georg Chini
On 22.02.2018 17:15, Raman Shyshniou wrote: Currently the pipe-source will remain running even if no writer is connected and therefore no data is produced. This patch prevets this by auto-suspending source when all writers are disconnected. --- src/modules/module-pipe-source.c | 190

Re: [pulseaudio-discuss] [PATCH v8] pipe-source: implement autosuspend option

2018-02-22 Thread Georg Chini
On 22.02.2018 09:49, Tanu Kaskinen wrote: On Thu, 2018-02-22 at 09:26 +0100, Georg Chini wrote: On 21.02.2018 21:02, Georg Chini wrote: On 21.02.2018 20:15, Raman Shishniou wrote: On 02/21/2018 09:41 PM, Raman Shuishniou wrote: 21.02.2018 20:07, Georg Chini пишет: Maybe you misunderstood me

Re: [pulseaudio-discuss] [PATCH v8] pipe-source: implement autosuspend option

2018-02-22 Thread Georg Chini
On 21.02.2018 21:02, Georg Chini wrote: On 21.02.2018 20:15, Raman Shishniou wrote: On 02/21/2018 09:41 PM, Raman Shuishniou wrote: 21.02.2018 20:07, Georg Chini пишет: Maybe you misunderstood me. What I mean, is that the pipe can be opened for writing as long as we are suspended. So it open

Re: [pulseaudio-discuss] [PATCH] sink: don't sync monitor suspend state when unlinking

2018-02-22 Thread Georg Chini
On 22.02.2018 09:06, Tanu Kaskinen wrote: When the sink is unlinked, there's no need to update the monitor suspend state. In fact, trying to do that causes an assertion failure, because pa_source_sync_suspend() wasn't written to handle the case where the sink is unlinked. ---

Re: [pulseaudio-discuss] [PATCH 7/8] bluetooth: fix resume error handling

2018-02-21 Thread Georg Chini
On 19.02.2018 15:48, Tanu Kaskinen wrote: When resuming a sink or source, pa_sink/source_process_msg() should be called only if resuming is successful. pa_sink/source_process_msg() updates thread_info.state and notifies streams about the new state, but if resuming fails, there's no state change.

Re: [pulseaudio-discuss] [PATCH 6/8] pass pa_suspend_cause_t to SINK/SOURCE_SET_STATE handlers

2018-02-21 Thread Georg Chini
On 19.02.2018 15:48, Tanu Kaskinen wrote: The suspend cause isn't yet used by any of the handlers. The alsa sink and source will use it to sync the mixer when the SESSION suspend cause is removed. Currently the syncing is done in pa_sink/source_suspend(), and I want to change that, because

Re: [pulseaudio-discuss] [PATCH 5/8] pass pa_suspend_cause_t to set_state() callbacks

2018-02-21 Thread Georg Chini
On 19.02.2018 15:48, Tanu Kaskinen wrote: The suspend cause isn't yet used by any of the callbacks. The alsa sink and source will use it to sync the mixer when the SESSION suspend cause is removed. Currently the syncing is done in pa_sink/source_suspend(), and I want to change that, because

Re: [pulseaudio-discuss] [PATCH 4/8] sink, source: redo state changing code

2018-02-21 Thread Georg Chini
On 19.02.2018 15:48, Tanu Kaskinen wrote: This adds a pa_suspend_cause_t parameter to the sink/source_set_state() functions, and moves part of the work that pa_sink/source_suspend() does to sink/source_set_state(). The reason for this code shuffling is that I plan to make all suspend cause

Re: [pulseaudio-discuss] [PATCH v8] pipe-source: implement autosuspend option

2018-02-21 Thread Georg Chini
On 21.02.2018 20:15, Raman Shishniou wrote: On 02/21/2018 09:41 PM, Raman Shuishniou wrote: 21.02.2018 20:07, Georg Chini пишет: Maybe you misunderstood me. What I mean, is that the pipe can be opened for writing as long as we are suspended. So it open when we see that the source is suspended

Re: [pulseaudio-discuss] [PATCH v8] pipe-source: implement autosuspend option

2018-02-21 Thread Georg Chini
On 21.02.2018 17:09, Raman Shishniou wrote: On 02/21/2018 06:43 PM, Georg Chini wrote: On 21.02.2018 16:15, Raman Shishniou wrote: On 02/21/2018 05:59 PM, Georg Chini wrote: On 21.02.2018 15:33, Raman Shishniou wrote: On 02/21/2018 05:00 PM, Georg Chini wrote: On 21.02.2018 12:50, Raman

Re: [pulseaudio-discuss] [PATCH v8] pipe-source: implement autosuspend option

2018-02-21 Thread Georg Chini
On 21.02.2018 16:15, Raman Shishniou wrote: On 02/21/2018 05:59 PM, Georg Chini wrote: On 21.02.2018 15:33, Raman Shishniou wrote: On 02/21/2018 05:00 PM, Georg Chini wrote: On 21.02.2018 12:50, Raman Shishniou wrote: On 02/21/2018 02:24 PM, Georg Chini wrote: On 21.02.2018 12:22, Raman

Re: [pulseaudio-discuss] [PATCH v8] pipe-source: implement autosuspend option

2018-02-21 Thread Georg Chini
On 21.02.2018 15:33, Raman Shishniou wrote: On 02/21/2018 05:00 PM, Georg Chini wrote: On 21.02.2018 12:50, Raman Shishniou wrote: On 02/21/2018 02:24 PM, Georg Chini wrote: On 21.02.2018 12:22, Raman Shishniou wrote: On 02/21/2018 12:13 PM, Raman Shishniou wrote: On 02/21/2018 09:39 AM

<    1   2   3   4   5   6   7   8   9   10   >