Commit graph

13788 commits

Author SHA1 Message Date
Wim Taymans
5c8e1ab7b6 jack: only update port name for other ports
Don't try to check for renames of our own port, we cause that
ourselves.

Also use the name of the port to find our ports.
2025-06-24 13:44:53 +02:00
yay me
b2edefbc4c po: Add Arabic translation 2025-06-24 07:00:17 -04:00
Elliot Chen
43441a4d69 pipewiresrc: fix sending last buffer failure if waiting operation exits in advance 2025-06-23 16:16:13 +00:00
Wim Taymans
4b236f8274 stream: fix a typo 2025-06-23 11:34:43 +02:00
Arun Raghavan
220b037683 pulse-server: Implement stream suspended callback 2025-06-23 09:19:10 +00:00
Wim Taymans
fd2db174c1 pipewire: update global properties
When the properties of an object change, update the properties on the
global as well. There is no way to notify clients of a changed global
but they are supposed to listen to the object specific events for that.
The global properties are meant to be a snapshot at the time of
enumerating the registry and can change later.
2025-06-23 10:42:47 +02:00
Pauli Virtanen
7fd05e7eaa bluez5: drop old SCO fragment data when sink starts
Any pending SCO fragment data should be cleared when sink starts, so
that we don't send out any old data.
2025-06-21 16:13:57 +03:00
Pauli Virtanen
665a27f281 bluez5: replace sco-source with media-source
Change media-source to use sco-io for HFP codecs.

Replace sco-source with media-source.

sco-source is mostly copypaste from media-source, only differed in the
IO handling.
2025-06-21 16:08:30 +03:00
Pauli Virtanen
5b4e9dc33e bluez5: replace sco-sink with media-sink
Change media-sink to use sco-io for HFP codecs.

Move SCO fragmentation to sco-io side.

Replace sco-sink with media-sink.

sco-sink is mostly copypaste from media-sink, and only differed in the
fragmentation detail, which can as well be handled on sco-io side.
2025-06-21 16:08:30 +03:00
Pauli Virtanen
f9b0bf3f95 bluez5: limit CVSD block size
Don't try to write data in too large blocks.

This controls the maximum amount of data to send at once. sco-io will
buffer and fragment packets to the right size.

Previously in sco-sink, SO_SNDBUF was not set, so there could be a
longer queue in the socket.
2025-06-21 16:08:30 +03:00
Wim Taymans
2f74789a92 jack: support port_rename callbacks
Look at the port name in the port_info properties and emit the
port_rename callback when it changes.

Fixes #4761
2025-06-20 16:28:26 +02:00
Wim Taymans
f3ff25c936 alsa: don't log unknown events with info
Debug is good enough
2025-06-20 15:49:17 +02:00
Pauli Virtanen
b91864eb37 bluez5: don't crash on codecs without caps_preference_cmp
E.g. LDAC doesn't have that. Add the missing guard that was accidentally
dropped in the rewrite.

Also explicitly filter out non-A2DP/BAP codecs that can't be used in
ensure_media_codec
2025-06-19 12:03:13 +00:00
Wim Taymans
cad0523617 audioconvert: refactor volume ramping
We don't actually have to store the ramp parameters so allocate them on
the stack and then use them to generate the sequence.

Make it possible to generate a sequence into a custom buffer as well.

Make sure we use the right rate (the graph rate) to calculate the number
of samples when converting from time to samples.
2025-06-19 11:16:34 +02:00
Wim Taymans
8047a37b02 spa: remove control type from formats
We just want to negotiate the control stream, we don't really care
about what is in the control stream.
2025-06-18 15:23:16 +02:00
Wim Taymans
2e18d5f70c doc: update pw-cli man page
Fixes #4744
2025-06-18 15:18:09 +02:00
Wim Taymans
343509abdf pw-cli: add type info to variables
Add type info to variables. This way we can avoid doing things on
variables of the wrong type.

Add a list-vars command to list the currently registered variables and
their type.

