vulkan_headers was a workaround for distributions providing pkg-config information
without the headers. Replacing it with a more conventional have_vulkan
and assert header availability if the option vulkan is enabled.
Enable LE Audio support by default if liblc3 is present, the Pipewire
implementation should be OK. Remove unused HAVE_BLUETOOTH_BAP define,
we don't have any #ifdefs for this.
The feature is still disabled by default in BlueZ, which also now takes
care of necessary hardware feature checks, and should be safe to enable
on Pipewire side.
Make BAP nodes align the first sample of their packets at multiples of
the ISO interval, counted in the shared graph sample position. This
skips a few samples (< 10ms) at the start of playback to ensure the
alignment.
Since the sinks align their flush timing to the graph time, this also
results to them sending packets corresponding to the same graph time at
the same real time instants.
Due to packet queues in kernel/controller, the playback may still be off
by multiples of packets. Kernel changes are needed to address that part.
This works towards making BAP left and right channels to be
synchronized in TWS headsets, where the two earpieces currently appear
as different devices.
* Add support for running the sink as a driver
* Detect which compressed formats are actually supported
* Correctly open/close/start/stop device according to the node commands
* Shift away from tinycompress and use Compress-Offload ioctls directly
to be able to access various caps information (including fragment sizes)
which are unavailable in the tinycompress API
* Implement SPA_PARAM_PropInfo and SPA_PARAM_Props support
Many distributions provide outdated libcamera versions. This change should also help making changes to libcamera itself.
System libcamera is kept a default to avoid breaking existing build processes relying to packaged libcamera.
* Decouple FFmpeg integration in pw-cat from the ffmpeg option; if
one wants to use Compress-Offload but not the ffmpeg SPA plugin,
it is then possible to just pass -Dpw-cat-ffmpeg=enabled to meson.
Likewise, this also makes it possible to build the ffmpeg plugin
without extending pw-cat.
* tinycompress does not need to be detected in the root meson.build,
since it is only needed by the alsa plugin.
Support Opus as A2DP vendor codec.
The specification for vendor A2DP codec is our Pipewire-specific one, so
it is compatible only with devices running Pipewire.
The file name "lc3.h" in the ETSI LC3plus package may conflict with the
actual LC3 codec, so try to find a file "lc3plus.h" instead. Also try
to find a pkg-config dependency for it first (in which case use lc3.h,
assuming it's in different directory). This can be fine tuned, if
something starts to package that library.
Since meson 0.59.0, a feature object has an `allowed()`
method which returns true when the feature is set to
'enabled' or 'auto'.
Utilize that instead of the previously used
not feature.disabled()
Commit fa64d93e64 moved the atomic_dep
from pipewire-jack to pipewire_dep however atomic_dep should also be
added to spa_dev to avoid the following build failure when building
examples (which don't depend on pipewire_dep):
FAILED: spa/examples/adapter-control
/home/buildroot/autobuild/instance-0/output-1/host/bin/sparc-linux-gcc -o spa/examples/adapter-control spa/examples/adapter-control.p/adapter-control.c.o -Wl,--as-needed -Wl,--no-undefined -Wl,-O1 -Wl,--start-group -lintl -ldl -pthread -lm -Wl,--end-group
/home/buildroot/autobuild/instance-0/output-1/host/opt/ext-toolchain/bin/../lib/gcc/sparc-buildroot-linux-uclibc/10.3.0/../../../../sparc-buildroot-linux-uclibc/bin/ld: spa/examples/adapter-control.p/adapter-control.c.o: in function `spa_graph_node_trigger':
adapter-control.c:(.text+0xdf4): undefined reference to `__atomic_fetch_sub_4'
Fixes:
- http://autobuild.buildroot.org/results/192f40a5c6e05fc11507494e19db52a47082fc35
Commit d06a2e2140
added support for finding libcamera under two different
names. However, due to breaking changes in libcamera[1],
the current codebase only supports the latest version,
thus drop support for the old name.
[1]: see commit 57dae3e2b3
libfreeaptx is a fork of libopenaptx prior to the dubious licensing
situation was introduced to the library.
As it's fully API compatible, let's use that instead for those who
want to use aptX support.
The library source is available at https://github.com/iamthehorker/libfreeaptx
libcamera commit ec7afef665a87eb389a5a4cb9ff35e9c24bbcc29 (2021-06-24)
changed the name of the generated pkg-config file from 'camera.pc'
to 'libcamera.pc'.
First look for the libcamera dependency under the new name 'libcamera',
and if that's not found, look for it under the older name 'camera'.
Fixes#1355
As suggested by George Kiagiadakis, adds calls to summary() function
for each feature that is by default set to auto, so that an overview
of their effective state is printed at the end of meson setup or
meson --reconfigure command.
Currently ordering is a bit messy but tidying it up would detach
the summary() functions from the dependencies they rely on and could
be done later along with meson_options.txt re-ordering so that the
two match as much as possible.
SPA_PLUGIN_DIR is exported in pkgconfig as 'plugindir'
PIPEWIRE_MODULE_DIR is exported as 'moduledir'
PIPEWIRE_CONFIG_DIR is exported only in uninstalled environments
as 'confdatadir' (not making this public due to the possible upcoming
configuration changes in pipewire)
All variables are also exported on the meson dependency objects,
so that subprojects can find them.
Wireplumber can then find them like this:
pipewire_moduledir = pipewire_dep.get_variable(
pkgconfig: 'moduledir', internal: 'moduledir', default_value: '')
... and this works regardless of whether wireplumber is being
configured as a subproject or using the uninstalled pkgconfig files
or using the system installation of pipewire.
This is required in order to run wireplumber tests in the
uninstalled environment with 'meson test'
This allows meson subprojects (or projects using pipewire as a meson
subproject) to be able to use dependency('libpipewire-0.3') and
dependency('libspa-0.2') to find the uninstalled versions of these
libraries directly from the build dir instead of going through pkg-config
`av_register_all()` is the only thing used from libavformat,
but that doesn't seem to be needed for codec enumeration,
so remove it, and call `avcodec_register_all()` instead
when libavcodec < 58.10.100.
openaptx has recently changed its license to explicitly exclude
'Freedesktop projects' from using it, which would include PipeWire, as
well as shifting to base terms of GPLv3:
811bc18586
This unilateral license change is legally dubious in many ways.
The original work came from ffmpeg under the LGPL v2.1, to which third
parties may not add additional restrictions (per sections 2 and 7 of the
LGPL v2.1), so LGPLv2.1 + may-not-use restrictions are not permissible
without the explicit consent of the original copyright holder.
The upgrade to LGPL v3.0 without explicit consent from the original
copyright holder is in itself permissible through the upgrade terms of
the LGPL, however the additional restrictions imposed again conflict
with sections 7 and 10 of the GPLv3 (as the base of the LGPLv3, with
those sections not being invalidated by the additional LGPLv3 text).
Though it does not impact the legal validity of the redeclaration of
licensing, the claims that freedesktop.org has violated the terms of the
openaptx license in the past are false; the work was contributed to the
PulseAudio project with an explicit open license, with the original
contributor later attempting to revoke permission for its use, despite
the explicit terms of the license giving no ability to do so as they
lack a change-of-heart provision.
The claims that Collabora violated the license are even more baseless;
they are based on an assertion that when I (acting on behalf of
freedesktop.org rather than Collabora, in my own unpaid time) banned
users from freedesktop.org's GitLab instance due to sustained violations
of the Code of Conduct users agree to when creating an account on that
platform, this somehow constituted a violation of the license. Even if
Collabora were somehow involved in this - which they were not at all -
there is no requirement under open licenses that users be given
unlimited access under all terms to any platform on the internet. Such
terms would mean that open development could only be conducted on
completely unmoderated platforms, which does not stand up to any
scrutiny.
Regardless of the declared license having no legal validity, the LGPL's
explicit provision in both v2.1 and v3.0 for such additional
restrictions to be stripped, and the low likelihood of it ever being
used together with PipeWire as its licensing terms would not be
acceptable to any distribution, enforcing a version check seems like the
safest way to ensure complete legal clarity, not put users or
downstreams in any jeopardy, and comply with the author's stated wishes
for v0.2.1 and above to not be used by PipeWire.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Make libudev dependency required if v4l2 feature option is set to enabled or
auto, or if alsa dependency is found or enabled through pipewire-alsa or alsa.