Commit graph

570 commits

Author SHA1 Message Date
Faidon Liambotis
458c763989 buildsys/autotools: add pulseaudio-x11.service.in
Commit 4868fcf5f3 ("daemon: Rely on
systemd unit file for X11 plugin initialization") added a new systemd
unit file, pulseaudio-x11.service, generated from a respective .in file.

Unfortunately, this was only hooked up to meson, and is not currently
installed by autotools. Among other breakage, "make dist" produces a
tarball that meson is then unable to build (because a file is missing).

Signed-off-by: Faidon Liambotis <paravoid@debian.org>
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/514>
2021-03-01 15:25:09 +00:00
Igor V. Kovalenko
f7f9c70b0f build-sys: drop gconf support
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/499>
2021-02-12 17:05:07 +00:00
Igor V. Kovalenko
4f0f215a13 buildsys: autotools: move map-file to src/pulse
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/461>
2021-01-18 17:57:41 +00:00
Igor V. Kovalenko
c2ae56a73c database: clean up remaining references to CANONICAL_HOST
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/425>
2021-01-07 23:27:16 +00:00
Igor V. Kovalenko
ae9d0cf307 database: use existing database matching same architecture prefix
State database binary file format may depend on system architecture,
for instance gdbm binary format depends on architecture word size,
making x86 and x64 gdbm files incompatible.

If this is the case, it is handled by adding system architecture name to
database file name using automatically configured CANONICAL_HOST string.
Meson build define CANONICAL_HOST to be system architecture name, while
autotools build extends this with vendor and and operating system components.

Switch autotools build to use host_cpu for CANONICAL_HOST to match Meson
configuration. For backwards compatibility always use existing database file
matching CANONICAL_HOST prefix if it exists.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/425>
2021-01-07 23:27:16 +00:00
Igor V. Kovalenko
b6396dbe9c x11: gracefully handle X11 connection error
Perform X11 connection recovery via XSetIOErrorExitHandler mechanism.

Implementation is largely inspired by this change to GNOME/mutter
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1447

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/441>
2021-01-04 15:59:22 +00:00
Edward Lee
3c51930b61 win32: Add support for Unix sockets in autoconf build.
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/360>
2020-12-16 11:05:28 -05:00
Georg Chini
4cdc0053c0 protocol-native: add message sending capability
This patch adds the PA_COMMAND_SEND_OBJECT_MESSAGE command to protocol-native
so that clients can use the messaging feature introduced in the previous patch.

Sending messages can in effect replace the extension system for modules. The
approach is more flexible than the extension interface because a generic string
format is used to exchange information. Furthermore the messaging system can be
used for any object, not only for modules, and is easier to implement than
extensions.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/51>
2020-12-03 14:41:39 +00:00
Sanchayan Maity
45abd0b43c Add default.pa.d folder support
The .include meta command already supports specifying a directory and
when including a directory, all files with the extension '.pa' in that
directory will be parsed in alphabetical order.

This feature can be used to add support for default.pa.d directory, so
that packages for other applications or users can just drop in a file
for configuration without changing the default.pa which is shipped.

We use the PA_DEFAULT_CONFIG_DIR for this, however, since meson quotes
this build variable, introduce an unquoted version for this purpose and
use it with .include.

Fixes: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/909

Signed-off-by: Sanchayan Maity <sanchayan@asymptotic.io>
2020-11-23 22:07:36 +00:00
Arun Raghavan
c442227c6b glib-mainloop: Drop deprecated g_get_current_time() usage
This uses the year 2038-safe g_get_real_time() as recommended instead.
Bumps GLib dependency to 2.28 as a result.
2020-11-23 19:02:33 +00:00
Arun Raghavan
d1e0594e93 build-sys: Bump libpulse soversion
This is because we reverted the previous API breaking change to the
meaning of the pa_mainloop_prepare() timeout argument.
2020-11-23 13:24:03 -05:00
Tanu Kaskinen
2ea425d194 build-sys: Disable GStreamer by default with Autotools
With Meson GStreamer is already disabled by default, let's match that
with Autotools.
2020-11-23 19:12:27 +02:00
Arun Raghavan
5f12dde2f5 rtp: gstreamer: Don't count on buffer DTS for capture time
With GStreamer 1.18, the old behaviour of storing the capture time in
DTS is gone (which is reasonable, since the semantics really don't
match). So instead, we get a capture timestamp when the buffer is being
pushed from udpsrc. This should eventually move into udpsrc, and the
timestamp should come from the cmsg instead of the clock.

We still fallback to the DTS if the meta isn't available, as the meta
might be dropped in older versions of rtpL16pay due to a bug.
2020-10-23 12:11:35 -04:00
Arun Raghavan
8705980364 build-sys: Bump gettext dependency
Needed for distcheck to work with a checked-in pulseaudio.pot. Not
updating to the very latest (0.21) to not force the dependency bump to
something "too new" on distros.
2020-09-20 20:57:54 -04:00
Arun Raghavan
d0c3ef1a7d build-sys: Bump soversions
libpulse gets a full API bump due to the addition of availability
groups, and libpulse-mainloop-glib gets a minor bump for implementation
change.
2020-09-20 19:10:03 -04:00
Tanu Kaskinen
6fce5b2eac build-sys: Configure doxygen.conf.in a bit differently
This change prepares for adding a doxygen target to the Meson build
system. The DOXYGEN_OUTPUT_DIRECTORY substitution variable is needed so
that the output will go to the build directory. I also replaced @srcdir@
with @top_srcdir@. I think it looks cleaner, since the ".." parent
directory traversal is avoided. It also happened to make writing the
Meson rules easier.
2020-08-10 19:38:07 +03:00
Jan Alexander Steffens (heftig)
b657cff400 build: Make alsadatadir configurable
Pipewire has started shipping copies of PulseAudio's ALSA card profiles.

It would be useful if both projects could share the same profiles and
this patch is a step toward that.
2020-08-09 01:57:01 +00:00
Tanu Kaskinen
99db8038de build-sys: Build atomic-test only if pthread_setaffinity_np() is available
The function seems to be essential to the test, so the test has to be
disabled entirely if pthread_setaffinity_np() is not available.

Fixes: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/850
2020-08-04 15:09:33 +03:00
Jaroslav Kysela
861836c5f7 device-port: introduce available_group member
In some cases, the I/O connector functionality can be shared
and we cannot determine the proper purpose automatically.
We just know that something was inserted to the jack.

Introduce a group identifier (a simple string - unique
per group) which helps to determine the proper ports
for the application. The user interface may be used
to set the wanted behaviour.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2020-06-17 06:06:12 +00:00
Tanu Kaskinen
1fe37e6d4b stream-restore: Forget pre-14.0 stream routing
Prior to commits f899d5f466 and
f62a49b8cf, GNOME's sound settings
overwrote the routing for all entries in the stream-restore database
when selecting a device. Now we prevent that from happening (see the
aforementioned commits), but the old overwritten settings can still be in
the database after updating to PulseAudio 14.0, and they can cause
problems, as documented here:
https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/832

We can't distinguish between devices set by GNOME's sound settings
and devices set by the user, so this patch discards all old device
settings, even though that is going to cause PulseAudio to forget routing
settings for many users. This is less bad than keeping the incorrect
routing settings in the database, because it's difficult for users to
figure out how to fix the situation when e.g. speaker test tones go to
the internal speakers no matter what device is selected as the default,
whereas old manual configuration can be restored restored by doing the
manual configuration again. Also, it's probably more common to have at
some point changed the default device in GNOME's sound settings than it
is to have any manual per-stream routing settings.

This is disabled by default, because this causes data loss, but
distributions that use GNOME are recommended to enable this with
the --enable-stream-restore-clear-old-devices (Autotools) or
-Dstream-restore-clear-old-devices=true (Meson) build option.

Fixes: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/832
2020-06-01 18:24:16 +00:00
Sebastien
2c5b594f1c Update configure.ac to fix the enable_gstreamer summary 2020-02-20 14:19:28 +00:00
Arun Raghavan
ef8a302d6b build: Bump soversion for libpulse
No interface changes, but minor implementation change via a fix for when
contexts are freed.
2020-02-14 05:07:56 -05:00
Sebastian Dröge
7f6571e1cc rtp: Use yes/no in configure instead of 1/0 2019-11-08 17:39:40 +05:30
Arun Raghavan
74f8456acb rtp: Add a GStreamer-based RTP implementation
This adds a GStreamer-based RTP implementation to replace our own. The
original implementation is retained for cases where it is not possible
to include GStreamer as a dependency.

The idea with this is to be able to start supporting more advanced RTP
features such as RTCP, non-PCM audio, and potentially synchronised
playback.

Signed-off-by: Arun Raghavan <arun@arunraghavan.net>
2019-11-08 17:39:40 +05:30
Arun Raghavan
3fa0daee37 build-sys: Fix documentation of version info
The comment has been incorrect for a while now. Thanks to Jan Steffens
for pointing this out.
2019-09-02 04:31:53 +00:00
Arun Raghavan
fb530e0f3b build-sys: Bump version info for libpulse
Minor implementation change since last release (we now load X11
properties only for SSH connections).
2019-09-01 13:05:10 +05:30
Arun Raghavan
b427dfcd06 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.
2019-07-04 14:20:57 +05:30
Thomas Hutschenreuther
d4ff4adce2 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>
2019-06-11 19:04:46 +03:00
Felipe Sateler
fd9e3452e2 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.
2019-05-28 19:16:49 +03:00
Takashi Iwai
b89d33bb18 alsa: Fix inclusion of use-case.h
The recent change in ALSA upstream stripped -I$include/alsa path from
pkgconfig.  We already fixed for this change in some places but still
the code for UCM was overlooked, and this resulted in the unresolved
symbols in alsa card module. Fix them as well.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-04-22 11:06:43 +03:00
Tanu Kaskinen
c235acd787 build-sys: Lower the minimum gettext version
The old minimum version was set in commit 57e3ccaf51 based on what the
commit author happened to have installed at the time. Russell Treleaven
now confirmed that Debian 8's gettext version, 0.19.3, works fine too,
or at least PulseAudio builds without errors. There might be room to
lower the required version even further, but that requires someone to
test older gettext versions.
2019-03-14 21:23:30 +02:00
Arun Raghavan
39bc380c12 build-sys: Add the ability to disable maintainer mode
This allows us to disable automatically updating build system files in
case things change. This is desirable in the common case, but not
necessarily for CI, where we want the ability to take a build directory
as an artifact from one stage to the next (i.e. into a fresh checkout).
2019-01-16 09:39:24 +05:30
Hongxu Jia
3d9deb1e56 build-sys: introduce a special build flag to explicitly disables running from build tree
It is helpful to improve reproducibility build [1] since
PA_SRCDIR/PA_BUILDDIR contains build path,
--disable-running-from-build-tree could drop these macros at
precompilation.

[1] https://reproducible-builds.org/

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
2018-12-11 16:15:32 +02:00
Joseph Herlant
b5fd854e52
Fix typo: controling -> controlling 2018-09-17 09:49:13 -07:00
Arun Raghavan
f38485dc1a build-sys: Drop ancient check for dbus_watch_get_unix_fd()
This function was added shortly after dbus 1.1.0, and our minimum
required dbus version is greater than 1.4.
2018-07-23 19:38:37 +05:30
Arun Raghavan
651a3d108e PROTOCOL: Bump to version 33
Required for the addition of new pa_encoding_t values.
2018-06-21 06:29:32 +05:30
Javier Jardón
57e3ccaf51 Use upstream gettext instead intltool 2018-06-21 06:28:59 +05:30
Luiz Augusto von Dentz
3b1093c0ad bluetooth: Remove BlueZ 4 support
BlueZ 4 is no longer supported by BlueZ community for a long long time,
also by moving to BlueZ 5 it should make it even more clearer that
BlueZ 4 is no longer an option.
2018-06-21 06:24:36 +05:30
Tanu Kaskinen
0ee9d65467 build-sys: bump sonames
A few small internal changes in libpulse. No changes in libpulse-simple
and libpulse-mainloop-glib.
2018-05-11 13:53:31 +03:00
Tanu Kaskinen
5d66b44203 build-sys: enable GSettings by default
A new paprefs release is expected soon, and it will only support
GSettings. In order to have the default configuration work with the new
paprefs version, we need to enable GSettings by default.

If both module-gconf and module-gsettings are enabled when building
PulseAudio, both modules will be part of the default configuration. That
can cause trouble, because when the GConf database is migrated to
GSettings, the old configuration in GConf is not removed, so both
module-gconf and module-gsettings will try to load modules.

Generally it's not necessary to have both modules enabled even at build
time, so let's default to having only one of them enabled.
2018-04-19 14:45:31 +03:00
Tanu Kaskinen
f5ff5d8bf2 build-sys: remove a redundant enable_gsettings check
If HAVE_GSETTINGS is 1, then enable_gsettings must be yes, so checking
enable_gsettings isn't necessary.
2018-04-19 14:38:36 +03:00
Tanu Kaskinen
b43d47f005 default.pa: add module-gsettings
This also makes the module-gconf section conditional on HAVE_GCONF,
because if only gsettings support is built, the gconf section in the
configuration file would be redundant and confusing.
2018-04-19 14:31:18 +03:00
Sylvain Baubeau
785b660d8a module-gsettings: new module to store configuration using gsettings
GConf is deprecated, and distributions are removing it. paprefs depends
on GConf, so in order to avoid paprefs getting removed as well, paprefs
has to be changed to use something else than GConf. GSettings is the
easiest alternative to migrate to, although it has the same problems
that GConf had: no support for system mode or networking.

This patch takes the non-GConf specific code from module-gconf and puts
it in stdin-util.[ch], which is then reused by module-gsettings.
module-gsettings is designed to be very similar to module-gconf.

Migration is expected to happen as follows: Distributions update
PulseAudio and paprefs at the same time, or first PulseAudio and then
paprefs. paprefs depends on module-gsettings, and module-gsettings
conflicts with module-gconf. Therefore module-gconf gets automatically
removed during the paprefs update. After the update an old PulseAudio is
likely to be running with module-gconf loaded. If the user tries to use
paprefs during this period, whatever the user does in paprefs won't have
any effect until PulseAudio is restarted (probably by a reboot or
relogin). This is not ideal, but will have to do.

When module-gsettings is loaded, it runs gsettings-data-convert
(implemented in a later patch). That will copy the settings from GConf
to GSettings. If gsettings-data-convert is not available (it's part of
GConf, so it may have already been uninstalled), then any previous
paprefs settings are lost.
2018-04-19 14:30:30 +03:00
Tanu Kaskinen
dfb0460fb4 memfd-wrappers: only define memfd_create() if not already defined
glibc 2.27 is to be released soon, and it will provide memfd_create().
If glibc provides the function, we must not define it ourselves,
otherwise building fails due to conflict between the two implementations
of the same function.

BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=104733
2018-01-31 08:21:32 +02:00
Vivek Dasmohapatra
6d7e057b37 daemon: don't re-exec if the linker supports the -z,now option
Usually PulseAudio is built with a linker that supports the -z,now
option, and that option should have the same effect (i.e. the dynamic
linker resolves all symbols when the program is started) as re-execing
with the LD_BIND_NOW environment variable set, so usually the re-execing
is redundant.

BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=104789
2018-01-26 04:05:38 +02:00
Felipe Sateler
f250341b80 build-sys: don't install esdcompat tool if building without esound support 2018-01-24 04:09:21 +02:00
Tanu Kaskinen
c8bd93c5a7 core-util, cpu-x86: use __get_cpuid() instead of homegrown assembly
The get_cpuid() function in cpu-x86.c was buggy on x86-64. When building
without optimizations, the homegrown assembly code overwrote the
beginning of the function argument list on the stack. That happened to
work fine on regular x86-64, but caused crashing with the x32 ABI.

At least GCC and clang provide cpuid.h, which has the __get_cpuid()
function that can be used instead of the homegrown assembly.

The PA_REG_* constants can be removed as well, because they're not used
any more.

BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=103656
2017-12-07 01:06:48 +02:00
Felipe Sateler
69fcfa60b5 build-sys: test for cxx-11 after AC_USE_SYSTEM_EXTENSIONS
This avoids the following autoconf warning:
configure.ac:89: warning: AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS
../../lib/autoconf/specific.m4:368: AC_USE_SYSTEM_EXTENSIONS is expanded from...
configure.ac:89: the top level
2017-10-14 01:48:07 +03:00
Tanu Kaskinen
fff0b34347 build-sys: bump sonames 2017-07-25 01:47:58 +03:00
David Michael
e538e19664 solaris: Support building on GNU Hurd 2017-07-14 22:01:15 +03:00