Fixes #4746
2025-06-18 15:02:20 +02:00
Wim Taymans
b51755bc8b pulse-server: add stream_properties for RTP streams 2025-06-18 12:29:39 +02:00
Wim Taymans
54923bf5bd alsa: remove UMP negotiation constraint
Otherwise we won't be able to negotiate with a port that only wants old
style midi.

Instead just negotiate the control link, conversion to old style midi
will be done in the control mixer for the old client.

Fixes #4759
2025-06-18 10:10:10 +02:00
Wim Taymans
7ce9b0daec spa-json-dump: fix compilation 2025-06-17 18:08:36 +02:00
Wim Taymans
b67226fa0c spa-json-dump: add -i and -s options
Add -i option to change the indentation
Add -s option to generate simplified SPA JSON
2025-06-17 17:27:10 +02:00
Wim Taymans
a6199c92a4 filter-graph: make sure strdupa is defined
Fixes #4756
2025-06-17 15:17:47 +02:00
Harald Sitter
b57b87abbb alsa: add Teufel Cage Pro mapping 2025-06-17 11:33:38 +00:00
Wim Taymans
f2905c74ed alsa-udev: support alsa.use-ucm
Make a new alsa.use-ucm option that sets api.alsa.use-ucm on the device
it creates (when set).

There is some documentation floating around (thr arch wiki) with this
property.

See #4755
2025-06-17 12:54:39 +02:00
Wim Taymans
58aab3e16b pw-dump: add -i and -s options
-i can be used to configure the indentation (default 2)
-s can be used to output simplified SPA JSON
2025-06-17 11:01:28 +02:00
Wim Taymans
953b0f81ad filter-graph: make sure M_PIf is defined 2025-06-17 09:25:54 +02:00
Wim Taymans
0b2b723a0e filter-graph: add a zeroramp plugin
The filter detects unnatural gaps (consisting of 0.0 values) and will
ramp-down or ramp-up the volume when entering/leaving those gaps.

This makes it filter out the pops and clicks you typically get when
pausing and resuming a stream.

See #4745
2025-06-17 09:14:18 +02:00
Frédéric Danis
75b4c3379d bluez5: hfp-hf: If available use AT+CLCC only to update calls state 2025-06-16 09:17:21 +02:00
Frédéric Danis
2cb678edb3 bluez5: hfp-hf: Remove disconnected calls from call list
After AT+CLCC command completion, the calls which has not been listed
should be removed.
This list the calls returned by AT+CLCC to be able to find the ones which
has not been listed but still in the call_list.
2025-06-16 09:17:20 +02:00
Frédéric Danis
931b6d9ad8 bluez5: hfp-hf: Fix condition for hfp_hf_swap_calls
AT+CHLD=2 can be called even if there is no active call, the only
condition is to have at least one held call.
2025-06-16 09:10:50 +02:00
Pauli Virtanen
3922247356 bluez5: sco-source: pass read mtu to codec 2025-06-15 14:35:32 +03:00
Pauli Virtanen
b869305282 bluez5: fix CVSD decode()
"Decoding" in CVSD should just copy bytes, packets may be any size.
2025-06-15 14:20:39 +03:00
Pauli Virtanen
dc618d37c6 modules: fix missing free/close and length checks
Fix some missing free and close.

Fix not checking length of received netjack data.
2025-06-14 15:24:05 +03:00
Pauli Virtanen
baadda3b67 tools: fix some missing free/close 2025-06-14 15:21:29 +03:00
Pauli Virtanen
3539374ba7 spa: alsa: fix some coverity warnings
NULL checks.

Change pa_x* malloc functions act like the pulseaudio ones: assert on
failure, as code assumes that.
2025-06-14 14:38:26 +03:00
Pauli Virtanen
7f2bdab8ea bluez5: fix some coverity issues
Missing null pointer checks, wrong array indices, uninitialized/unused
variables.
2025-06-14 14:34:55 +03:00
Pauli Virtanen
26b09b0ee3 bluez5: temporarily remove BAP nodes when another device is switching
Unicast BAP codec switch requires CIG reconfiguration, which cannot be
done if there is an acquired transport.

