[pulseaudio-discuss] [PATCH v2] sink-input, source-output: don't allow moving streams that are connected to moving filter devices

2017-05-08 Thread Tanu Kaskinen
When a filter sink is moving, it's not connected to any master sink, and therefore it's not connected to any IO thread either. In this situation trying to move a stream that is connected to the filter sink is likely to result in crashing, because starting the move involves sending a message to the

Re: [pulseaudio-discuss] [PATCH v5 5/7] bluetooth: Auto recover if profile is 'off'

2017-05-08 Thread Tanu Kaskinen
On Mon, 2017-05-08 at 11:26 +0300, Luiz Augusto von Dentz wrote: > Hi Tanu, > > On Sat, May 6, 2017 at 7:20 PM, Tanu Kaskinen <ta...@iki.fi> wrote: > > On Fri, 2017-05-05 at 16:41 +0300, Luiz Augusto von Dentz wrote: > > > Hi Tanu, > > > > > > O

Re: [pulseaudio-discuss] [PATCH] echo-cancel: Avoid segfaults due to invalid master sink or source

2017-05-07 Thread Tanu Kaskinen
On Sun, 2017-05-07 at 12:32 +0200, Georg Chini wrote: > On 07.05.2017 09:33, Tanu Kaskinen wrote: > > On Sat, 2017-05-06 at 22:38 +0200, Georg Chini wrote: > > > On 06.05.2017 22:15, Georg Chini wrote: > > > > On 06.05.2017 22:06, Tanu Kaskinen wrote: > > &

Re: [pulseaudio-discuss] [PATCH] echo-cancel: Avoid segfaults due to invalid master sink or source

2017-05-07 Thread Tanu Kaskinen
On Sun, 2017-05-07 at 12:37 +0200, Georg Chini wrote: > On 07.05.2017 11:16, Tanu Kaskinen wrote: > > On Sat, 2017-05-06 at 22:15 +0200, Georg Chini wrote: > > > On 06.05.2017 22:06, Tanu Kaskinen wrote: > > > > I made a strange interpretation, because what you re

Re: [pulseaudio-discuss] [PATCH] echo-cancel: Avoid segfaults due to invalid master sink or source

2017-05-06 Thread Tanu Kaskinen
On Sat, 2017-05-06 at 20:06 +0200, Georg Chini wrote: > On 06.05.2017 18:36, Tanu Kaskinen wrote: > > On Fri, 2017-05-05 at 16:21 +0200, Georg Chini wrote: > > > I agree with you that my patch is wrong, but I think there is a simpler > > > solution than your pat

Re: [pulseaudio-discuss] Problems with loading the module-echo-cancel with webrtc

2017-05-06 Thread Tanu Kaskinen
On Thu, 2017-05-04 at 15:35 +0200, Koenraad Verheyden wrote: > Hey all, > > I'm using the module-echo-cancel using webrtc. I'm having two problems > loading the module: > > 1) I can't figure out how to pass multiple aec_args. When I do > > $ pactl load-module module-echo-cancel

Re: [pulseaudio-discuss] [PATCH] echo-cancel: Avoid segfaults due to invalid master sink or source

2017-05-06 Thread Tanu Kaskinen
On Fri, 2017-05-05 at 16:21 +0200, Georg Chini wrote: > On 04.05.2017 20:11, Tanu Kaskinen wrote: > > On Wed, 2017-05-03 at 22:19 +0200, Georg Chini wrote: > > > On 03.05.2017 21:58, Tanu Kaskinen wrote: > > > > On Tue, 2017-05-02 at 07:12 +0200, Georg Chini wrote:

Re: [pulseaudio-discuss] [PATCH v5 5/7] bluetooth: Auto recover if profile is 'off'

2017-05-06 Thread Tanu Kaskinen
On Fri, 2017-05-05 at 16:41 +0300, Luiz Augusto von Dentz wrote: > Hi Tanu, > > On Thu, May 4, 2017 at 3:29 PM, Tanu Kaskinen <ta...@iki.fi> wrote: > > On Thu, 2017-05-04 at 12:58 +0300, Luiz Augusto von Dentz wrote: > > > From: Luiz Augusto von D

Re: [pulseaudio-discuss] [PATCH] echo-cancel: Avoid segfaults due to invalid master sink or source

2017-05-04 Thread Tanu Kaskinen
On Wed, 2017-05-03 at 22:19 +0200, Georg Chini wrote: > On 03.05.2017 21:58, Tanu Kaskinen wrote: > > On Tue, 2017-05-02 at 07:12 +0200, Georg Chini wrote: > > > On 01.05.2017 22:10, Tanu Kaskinen wrote: > > > > On Mon, 2017-04-24 at 19:33 +0200, Georg Chini wrot

Re: [pulseaudio-discuss] [PATCH v5 5/7] bluetooth: Auto recover if profile is 'off'

2017-05-04 Thread Tanu Kaskinen
On Thu, 2017-05-04 at 12:58 +0300, Luiz Augusto von Dentz wrote: > From: Luiz Augusto von Dentz > > This means something went wrong, which in case of ofono backend it is > probably due to the profile not connecting immediately, but it can be > safely restored in that

Re: [pulseaudio-discuss] [PATCH] echo-cancel: Avoid segfaults due to invalid master sink or source

2017-05-03 Thread Tanu Kaskinen
On Tue, 2017-05-02 at 07:12 +0200, Georg Chini wrote: > On 01.05.2017 22:10, Tanu Kaskinen wrote: > > On Mon, 2017-04-24 at 19:33 +0200, Georg Chini wrote: > > > There are several places in module-echo-cancel where a segfault is > > > possible when the master sink or so

Re: [pulseaudio-discuss] [PATCH] switch-on-port-available: check and change default sink or source

