Commit graph

150 commits

Author SHA1 Message Date
Tanu Kaskinen
2c7c0f0912 build-sys: Remove version number from the module path
When packaging a new version for OpenEmbedded, I use the
buildhistory-diff tool to check what changed between the versions. The
version number in the module directory means that I get tons of diff
output due to changes in file paths. There are many removed and added
files and it's hard to see if something else than just the version
number changed.

That motivated me to write this patch. Removing the version number has
the downside that it makes it easier to have version mismatches between
the daemon and the modules, but
https://gitlab.freedesktop.org/pulseaudio/pulseaudio/merge_requests/249
will make the handling of such situations better.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/230>
2021-08-25 18:43:35 +03:00
Igor V. Kovalenko
1b96b49f65 build-sys: meson: Check if cpuid.h header is usable
With clang compiler including cpuid.h will produce error if architecture is not
x86-based, and cheching if cpuid.h exists via Meson has_header() is not enough.

Fix this by creating a list of headers checked to be usable via Meson
check_header() function, and move cpuid.h to that list.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/614>
2021-08-11 15:16:55 +00:00
Igor V. Kovalenko
42af3ee083 build-sys: meson: Require xice, xsm and xtst for daemon only
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/613>
2021-08-11 15:09:43 +00:00
Arun Raghavan
6329a2498e build-sys: Fix a warning related to avahi and config data
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/608>
2021-07-27 12:59:58 -04:00
Arun Raghavan
08a43be634 build-sys: Fix a warning related to gsettings and config data
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/607>
2021-07-27 12:49:24 -04:00
Igor V. Kovalenko
c817dfb5a4 build-sys: meson: Require bluez dependency if bluez5 feature is enabled
Build breaks if bluez5 and bluez5-native-headset are both enabled
but bluez headers are not available.

Fix this by changing `bluez5` to Meson feature requiring `bluez` dependency.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/583>
2021-06-21 10:50:08 +00:00
Igor V. Kovalenko
58052e0e04 build-sys: meson: require GIO dependency for RTP-GStreamer
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/584>
2021-06-21 03:25:32 +03:00
Igor V. Kovalenko
a7d44750af build-sys: meson: restore big endian detection
Autotools used AC_C_BIGENDIAN to set WORDS_BIGENDIAN, add Meson implementation.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/572>
2021-06-03 18:38:06 +00:00
Igor V. Kovalenko
edae28e9b5 build-sys: meson: make doxygen optional
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/558>
2021-05-19 01:05:42 +03:00
Igor V. Kovalenko
6e04c0a704 build-sys: meson: only require libltdl if daemon is built
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/557>
2021-05-18 19:37:28 +03:00
Arun Raghavan
188f9772c8 build-sys: Fix a couple of meson warnings
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/556>
2021-05-17 16:07:33 -04:00
Arun Raghavan
f8c2f4c1c2 build-sys: Bump libpulse soversion
Lots of changes, particularly related to the messaging API.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/555>
2021-05-17 11:39:57 -04:00
Igor V. Kovalenko
424580a901 build-sys: meson: allow building client libraries only
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/540>
2021-04-19 18:48:59 +00:00
James Bottomley
f22cfa8f81 bluetooth: add support for mSBC codec
Adding processing support for the mSBC codec is somewhat problematic,
because, although it is a SBC codec, the a2dp handling can't simply be
reused because the codec is used on an eSCO link with transparent
data, meaning the transmission unit has to be 48 bytes (fragmenting
the codec packets) and reassembly and boundary detection is required
to be done by the implementation.  Therefore we have to implement
separate render and push routines for msbc that do this fragmentation.

Fragmentation is done by emulating circular buffers.  The receive
(push) buffer is easy, since the mSBC packet size is 60, simply have a
buffer of this size in the sbc_info area where the fragments are
reassembled.  Once we have a full 60 bytes, decode and restart from
zero.  The send (render) buffer is more problematic, since the
transmit must be done from contiguous memory.  This means that the
buffer must be the lowest common multiple of the transmission unit and
the packet size.  This value is 240 since 240/48 == 5 and 240/60 == 4.
So the buffer pointers are reset at 240 which is a whole number of
both rendered packets and eSCO transmission units.

Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/507>
2021-04-05 15:43:32 +00:00
Igor V. Kovalenko
a82e019de9 build-sys: meson: fix meson dist version
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/516>
2021-03-15 18:25:06 +00:00
Igor V. Kovalenko
de8b7c0d8f build-sys: meson: support elogind alternative for module-systemd-login
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/502>
2021-02-12 20:34:11 +03:00
Igor V. Kovalenko
156e16f941 build-sys: meson: add tcp-wrappers
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/498>
2021-02-12 17:14:24 +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
Sanchayan Maity
3377964889 bluetooth: Add aptX support via GStreamer
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/440>
2021-01-19 13:43:42 +05:30
Sanchayan Maity
ef4762a416 bluetooth: Add LDAC support via GStreamer
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/440>
2021-01-19 13:43:42 +05:30
Sanchayan Maity
a407e9aafa bluetooth: Add a generic GStreamer codec module
This adds a generic gstreamer codec module based on which other
bluetooth codecs viz. aptX, aptX-HD, LDAC and AAC can be supported.

