Commit graph

516 commits

Author SHA1 Message Date
Ahmed S. Darwish
f665b2b10d protocol-native: Don't signal memfd support for 9.0 clients
Although such 9.0 clients support memfd transport, they have an
iochannel bug that would break memfd audio if they're run in 32
bit mode over a 64-bit kernel. Influence them to use the POSIX
shared memory model instead.

Also bump the protocol version to exclusively mark such v9.0
libraries. Check commit 451d1d6762 for further details.

BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=97769
Signed-off-by: Ahmed S. Darwish <darwish.07@gmail.com>
2016-11-19 15:11:59 +02:00
Peter Meerwald
f9985e1cbd build: Check version of check library, require >= 0.9.10
tests/core-util-test.c uses ck_assert_int_lt() which was introduced
in check 0.9.10

make this dependency (with --enable-tests) explicit in configure.ac

Signed-off-by: Peter Meerwald-Stadler <pmeerw@pmeerw.net>
2016-08-10 17:05:01 +03:00
Romain Naour
a7231692e9 build-sys: C++11 is only required for WebRTC support
Make C++11 support optional and explicitly check for gnu++11.

Stop the build only if no C++11 support has been found and WebRTC
support has been requested.

Fixes:
http://autobuild.buildroot.net/results/d89/d897a94a8b6a52eba03d04c24536f554a7643000

Signed-off-by: Romain Naour <romain.naour@gmail.com>
2016-07-22 16:30:11 +05:30
Arun Raghavan
c692ec3afd format: Drop dependency on json-c
json-c has a symbol clash (json_object_get_type) with json-glib (which
at least a number of our GNOME clients use). This patch moves to our own
JSON parser so that we can avoid this kind of situation altogether.

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=95135

Signed-off-by: Arun Raghavan <arun@arunraghavan.net>
2016-06-22 21:04:47 +05:30
Arun Raghavan
47a0171a95 build-sys: Bump sonames for release
Bumping libpulse' version since PA_RATE_MAX was changed.

Signed-off-by: Arun Raghavan <arun@arunraghavan.net>
2016-05-12 15:52:44 +05:30
Jeremy Huddleston Sequoia
4f7ade31a9 build-sys: Fix check for CoreServices.h
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@macports.org>
Signed-off-by: Arun Raghavan <git@arunraghavan.net>
2016-05-03 08:51:26 +05:30
Ahmed S. Darwish
d2a6afcab3 core: Support memfd transport; bump protocol version
Now that all layers in the stack support memfd blocks, add memfd
support for the daemon's global core mempool. Also introduce
"enable-memfd=" daemon argument and configuration option.

For now, memfd support is an opt-in feature to be activated only
when daemon's enable-memfd= is set to yes.

Signed-off-by: Ahmed S. Darwish <darwish.07@gmail.com>
2016-04-27 18:37:08 +05:30
Ahmed S. Darwish
dcbe79bd63 build-sys: Set C language standard to gnu11
Per glibc feature_test_macros(7), setting compiler flags to
-std=c11 (or any c* variant like c99) enforces strict ANSI
mode.

Enforcing strict ANSI makes all declarations under _GNU_SOURCE
unavailable. This leads to build warnings in the form of:

    warning: implicit declaration of function ‘syscall’

Thus replace -std=c11 with -std=gnu11

Signed-off-by: Ahmed S. Darwish <darwish.07@gmail.com>
2016-04-23 12:53:17 +03:00
Ahmed S. Darwish
73e86b1cb1 pulsecore: Introduce memfd support
Memfd is a simple memory sharing mechanism, added by the systemd/kdbus
developers, to share pages between processes in an anonymous, no global
registry needed, no mount-point required, relatively secure, manner.

This patch introduces the necessary building blocks for using memfd
shared memory transfers in PulseAudio.

Memfd support shall also help us in laying out the necessary (but not
yet sufficient) groundwork for application sandboxing, protecting PA
from its clients, and protecting clients data from each other.

We plan to exclusively use memfds, instead of POSIX SHM, on the way
forward.

Signed-off-by: Ahmed S. Darwish <darwish.07@gmail.com>
2016-04-02 05:47:47 +02:00
Arun Raghavan
aa02e1654b build-sys: Move to compiling with C11 support
This is needed for building with anonymous unions. A bunch of calls to
fail() that used to mysteriously work need fixing -- fail() is a macro
that takes a printf-style message as an argument. Not passing this
somehow worked with the previous compiler flags, but breaks with
-std=c11.
2016-02-25 09:09:13 +05:30
Arun Raghavan
f8beaae238 echo-cancel: Update webrtc-audio-processing usage to new API
The code now needs C++11 support to compile with the updated
webrtc-audio-processing library.
2016-02-24 18:43:58 +02:00
Arun Raghavan
3314dc72ea build-sys: Only use sysroot in OS X CFLAGS if specified
The default value doesn't make sense any more, so we'll only use this if
explicitly specified.
2016-02-12 19:25:00 +05:30
Kamil Rytarowski
a1191874fe solaris: Illumos does not ship with SOUND_PCM* functionality
Code reference:
https://github.com/joyent/illumos-joyent/blob/master/usr/src/uts/common/sys/audio/audio_oss.h