2017-05-03 Thread Tanu Kaskinen
On Wed, 2017-05-03 at 11:23 +0800, Hui Wang wrote: > Today I tested the latest master branch (already including your two > patches), seems it did not fix the problem. Below is my testing detail: > > Install ubuntu 16.04 on my laptop. > clone the latest pulseaudio source code, checkout master

[pulseaudio-discuss] [PATCH] jack-sink: fix latency calculation

2017-05-02 Thread Tanu Kaskinen
The compiler warned about number_of_frames being possibly used uninitialized, and on closer inspection I found that it was indeed not initialized if saved_frame_time_valid is false. In commit fe70b9e11a "source/sink: Allow pa_{source, sink}_get_latency_within_thread() to return negative values"

Re: [pulseaudio-discuss] [PATCH] switch-on-port-available: check and change default sink or source

2017-05-02 Thread Tanu Kaskinen
On Tue, 2017-05-02 at 08:55 +0800, Hui Wang wrote: > On 04/29/2017 09:04 PM, Tanu Kaskinen wrote: > > On Fri, 2017-04-28 at 12:21 +0800, Hui Wang wrote: > > > Hello Tanu, > > > > > > Could you please take a look at this patch, you are the maintainer a

Re: [pulseaudio-discuss] [PATCH] echo-cancel: Avoid segfaults due to invalid master sink or source

2017-05-01 Thread Tanu Kaskinen
On Mon, 2017-04-24 at 19:33 +0200, Georg Chini wrote: > There are several places in module-echo-cancel where a segfault is > possible when the master sink or source is invalid. I don't think the rewind, volume and mute callbacks are ever called during stream moves, at least with the current code

Re: [pulseaudio-discuss] [PATCH] switch-on-port-available: check and change default sink or source

2017-04-29 Thread Tanu Kaskinen
On Sat, 2017-04-29 at 15:34 +0200, Georg Chini wrote: > On 29.04.2017 15:04, Tanu Kaskinen wrote: > > On Fri, 2017-04-28 at 12:21 +0800, Hui Wang wrote: > > > Hello Tanu, > > > > > > Could you please take a look at this patch, you are the maintainer a

Re: [pulseaudio-discuss] Can pulsaudio client API become a crossplatform standard ?

2017-04-29 Thread Tanu Kaskinen
On Wed, 2017-04-26 at 16:56 +0200, Enrico Weigelt, metux IT consult wrote: > On 24.04.2017 20:04, Tanu Kaskinen wrote: > > > "Let PA sit ontop of that", with "that" referring to a bunch of > > headers, doesn't make sense to me. I understand your proposal so

Re: [pulseaudio-discuss] [PATCH] switch-on-port-available: check and change default sink or source

2017-04-29 Thread Tanu Kaskinen
On Fri, 2017-04-28 at 12:21 +0800, Hui Wang wrote: > Hello Tanu, > > Could you please take a look at this patch, you are the maintainer and > recently contributed couple of commits to > module-switch-on-port-available.c. :-) Well, I'm trying to concentrate on preparing for the release, so I

Re: [pulseaudio-discuss] [PATCH 3/3] volume: Fix overflow in percent calculation of pa_*volume_snprint*()

2017-04-29 Thread Tanu Kaskinen
On Fri, 2017-04-28 at 11:13 +0200, Georg Chini wrote: > The percent calculation could overflow in the pa_*volume_snprint*() functions. > For large volumes, volume * 100 can exceed UINT32_MAX. > > This patch adds appropriate type casts. > --- > src/pulse/volume.c | 6 +++--- > 1 file changed, 3

Re: [pulseaudio-discuss] [PATCH 2/3] volume: Print a warning when volume is clipped in pa_sw_volume_multiply/divide()

2017-04-29 Thread Tanu Kaskinen
On Fri, 2017-04-28 at 11:13 +0200, Georg Chini wrote: > When the volume exceeds PA_VOLUME_MAX in pa_sw_volume_multiply() or > pa_sw_volume_divide(), volume settings are insanely high and the > user should be notified about it. > > This patch adds volume clamping to pa_sw_volume_divide() and

Re: [pulseaudio-discuss] [PATCH 1/3] source/sink: Fix wrong calculation of thread_info.current_hw_volume

2017-04-29 Thread Tanu Kaskinen
On Fri, 2017-04-28 at 11:13 +0200, Georg Chini wrote: > In pa_{source,sink}_new() and pa_{source,sink}_put() the current hardware > volume was miscalculated: > > hw volume (dB) = real volume (dB) + soft volume (dB) > was used instead of > hw volume (dB) = real volume (dB) - soft volume (dB) > >

Re: [pulseaudio-discuss] Freezing master, release notes, blocker bugs

2017-04-27 Thread Tanu Kaskinen
On Thu, 2017-04-27 at 14:12 +0200, Georg Chini wrote: > On 24.04.2017 15:58, Tanu Kaskinen wrote: > > On Sat, 2017-04-22 at 20:37 +0200, Georg Chini wrote: > > > On 21.04.2017 15:32, Tanu Kaskinen wrote: > > > > Hi all, > > > > > > > > It's

Re: [pulseaudio-discuss] Can pulsaudio client API become a crossplatform standard ?

2017-04-24 Thread Tanu Kaskinen
On Thu, 2017-04-20 at 19:45 +0200, Enrico Weigelt, metux IT consult wrote: > On 17.04.2017 19:40, Tanu Kaskinen wrote: > > > As you're planning to create yet another cross-platform audio > > abstraction API, > > No, no, I dont wanna create yet another one. I'm just tryin

[pulseaudio-discuss] [PATCH] alsa: don't assume that hw:x is an analog output

2017-04-24 Thread Tanu Kaskinen
Previously, if front:x didn't work, we would try to use hw:x for analog stereo output. There's no guarantee that hw:x is an analog output, however. For example, the Intel HDMI LPE driver uses hw:x for HDMI output, and PulseAudio incorrectly created analog profiles for that card, because front:x