The GStreamer codec plugins used here themselves depend on the native
codec implementation.

aptX/aptX-HD -> libopenaptx
LDAC         -> libldac
AAC          -> Fraunhofer FDK AAC

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/440>
2021-01-19 13:43:42 +05:30
Greg V
33c89b6b76 build-sys: meson: only warn about lack of udev on Linux
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/277>
2021-01-18 16:33:53 +00:00
Greg V
72792db74c module-devd-detect: new module for soundcard hotplug on FreeBSD
Used in addition to module-detect, since devd only provides hotplug events.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/277>
2021-01-18 16:33:53 +00:00
Greg V
e7465e1a9b build-sys: meson: support memfd without SYS_memfd_create (FreeBSD 13)
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/277>
2021-01-18 16:33:53 +00:00
Greg V
51fecacd46 build-sys: meson: add execinfo dependency for FreeBSD
For 'backtrace' and related symbols

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/277>
2021-01-18 16:33:53 +00:00
Greg V
6cc1f1d91c build-sys: meson: check for shm_open even if it's in libc (FreeBSD), not librt
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/277>
2021-01-18 16:33:53 +00:00
Greg V
4ff664a3eb build-sys: meson: when libc iconv is used, tell libiconv header to pretend to be libc's iconv
The libiconv header on FreeBSD would be preferred by include path, but
we don't want to link to libiconv, so tell its header to act like
the system header.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/277>
2021-01-18 16:33:52 +00:00
Greg V
42a9254891 build-sys: meson: set HAVE_DLADDR even if it's in libc (FreeBSD), not libdl
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/277>
2021-01-18 16:33:52 +00:00
Patrick Gaskin
613b3ebc2c win32: Fix privlibdir for running on Windows
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/458>
2021-01-13 03:42:24 +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
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
b892e327a9 win32: Fix meson build system for Windows.
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/360>
2020-12-16 11:05:28 -05:00
Igor V. Kovalenko
d285b00a16 build-sys: meson: change oss-output boolean to Meson feature
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/437>
2020-12-14 19:48:06 +00:00
Tanu Kaskinen
dc79f304dd build-sys: Add an option for enabling/disabling Valgrind
In OpenEmbedded the PulseAudio recipe currently disables Valgrind
support by passing "ac_cv_header_valgrind_memcheck_h=no" to the
configure script (this was added to make it deterministic whether
Valgrdind support gets enabled or not). I'm converting the PulseAudio
recipe to use Meson, and I needed an option to disable Valgrind.
2020-12-09 11:07:09 +00: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
Igor V. Kovalenko
cb3d12377c build-sys: meson: use target_machine.cpu_family() for CANONICAL_HOST
target_machine provides information about the machine on which the compiled
binary's output will run.

cpu_family() returns CPU family name (such as x86_64, not more specific amd64)

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/426>
2020-11-30 13:40:04 +03:00
Igor V. Kovalenko
ecd597995a build-sys: meson: add oss-output option for OSS output support
Restore an option to disable OSS output available with autotools.
2020-11-28 00:34:49 +03: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
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
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
2c790e1937 meson: Add doxygen target
The documentation can be generated with "ninja -C build doxygen". The
output will go to "doxygen/html" under the build directory.
2020-08-10 19:50:57 +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
0e691b9664 build-sys: meson: bump protocol version
This was forgotten in commit 861836c5f7.
2020-07-11 15:17:11 +03:00
Jan Alexander Steffens (heftig)
0547ae49ba
build-sys: meson: Fix detection of SYS_memfd_create
It's a define resolving to a number, not a function.
2020-06-17 20:01:15 +02: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
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
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
Rasmus Thomsen
bff163089c meson: link libintl if it's not provided by libc
This fixes the build on musl with external gettext
2019-09-25 04:42:03 +00:00