Commit graph

3493 commits

Author SHA1 Message Date
Barnabás Pőcze
934ab3036e treewide: use SPDX tags to specify copyright information
SPDX tags make the licensing information easy to understand and clear,
and they are machine parseable.

See https://spdx.dev for more information.
2023-02-16 10:54:48 +00:00
Barnabás Pőcze
2b6541f503 spa: support: send TID to systemd journal
Knowing which thread posted which log message can
be useful, so send the TID to the systemd journal.

The `TID` field is explicitly listed on
https://www.freedesktop.org/software/systemd/man/systemd.journal-fields.html#TID=
2023-02-14 11:38:52 +00:00
Wim Taymans
58812103f3 test: add another channelmix test 2023-02-14 11:57:04 +01:00
Wim Taymans
2895961b48 audioconvert: improve channelmix with unknown layouts
Use a 0 mask to handle unknown layouts. When the source or destination
is an unknown layout, pair, distribute or average. When pairing, keep
track how we paired and use that to construct the matrix later.

This fixes [ UNK UNK ] -> [ FL FR ] mapping by pairing.
2023-02-14 11:57:04 +01:00
Wim Taymans
b93c3fb0c5 spa: improve param doc 2023-02-13 17:15:04 +01:00
Dmitry Sharshakov
57f19959a7 meson: drop unnecessary option
Co-authored-by: Barnabás Pőcze <pobrn@protonmail.com>
2023-02-10 09:21:58 +00:00
Dmitry Sharshakov
3d971b4024 meson: allow building libcamera from source as a subproject
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.
2023-02-10 09:21:58 +00:00
Dmitry Sharshakov
6d712d17e7 meson: libcamera: remove libdrm dependency
Seems to no longer be used in plugin headers, thus not a direct dependency.
2023-02-10 09:21:58 +00:00
Barnabás Pőcze
1cde814cdf spa: libcamera: remove unused libcamera-client.c 2023-02-09 22:02:48 +01:00
Pauli Virtanen
b94cb5d99d bluez5: fix BAP current profile
Fix BAP profiles again: make sure the current profile is indicated
properly.
2023-02-07 22:54:37 +02:00
Wim Taymans
b9999b292d channelmix: improve mixing setup
Handle MONO layout as a real layout, not just like FC. This means it
does not share the FC mixing weights.
Only distribute and combine MONO channels when the target is also
MONO, enable normalization in this case.
Otherwise downmix and upmix the mono channels like any other channel,
which will make it respect the upmix and other settings.
Change some tests with this new way of doing things.

Fixes #3010
2023-02-06 21:05:23 +01:00
Pauli Virtanen
987b772b97 bluez5: don't claim sbc is supported when there's no A2DP at all
Handle failure to register legacy A2DP endpoints.
2023-02-06 06:35:40 +00:00
Pauli Virtanen
cfee662f0b bluez5: fix BAP profiles for source/duplex cases
Codec switching does not currently work properly for source/duplex.
With BAP it's also possible only when we're BAP client.

When we can't codec switch, emit the "codecless" BAP profile.
2023-02-06 06:35:40 +00:00
Pauli Virtanen
417f1dc02a bluez5: fix dependency checking
Don't do subdir_done() in bluez5/meson.build, since the presence of
dependencies is supposed to be checked in spa/meson.build.
2023-02-05 09:36:45 +00:00
Wim Taymans
73cc5d1dde libcamera: map controls to standard ids
Map the control id from libcamera to standard pipewire ones and
vice versa.
2023-02-05 10:27:47 +01:00
Wim Taymans
50a1e2db22 utils: remove () around variable declaration
c++ warns about this.
2023-02-05 10:27:12 +01:00
Wim Taymans
8ffb74c8e2 alsa: keep more headroom when rate matching
When we are rate matching, keep some more headroom to make sure we
have enough data for the adaptive resampler.

Fixes crackling when following the dummy node and probably also when
following another capture device.
2023-02-02 20:06:58 +01:00
Wim Taymans
206df03c27 support: Handle supported clocks with timerfd
We don't need to follow a clock when it is one of the supported clocks
for timerfd.
2023-02-01 16:19:14 +01:00
Wim Taymans
e3b358ac8b support: add support for other clocks
Add support for using other clocks.
clock.id can be used to set one of the system clocks.
clock.device can be used to open a clock device such as a PTP clock
device.
Use a dll to track the progress of non-monotonic clocks.
2023-02-01 15:54:54 +01:00
Wim Taymans
2681d7e3ec acp: add option to set Pro Audio channels
We always probe the Pro Audio profile with the maximum number of
channels but this can lead to a more limited amount of sample rates.

Add an option to set the channels used when probing so that the other
samplerates become available.

Fixes #2990
2023-01-31 15:59:39 +01:00
Pauli Virtanen
1ed9daa8c5 bluez5: fix supported codecs when as BAP Server
BAP Clients do not have endpoints associated with them, and we only know
that codecs on currently configured transports are supported.

Handle this case in spa_bt_device_supports_media_codec
2023-01-29 17:38:21 +02:00
Pauli Virtanen
fb43a71543 bluez5: SupportedUUIDs is an adapter-specific property
The DBus adapter objects has both .Adapter1 and .Media1 interfaces.