Re: [pulseaudio-discuss] Freezing master, release notes, blocker bugs

2017-04-24 Thread Tanu Kaskinen
On Sat, 2017-04-22 at 20:37 +0200, Georg Chini wrote: > On 21.04.2017 15:32, Tanu Kaskinen wrote: > > Hi all, > > > > It's been three months since the last release, which means that it's > > time to freeze the master branch in preparation for the next release. &g

Re: [pulseaudio-discuss] [PATCH] virtual sources and sinks: Fix possible segfault

2017-04-24 Thread Tanu Kaskinen
On Sun, 2017-04-23 at 20:31 +0200, Georg Chini wrote: > Several virtual sources and sinks apart from module-echo-cancel also query > the master > sink or source to estimate the current latency. Those modules might > potentially show > the bug that is described for module-echo-cancel in bug

Re: [pulseaudio-discuss] [PATCH] i18n: Update the Korean translation

2017-04-24 Thread Tanu Kaskinen
On Sun, 2017-04-23 at 02:29 +0900, KimJeongYeon wrote: > Translate filter modules and fixed wrong c-format. > > Signed-off-by: KimJeongYeon > --- > po/ko.po | 416 > --- > 1 file changed, 158 insertions(+),

Re: [pulseaudio-discuss] [PATCH] echo-cancel: Fix segfault during profile switch

2017-04-23 Thread Tanu Kaskinen
On Sun, 2017-04-23 at 18:48 +0200, Georg Chini wrote: > When module-echo-cancel is loaded and there is only one sound card, then > during a > profile switch, all sinks and sources can become temporarily unavailable. If > module-always sink is loaded, it will load a null-sink in that situation. If

Re: [pulseaudio-discuss] [PATCH] bluez5-util: Fix segfault during shutdown of daemon

2017-04-21 Thread Tanu Kaskinen
On Sun, 2017-04-16 at 13:27 +0200, Georg Chini wrote: > If a HFP audio gateway was connected via the ofono backend, pulse would > segfault during shutdown of the daemon. pa_bluetooth_discovery_unref() > removed the devices before the ofono backend was freed. Because the > ofono backend keeps its

[pulseaudio-discuss] Freezing master, release notes, blocker bugs

2017-04-21 Thread Tanu Kaskinen
Hi all, It's been three months since the last release, which means that it's time to freeze the master branch in preparation for the next release. Only release blocker bug fixes and translation updates should be pushed to master. Other patches should go to the "next" branch. If you think

Re: [pulseaudio-discuss] Can pulsaudio client API become a crossplatform standard ?

2017-04-17 Thread Tanu Kaskinen
On Sun, 2017-04-16 at 22:33 +0200, Enrico Weigelt, metux IT consult wrote: > On 15.04.2017 20:39, Tanu Kaskinen wrote: > > > The feature set of libpulse will necessarily track the features of the > > pulseaudio daemon. Is the idea to take a subset of the libpulse API and > &g

Re: [pulseaudio-discuss] [PATCH 2/2] source/sink: Allow pa_{source, sink}_get_latency_within_thread() to return negative values

2017-04-17 Thread Tanu Kaskinen
On Fri, 2017-04-14 at 17:02 +0200, Georg Chini wrote: > The reported latency of source or sink is based on measured initial > conditions. > If the conditions contain an error, the estimated latency values may become > negative. > This does not indicate that the latency is indeed negative but can

Re: [pulseaudio-discuss] [PATCH 1/2] source/sink: Don't let pa_{sink, source}_get_latency_within_thread() return -1 if process_msg() fails

2017-04-16 Thread Tanu Kaskinen
On Fri, 2017-04-14 at 17:02 +0200, Georg Chini wrote: > None of the callers checks the return value anyway. Return the offset only > if message processing fails. This is in preparation for the next patch. > --- > src/pulsecore/sink.c | 3 +-- > src/pulsecore/source.c | 3 +-- > 2 files changed,

Re: [pulseaudio-discuss] Can pulsaudio client API become a crossplatform standard ?

2017-04-15 Thread Tanu Kaskinen
On Sat, 2017-04-15 at 15:28 +0200, Enrico Weigelt, metux IT consult wrote: > Hi folks, > > > I'm just wondering whether something like PA's client API could > ever become a real crossplatform standard API. > > The problem behind is there're tons of audio APIs - most of them > doing more or less

[pulseaudio-discuss] Should "sink_master" arguments be renamed to "master_sink"?

2017-04-14 Thread Tanu Kaskinen
With the recent patches, we seem to be standardising on "sink_master" and "source_master" as the modarg names for specifying the master device. To me "master_sink" and "master_source" would look better, however. I won't explain why, because if my preferred modarg naming scheme isn't obviously

[pulseaudio-discuss] [PATCH] ladspa-sink, virtual-surround-sink: fix master sink argument handling

2017-04-14 Thread Tanu Kaskinen
The old code worked incorrectly in several situations. For example, trying to use the "master" argument wouldn't work, because if "sink_master" wasn't specified, pa_namereg_get() would pick the default sink as the master sink. --- src/modules/module-ladspa-sink.c | 19

Re: [pulseaudio-discuss] [PATCH] scripts: Add a pre-receive hook to catch invalid merge and WIP commits

