Commit graph

8283 commits

Author SHA1 Message Date
Wim Taymans
2013fb56cf conf: refactor abs path
We can simplify the check by shifting the prefix and name and use
the same code for both the config and state path.
2022-02-01 15:25:48 +01:00
Wim Taymans
65c487564b context: add a function to merge config properties
Add a function that takes a section and merges the properties into
a target properties. Replace some usage of get_config_section().
2022-02-01 15:11:45 +01:00
Wim Taymans
6149c01b51 jack: pass size_t as len 2022-02-01 13:28:10 +01:00
Pauli Virtanen
f32935ec8a bluez5: sco-sink: fix behavior as follower
When sink is follower, and no data to write is available, it should not
schedule a timeout, but wait for the driver to wake it up again.

Fixes process ending up busylooping in data thread as follower, under
some conditions.

Also, clean up the code to be more clear about timeout logic. Just loop
directly instead of setting timeout 1, if we need to just flush more
immediately.
2022-01-31 21:59:39 +02:00
Pauli Virtanen
4bb3ff739a bluez5: keepalive A2DP source / SCO AG dynamic node transports
When acting as SCO AG / A2DP sink, the remote end should decide when to
close the connection.  This does not work currently properly, because
stopping sources/sinks releases the transport, which causes it to go
idle, and which then destroys dynamic nodes.  The sources/sinks should
not cause the transport to be released.

Implement keepalive flag for spa_bt_transport, such that
spa_bt_transport_release does not actually release the transport when
the refcount reaches zero. Set the flag for dynamic nodes when the
transport becomes pending (remote end connects) and unset the flag when
idle (remote end disconnected, or dynamic node removed).
2022-01-31 21:59:39 +02:00
Wim Taymans
24c97b1c7e context: add force-quantum and force-rate property
Add a node.force-quantum and node.force-rate property. When no global
quantum or rate is enforce with settings, the last updated node property
is used as the quantum.

Make jack use the force-quantum property when set_buffersize is used to
make sure that the quantum is not just a suggestion but a hard forced
one. This makes it possible for ardour or other jack apps to raise the
quantum above the max-quantum but also ensure that it will not change
by any other application (unless other jack apps).

Fixes #2079
2022-01-31 17:59:18 +01:00
Wim Taymans
54d50b943f global: move serial counter to context 2022-01-31 17:34:30 +01:00
Wim Taymans
8698d5a548 jack: handle metadata remove
Add a proxy listener to the metadata so that we can remove our ref to it
when it is destroyed.
2022-01-31 15:04:08 +01:00
Wim Taymans
dbab29d9db pulse-server: improve remap sink/source properties
Make the NODE_DESCRIPTION based on target sink or node.name
2022-01-31 12:40:38 +01:00
Wim Taymans
7ec920b0af pulse-server: improve remap sink/source properties
Make the same MEDIA_NAME and NODE_DESCRIPTION for both streams.
Make a better NODE_NAME for the other stream with a prefix.
2022-01-31 12:07:49 +01:00
Pauli Virtanen
a2a5012cb2 bluez5: backend-native: set transport volume on create
Initial transport volume was being set incorrectly to max for new
transports. This is usually masked by route restore, but not always.
2022-01-30 22:00:32 +02:00
Pauli Virtanen
3ffc0452a7 bluez5: backend-native: fallback switch msbc->cvsd on EOPNOTSUPP
If MSBC connect() fails with EOPNOTSUPP, trigger codec renegotiation.