When doing BAP codec switch, disable nodes of other devices sharing the
same CIG.

To avoid problems with node start/stop, just remove and re-add them.
2025-06-13 22:16:03 +00:00
Pauli Virtanen
3ed969144a bluez5: bap: prefer 32 kHz in/out for duplex configuration
I'm not aware of any devices that support 48 kHz output in duplex
configuration, so disable that for now.

Doing this properly requires catching errors when on transport Acquire,
and switching to another configuration if the error was due to bad
configuration.

Due to how BAP specification works, it's not necessarily possible to
know whether a configuration was really accepted at earlier stage, and
anyway there's no proper error -> reconfiguration handling currently on
BlueZ side either.
2025-06-13 22:16:03 +00:00
Pauli Virtanen
209820bab8 bluez5: add separate BAP sink/source/duplex profiles
If device supports duplex, show also separate sink-only/source-only
profiles.

Devices don't necessarily support high-quality audio in duplex profile,
so add sink/source only profiles.

This is also a workaround for the current situation that devices may
signal duplex support, but the attempted duplex configuration fails to
work.
2025-06-13 22:16:03 +00:00
Pauli Virtanen
8795298f69 bluez5: implement BAP ucast reconfiguration
Use SelectProperties() DBus API to reconfigure BAP unicast setup.

Add support to spa_bt_ensure_codec() to select whether to configure as
sink/source/duplex.
2025-06-13 22:16:03 +00:00
Pauli Virtanen
592a97a7b0 bluez5: keep BAP endpoint properties in spa_bt_remote_endpoint
Make QoS, Context etc. always up to date in spa_bt_remote_endpoint.
2025-06-13 22:16:03 +00:00
Pauli Virtanen
6e0970c14b bluez5: simplify codec switch code
Simplify codec switching code: determine what switch to perform
immediately in spa_bt_device_ensure_media_codec().

The previous code doing "fallback" switching to various codecs is not
useful, as A2DP generally disconnects on the first failure and all
remote endpoints disappear.

Add iteration over multiple endpoints, for reconfiguring both source and
sink directions at the same time.  This is in preparation of supporting
BAP reconfiguration (for A2DP there's usually only one direction
connected at a time).
2025-06-13 22:16:03 +00:00
Pauli Virtanen
a30d385636 bluez5: reduce debug spam 2025-06-13 22:16:03 +00:00
Pauli Virtanen
64f2f38ec4 bluez5: support LC3-24kHz HFP codec available on some Apple devices
Add support of HFP codec used on eg Apple AirPods 3+, transporting LC3
mono @ 24kHz
2025-06-13 22:15:29 +00:00
Pauli Virtanen
6982bb8c7f bluez5: backend-native: set best codec also when retrying on timeout
Try again setting best available codec, not MSBC, when retrying if no
response to previous +BCS: command.
2025-06-13 22:15:29 +00:00
Martin Geier
d04ee91714 plugins: alsa: increase follower write synchronization when htimestamps are enabled
alsa_write_sync can insert or remove some data from alsa when
resynchronization is needed.
Avail and delay are equal when high precision timestamps are not allowed.
When the high precision timestamps are enabled, the delay is avail
adjusted to current_time.

Signed-off-by: Martin Geier <martin.geier@streamunlimited.com>
2025-06-13 22:14:34 +00:00
Pauli Virtanen
7e135a5235 bluez5: fix compilation 2025-06-13 21:06:08 +03:00
Pauli Virtanen
df591638a5 bluez5: indicate codec support status for ofono/hsphfpd
Indicates codecs properly.
2025-06-13 17:51:16 +00:00
Pauli Virtanen
52fc22a76b bluez5: make sure mandatory codecs are always enabled
It should not be possible to disable mandatory codecs: csvd, sbc, lc3
2025-06-13 17:51:16 +00:00
Pauli Virtanen
9f34e962a6 bluez5: backend-native: don't hardcode available HFP codecs
Remove most hardcoding of possible HFP codecs. Instead, get what is
available from codec lists.
2025-06-13 17:51:16 +00:00