2017-04-14 Thread Tanu Kaskinen
On Fri, 2017-04-07 at 14:09 +0530, Arun Raghavan wrote: > This should make sure we avoid merge commits from branches outside of PA > (we don't really have any, so this should avoid all merge commits). This > also catches "WIP" and such in the title to prevent accidental pushing > of those. > --- >

Re: [pulseaudio-discuss] Pulseaudio Sink and source allocator

2017-04-14 Thread Tanu Kaskinen
On Wed, 2017-04-12 at 10:21 +0530, ravikiran j wrote: > Hi all, > > > I need a some information regarding the pulseaudio, > > Which module of pulseaudio is going to set the Sink and Source in hfp > usage ? It's not clear from your question what "the sink and source" refers to. If you mean

Re: [pulseaudio-discuss] [PATCH 2/2] sample.c: Allow module-loopback to exceed PA_RATE_MAX

2017-04-14 Thread Tanu Kaskinen
On Tue, 2017-04-11 at 22:43 +0200, Georg Chini wrote: > The rate set by module loopback may exceed PA_RATE_MAX by 1%, therefore > allow rates higher than PA_RATE_MAX in pa_sample_rate_valid(). > --- > src/pulse/sample.c | 5 - > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git

Re: [pulseaudio-discuss] [PATCH 1/2] loopback: Implement underrun protection

2017-04-14 Thread Tanu Kaskinen
On Tue, 2017-04-11 at 22:43 +0200, Georg Chini wrote: > +case LOOPBACK_MESSAGE_UNDERRUN: > + > +u->underrun_counter++; I'd still like to have a log message about the counter increment, even though it's possible to deduce the value from other log messages. Otherwise looks good

Re: [pulseaudio-discuss] [PATCH] context: Check for errno == ECHILD instead of ESRCH after failed waitpid().

2017-04-11 Thread Tanu Kaskinen
On Sun, 2017-04-09 at 00:15 +0200, Imre Vadász wrote: > When the specified pid no longer exists as a child of the process (since > it was already reaped by the SIGCHLD handler), errno is set to ECHILD, not > to ESRCH. > --- > src/pulse/context.c | 2 +- > 1 file changed, 1 insertion(+), 1

Re: [pulseaudio-discuss] [PATCH 2/2] loopback: Reset sink input rate when source or sink changes

2017-04-11 Thread Tanu Kaskinen
On Mon, 2017-04-10 at 22:13 +0200, Georg Chini wrote: > If source or sink are changed, the current sink input rate may be different > from the default rate. Switch sink input rate back to default to avoid the > influence of the previous combination of source and sink. > --- >

Re: [pulseaudio-discuss] [PATCH 1/2] sink-input: Allow sink_input_set_rate() to be called during a move

2017-04-11 Thread Tanu Kaskinen
On Mon, 2017-04-10 at 22:13 +0200, Georg Chini wrote: > During a move sink_input->sink is not valid. This leads to a crash when > sink_input_set_rate() is called from the moving() callback. This patch > fixes the problem. > --- > src/pulsecore/sink-input.c | 7 ++- > 1 file changed, 6

Re: [pulseaudio-discuss] [PATCH 2/2, v2] loopback: Reset sink input rate when source or sink changes

2017-04-10 Thread Tanu Kaskinen
On Mon, 2017-04-10 at 16:27 +0200, Georg Chini wrote: > On 10.04.2017 16:23, Tanu Kaskinen wrote: > > On Sat, 2017-04-08 at 20:34 +0200, Georg Chini wrote: > > > If source or sink are changed, the current sink input rate may be > > > different > > > from the

Re: [pulseaudio-discuss] [PATCH 2/2, v2] loopback: Reset sink input rate when source or sink changes

2017-04-10 Thread Tanu Kaskinen
On Sat, 2017-04-08 at 20:34 +0200, Georg Chini wrote: > If source or sink are changed, the current sink input rate may be different > from the default rate. Switch sink input rate back to default to avoid the > influence of the previous combination of source and sink. > --- >

Re: [pulseaudio-discuss] [PATCH 1/2, v2] loopback: Add hooks to track port latency offsets

2017-04-10 Thread Tanu Kaskinen
On Sat, 2017-04-08 at 20:34 +0200, Georg Chini wrote: > The previous patch assumed constant port latency offsets. The offsets can > however be changed by the user, therefore these changes need to be tracked > as well. This patch adds the necessary hooks. > > Also the print_msg argument was

Re: [pulseaudio-discuss] [PATCH 1/2] loopback: Add hooks to track port latency offsets

2017-04-07 Thread Tanu Kaskinen
On Fri, 2017-04-07 at 09:37 +0200, Georg Chini wrote: > The previous patch assumed constant port latency offsets. The offsets can > however be changed by the user, therefore these changes need to be tracked > as well. This patch adds the necessary hooks. > --- > src/modules/module-loopback.c | 38

Re: [pulseaudio-discuss] [PATCH] scripts: Add a pre-receive hook to catch invalid merge and WIP commits

2017-04-07 Thread Tanu Kaskinen
On Fri, 2017-04-07 at 12:34 +0530, Arun Raghavan wrote: > On Fri, 7 Apr 2017, at 12:33 PM, Arun Raghavan wrote: > > This should make sure we avoid merge commits from branches outside of PA > > (we don't really have any, so this should avoid all merge commits). This > > also catches "WIP" and such

[pulseaudio-discuss] [PATCH] protocol-native: log who changes card profiles

2017-04-04 Thread Tanu Kaskinen
Some volume control applications, including gnome-control-center[1], Budgie Volume Control[2] and possibly something in xfce4 too[3], sometimes do unwanted card profile changes. This patch makes it possible to see from the log which application requested a profile change, which makes it easier to

Re: [pulseaudio-discuss] [PATCH] loopback: Calculate and track minimum possible latency

2017-04-02 Thread Tanu Kaskinen
On Wed, 2017-03-29 at 10:36 +0200, Georg Chini wrote: > With the current code, the user can request any end-to-end latency. Because > there > is no protection against underruns, setting the latency too small will result > in > repetitive underruns. > > This patch tries to mitigate the problem

Re: [pulseaudio-discuss] [PATCH] Added fixed port 5004 option for rtp sender

2017-04-02 Thread Tanu Kaskinen
it > > > > Cheers > > Nico > > > > On 02/19/2017 12:19 PM, Tanu Kaskinen wrote: > > > On Sat, 2017-02-11 at 11:55 +0100, archli...@nicohood.de wrote: > > > > From: NicoHood <nicoh...@users.noreply.github.com> > > > > >

Re: [pulseaudio-discuss] pulseaudio dies randomly when not in 2.0 output

2017-03-30 Thread Tanu Kaskinen
On Wed, 2017-03-29 at 10:32 +1300, John Nunnington wrote: > I'm running Ubuntu 16.10 and 16.04, and I get repeatable failures in > Spotify that are caused by the pulseaudio daemon dying. > > I don't get this issue when my sound is configured in analog-stereo through > the sound card, or when

Re: [pulseaudio-discuss] [PATCH] loopback: Do not skip audio at startup

2017-03-30 Thread Tanu Kaskinen
On Wed, 2017-03-29 at 07:27 +0200, Georg Chini wrote: > The code is now waiting for source and sink to start up, so the skip > logic is not necessary anymore. > --- > src/modules/module-loopback.c | 37 ++--- > 1 file changed, 2 insertions(+), 35 deletions(-)

Re: [pulseaudio-discuss] [PATCH v4 0/2] A couple of minor RAOP fixes

2017-03-30 Thread Tanu Kaskinen
On Wed, 2017-03-29 at 21:08 +0200, Georg Chini wrote: > On 07.11.2016 16:12, Tanu Kaskinen wrote: > > Tanu Kaskinen (2): > >raop: add error handling to rsa_encrypt() > >raop: fix typo: modules -> modulus > > > >

Re: [pulseaudio-discuss] [alsa-devel] pulseaudio fails to start with kernel 4.11, caused by new snd_hdmi_lpe_audio module)

2017-03-29 Thread Tanu Kaskinen
On Wed, 2017-03-29 at 15:26 +0200, Takashi Iwai wrote: > On Wed, 29 Mar 2017 15:14:19 +0200, > Tanu Kaskinen wrote: > > > > On Wed, 2017-03-29 at 15:06 +0200, Takashi Iwai wrote: > > > On Wed, 29 Mar 2017 14:59:45 +0200, > > > Tanu Kaskinen wrote: > >

Re: [pulseaudio-discuss] [alsa-devel] pulseaudio fails to start with kernel 4.11, caused by new snd_hdmi_lpe_audio module)

