[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. --- src/modules/bluetoo

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 foomodulesimpleprotocolunixsy

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] [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

[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 fo

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: > > 1.

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 th

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] 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. > > https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/Developer/Clients/DBus/Ladspa

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] [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 (20

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] [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 wh

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 t

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] [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-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 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: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-30 Thread Tanu Kaskinen
On Wed, 2017-03-29 at 16:51 +0200, Takashi Iwai wrote: > On Wed, 29 Mar 2017 16:40:28 +0200, > Tanu Kaskinen wrote: > > > > On Wed, 2017-03-29 at 15:26 +0200, Takashi Iwai wrote: > > > On Wed, 29 Mar 2017 15:14:19 +0200, > > > Tanu Kaskinen wrote: > >

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] [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(-) Looks

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 outpu

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

2017-04-02 Thread Tanu Kaskinen
On Fri, 2017-03-31 at 10:14 +1300, John Nunnington wrote: > the process is killed. > > julie@silverstone:~$ LANG=C pulseaudio - --log-time=1 > > ~/pulseverbose.log>&1 > Killed This probably happens, because pulseaudio consumes more CPU time in a realtime thread than the kernel allows. To work

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 > > > > > >

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 by

[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 d

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

2017-04-06 Thread Tanu Kaskinen
On Mon, 2017-04-03 at 16:47 +0200, Georg Chini wrote: > +/* Called from main thread. > + * It has been a matter of discussion how to correctly calculate the minimum > + * latency that module-loopback can deliver with a given source and sink. > + * The calculation has been placed in a separate funct

Re: [pulseaudio-discuss] [PATCH] move streams when the default sink or source changes

2017-04-06 Thread Tanu Kaskinen
On Thu, 2017-04-06 at 11:52 +0200, Georg Chini wrote: > On 25.10.2016 15:02, Tanu Kaskinen wrote: > > This adds a new "use_default_sink" field to pa_sink_input. If > > use_default_sink is set, the stream will be automatically moved when the > > default sink changes.

Re: [pulseaudio-discuss] [PATCH] memblock: multiple references should make blocks read-only

2017-04-06 Thread Tanu Kaskinen
On Thu, 2017-04-06 at 20:02 +0200, Georg Chini wrote: > On 08.06.2016 20:18, Tanu Kaskinen wrote: > > The old code makes no sense to me. Why would multiple references mean > > that a previously read-only memblock is suddenly writable? I'm pretty > > sure that the origi

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 i

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 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 removed

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. > --- > src/modules/module-lo

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 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 insertio

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. > --- > src/modules/module-lo

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 deletion

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 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 a/

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 whic

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. > --- >

[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 +--

[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 bette

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

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] [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] 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

[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 somethin

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 ow

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] 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(+), 258 deletions(-) Thanks! Ap

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 100277

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.

[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 doe

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

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

2017-04-27 Thread Tanu Kaskinen
On Wed, 2017-04-26 at 14:19 +0530, Arun Raghavan wrote: > On Mon, 24 Apr 2017, at 08:36 PM, Tanu Kaskinen wrote: > > 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, > >

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&#

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) > > T

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 prints

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 in

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 don

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 proposa

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 and

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

2017-04-29 Thread Tanu Kaskinen
On Sat, 2017-04-29 at 17:42 +0200, Takashi Iwai wrote: > On Sat, 29 Apr 2017 14:45:41 +0200, > Arun Raghavan wrote: > > > > (looping in Takashi for his thoughts, since we'd discussed this a long > > time ago) > > > > On Fri, 28 Apr 2017, at 12:38 AM, Tanu

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 b

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 and

[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" th

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 bran

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 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 case the transport is playing

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-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 wrote: > > On Thu, 2017-05-04 at 12:58 +0300, Luiz Augusto von Dentz wrote: > > > From: Luiz Augusto von Dentz > > > > > >

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] 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 aec_method=webrtc

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 patch.

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

2017-05-07 Thread Tanu Kaskinen
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: > > > On Sat, 2017-05-06 at 20:06 +0200, Georg Chini wrote: > > > > On 06.05.2017 18:36, Tanu Kaskinen wrote: > > >

[pulseaudio-discuss] [PATCH] sink, source: update the default sink/source on port switches

2017-05-07 Thread Tanu Kaskinen
When sinks are compared during the default sink selection, the active port's availability is inspected. Therefore, the default sink should be updated when the active port changes, because the new port may have different availability status than the old port. For example, let's say that a laptop ha

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

2017-05-07 Thread Tanu Kaskinen
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 really meant seemed > > even more crazy. I forgot that module-switch-on-connect only moves > > streams if they are routed to

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-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 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 wrote: > > On Fri, 2017-05-05 at 16:41 +0300, Luiz Augusto von Dentz wrote: > > > Hi Tanu, > > > > > > On Thu, May 4, 2017 at

[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] echo-cancel: Avoid segfaults due to invalid master sink or source

2017-05-09 Thread Tanu Kaskinen
On Tue, 2017-05-09 at 16:59 +0200, Georg Chini wrote: > On 07.05.2017 13:23, Tanu Kaskinen wrote: > > On Sun, 2017-05-07 at 12:37 +0200, Georg Chini wrote: > > > Another similar point, while reading the code of > > > module-switch-on-connect, i > > > found a p

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

2017-05-11 Thread Tanu Kaskinen
On Mon, 2017-05-08 at 13:09 +0300, Luiz Augusto von Dentz wrote: > Hi Tanu, > > On Mon, May 8, 2017 at 11:53 AM, Tanu Kaskinen wrote: > > On Mon, 2017-05-08 at 11:26 +0300, Luiz Augusto von Dentz wrote: > > > Hi Tanu, > > > > > > On Sat, May 6, 2017 at

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

2017-05-11 Thread Tanu Kaskinen
On Wed, 2017-05-10 at 16:17 +0300, Luiz Augusto von Dentz wrote: > Another thing with 'off' > profile, at least with gnome settings when it is selected there is no > way to switch it back to either A2DP or HFP, I think it is probably > because it has no ports available. That's interesting. The por

Re: [pulseaudio-discuss] [PATCH] sink/source: Don't update default sink/source before calling PA_CORE_HOOK_{SINK, SOURCE}_PUT

2017-05-11 Thread Tanu Kaskinen
On Wed, 2017-05-10 at 12:05 +0200, Georg Chini wrote: > In sink_put() and source_put(), pa_core_update_default_{sink,source}() was > called > before the PA_CORE_HOOK_{SINK,SOURCE}_PUT hook. Therefore > module-switch-on-connect > could not correctly determine the old default sink/source if no user

Re: [pulseaudio-discuss] [PATCH] sink, source: update the default sink/source on port switches

2017-05-13 Thread Tanu Kaskinen
On Thu, 2017-05-11 at 17:18 +0200, Georg Chini wrote: > On 07.05.2017 11:12, Tanu Kaskinen wrote: > > When sinks are compared during the default sink selection, the active > > port's availability is inspected. Therefore, the default sink should be > > updated when the ac

Re: [pulseaudio-discuss] [PATCH] virtual sources and sinks: Don't double attach a sink input or source output on filter load

2017-05-13 Thread Tanu Kaskinen
On Tue, 2017-05-09 at 16:42 +0200, Georg Chini wrote: > When a filter is loaded and module-switch-on-connect is present, > switch-on-connect > will make the filter the default sink or source and move streams from the old > default to the filter. This is done from the sink/source put hook, therefor

Re: [pulseaudio-discuss] [PATCH] virtual sources and sinks: Don't double attach a sink input or source output on filter load

2017-05-17 Thread Tanu Kaskinen
On Tue, 2017-05-16 at 15:14 +0200, Georg Chini wrote: > When a filter is loaded and module-switch-on-connect is present, > switch-on-connect > will make the filter the default sink or source and move streams from the old > default to the filter. This is done from the sink/source put hook, therefor

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

2017-05-17 Thread Tanu Kaskinen
On Tue, 2017-05-16 at 16:29 +0800, Hui Wang wrote: > On 05/03/2017 06:51 PM, Tanu Kaskinen wrote: > > 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 p

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

2017-05-18 Thread Tanu Kaskinen
On Mon, 2017-05-08 at 12:58 +0300, Tanu Kaskinen wrote: > 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 li

Re: [pulseaudio-discuss] [PATCH] alsa: make headset-mic scanned earlier than headphone-mic

2017-05-20 Thread Tanu Kaskinen
On Fri, 2017-05-19 at 09:29 +0800, Hui Wang wrote: > Hello Tanu, > > Could you please help take a look at this patch? This patch really fix > an issue on some Dell machines (with realtek codec and has no internal > microphone on them), And I think this minor change will not introduce > regressi

Re: [pulseaudio-discuss] Service fails on systemctl start. Status always "activating"

2017-05-22 Thread Tanu Kaskinen
On Mon, 2017-05-22 at 09:03 -0700, Karl Stahl wrote: > I'm trying to get pulseaudio running on a Raspberry Pi 3 (ARM). I'm > having trouble getting the service to start properly. The status > always says "activating", but never seems to finish. Any ideas? What's the pulseaudio version? Raspbian

Re: [pulseaudio-discuss] Service fails on systemctl start. Status always "activating"

2017-05-22 Thread Tanu Kaskinen
On Mon, 2017-05-22 at 11:21 -0700, Karl Stahl wrote: > Thanks for the reply! I'm running Raspbian and have pulseaudio > version 5.0. > I tried changing it to type=simple, and that fixed the notify issue, > but it's still not working. This is what I get: > > $ paplay test.wav > connect localhost

Re: [pulseaudio-discuss] Service fails on systemctl start. Status always "activating"

2017-05-22 Thread Tanu Kaskinen
On Mon, 2017-05-22 at 13:01 -0700, Karl Stahl wrote: > Apparently the "xcb_connection_has_error()" message is caused by my > having SSHed to the device. If I run the same command on the device > directly, I don't get that message. My environment already had that > variable set as you suggested: >

Re: [pulseaudio-discuss] [PATCH] alsa: make headset-mic scanned earlier than headphone-mic

2017-05-23 Thread Tanu Kaskinen
On Tue, 2017-05-23 at 11:04 +0800, Hui Wang wrote: > On 05/20/2017 10:51 PM, Tanu Kaskinen wrote: > > On Fri, 2017-05-19 at 09:29 +0800, Hui Wang wrote: > > > Hello Tanu, > > > > > > Could you please help take a look at this patch? This patch really fix > &

Re: [pulseaudio-discuss] Service fails on systemctl start. Status always "activating"

2017-05-23 Thread Tanu Kaskinen
On Mon, 2017-05-22 at 15:12 -0700, Karl Stahl wrote: > Ah! Sure enough, I had this line in my pulseaudio.service file: > > Requires=pulseaudio.socket > > I copied this file directly from the Debian source: > https://sources.debian.net/src/pulseaudio/8.0-2/src/daemon/systemd/user/pulseaudio.servi

Re: [pulseaudio-discuss] [PATCH] alsa: make headset-mic scanned earlier than headphone-mic

2017-05-23 Thread Tanu Kaskinen
On Tue, 2017-05-23 at 17:36 +0800, Hui Wang wrote: > On 05/23/2017 04:20 PM, Tanu Kaskinen wrote: > > On Tue, 2017-05-23 at 11:04 +0800, Hui Wang wrote: > > > On 05/20/2017 10:51 PM, Tanu Kaskinen wrote: > > > > On Fri, 2017-05-19 at 09:29 +0800, Hui Wa

[pulseaudio-discuss] [PATCH RFC] alsa-mixer: add query_hw_device option to mappings

2017-05-23 Thread Tanu Kaskinen
We have so far assumed that HDMI always uses device indexes 3, 7, 8, 9, 10, 11, 12 and 13. These values are hardcoded in the HDMI path configuration files (the index is used for setting the ELD device and the jack mixer element name). The Intel HDMI LPE driver, however, uses different device number

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