Add autoconf checks for:
- SOUND_PCM_READ_RATE
- SOUND_PCM_READ_CHANNELS
- SOUND_PCM_READ_BITS

Some platforms like SunOS (Illumos) may ship without SOUND_PCM_* functionality

Thanks to Jonathan Perkin (Joyent) for Illumos code reference.
2016-01-22 13:25:29 +05:30
Kamil Rytarowski
7c1a5d6159 NetBSD: Stop depending upon nonstandard __WORDSIZE
There is no way to check CPU type in a portable way across ABIs.

Assume if pointers are 64-bit that CPU is capable to perform fast
64-bit operations. Add an extra check to handle x32-ABI.

PulseAudio by default builds with -Wundef. If we add -Werror=undef this
missing define is fatal. By default build log is full of entries like:

In file included from ./pulsecore/core.h:47:0,
                 from ./pulsecore/module.h:31,
                 from ./pulsecore/sink-input.h:31,
                 from pulsecore/sound-file-stream.c:36:
./pulsecore/sample-util.h: In function 'pa_mult_s16_volume':
./pulsecore/sample-util.h:58:5: warning: "__WORDSIZE" is not defined [-Wundef]
 #if __WORDSIZE == 64 || ((ULONG_MAX) > (UINT_MAX))
     ^

(NetBSD-7.99.21 with default GCC 4.8.5)

This change fixes build issues on NetBSD.

This also address a bug reported by Shawn Walker from Oracle (possibly Solaris):
Bug 90880 - builds can fail due to non-portable glibc-specific internal macro usage
2016-01-08 14:23:37 +01:00
Mihai Moldovan
51caceb770 configure.ac: add HAVE_COREAUDIO to automake and code.
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
Signed-off-by: Mihai Moldovan <ionic@ionic.de>
2016-01-04 12:39:20 +05:30
Tanu Kaskinen
175fc3ef13 build-sys: bump sonames
Bump 18 -> 19 due to the addition of the LFE balance API.
2015-12-27 14:42:35 +02:00
Kamil Rytarowski
7f4acbd1c0 netbsd: Revamp NetBSD platform checks 2015-12-08 08:56:47 +05:30
Tanu Kaskinen
74c9c41031 build-sys: fix PULSE_LOCALEDIR definition
On some systems (at least Arch) DATADIRNAME is not defined. This
caused PULSE_LOCALEDIR to point to a wrong directory. This seemed like
an issue introduced in 7.0, but probably something else was updated in
Arch at the same time, causing DATADIRNAME to become undefined,
because there were no changes between 6.0 and 7.0 that could have
caused this.

After noticing that localedir is a standard variable, my first idea
was to use pulselocaledir='${localedir}' in configure.ac, but Jan
Steffens pointed out that it causes the final PULSE_LOCALEDIR to
become "${prefix}/share/locale", that is, the variables weren't fully
expanded. I then found a FAQ item in Autoconf's manual[1], which
recommends not to define any absolute installation directories in
configure.ac, because the installation directories should be possible
to change when running make. The recommended solution is to define the
constant in AM_CPPFLAGS instead, so that's what this patch does.