2017-03-29 Thread Tanu Kaskinen
On Wed, 2017-03-29 at 16:14 +0300, Tanu Kaskinen wrote: > On Wed, 2017-03-29 at 15:06 +0200, Takashi Iwai wrote: > > On Wed, 29 Mar 2017 14:59:45 +0200, > > Tanu Kaskinen wrote: > > > > > > On Wed, 2017-03-29 at 07:21 +0200, Takashi Iwai wrote: > > >

Re: [pulseaudio-discuss] [alsa-devel] pulseaudio fails to start with kernel 4.11, caused by new snd_hdmi_lpe_audio module)

2017-03-29 Thread Tanu Kaskinen
On Wed, 2017-03-29 at 15:06 +0200, Takashi Iwai wrote: > On Wed, 29 Mar 2017 14:59:45 +0200, > Tanu Kaskinen wrote: > > > > On Wed, 2017-03-29 at 07:21 +0200, Takashi Iwai wrote: > > > On Tue, 28 Mar 2017 22:10:28 +0200, > > > Tanu Kaskinen wrote: > >

Re: [pulseaudio-discuss] [alsa-devel] pulseaudio fails to start with kernel 4.11, caused by new snd_hdmi_lpe_audio module)

2017-03-29 Thread Tanu Kaskinen
On Wed, 2017-03-29 at 07:21 +0200, Takashi Iwai wrote: > On Tue, 28 Mar 2017 22:10:28 +0200, > Tanu Kaskinen wrote: > > > > On Fri, 2017-03-24 at 23:01 +0100, Hans de Goede wrote: > > > Hi, > > > > > > On 03/24/2017 07:18 PM, Tanu Kaskinen wro

Re: [pulseaudio-discuss] [alsa-devel] pulseaudio fails to start with kernel 4.11, caused by new snd_hdmi_lpe_audio module)

2017-03-28 Thread Tanu Kaskinen
On Fri, 2017-03-24 at 23:01 +0100, Hans de Goede wrote: > Hi, > > On 03/24/2017 07:18 PM, Tanu Kaskinen wrote: > > On Thu, 2017-03-23 at 09:57 +0100, Takashi Iwai wrote: > > > On Thu, 23 Mar 2017 04:16:52 +0100, > > > Pierre-Louis Bossart wrote: > > > &g

Re: [pulseaudio-discuss] [PATCH 2/2] loopback: Fix corking logic of module-loopback

2017-03-28 Thread Tanu Kaskinen
On Sun, 2017-03-26 at 21:40 +0200, Georg Chini wrote: > When moving from a user suspended source or sink to an idle suspended source > or sink > the sink input or source output would not be uncorked because we did not > check for > the suspend cause. > > Uncorking also would not be possible in

Re: [pulseaudio-discuss] [PATCH 1/2] sink-input/source-output: Don't crash when cork() is called without valid sink or source

2017-03-28 Thread Tanu Kaskinen
On Sun, 2017-03-26 at 21:40 +0200, Georg Chini wrote: > If pa_sink_input_cork() or pa_source_output_cork() were called without a sink > or source attached, the calls would crash pulseaudio. > > This patch fixes the problem, so that a source output or sink input can still > be corked or uncorked

Re: [pulseaudio-discuss] [PATCH v2] bluez5-util: fix profile waiting logic