Change handling of this so that we wait for both properties to appear.
2023-01-27 19:25:16 +02:00
Pauli Virtanen
7b54a891b4 bluez5: separate object manager for A2DP and BAP
BlueZ fails registering object managers containing A2DP endpoints if
controller is in LE-only mode.

Make the A2DP and BAP object managers separate, so that failure to
register one does not prevent registering the other.

Also rename some functions to indicate which ones deal with the legacy
BlueZ API.
2023-01-27 19:25:16 +02:00
Wim Taymans
1efb43b897 bluez5: fix uninitialized value warning 2023-01-26 09:54:30 +01:00
Pauli Virtanen
17049abd04 bluez5: backend-native: fixup HFP command handling
Strip initial \n from commands: some devices (Sennheiser HD 350BT) send
them.

Only reply OK to empty command with terminated command line;
non-terminated lines are invalid.

Add some debug in case the RFCOMM reply contains non-printable
characters.
2023-01-25 22:22:37 +02:00
Pauli Virtanen
effc1974e3 bluez5: backend-native: HFP should reply OK to no commands
HFP 1.8 -> 3GPP 27.007 -> ITU-T Rec. V.250 Sec. 5.6, which indicates to
reply OK to no commands on command line, not ERROR.
2023-01-25 19:35:26 +02:00
Wim Taymans
3e6f62875d audioconvert: make sure shifts are defined
Don't to signed left shifts, make macros to do the shifting on unsigned
ints when needed.

See !1505
2023-01-24 21:29:18 +01:00
Niklāvs Koļesņikovs
b0fccf87d7
bluez5: a few more -Werror=strict-prototypes fixes
The Bluetooth Low Energy MIDI code added a few legacy function declarations
that fail when building with -Werror=strict-prototypes. The fix is same as
before: add a void to the empty function argument list.

Signed-off-by: Niklāvs Koļesņikovs <89q1r14hd@relay.firefox.com>
2023-01-24 11:14:27 +02:00
Carlos Rafael Giani
293ba8aee3 alsa-compress-offload-sink: Miscellaneous clean up
- Fix typo
- Fix index check in port_enum_formats()
2023-01-24 08:44:14 +00:00
Carlos Rafael Giani
6284cf39c0 meson: Rework FFmpeg / tinycompress detection and add pw-cat-ffmpeg option
* 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.
2023-01-24 08:44:14 +00:00
Carlos Rafael Giani
e9a2c6aa34 Rename "compressed-offload to "Compress-Offload" in the code 2023-01-24 08:44:14 +00:00
Sanchayan Maity
6a034cc398 Add support for ALSA compressed offload
See
https://docs.kernel.org/sound/designs/compress-offload.html
https://github.com/alsa-project/tinycompress
2023-01-24 08:44:14 +00:00
Carlos Rafael Giani
f3914e494c spa: Add ENCODED audio format to compressed format builder results
WirePlumber checks for the ENCODED audio format to determine if the
format is compressed/encoded. Without this info, it is not able
to automatically link compressed audio nodes.
2023-01-24 08:44:14 +00:00
Wim Taymans
b66b9f70c4 spa: add APE format 2023-01-24 08:44:14 +00:00
Wim Taymans
e535d4c6c4 spa: add FLAC format 2023-01-24 08:44:14 +00:00
Wim Taymans
efbce802e4 spa: add ALAC format 2023-01-24 08:44:14 +00:00
Wim Taymans
603c28223b spa: add AMR type 2023-01-24 08:44:14 +00:00
Wim Taymans
de5015c77b spa: add Real Audio format 2023-01-24 08:44:14 +00:00
Wim Taymans
6c962d8258 spa: add WMA type 2023-01-24 08:44:14 +00:00
Wim Taymans
d24b3f29b2 spa: add vorbis type 2023-01-24 08:44:14 +00:00
Wim Taymans
2ac8a3f4e2 spa: add AAC format 2023-01-24 08:44:14 +00:00
Wim Taymans
844a3d8534 spa: add mp3 type 2023-01-24 08:44:14 +00:00
Wim Taymans
9e0a7c26f7 spa: add bitrate and blockAlign format props 2023-01-24 08:44:14 +00:00
Pauli Virtanen
f292818961 bluez5: dbus-monitor: call remove hooks always
Call remove hooks always. We don't rely on this currently, but may be
clearer like this.
2023-01-24 08:27:56 +00:00
Pauli Virtanen
039759ceaf bluez5: use spa_debug_log_mem, not spa_log_hexdump 2023-01-24 08:27:56 +00:00
Pauli Virtanen
fef0981488 bluez5: fixup BLE MIDI selinux README
The SELinux configuration should allow passing sockets also from PW to
bluetoothd.
2023-01-24 08:27:56 +00:00
Pauli Virtanen
25f36e4334 bluez5: add info key indicating glib mainloop is usable 2023-01-24 08:27:56 +00:00
Pauli Virtanen
93a473eff6 bluez5: prevent unloading spa-bluez5.so
GObject is not compatible with unloading shared libraries using it, so
add linker flags preventing that.
2023-01-24 08:27:56 +00:00
Pauli Virtanen
661569febc bluez5: use GDBus in midi-node 2023-01-24 08:27:56 +00:00
Pauli Virtanen
89542289ac bluez5: use GDBus in midi-server 2023-01-24 08:27:56 +00:00