platform/upstream/pulseaudio.git
4 years agosource: Fix a bad condition that made source events not be emitted 68/210768/2 accepted/tizen/unified/20190725.042946 submit/tizen/20190724.120524
Arun Raghavan [Tue, 19 Feb 2019 03:57:02 +0000 (09:27 +0530)]
source: Fix a bad condition that made source events not be emitted

This broke during a refactor of sink/source state-change.

https://cgit.freedesktop.org/pulseaudio/pulseaudio/commit/?id=db788229c66369a7b1283173183662b7f5e6c742

[Version] 11.1-76
[Profile] Common
[Issue Type] Upstream patch

Change-Id: I670281dcb94aa7d2bcc24b05cd44b99fa7ffc376

4 years agoCommit fd9e3452 removed -ffast-math from the compile flags. Under some
Georg Chini [Sun, 21 Jul 2019 13:07:18 +0000 (15:07 +0200)]
Commit fd9e3452 removed -ffast-math from the compile flags. Under some
conditions this may lead to massive slowdown of floating point operations
when underflows or denormals are encountered. In particular, this problem
was observed with the soxr resampler after applying
https://gitlab.freedesktop.org/pulseaudio/pulseaudio/merge_requests/120

Therefore this patch adds -ffast-math to the link flags of the pulseaudio
daemon. Linking with -ffast-math adds a procedure set_fast_math() to the
startup code of the daemon. On x86, the procedure sets bit 6 and 15 of the
mxcsr register. When these bits are set, denormals and results of
underflowing operations are truncated to 0.

4 years agoi18n: update Polish translation
Piotr Drąg [Sat, 20 Jul 2019 12:13:29 +0000 (14:13 +0200)]
i18n: update Polish translation

4 years agopasuspender: explain program argument in help
S Page [Tue, 16 Jul 2019 06:23:50 +0000 (06:23 +0000)]
pasuspender: explain program argument in help

Fixes: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/issues/706

4 years agosvolume: Mark channel parameter as earlyclobber
Arun Raghavan [Thu, 11 Jul 2019 05:27:31 +0000 (10:57 +0530)]
svolume: Mark channel parameter as earlyclobber

For all our MMX/SSE code, we use a temporary channel variable, assigned
to the DI register, which is zero'ed as the very first operation in the
inline assembly code, before any other code is run.

With GCC 9.1, while using -O2, the DI register is also used for the
input operand. This is perfectly legal, but causes our code to become
incorrect because the output operand that is assigned to DI is not
explicitly marked as being clobbered before inputs are read.

This change fixes the problem by adding an earlyclobber annotation (&)
to the DI output argument.

4 years agoalsa-mixer: Add a missing USB product ID for SteelSeries Arctis 7
Kaleb Ercanbrack [Thu, 11 Jul 2019 14:09:58 +0000 (14:09 +0000)]
alsa-mixer: Add a missing USB product ID for SteelSeries Arctis 7

4 years agobuild-sys: Install cmedia-high-speed-true-hdaudio.conf
Jan Alexander Steffens (heftig) [Wed, 10 Jul 2019 23:41:55 +0000 (01:41 +0200)]
build-sys: Install cmedia-high-speed-true-hdaudio.conf

This profile set was missing from the installation.

4 years agoAdd to check privilege in case of ActivateDucking DBus method 97/209797/1 accepted/tizen/unified/20190716.111219 submit/tizen/20190716.020521
Jeongmo Yang [Thu, 11 Jul 2019 06:16:37 +0000 (15:16 +0900)]
Add to check privilege in case of ActivateDucking DBus method

[Version] 11.1.75
[Profile] Common
[Issue Type] New feature

Change-Id: Ie52a6745dd399251188ad506f0659dc5d526449a
Signed-off-by: Jeongmo Yang <jm80.yang@samsung.com>
4 years agobuild-sys: meson: Disable coverage by default
Arun Raghavan [Thu, 11 Jul 2019 02:24:13 +0000 (07:54 +0530)]
build-sys: meson: Disable coverage by default

4 years agoproplist: Add PA_PROP_MEDIA_ROUTE_AUTO_PREFERRED_DEVICE_ROLE property 44/209444/1 accepted/tizen/unified/20190715.111913 submit/tizen/20190712.062844
Sangchul Lee [Mon, 8 Jul 2019 05:39:08 +0000 (14:39 +0900)]
proplist: Add PA_PROP_MEDIA_ROUTE_AUTO_PREFERRED_DEVICE_ROLE property

[Version] 11.1.74
[Issue type] New feature