2017-03-28 Thread Tanu Kaskinen
On Mon, 2017-03-27 at 21:20 +0200, Georg Chini wrote: > On 16.03.2017 22:48, Tanu Kaskinen wrote: > > There were two bugs in the old logic. The first one: > > > > If a device has two profiles, the old code would start the wait timer > > when the first profile connects,

Re: [pulseaudio-discuss] [alsa-devel] pulseaudio fails to start with kernel 4.11, caused by new snd_hdmi_lpe_audio module)

2017-03-24 Thread Tanu Kaskinen
On Thu, 2017-03-23 at 09:57 +0100, Takashi Iwai wrote: > On Thu, 23 Mar 2017 04:16:52 +0100, > Pierre-Louis Bossart wrote: > > > > On 3/21/17 2:56 AM, Hans de Goede wrote: > > > I: [pulseaudio] alsa-sink.c: Using 1.0 fragments of size 352832 bytes > > > (2000.18ms), buffer size is 352832 bytes

Re: [pulseaudio-discuss] [PATCH v9] loopback: Correct corking logic during sink or source move

2017-03-23 Thread Tanu Kaskinen
On Mon, 2017-03-20 at 21:15 +0100, Georg Chini wrote: > On 17.03.2017 21:50, Tanu Kaskinen wrote: > > On Mon, 2017-02-27 at 18:17 +0100, Georg Chini wrote: > > > The corking logic of module-loopback was incorrectly implemented. If you > > > suspended > > &

Re: [pulseaudio-discuss] Changing ladspa control values via pulseaudio API

2017-03-23 Thread Tanu Kaskinen
On Wed, 2017-03-22 at 14:55 +0100, Zygmunt Ptak wrote: > Hi, > > I can't find anything helpfull to change module params via pulseaudio C API. > I see property: AlgorithmParameters exposed on dbus. > >

Re: [pulseaudio-discuss] [PATCH v9] loopback: Correct corking logic during sink or source move

2017-03-17 Thread Tanu Kaskinen
On Fri, 2017-03-17 at 22:50 +0200, Tanu Kaskinen wrote: > On Mon, 2017-02-27 at 18:17 +0100, Georg Chini wrote: > > The corking logic of module-loopback was incorrectly implemented. If you > > suspended > > the source, the sink input would be corked. When then the sink was

Re: [pulseaudio-discuss] [PATCH v9] loopback: Correct corking logic during sink or source move

2017-03-17 Thread Tanu Kaskinen
On Mon, 2017-02-27 at 18:17 +0100, Georg Chini wrote: > The corking logic of module-loopback was incorrectly implemented. If you > suspended > the source, the sink input would be corked. When then the sink was suspended > because > of being idle, the source output was also corked. If you moved

Re: [pulseaudio-discuss] [PATCH] echo-cancel: Fix assert with webrtc's built-in drift compensation

2017-03-17 Thread Tanu Kaskinen
On Fri, 2017-03-17 at 07:59 +0530, Arun Raghavan wrote: > The webrtc canceller seems to have changed to require that the > set_stream_drift_samples() method be called before every call of > ProcessStream(). > > So we now call ec->set_stream_drift_samples() before calling > ec->record() by: > >

[pulseaudio-discuss] [PATCH v2] bluez5-util: fix profile waiting logic

2017-03-16 Thread Tanu Kaskinen
There were two bugs in the old logic. The first one: If a device has two profiles, the old code would start the wait timer when the first profile connects, but when the second profile connects, the timer would not get stopped and the CONNECTION_CHANGED hook would not get fired, because the code

Re: [pulseaudio-discuss] [PATCH] bluetooth: fix profile waiting logic

2017-03-16 Thread Tanu Kaskinen
On Mon, 2016-08-22 at 17:53 +0300, Tanu Kaskinen wrote: > If a device has two profiles, the old code would start the wait timer > when the first profile connects, but when the second profile connects, > the timer would not get stopped and the CONNECTION_CHANGED hook would > not get fi

Re: [pulseaudio-discuss] ifdef foo

2017-03-15 Thread Tanu Kaskinen
On Wed, 2017-03-15 at 22:35 +0100, Timothy Hobbs wrote: > I thought that was what it was. I was just confused by the use of "foo", > which is usually used when prototyping something... Is it convention > just for PA or is it a wider C convention? I haven't seen it outside PulseAudio. -- Tanu

Re: [pulseaudio-discuss] ifdef foo

2017-03-15 Thread Tanu Kaskinen
On Wed, 2017-03-15 at 20:00 +0100, Timothy Hobbs wrote: > I noticed when looking through the source to pulseaudio 5.0 as aquired > from debain that in file: > > src/module-simple-protocol-unix-symdef.h > > There are the following ifdef foo lines: > > 0 #ifndef

[pulseaudio-discuss] [PATCH] bluetooth-policy: retain backwards compatibility

2017-03-15 Thread Tanu Kaskinen
The auto_switch argument was added in PulseAudio 10.0. In that release the argument type was boolean. The type was changed to integer in commit 3397127f00. This patch adds backwards compatibility so that old configuration files won't break when upgrading PulseAudio to 11.0. ---

Re: [pulseaudio-discuss] [PATCH v4] bluez5-util: Disconnect AG devices when ofono is started and headset=auto

2017-03-14 Thread Tanu Kaskinen
On Tue, 2017-03-14 at 07:34 +0100, Georg Chini wrote: > With headset=auto it is possible that AG devices are connected and handled > via the native backend when ofono is started. Because the HS role will then > be disabled in the native backend, AG devices must be disconnected and any > future

Re: [pulseaudio-discuss] [PATCH v3 1/2] refactor default sink/source handling

2017-03-13 Thread Tanu Kaskinen
On Mon, 2017-03-13 at 20:34 +0100, Georg Chini wrote: > One more thing before you push your patch: In source_put_cb() > and sink_put_cb() you do not use the return value of > create_dbus_object_for_*(). There should be a (void) before the > calls to avoid warnings about the unused return value.