When PW is AG, this also removes the msbc profile.
2022-01-30 22:00:32 +02:00
Pauli Virtanen
1da23145df bluez5: probe adapter msbc capability via hci commands
Using a probe connection to determine adapter msbc capability causes
problems on some adapters (ff8c3d2, 84bc0490a5, 717004334b,
pipewire#2030) and seems to be a bad idea.

Go back to probing for transparent msbc transport capability via HCI
commands. bluetooth/hci.h may be deprecated later, but for now it's
better to go back to using it.  (In practice, adapters not supporting
esco appear to be fairly rare; kernel commit in 2013 refers to "older
devices", so if we can't use HCI, assume the adapter supports the
necessary modes.)
2022-01-30 22:00:32 +02:00
Valentin Hăloiu
483831e514
bluez: handle non-hexadecimal XAPL version strings 2022-01-29 21:13:45 +00:00
Wim Taymans
115875dc5b pulse-server: add more properties
Add device.class property
2022-01-29 11:21:31 +01:00
Wim Taymans
78ff44b91d pulse-server: fill description for remap module
See #2076
2022-01-29 11:11:44 +01:00
Bart Ribbers
b3394f36b9 ci: add Alpine target to test Musl builds 2022-01-29 07:29:34 +00:00
Wim Taymans
7201b079fc meson: reverse intl check
If we have a library, use that, otherwise use the normal dep.

Might fix build on musl
2022-01-29 08:28:15 +01:00
Wim Taymans
6543899fe6 pulse-server: implement stream_buffer_attr 2022-01-28 17:34:36 +01:00
Wim Taymans
ce03fc7c15 pulse-server: increase maxlength to match tlength
When we need to increase tlength because of a quantum change, increase
maxlength as well, but clamp it to MAXLENGTH.

See #2069
2022-01-28 16:23:42 +01:00
Wim Taymans
1ac1f914e3 pulse-server: allows allocate MAXLENGTH for the ringbuffer
See #2069
2022-01-28 16:21:03 +01:00
Wim Taymans
5ead4507cc pulse-server: ensure tlength <= maxlength
See #2069
2022-01-28 16:15:26 +01:00
Wim Taymans
ead827d6cb modules: limit the max amount of items in the protocol
For now, put a limit on the amount of items we can send and receive
over the native protocol. A more complex way of allocating and freeing
can be implemented later when we really need to raise the limits.

Fixes #2070
2022-01-28 15:55:44 +01:00
Wim Taymans
92198e4d0d spa: clamp required alignment to cpu alignment
pipewire will allocate buffers aligned to the max alignment required for
the CPU. Take this into account and don't expect larger alignment.

Fixes a warning in mixer-dsp when the CPU max alignment is 16 but the
plugin requires 32 bytes alignment for the AVX2 path (that would never
be chosen on the CPU).

See #2074
2022-01-28 11:49:06 +01:00
Wim Taymans
36d78c41a0 modules: refactor permissions parsing 2022-01-28 10:51:09 +01:00
Wim Taymans
98aa2a04c7 modules: refactor param_info_parsing
To add more checks later.

See #2070
2022-01-28 10:35:14 +01:00
Wim Taymans
ef8fa3dc6f modules: refactory param parsing
So that we can add some more checks later.

See #2070
2022-01-28 10:25:30 +01:00
Wim Taymans
71a86877b7 modules: refactor parse_dict
Make a macro from parse_dict and move the n_items parsing and alloca
in it. This should make it easier to check the data.

See #2070
2022-01-28 10:01:12 +01:00
Maciek Borzecki
78a239a370 spa/bluez: enable sbc-xq for JBL Endurance Run BT headset
Enable SBC-XQ codec for the JBL Endurance RUN BT headset. The codec worked well
with pulseaudio and works equally well with pipewire.

Signed-off-by: Maciek Borzecki <maciek.borzecki@gmail.com>
2022-01-28 07:58:22 +00:00
Peter Hutterer
6bd1bec2a4 ci: test with all auto() features enabled
This should catch any potential issues with conflicting options, missing
libraries, etc.

We need to disable aptx and roc because Fedora doesn't ship those
libraries, and we disable libcamera because it's a moving target and
shouldn't hold up the pipeline.
2022-01-28 10:45:11 +10:00
Wim Taymans
fd1112c4e2 modules: add latency and rate params to protocol-simple
See #2068
2022-01-27 16:56:22 +01:00
Wim Taymans
ee007eaf6c modules: improve simple-protocol arguments
Use the format parsing code to also parse the channel_map.
Improve serialization of the properties.

See #2068
2022-01-27 16:31:01 +01:00
Wim Taymans
0ba5aebf0b mem: add debug for new fd 2022-01-27 15:08:44 +01:00
Wim Taymans
5ab031b472 loop: remove the eventfd to stop the loop
We can just as well use _invoke to schedule a task in the context
of the loop.
2022-01-27 15:07:38 +01:00
Wim Taymans
3256c6e5e7 tools: fix compilation with musl 2022-01-27 14:59:11 +01:00
Wim Taymans
bb5c43b5ba pw-cli: add support for sending commands to a node
So that it can be suspended manually.
2022-01-27 12:34:54 +01:00
Wim Taymans
398b04e145 spa: fix the event and command type info
The object id needs to have the object type as the parent.
2022-01-27 12:34:04 +01:00
Wim Taymans
f2906a26f1 alsa: sync TI2902 conf with pulseaudio
Adn reenable it to see if it improves things again.
2022-01-27 11:10:24 +01:00
Wim Taymans
4660e16d5b meson: enable some more warnings
Fix some warnings
2022-01-27 11:07:17 +01:00
Wim Taymans
c4ca245b24 0.3.44 2022-01-27 10:17:53 +01:00
Peter Hutterer
3c6e93b69d ci: bump to use Fedora 35 2022-01-27 14:51:19 +10:00
Peter Hutterer
4a745026bc ci: bump to the latest ci-templates
Let's pick up the various fixes to the templates in the last year or so.
2022-01-27 14:50:57 +10:00
Wim Taymans
f0cc49766f jack: use serial for uuid
We must use the serial for generating the uuid.

We use the serial for the port_id and jack_port_uuid_generate() can
be used to turn that into a uuid. So all mappings to and from
uuid need to be with serials.
2022-01-26 17:47:03 +01:00
Wim Taymans
420d65fb38 pw-cli: add pattern matching lookups
ex:

pw-cli e alsa_card.usb-BEHRINGER_UMC404HD_192k-00 Profile
pw-cli ls alsa_input*
2022-01-26 16:32:35 +01:00
Wim Taymans
b7e0b5437b pw-dump: add pattern matching
Do pattern matching on object properties to also allow lookups on
type, object.path, object.serial and <type>.name.

ex:

  pw-dump alsa_card.usb-BEHRINGER_UMC404HD_192k-00
  pw-dump alsa_input*
  pw-dump Node
2022-01-26 16:31:38 +01:00
Wim Taymans
97d571d1e7 pw-cli: improve object lookup
Also allow object lookup with object.serial, and <type>.name
2022-01-26 15:12:27 +01:00
Gleb Popov
ecee25a047 Enable pipewire-jack on FreeBSD CI 2022-01-26 14:37:19 +03:00
Gleb Popov
6c5c3dc090 Fix build on recent FreeBSD 13-STABLE 2022-01-26 14:37:19 +03:00
Gleb Popov
44b18b86cd Fix build on FreeBSD by defining bswap_64. 2022-01-26 14:37:19 +03:00
Wim Taymans
0538034ed3 context: move linked nodes when assigning a driver
When a node that requires a driver is moved to a driver, collect all
linked nodes and move them to the driver as well.

This fixes the case where a single jack node (zita-n2j) is linked to
paplay. The zita-n2j node is moved to the dummy driver but paplay is not
and so nothing happens before this patch.
2022-01-26 12:25:35 +01:00