Change-Id: I8aadbe1842fbc89ead5ced97457f2c75a93318c7
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
4 years agobuild-sys: Fixes for i18n parts of the meson build v12.99.1
Arun Raghavan [Mon, 1 Jul 2019 15:49:04 +0000 (21:19 +0530)]
build-sys: Fixes for i18n parts of the meson build

4 years agoproplist: Add PA_PROP_DEVICE_ROLE property 08/207808/2
Sangchul Lee [Thu, 13 Jun 2019 02:31:19 +0000 (11:31 +0900)]
proplist: Add PA_PROP_DEVICE_ROLE property

[Version] 11.1.73
[Issue type] New feature

Change-Id: I9c61e89aa86f3fa2cb95be6aad996e89cea098eb
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
4 years agobuild-sys: Bump libpulse soversion
Arun Raghavan [Thu, 4 Jul 2019 08:49:33 +0000 (14:19 +0530)]
build-sys: Bump libpulse soversion

We've added new API and updated an enum. A bunch of function parameters
have been marked as const, but this probably shouldn't count as a change
anyway.

4 years agocore-util: Fix detection when running in a VM
Arun Raghavan [Mon, 1 Jul 2019 01:52:55 +0000 (07:22 +0530)]
core-util: Fix detection when running in a VM

The original code that was written was trying to detect what hypervisor
we were running under, rather than testing the presence bit first. We
don't really need the former, so let's use the more comprehensive latter
instead.

Fixes: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/issues/684

4 years agosink-input: fix rewriting render memblockq when nothing should be rewound
Georg Chini [Wed, 3 Jul 2019 10:32:50 +0000 (12:32 +0200)]
sink-input: fix rewriting render memblockq when nothing should be rewound

If process_rewind() is called with nbytes = 0, process_rewind() will
nevertheless request a rewrite of the render memblockq.

This patch fixes the problem by adding the render memblockq length to the
rewrite amount only if nbytes > 0.

4 years agosource-output: Fix rewinding bug
Georg Chini [Wed, 3 Jul 2019 10:32:16 +0000 (12:32 +0200)]
source-output: Fix rewinding bug

Currently the rewind logic for the source output is broken if the output
does not implement a process_rewind() callback. In that case, the read
index of the delay memblockq is rewound. This is wrong, because the data
that is going to be re-written was not yet read. Instead the write index
should be rewound and the read index left untouched. This is the reason
for the rewind glitches of monitor sources.

4 years agobluetooth: Fix crash when disabling Bluetooth adapter
Frédéric Danis [Wed, 19 Jun 2019 09:09:11 +0000 (11:09 +0200)]
bluetooth: Fix crash when disabling Bluetooth adapter

This crash occurs when PA is connected to a phone through the oFono
backend.
When disabling the Bluetooth adapter, pa_bluetooth_device is removed before
hf_audio_card. Both keep refs on pa_bluetooth_transport. Those removal will
call pa_bluetooth_transport_free() from device_free() (bluez5-util.c) and
hf_audio_card_free() (backend-ofono.c).
In the end, the call to pa_bluetooth_transport_free() calls
pa_hasmap_remove() through pa_bluetooth_transport_unlink(), but since
memory has already been freed, the second try results in a segfault.

Triggering hf_audio_card removal during pa_bluetooth_device removal allows
hf_audio_card to be freed at the right time.

4 years agobluetooth: Fix crash in setup_stream()
Frédéric Danis [Tue, 18 Jun 2019 08:15:15 +0000 (10:15 +0200)]
bluetooth: Fix crash in setup_stream()

setup_stream() crashes when calling set_nonblock() with an invalid
stream_fd.

On a new call, the ofono backend gets notified of a new connection.
The ofono backend sets the transport state to playing, and that triggers
a profile change, which sets up the stream for the first time.
Then module-bluetooth-policy sets up the loopbacks. The loopbacks get
fully initialized before the crash.

After module-bluetooth-policy has done its things, the execution
continues in the transport state change hook. The next hook user is
module-bluez5-device, whose handle_transport_state_change() function
gets called. It will then set up the stream again even though it's
already set up. I'm not sure if that's a some kind of a bug.
setup_stream() can handle the case where it's unnecessarily called,
though, so this second setup is not a big problem.

The crash happens, because the connection died due to POLLHUP in the IO
thread before the second setup_stream() call.

4 years agocore-util: Use /proc/fd on Solaris as well in pa_close_all
Alan Coopersmith [Thu, 27 Jun 2019 01:32:40 +0000 (18:32 -0700)]
core-util: Use /proc/fd on Solaris as well in pa_close_all