Re: [pulseaudio-discuss] [PATCH v3 1/2] refactor default sink/source handling

2017-03-13 Thread Tanu Kaskinen
On Mon, 2017-03-13 at 18:45 +0100, Georg Chini wrote: > On 13.03.2017 17:45, Tanu Kaskinen wrote: > > On Mon, 2017-03-13 at 07:57 +0100, Georg Chini wrote: > > > Yes, it is no regression. But anyway, while you are improving it, I > > > would use a string for the user

Re: [pulseaudio-discuss] [PATCH v3 1/2] refactor default sink/source handling

2017-03-13 Thread Tanu Kaskinen
On Mon, 2017-03-13 at 07:57 +0100, Georg Chini wrote: > On 12.03.2017 23:07, Tanu Kaskinen wrote: > > On Sun, 2017-03-12 at 16:45 +0100, Georg Chini wrote: > > > On 16.02.2017 11:09, Tanu Kaskinen wrote: > > > > > > "Refactor" is the wrong word, yo

Re: [pulseaudio-discuss] [PATCH 2/2, v2] backend-native: send DBus signal on headset button press

2017-03-13 Thread Tanu Kaskinen
On Mon, 2017-03-13 at 09:36 +0100, Georg Chini wrote: > On 12.03.2017 22:46, Tanu Kaskinen wrote: > > On Sat, 2017-03-11 at 20:27 +0100, Georg Chini wrote: > > > The reason for this patch was that I wrote an application to handle > > > mobile phones and it was a nic

Re: [pulseaudio-discuss] [PATCH v3] bluez5-util: Disconnect AG devices when ofono is started and headset=auto

2017-03-13 Thread Tanu Kaskinen
On Mon, 2017-03-13 at 09:48 +0100, Georg Chini wrote: > With headset=auto it is possible that AG devices are connected and handled > via the native backend when ofono is started. Because the HS role will then > be disabled in the native backend, AG devices must be disconnected and any > future

Re: [pulseaudio-discuss] [PATCH] echo-cancel: Fix assert with webrtc's built-in drift compensation

2017-03-13 Thread Tanu Kaskinen
On Mon, 2017-03-13 at 16:07 +0530, Arun Raghavan wrote: > The webrtc canceller requires that the set_stream_drift_samples() method > be called before every call of ProcessStream(). We do kind of leak this > into the generic bits of module-echo-cancel, but this should not be > harmful in the

Re: [pulseaudio-discuss] [PATCH v3 1/2] refactor default sink/source handling

2017-03-12 Thread Tanu Kaskinen
On Sun, 2017-03-12 at 16:45 +0100, Georg Chini wrote: > On 16.02.2017 11:09, Tanu Kaskinen wrote: > > "Refactor" is the wrong word, you are changing the logic. > Maybe redesign is a better verb. Indeed. I think I'll change it to "improve" ("redesign

Re: [pulseaudio-discuss] [PATCH 2/2, v2] backend-native: send DBus signal on headset button press

2017-03-12 Thread Tanu Kaskinen
On Sat, 2017-03-11 at 20:27 +0100, Georg Chini wrote: > > I tried searching the net, and it looks like ButtonPress is not a > > documented signal. Did you invent the signal yourself? If it's your > > invention, I don't think the org.bluez.Headset interface should be > > used. The org.bluez

Re: [pulseaudio-discuss] [PATCH 2/2, v2] backend-native: send DBus signal on headset button press

2017-03-11 Thread Tanu Kaskinen
On Fri, 2017-03-10 at 21:22 +0100, Georg Chini wrote: > Currently pressing the headset button is ignored. This patch sends a DBUS > signal that can be caught by applications to trigger events like picking > up or ending a phone call. > --- > > No changes in v2 > >

Re: [pulseaudio-discuss] [PATCH 1/2, v3] bluetooth: use native and ofono backends in parallel with headset=auto

2017-03-11 Thread Tanu Kaskinen
On Sat, 2017-03-11 at 13:30 +0100, Georg Chini wrote: > This patch changes the behavior of the headset=auto switch for > module-bluez5-discover. > With headset=auto now both backends will be active at the same time for the > AG role and > the switching between the backends is only done for the

Re: [pulseaudio-discuss] Fwd: pa_source_info question

2017-03-11 Thread Tanu Kaskinen
On Fri, 2017-03-10 at 21:38 -0300, Alexandre Vicenzi wrote: > Hi, > > I'm calling pa_context_get_source_info_list to get the complete source > list and I would like to know if pa_source_info is the current default > source. > > I know that I could call pulse_get_server_info to get the default

Re: [pulseaudio-discuss] [PATCH 2/3] bluetooth: use native and ofono backends in parallel with headset=auto

2017-03-11 Thread Tanu Kaskinen
On Fri, 2017-03-10 at 21:24 +0100, Georg Chini wrote: > On 10.03.2017 19:21, Tanu Kaskinen wrote: > > On Fri, 2017-03-10 at 08:13 +0100, Georg Chini wrote: > > > On 10.03.2017 00:33, Tanu Kaskinen wrote: > > > > On Thu, 2017-03-02 at 17:04 +0100, Georg Chini wrote: &

Re: [pulseaudio-discuss] [PATCH 2/3] bluetooth: use native and ofono backends in parallel with headset=auto

2017-03-10 Thread Tanu Kaskinen
On Fri, 2017-03-10 at 10:19 +0100, Georg Chini wrote: > On 10.03.2017 08:13, Georg Chini wrote: > > On 10.03.2017 00:33, Tanu Kaskinen wrote: > > > On Thu, 2017-03-02 at 17:04 +0100, Georg Chini wrote: > > > > This patch changes the behavior of the headset=auto swi

Re: [pulseaudio-discuss] [PATCH 2/3] bluetooth: use native and ofono backends in parallel with headset=auto