[1] https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Defining-Directories.html
2015-12-07 10:41:37 +01:00
Kamil Rytarowski
cda1a5e897 netbsd: Fix unportable test(1) construct 2015-12-07 09:09:32 +01:00
Kamil Rytarowski
2d555ba15c netbsd: Improve handling of <locale> and <xlocale.h> headers
NetBSD ships with strtod_l(3) in <stdlib.h>.
Having strtol_l(3) doesn't imply to have <xlocale.h>.
Generalize inclusion of <locale.h> and <xlocale.h>.
2015-12-07 09:01:21 +01:00
Kamil Rytarowski
3753f50755 netbsd: NetBSD ships with paccept(2) a superset of Linux-specific accept4()
[diwic: Moved paccept to #bsd line in configure.ac]
2015-11-27 09:52:10 +01:00
Tanu Kaskinen
772d655de6 build-sys: fix the default bash completion directory
If bashcompletiondir was empty, the check didn't catch that. As
a result, the symlinks that were supposed to be generated in the
completion directory were created in the root directory.
2015-09-27 17:02:17 +03:00
Shawn Walker
b727dd540b build-sys: don't use the nodelete linker flag on executables
The nodelete flag indicates that we don't want our libraries to be
unloaded. It's only relevant on libraries, so let's not use it for
executables. Trying to use it on executables breaks things on some
platforms.

BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=90878
2015-09-25 17:29:02 +05:30
Tanu Kaskinen
4c964d8074 build-sys: bump sonames
There were a couple of bug fixes to libpulse since 6.99.1.
2015-09-12 16:23:03 +03:00
Tanu Kaskinen
27d71c00d8 build-sys: check strtod_l instead of strtof_l
We have no strtof_l calls in the code, so it doesn't make sense to
check that function's availability. We have one strtod_l call, so
let's check that instead.

I don't know if this change makes any practical difference. I just
wondered why we had HAVE_STRTOF_L ifdefs in core-util.c for code that
didn't use strtof_l.
2015-09-07 14:54:27 +02:00
Tanu Kaskinen
8f53a32a8c build-sys: bump sonames
In this release cycle, libpulse had some internal code changes, but no ABI
changes.

libpulse-simple and libpulse-mainloop-glib had no changes whatsoever.
2015-08-27 20:48:41 +03:00
Arun Raghavan
344770389e build-sys: Fix up setting the bash completion dir
This makes setting up the bash completion dir consistent with the other
cases that we need to deal with, and also handles distcheck correctly.
2015-07-29 08:08:41 +05:30
Ville Skyttä
84dff820ed build-sys: Install bash completion to where bash-completion.pc says
Fall back to the previous /etc/bash_completion.d dir on failures
(either old bash completion or not installed).

changes over Ville Skyttä's patch:
define PKG_CHECK_VAR macro which became available only in pkg-config 0.28

see https://bugs.freedesktop.org/show_bug.cgi?id=88782 and
https://bugs.freedesktop.org/show_bug.cgi?id=89540

Signed-off-by: Ville Skyttä <ville.skytta@iki.fi>
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
2015-05-25 16:20:43 +02:00
Andrey Semashev
6ea00eeb07 Added libsoxr detection and optional build of soxr resampler backend. 2015-02-12 20:36:59 +01:00
Peter Meerwald
fd263f048b man: Drop separate paplay man page, move info to pacat man page
see https://bugs.freedesktop.org/show_bug.cgi?id=68135

pacat and paplay man pages both claim to describe the paplay program
(which is actually a symlink to pacat) -- this is inconsistent and
redundant, so drop the paplay man page

a follow-up patch will add man page symlink for all programs
implemented by pacat, not just paplay

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
2015-02-12 20:36:58 +01:00
Ondrej Holecek
5effc83479 update FSF addresses to FSF web page
FSF addresses used in PA sources are no longer valid and rpmlint
generates numerous warnings during packaging because of this.
This patch changes all FSF addresses to FSF web page according to
the GPL how-to: https://www.gnu.org/licenses/gpl-howto.en.html

Done automatically by sed-ing through sources.
2015-01-14 22:20:40 +02:00
Tanu Kaskinen
ce950b150d build-sys: Don't enable libsamplerate by default
The libsamplerate based resamplers have been deprecated, so it's best
to not build them by default.
2015-01-05 16:14:19 +02:00
David Henningsson
d9854577c3 Revert "launch: Disable autospawn by default when systemd daemon support is enabled."
This reverts commit 7276faca72.

Using the new systemd socket activation for PulseAudio will cause PulseAudio to not
have any connection with D-Bus, breaking device reservation protocol, module-jackdbus-detect
and module-dbus-protocol. Therefore, autospawn is now still enabled by default even if you
build with systemd daemon headers.
2014-12-19 13:46:11 +01:00
David Henningsson
580f468900 build-sys: Don't build srbchannel-test on targets without srbchannel
Reported-by: Felipe Sateler <fsateler@debian.org>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2014-12-03 11:48:52 +01:00
Tanu Kaskinen
7856a7bf06 build-sys: Fix the BlueZ 5 native headset backend check
If the libbluetooth headers aren't available, we shouldn't treat that
as an error unless --enable-bluez5-native-headset has been explicitly
given to configure.

BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=86582
2014-11-24 11:49:43 +02:00
Tanu Kaskinen
2df47d1519 build-sys: Always define bluetooth related HAVE_* variables
I don't know if it can cause any problems if HAVE_BLUEZ_4,
HAVE_BLUEZ_5, HAVE_BLUEZ, HAVE_BLUEZ_5_OFONO_HEADSET or
HAVE_BLUEZ_5_NATIVE_HEADSET are undefined when the corresponding
features are not enabled, but it certainly won't hurt to define the
variables also when the features are not enabled.
2014-11-24 11:49:41 +02:00
David Henningsson
a68d7e2236 configure: Bump sonames
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2014-11-21 13:27:31 +01:00
Peter Meerwald
64f3b5711b build-sys: Deprecate libsamplerate support
output DEPRECATED warnings for libsamplerate in configure and
PA daemon's log

libsamplerate offers no particular advantage over the speex
resampler and is distributed under GPL; support for it will be removed
in one of the next releases

v2: (thanks Arun Raghavan)
* log a warning (instead of info)

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
2014-11-17 13:19:37 +01:00
David Henningsson
1ffede3c85 bluez 5: Build both headset backends, if available
Enable both ofono and native backends to be built into the same
libbluez5-util. Never build the null backend.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2014-11-14 11:44:33 +01:00
Tanu Kaskinen
4f4ed3d11a build-sys: Fix a variable value check 2014-11-12 14:48:58 +02:00
Colin Guthrie
bdbc561619 build-sys: Minor cosmetic tidyup of configure summary 2014-11-03 12:32:23 +00:00
Colin Guthrie
7276faca72 launch: Disable autospawn by default when systemd daemon support is enabled.
When enabled, this method is prefered over pulseaudio's built in
systems so we should try our best to ensure that it cannot be spawned
outside of the mechanisms desired.

Packagers should call 'systemctl --global enable pulseaudio.socket' to
enable the socket for all users, or alternatively ship an enabling
symlink in /usr/lib/systemd/user/sockets.target.wants/ folder. It may
also make sense for distributions to add in a ConditionNNN= line to the
socket unit if they have a downstream mechanism for enabling or
disabling pulseaudio.

If individual users wish to opt out of this vendor (or administrator)
decision, they can call 'systemctl --user mask pulseaudio.socket'
2014-11-03 12:32:23 +00:00
Colin Guthrie
e542e81004 launch: Add systemd units for launching pulseaudio user instances 2014-11-03 12:32:23 +00:00
Colin Guthrie
467b4b9bee socket-server: Add support for systemd socket activation.
This adds support to module-native-protocol-unix to take over already
listening sockets passed in via socket activation (e.g. from systemd)

Most of the code is isolated to socket-server but some cleanup code also
had to be tweaked to ensure we do not overzealously close open fds.
2014-11-03 12:32:23 +00:00
Colin Guthrie
fb1ca6f0c1 build-sys: Add support for newer systemd without compatibility libs
In newer versions of systemd some libraries were combined for the sake of
general simplicity.

This change checks against the newer name first and avoids separate pkgconfig
checks if it's found. We probably want to keep support for the older library
names for some time. systemd does allow for the shipping of compatibility
pkgconfig files to not break downstream code like ourselves which is why this
likely hasn't been "fixed" until now.

With this change we no longer rely on systemd having been built with those
compatibility pkgconfig files.
2014-11-03 12:32:23 +00:00
Colin Guthrie
f7da58b73f build-sys: Clarify some systemd sub-component variable/define names.
We currently use the term SYSTEMD when referring to libsystemd-login
and JOURNAL when referring to libsystemd-journal.

I will be shortly adding support for libsystemd-daemon and in
preparation I figured it would be a good idea to clarify the names
used currently before adding another!
2014-11-03 12:32:23 +00:00
Wim Taymans
7d4a497b3d backend-native: add a new native headset backend
Add a simple native headset backend that implements support for the
blutooth HSP profile.
This allows pulseaudio to output audio to a Headset using the HSP profile.

Make the native backend the default.
2014-10-31 10:46:10 +05:30
Michał Górny
ee4bbe5cd3 build-sys: Alias bash-completion for all PulseAudio commands
Bash-completion 1.90 introduced support for on-demand loading
of completions. Install the completion file as 'pulseaudio' to match
the main command, and create symlinks as aliases for other supported
commands in order to support the new system.
2014-10-28 12:48:38 +02:00
David Henningsson
e728bcf614 configure: Remove "WIBBLE" test
Apparently "WIBBLE" is just a test, and maybe the test was "How
long does it take until somebody notices a strange row in configure.ac
and tries to remove it", if so, the test result is "a little over
three years". :-)

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2014-10-24 15:01:39 +02:00
Felipe Sateler
93c698c9fc util: Try finding out application name using dladdr if available
This fixes getting the binary name in the Hurd, or any other port using
the GNU C library, but only in the case where the library is directly
linked to. Opening with dlopen will not work.

Change in v3: reorder header includes and definitions
Change in v2: use a weak reference to main, so that we
don't crash when main cannot be found.
2014-10-16 15:57:21 +02:00