Gets rid of > 65,000 unnecessary close() syscalls

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
4 years agomeson: check for sys/filio.h
Alan Coopersmith [Thu, 27 Jun 2019 00:31:14 +0000 (17:31 -0700)]
meson: check for sys/filio.h

Needed for FIONREAD on Solaris

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
4 years agomeson: fix builds on platorms without libsystemd
Alan Coopersmith [Thu, 27 Jun 2019 00:16:51 +0000 (17:16 -0700)]
meson: fix builds on platorms without libsystemd

Without this, meson on Solaris exits with:
src/daemon/meson.build:138:15: ERROR: Unknown variable "systemd_dep".

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
4 years agoi18n: update Polish translation
Piotr Drąg [Sun, 30 Jun 2019 14:37:28 +0000 (16:37 +0200)]
i18n: update Polish translation

4 years agoChange the config value of the systemd service ("false" -> "no") 75/208375/1 accepted/tizen/unified/20190626.040924 submit/tizen/20190625.070900
INSUN PYO [Mon, 24 Jun 2019 02:22:21 +0000 (11:22 +0900)]
Change the config value of the systemd service ("false" -> "no")

"no" and "false" have the same meaning, but the document has "no".
Also, since the parsing order is "no" first, there is some performance gain.

Change-Id: I21da095f13644e643a95ee74ef4630083a4571b4

4 years agoUpdate Croatian translation
muzena [Sun, 23 Jun 2019 12:26:22 +0000 (14:26 +0200)]
Update Croatian translation

4 years agomain: Log more information when executing default.pa fails
Tanu Kaskinen [Sat, 8 Jun 2019 08:44:43 +0000 (11:44 +0300)]
main: Log more information when executing default.pa fails

"Failed to initialize daemon" is not as informative message as it could
be. This change was inspired by the discussion in this bug:
https://gitlab.freedesktop.org/pulseaudio/pulseaudio/issues/597

4 years agodaemon: Harden systemd service
Topi Miettinen [Wed, 10 Apr 2019 11:44:28 +0000 (14:44 +0300)]
daemon: Harden systemd service

Signed-off-by: Topi Miettinen <toiwoton@gmail.com>
4 years agoa2dp-codec-sbc: get rid of compiler warnings
Tanu Kaskinen [Sun, 16 Jun 2019 09:09:27 +0000 (12:09 +0300)]
a2dp-codec-sbc: get rid of compiler warnings

The warnings:

modules/bluetooth/a2dp-codec-sbc.c: In function ‘default_bitpool’:
modules/bluetooth/a2dp-codec-sbc.c:161:13: warning: this statement may fall through [-Wimplicit-fallthrough=]
             switch (mode) {
             ^~~~~~
modules/bluetooth/a2dp-codec-sbc.c:169:9: note: here
         case SBC_SAMPLING_FREQ_44100:
         ^~~~
modules/bluetooth/a2dp-codec-sbc.c:170:13: warning: this statement may fall through [-Wimplicit-fallthrough=]
             switch (mode) {
             ^~~~~~
modules/bluetooth/a2dp-codec-sbc.c:180:9: note: here
         case SBC_SAMPLING_FREQ_48000:
         ^~~~

These were valid warnings in that an invalid channel mode would result
in unintended fallthroughs, but the end result would anyway been a crash
in the pa_assert_not_reached() at the end of the function, so
functionally there's no change.

4 years ago.gitignore: add atomic-test
Tanu Kaskinen [Sat, 15 Jun 2019 08:14:33 +0000 (11:14 +0300)]
.gitignore: add atomic-test

5 years agosink-input: Skip rewinding if a ramp was set in case of SET_SOFT_VOLUME 47/207747/2 accepted/tizen/unified/20190621.121840 submit/tizen/20190619.053430 submit/tizen/20190620.095920
Sangchul Lee [Tue, 11 Jun 2019 07:22:17 +0000 (16:22 +0900)]
sink-input: Skip rewinding if a ramp was set in case of SET_SOFT_VOLUME

This patch is to fix a noise issue in case of unducking with fade in.

[Version] 11.1.72
[Issue type] Bug fix

Change-Id: Id135b2cc4fac31c2213b9d4cd3eaa16b22d5a601
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
5 years agoatomic: fix load and store for armv7 and higher
Thomas Hutschenreuther [Wed, 29 May 2019 17:20:37 +0000 (19:20 +0200)]
atomic: fix load and store for armv7 and higher

The original atomic implementation in pulseaudio based on
libatomic stated that the intent was to use full memory barriers.

According to [1], the load and store implementation based on
gcc builtins matches sequential consistent (i.e. full memory barrier)
load and store ordering only for x86.

I observed random crashes in client applications using memfd srbchannel
transport on an armv8-aarch64 platform (cortex-a57).
In all those crashes the first read on the pstream descriptor
(the size field) was wrong and looked like it contained old data.
I boiled the relevant parts of the srbchannel implementation down to
a simple test case and could observe random test failures.
So I figured that the atomic implementation was broken for armv8
with respect to cross-cpu memory access ordering consistency.

In order to come up with a minimal fix, I used the newer
__atomic_load_n/__atomic_store_n builtins from gcc.

With
aarch64-linux-gnu-gcc (Linaro GCC 7.3-2018.05) 7.3.1 20180425
they compile to
ldar and stlxr on arm64, which is correct according to [1] and [2].

The other atomic operations based on __sync builtins don't need
to be touched since they already are of the full memory barrier
variety.

[1] https://www.cl.cam.ac.uk/~pes20/cpp/cpp0xmappings.html
[2] <https://community.arm.com/developer/ip-products/processors
    /b/processors-ip-blog/posts/armv8-a-architecture-2016-additions>

5 years agoi18n: update Polish translation
Piotr Drąg [Mon, 10 Jun 2019 13:55:07 +0000 (15:55 +0200)]
i18n: update Polish translation

5 years agosink, source: Don't change suspend cause when unlinking
Tanu Kaskinen [Mon, 10 Jun 2019 11:18:47 +0000 (14:18 +0300)]
sink, source: Don't change suspend cause when unlinking

See the added comments for why this is necessary.

Fixes: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/issues/667

5 years agomainloop: fix timeout assignment in pa_mainloop_prepare
shdown [Sun, 9 Jun 2019 13:40:14 +0000 (13:40 +0000)]
mainloop: fix timeout assignment in pa_mainloop_prepare

The function calculates the correct timeout (in microseconds) to assign
in the `u` variable, but then assigns `m->prepared_timeout` the value
of the `timeout` argument (in milliseconds).

5 years agostream-restore: Don't restore if the active_port is PA_AVAILABLE_NO
Hui Wang [Wed, 15 May 2019 06:39:27 +0000 (14:39 +0800)]
stream-restore: Don't restore if the active_port is PA_AVAILABLE_NO

We met two problems recently, one happened on a Lenovo machine with
dual analogue codecs, the other happened on a Dell machine with
a digital mic directly connected to PCH. The two problems are
basically same, there is an internal mic and an external mic, the
internal mic always shows up in the gnome-control-center, the external
mic only shows up when it is plugged. After the external mic is
plugged and users select it from gnome-control-center, the
gnome-control-center will read all saved streams through extension_cb,
and bind the source of external mic to all streams, after that the
apps only record sound via the source of external mic, after the
external mic is unplugged, the internal mic will automatically be
selected since it is the only left input device in the
gnome-control-center, since users don't select it, all streams are
still bond the source of external mic. When users record sound via
apps, they can't record any sound even the default_source is the
source of internal mic and the internal mic is selected in the UI.

It is very common that a machine has internal mic and external mic,
but this problem didn't expose before, that is because both internal
mic and external mic belong to one source, but for those two
machines, the internal mic belongs to one source, while the external
mic belongs to another source (they are in differnt codecs or one is
in the codec and the other is from PCH),

To fix it with a mininal change, we just check if the active_port is
PA_AVAILABLE_NO or not when building a new stream, if it is, don't
restore the device to the new built stream, let pa_source_output_new()
decide the source device for this stream.

And we also do the same change to sink_input.

This change only affects the new built streams, it will not change
the database, so the users' preference is still saved in the database,
after the active_port is not PA_AVAILABLE_NO, the new streams will
still restore to the preferred device.

Signed-off-by: Hui Wang <hui.wang@canonical.com>
5 years agoi18n: Fix copyright information in pt_BR.po
Mark Filion [Thu, 6 Jun 2019 20:41:08 +0000 (20:41 +0000)]
i18n: Fix copyright information in pt_BR.po

5 years agomeson: Duplicate split of long daemon tests from autotools build
Arun Raghavan [Sat, 8 Jun 2019 10:52:05 +0000 (12:52 +0200)]
meson: Duplicate split of long daemon tests from autotools build

This avoids the running the longer daemon tests by default to make CI
faster.

5 years agomeson: Skip norun tests
Arun Raghavan [Sat, 8 Jun 2019 10:47:53 +0000 (12:47 +0200)]
meson: Skip norun tests

These weren't meant to be run, so we skip then while generating meson
tests.

5 years agodaemon: Drop empty fields in desktop file
Arun Raghavan [Sat, 8 Jun 2019 10:40:47 +0000 (12:40 +0200)]
daemon: Drop empty fields in desktop file

The fields weren't used, and were incorrectly munged during generation.
This makes validation succeed.

5 years agomeson: Disable alsa-mixer-path-test
Arnaud Rebillout [Wed, 16 Jan 2019 11:33:15 +0000 (18:33 +0700)]
meson: Disable alsa-mixer-path-test

This test relies on parsing the generated Makefile. A meson equivalent
requires to re-write all the parser.

Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
5 years agomeson: Add running-from-build-tree option
Arnaud Rebillout [Wed, 16 Jan 2019 10:58:42 +0000 (17:58 +0700)]
meson: Add running-from-build-tree option

Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
5 years agomeson: Increase timeout for tests
Arnaud Rebillout [Wed, 16 Jan 2019 08:40:31 +0000 (15:40 +0700)]
meson: Increase timeout for tests

This solves numerous timeout failures

Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
5 years agomeson: Add support for gcov
Arnaud Rebillout [Wed, 28 Nov 2018 13:43:53 +0000 (20:43 +0700)]
meson: Add support for gcov

Unlike autotools, we use the option --coverage, which is a synonym for
-profile-arcs and -ftest-coverage (when compiling) and -lgcov (when
linking).

For reference, see:
https://gcc.gnu.org/onlinedocs/gcc/Instrumentation-Options.html#Instrumentation-Options

Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
5 years agomeson: Add ORC support
Arnaud Rebillout [Wed, 28 Nov 2018 08:42:25 +0000 (15:42 +0700)]
meson: Add ORC support

Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
5 years agomeson: Disable esound modules
Arnaud Rebillout [Mon, 26 Nov 2018 10:38:31 +0000 (17:38 +0700)]
meson: Disable esound modules

For now esound is not supported with the meson build, although it
wouldn't be that hard to support it.

Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
5 years agomeson: Install headers
Arnaud Rebillout [Mon, 26 Nov 2018 10:33:11 +0000 (17:33 +0700)]
meson: Install headers

Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
5 years agomeson: Install cmake files
Arnaud Rebillout [Mon, 26 Nov 2018 10:29:28 +0000 (17:29 +0700)]
meson: Install cmake files

Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
5 years agomeson: Install systemd user service
Arnaud Rebillout [Mon, 26 Nov 2018 10:12:09 +0000 (17:12 +0700)]
meson: Install systemd user service

Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
5 years agomeson: Build libwebrtc-util as a shared library
Arnaud Rebillout [Mon, 26 Nov 2018 09:44:06 +0000 (16:44 +0700)]
meson: Build libwebrtc-util as a shared library

As it'sdone in the autotools

Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
5 years agomeson: Install utils symlinks, install qpaeq
Arnaud Rebillout [Mon, 26 Nov 2018 09:43:25 +0000 (16:43 +0700)]
meson: Install utils symlinks, install qpaeq

Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
5 years agomeson: Move oss-util in a library
Arnaud Rebillout [Mon, 26 Nov 2018 09:29:12 +0000 (16:29 +0700)]
meson: Move oss-util in a library

Like it was with the aututools

Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
5 years agomeson: Fix udevrulesdir
Arnaud Rebillout [Mon, 26 Nov 2018 08:50:56 +0000 (15:50 +0700)]
meson: Fix udevrulesdir

Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
5 years agomeson: Install dbus policy file
Arnaud Rebillout [Mon, 26 Nov 2018 08:45:41 +0000 (15:45 +0700)]
meson: Install dbus policy file

Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
5 years agomeson: Fix install paths
Arnaud Rebillout [Mon, 26 Nov 2018 08:36:13 +0000 (15:36 +0700)]
meson: Fix install paths

Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
5 years agomeson: Build daemon custom targets by default
Arnaud Rebillout [Mon, 26 Nov 2018 08:33:13 +0000 (15:33 +0700)]
meson: Build daemon custom targets by default

Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
5 years agomeson: Translate and install desktop file
Arnaud Rebillout [Mon, 26 Nov 2018 08:32:25 +0000 (15:32 +0700)]
meson: Translate and install desktop file

Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
5 years agomeson: Add basic po support
Arnaud Rebillout [Mon, 26 Nov 2018 08:31:49 +0000 (15:31 +0700)]
meson: Add basic po support

Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
5 years agomeson: Install ALSA udevrules
Arnaud Rebillout [Mon, 26 Nov 2018 08:12:29 +0000 (15:12 +0700)]
meson: Install ALSA udevrules

Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
5 years agomeson: Fix various install scripts
Arnaud Rebillout [Mon, 26 Nov 2018 07:11:47 +0000 (14:11 +0700)]
meson: Fix various install scripts

Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
5 years agomeson: Add udevrulesdir option
Arnaud Rebillout [Mon, 26 Nov 2018 08:12:04 +0000 (15:12 +0700)]
meson: Add udevrulesdir option

Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
5 years agomeson: Add systemduserunitdir option
Arnaud Rebillout [Mon, 26 Nov 2018 06:33:44 +0000 (13:33 +0700)]
meson: Add systemduserunitdir option

Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
5 years agomeson: Fix pulsedspdir
Arnaud Rebillout [Mon, 19 Nov 2018 08:49:24 +0000 (15:49 +0700)]
meson: Fix pulsedspdir

Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
5 years agomeson: Install pkg-config files
Arnaud Rebillout [Mon, 19 Nov 2018 08:48:35 +0000 (08:48 +0000)]
meson: Install pkg-config files

Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
5 years agomeson: Install vala apis
Arnaud Rebillout [Mon, 5 Nov 2018 05:17:37 +0000 (12:17 +0700)]
meson: Install vala apis

Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
5 years agomeson: Fix man install dir
Arnaud Rebillout [Mon, 5 Nov 2018 05:21:31 +0000 (12:21 +0700)]
meson: Fix man install dir

Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
5 years agomeson: Handle man pages symlinks with a meson install script
Arnaud Rebillout [Mon, 5 Nov 2018 05:05:35 +0000 (12:05 +0700)]
meson: Handle man pages symlinks with a meson install script

This seems to be the common way to handle that, until meson decides to
address #1602: https://github.com/mesonbuild/meson/issues/1602

Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
5 years agomeson: Make man page build and install conditional
Arnaud Rebillout [Mon, 5 Nov 2018 05:03:03 +0000 (12:03 +0700)]
meson: Make man page build and install conditional

Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
5 years agomeson: Install completion files
Arnaud Rebillout [Mon, 5 Nov 2018 04:42:24 +0000 (11:42 +0700)]
meson: Install completion files

Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
5 years agotest-daemon: No need to define dl-search-path
Arnaud Rebillout [Wed, 31 Oct 2018 11:41:46 +0000 (18:41 +0700)]
test-daemon: No need to define dl-search-path

There's already a hook that modifies the search path when run from the
build tree.

      if (pa_run_from_build_tree()) {
          pa_log_notice("Detected that we are run from the build tree, fixing search path.");
  #ifdef MESON_BUILD
          c->dl_search_path = pa_xstrdup(PA_BUILDDIR PA_PATH_SEP "src" PA_PATH_SEP "modules");
  #else
          c->dl_search_path = pa_xstrdup(PA_BUILDDIR);
  #endif
      } else

I'm not sure how it works behind the hood, but by setting
--dl-search-path, we get errors in the logs when running `make
check-daemon`:

 E: [pulseaudio][daemon/ltdl-bind-now.c:75 bind_now_open()] Failed to open module /home/arno/proj/pulse/src/pa.up/src/.libs/.libs/module-native-protocol-unix.so:
   /home/arno/proj/pulse/src/pa.up/src/.libs/.libs/module-native-protocol-unix.so: cannot open shared object file: No such file or directory
 I: [pulseaudio][pulsecore/module.c:197 pa_module_load()] Loaded "module-native-protocol-unix" (index: #3; argument: "").

So basically, PA tries two paths, fails the first time (obviously we can
see the path is not correct), then tries again with another path (where
does it gets it?) and succeeds. So there's no obvious error if you don't
look at the log.

This commit removes the useless `--dl-search-path`, which has the effect
to remove the errors in the logs.

Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
5 years ago.gitlab-ci: Add meson test-daemon
Arnaud Rebillout [Wed, 31 Oct 2018 11:51:29 +0000 (18:51 +0700)]
.gitlab-ci: Add meson test-daemon

Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
5 years agomeson: Enable echo-cancel test
Arnaud Rebillout [Wed, 31 Oct 2018 12:16:08 +0000 (19:16 +0700)]
meson: Enable echo-cancel test

Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
5 years agomeson: Define HAVE_SYS_UN_H, this was forgotten
Arnaud Rebillout [Wed, 31 Oct 2018 11:39:40 +0000 (18:39 +0700)]
meson: Define HAVE_SYS_UN_H, this was forgotten

Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
5 years agomeson: Boolean options default to true, no need to say it
Arnaud Rebillout [Wed, 31 Oct 2018 12:18:09 +0000 (19:18 +0700)]
meson: Boolean options default to true, no need to say it

Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
5 years agomeson: Enable (almost) all tests
Arnaud Rebillout [Wed, 31 Oct 2018 05:45:11 +0000 (12:45 +0700)]
meson: Enable (almost) all tests

Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
5 years agomeson: Add libpulse simple
Arnaud Rebillout [Wed, 31 Oct 2018 05:31:18 +0000 (12:31 +0700)]
meson: Add libpulse simple

Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
5 years agomeson: Move shm_dep check where it belongs
Arnaud Rebillout [Wed, 31 Oct 2018 05:36:01 +0000 (12:36 +0700)]
meson: Move shm_dep check where it belongs

Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
5 years agomeson: Add some symbol checks
Arnaud Rebillout [Wed, 31 Oct 2018 05:34:03 +0000 (12:34 +0700)]
meson: Add some symbol checks

Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
5 years agomeson: Add a check for sys/eventfd.h header
Arnaud Rebillout [Wed, 31 Oct 2018 05:32:39 +0000 (12:32 +0700)]
meson: Add a check for sys/eventfd.h header

This test is present in the configure.ac, it was forgotten in
meson.build.

Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
5 years agomeson: Add a dependency object for libpulse_mainloop_glib
Arnaud Rebillout [Wed, 31 Oct 2018 05:31:41 +0000 (12:31 +0700)]
meson: Add a dependency object for libpulse_mainloop_glib

Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
5 years agosink: Set monitor source's avoid-resampling value to its sink's
Sangchul Lee [Fri, 7 Jun 2019 12:20:55 +0000 (21:20 +0900)]
sink: Set monitor source's avoid-resampling value to its sink's

It was omitted. This patch fixes unexpected behavior that avoid-
resampling does not work in some cases.

Signed-off-by: Sangchul Lee <sangchul1011@gmail.com>
5 years agorole-ducking/role-cork: Add skip_sinks argument 63/207463/2 accepted/tizen/unified/20190610.082609 submit/tizen/20190607.070023
Sangchul Lee [Wed, 5 Jun 2019 05:01:01 +0000 (14:01 +0900)]
role-ducking/role-cork: Add skip_sinks argument

[Version] 11.1.71
[Issue type] New feature

Change-Id: I599d452cc1cb76e3214b10f8be7cc28be437d16b
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
5 years agostream-interaction: Add support for skip_sinks argument 61/207461/4
Sangchul Lee [Wed, 5 Jun 2019 03:49:48 +0000 (12:49 +0900)]
stream-interaction: Add support for skip_sinks argument

Skip applying cork/ducking effect to a stream which belongs to
the sink specified in the argument.

[Version] 11.1.70
[Issue type] New feature

Change-Id: If58fbadbdd0739b4127405649857de1a3f092a4c
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
5 years agomutex: Add pa_cond_timedwait() API 60/207260/4
Sangchul Lee [Fri, 31 May 2019 07:52:25 +0000 (16:52 +0900)]
mutex: Add pa_cond_timedwait() API

[Version] 11.1.69
[Issue type] New feature

Change-Id: Ia204d2ee14633113a5fbe065aebce925032d63fa
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
5 years agobuild-sys: Fix up meson install paths
Arun Raghavan [Sat, 13 Oct 2018 06:20:03 +0000 (11:50 +0530)]
build-sys: Fix up meson install paths

Brings things in line with the autotools build, and adds ALSA mixer
paths and profile-sets into the meson build system as well.

The module installation path is also now customisable.

5 years agoloopback: fix callback name in comment
Tanu Kaskinen [Wed, 29 May 2019 08:07:01 +0000 (11:07 +0300)]
loopback: fix callback name in comment

5 years agoloopback: remove an unnecessary level of pointer dereferencing
Tanu Kaskinen [Wed, 29 May 2019 05:02:45 +0000 (08:02 +0300)]
loopback: remove an unnecessary level of pointer dereferencing

The userdata struct has a pointer to the core itself, no need to go via
u->module to get to it.

5 years agoi18n: Don't compile with -ffast-math
Felipe Sateler [Wed, 16 Jan 2019 00:52:31 +0000 (21:52 -0300)]
i18n: Don't compile with -ffast-math

This flag results in calls to (at least) isfinite() and isnan() becoming
skipped, and a constant false returned. This caused volume-test to fail
on Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=916504

Since PulseAudio deals with negative infinities with volume dB values,
this is not a problem only in volume-test. We shouldn't use -ffast-math
at all.

5 years agoi18n: New translation for Afrikaans (af)
Friedel Wolff [Wed, 9 Jan 2019 10:24:00 +0000 (12:24 +0200)]
i18n: New translation for Afrikaans (af)

5 years agocore: add simple message interface
Georg Chini [Tue, 26 Mar 2019 09:41:05 +0000 (10:41 +0100)]
core: add simple message interface

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 arguments (apart from passing the core):

object_path: The path identifying the object that will receive the message
message: message command
message_parameters: A string containing additional parameters
response: Pointer to a response string that will be filled by the
          message handler. The caller is responsible to free the string.

The patch is a precondition for the following patches that allow clients
to send messages to pulseaudio objects.

There is no restriction on object names, except that an object path
always starts with a "/". The intention is to use a path-like syntax,
for example /core/sink_1 for a sink or /name/instances/index for modules.
The exact naming convention still needs to be agreed.

5 years agocore-util: Avoid usage of pa_strbuf in pa_escape()
Georg Chini [Tue, 26 Mar 2019 09:39:21 +0000 (10:39 +0100)]
core-util: Avoid usage of pa_strbuf in pa_escape()

The current code uses a pa_strbuf to construct the escaped string. This
will generate a linked list member for each character which may be very
inefficient.
This patch avoids the use of pa_strbuf by allocating a sufficiently large
string which can be filled with the output data.

5 years agoExpose control param to alsa-card module
Nate Brown [Tue, 14 May 2019 16:28:32 +0000 (09:28 -0700)]
Expose control param to alsa-card module

5 years agocore: send subscription events when the configured default sink or source changes
Tanu Kaskinen [Tue, 21 May 2019 12:57:20 +0000 (15:57 +0300)]
core: send subscription events when the configured default sink or source changes

These events were missing, because the
pa_core_update_default_sink/source() calls were assumed to send the
subscription events when necessary. Often that indeed is the case, but
if the current configured default sink doesn't exist, and then the
current default sink is set as the configured default sink, the
configured default sink changes but the default sink doesn't, and in
this case pa_core_update_default_sink() doesn't send the change event.

module-default-device-restore relies on getting a notification whenever
the configured default sink changes, and the missing event meant that
the files containing the configured sink and source weren't updated in
some cases.

Fixes: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/issues/648

5 years agoi18n: a couple of improvements to the Spanish translation
Tanu Kaskinen [Wed, 22 May 2019 15:07:09 +0000 (18:07 +0300)]
i18n: a couple of improvements to the Spanish translation

Suggested by R. Diez:
https://gitlab.freedesktop.org/pulseaudio/pulseaudio/issues/613

5 years agoi18n: Update Galician translations
Fran Diéguez [Tue, 21 May 2019 11:57:18 +0000 (11:57 +0000)]
i18n: Update Galician translations

5 years ago[l10n] Update Ukrainian translation
Yuri Chornoivan [Tue, 21 May 2019 09:56:29 +0000 (09:56 +0000)]
[l10n] Update Ukrainian translation

5 years agoUpdate Brazilian Portuguese translation
Rafael Fontenelle [Tue, 14 May 2019 22:17:02 +0000 (22:17 +0000)]
Update Brazilian Portuguese translation

5 years agoUpdate Swedish Translation
Josef Andersson [Tue, 8 Jan 2019 23:01:58 +0000 (00:01 +0100)]
Update Swedish Translation

5 years agonull-sink: setting maximum latency to 50 ms when rewinds are disabled
Wellington Wallace [Wed, 8 May 2019 15:05:49 +0000 (12:05 -0300)]
null-sink: setting maximum latency to 50 ms when rewinds are disabled

5 years agoBluetooth: Remove undefined well-known name 55/205655/1 accepted/tizen/unified/20190512.221833 submit/tizen/20190509.095633 submit/tizen/20190510.020543
DoHyun Pyun [Wed, 8 May 2019 07:48:53 +0000 (16:48 +0900)]
Bluetooth: Remove undefined well-known name

bluetooth-ag-agent will use "org.pulseaudio.Server" instead of
"org.PulseAudio2"

Change-Id: I88378084e7a96fe14f757fc128922ad6a9a8707e
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
5 years agonull-sink: add an option that allows rewinds to be disabled
Wellington Wallace [Tue, 7 May 2019 14:58:45 +0000 (11:58 -0300)]
null-sink: add an option that allows rewinds to be disabled

5 years agoMerge branch 'allow-to-disable-null-sink-rewinds' of https://gitlab.freedesktop.org...
Wellington Wallace [Tue, 7 May 2019 14:06:59 +0000 (11:06 -0300)]
Merge branch 'allow-to-disable-null-sink-rewinds' of https://gitlab.freedesktop.org/wwmm/pulseaudio into allow-to-disable-null-sink-rewinds