2017-03-10 Thread Tanu Kaskinen
On Fri, 2017-03-10 at 08:13 +0100, Georg Chini wrote: > On 10.03.2017 00:33, Tanu Kaskinen wrote: > > On Thu, 2017-03-02 at 17:04 +0100, Georg Chini wrote: > > > -pa_bluetooth_backend *pa_bluetooth_native_backend_new(pa_core *c, > > > pa_bluetooth_discovery *y) {

Re: [pulseaudio-discuss] [PATCH 2/3] bluetooth: use native and ofono backends in parallel with headset=auto

2017-03-09 Thread Tanu Kaskinen
On Thu, 2017-03-02 at 17:04 +0100, Georg Chini wrote: > This patch changes the behavior of the headset=auto switch for > module-bluez5-discover. > With headset=auto now both backends will be active at the same time for the > AG role and > the switching between the backends is only done for the

Re: [pulseaudio-discuss] [PATCH v2 1/2] Fix wrong input device in module-waveout

2017-03-07 Thread Tanu Kaskinen
On Wed, 2017-03-01 at 19:29 +0100, Moritz Bruder wrote: > Both input and output device were chosen with the same device number. > This is problematic as those numbers don't have to correspond. > Additionally the input device was named after the output device. This > commit adresses both issues by

Re: [pulseaudio-discuss] [PATCH] iochannel: don't use variable length array in union

2017-03-07 Thread Tanu Kaskinen
On Tue, 2017-03-07 at 13:42 +0100, Georg Chini wrote: > On 04.02.2017 13:19, Tanu Kaskinen wrote: > > Clang didn't like the variable length array: > > > > pulsecore/iochannel.c:358:17: error: fields must have a constant size: > > 'variable length array in stru

Re: [pulseaudio-discuss] [PATCH 1/3 v2] backend-native: add support for the HSP Headset role

2017-03-07 Thread Tanu Kaskinen
On Tue, 2017-03-07 at 13:44 +0100, Georg Chini wrote: > From: Wim Taymans > > > This is a rebase of Wim Taymans patch to support the HSP headset role that has > somehow been forgotten. Original patch can be found at >

[pulseaudio-discuss] New reviewer: Georg Chini

2017-03-07 Thread Tanu Kaskinen
Hi all, A small (or maybe big? or mid-sized?) announcement: Georg Chini kindly offered to help with reviewing patches, and we granted him commit rights too. This should reduce our problems with keeping up with the incoming patches. -- Tanu https://www.patreon.com/tanuk

Re: [pulseaudio-discuss] [PATCH v2 01/10] build: Add Coverity scan model

2017-03-07 Thread Tanu Kaskinen
On Tue, 2017-03-07 at 10:02 +0100, Peter Meerwald-Stadler wrote: > > Ack, go ahead and push this. Do we need to modify our Coverity project > > settings? > > pushed, no need to modify server side Coverity settings You seemed to push the whole patch set without responding to the issues that

Re: [pulseaudio-discuss] [PATCH 1/3] backend-native: add support for the HSP Headset role

2017-03-06 Thread Tanu Kaskinen
On Thu, 2017-03-02 at 17:04 +0100, Georg Chini wrote: > #define HSP_AG_PROFILE "/Profile/HSPAGProfile" > +#define HSP_HS_PROFILE "/Profile/HSPHSProfile" > + > +/* RFCOMM channel for HSP headset role */ > +#define HSP_HS_DEFAULT_CHANNEL 3 The comment still doesn't explain why 3 is a good

Re: [pulseaudio-discuss] Control ladspa plugin using libpulse instead of the dbus interface

2017-03-05 Thread Tanu Kaskinen
On Sat, 2017-03-04 at 23:46 -0300, wellington wallace wrote: > Hello, > > I am able to dynamically change ladspa plugin controls using pulseaudio's > dbus interface. But as this api is not recommended I would like to do > the same using libpulse. I have read the documentation but I could not find

Re: [pulseaudio-discuss] [PATCH] Fix wrong input device in module-waveout

2017-03-01 Thread Tanu Kaskinen
On Wed, 2017-03-01 at 15:54 +0100, Moritz Bruder wrote: > Am 28.02.2017 um 14:40 schrieb Tanu Kaskinen: > > On Thu, 2017-02-23 at 17:38 +0100, Moritz Bruder wrote: > > > Both input and output device were chosen with the same device number. > > > This is problematic

Re: [pulseaudio-discuss] [PATCH v9] loopback: Initialize latency at startup and during source/sink changes

2017-02-28 Thread Tanu Kaskinen
On Tue, 2017-02-28 at 16:30 +0100, Georg Chini wrote: > On 28.02.2017 16:11, Tanu Kaskinen wrote: > > On Mon, 2017-02-27 at 13:54 +0100, Georg Chini wrote: > > > case SINK_INPUT_MESSAGE_POST: > > > > > > -pa_sink_i

Re: [pulseaudio-discuss] [PATCH v9] loopback: Initialize latency at startup and during source/sink changes

2017-02-28 Thread Tanu Kaskinen
On Mon, 2017-02-27 at 13:54 +0100, Georg Chini wrote: > case SINK_INPUT_MESSAGE_POST: > > -pa_sink_input_assert_io_context(u->sink_input); > +pa_memblockq_push_align(u->memblockq, chunk); > + > +/* If push has not been called yet, latency adjustments

Re: [pulseaudio-discuss] [PATCH] Fix wrong input device in module-waveout

2017-02-28 Thread Tanu Kaskinen
On Thu, 2017-02-23 at 17:38 +0100, Moritz Bruder wrote: > Both input and output device were chosen with the same device number. > This is problematic as those numbers don't have to correspond. > Additionally the input device was named after the output device. This > commit adresses both issues by

<    5   6   7   8   9   10   11   12   13   14   >