Commit graph

13346 commits

Author SHA1 Message Date
Frédéric Danis
0e92ab9307 bluez5: backend-native: Fix 3way active call hangup
HFP/HF/TWC/BV-03-C test, which setup an active and a held calls,
expects to receive AT+CHLD=1 (release and swap calls) instead of
AT+CHUP on active call hang up request.

As this changes the active call to disconnected and held call to
being active, the call states should be managed in hfp_hf_hangup
instead of waiting for +CIEV (callheld=0) event which will drop
the previously held call before AT+CLCC reply can inform this call
is now active.
2025-03-07 08:31:24 +00:00
Frédéric Danis
90b95ae065 bluez5: backend-native: Fix incoming call crash
HFP/HF/TWC/BV-01-C test creates an incoming call as soon as the SLC is
completed, i.e. a +CIEV: <callsetup>,1 event just after AT+CHLD=? reply
has been received. This try to parse the rfcomm->telephony_ag->call_list
which has not yet been created.

This commit move the telephony_ag creation to the SLC completed event.
2025-03-07 08:31:24 +00:00
Frédéric Danis
be1fc5f3a6 bluez5: backend-native: Fix ECNR support in HFP HF SDP record
Sending AT+ECNR is supported by the native backend
2025-03-07 08:31:24 +00:00
Wim Taymans
22951a9b87 protocol: document to client-node communication flow a little 2025-03-06 16:52:27 +01:00
Wim Taymans
df1c36aec2 1.4.0 2025-03-06 13:11:38 +01:00
Wim Taymans
4e63717e77 spa: fix device.profile key 2025-03-06 13:11:38 +01:00
Taruntej Kanakamalla
a4a9d3540d gst: sink: copy frames if video buffer from other pool
In case of the video, if the buffer to be rendered is from upstream and
not from the pipewirepool, map the memory into video frames and copy the
frames instead of doing a buffer copy.

Avoid splitting of buffers in the case of video, because that might break
the frame layout, especially planar formats, for the applications which
use pipewiresink as a camera source to capture video.
2025-03-04 22:54:47 +05:30
Wim Taymans
0b5d669679 jack: add option and disable MIDI2 port flags by default
Add an option to add the MIDI2 flag on ports. This is disabled by
default because most JACK apps don't know about the flag and then
refuse to show the MIDI ports.

Fixes #4584
2025-03-04 15:51:39 +01:00
Wim Taymans
3905e3b3d3 stream: set errno to the current error
Make the state_changed event and _get_state() function set errno with
the current error value if the state is in error, so that application
can use this to give more detailed error reporting.

Use this in alsa, v4l2 and pulse to give some other error codes than
EIO.

Fixes #4574
2025-03-04 13:22:51 +01:00
George Kiagiadakis
491fb26f18 bluez5: backend-native: fix parsing +CLCC response with optional number
The format is: <idx>,<dir>,<status>,<mode>,<mpty>[,<number>,<type>]
so the response can be considered parsed when mpty is read.
2025-03-04 08:29:30 +00:00
Stefan Ursella
fb7c37aeb4 alsa-pcm: recognize headroom to calculate max_error and max_resync 2025-03-03 12:26:05 +01:00
Nicolas Fella
398914e609 Add missing includes to metadata.h
Fixes https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/4575
2025-02-25 12:49:46 +00:00
Philippe Normand
9296d1645f gst: deviceprovider: Notify default devices changes
This allows GStreamer apps using GstDeviceMonitor to be notified when the user
changes the default input/output devices.
2025-02-25 12:48:21 +00:00
Wim Taymans
54836736b0 pod: avoid use-after-free error because of reallocation
When the pod to filter is in the target builder memory and reallocation
is needed, make sure we refer to the filter in the reallocated memory
instead of the old freed memory.

Fixes #4445
2025-02-25 13:18:37 +01:00
Wim Taymans
fb4475b5da adapter: evaluate node rules before loading the follower
So that the right node.rules are applied to the follower.

See #4562
2025-02-20 17:06:24 +01:00
Wim Taymans
e67c1bc734 1.3.83 2025-02-20 15:19:41 +01:00
Wim Taymans
c6de17c9b4 spa: improve introspection 2025-02-19 18:07:54 +01:00
Wim Taymans
e825a6ae6c modules: reduce some errors from warn to info
Some of the more common errors (caused by packet loss, network jitter, ...)
should be reported with INFO unless there is some indication about how
to fix the problem.

Fixes #4559
2025-02-18 16:24:52 +01:00
Wim Taymans
3270bd4552 module-roc: add some more options
To configure the resampler backend and latency-tuner. This is mostly
to work around potential bugs in the ROC resampler backend.

See #4516
2025-02-18 15:51:39 +01:00
Pauli Virtanen
8cd8138cc8 bluez5: specify node.latency at node rate
Avoid some potential rounding-down-to-power-of-2 by specifying the
wanted latency at the samplerate of the stream. Also looks nicer in
pw-top.
2025-02-17 19:42:56 +02:00
Wim Taymans
62035963a3 protocol-native: support abstract socket addresses
They start with @ and do not create a file in the file system.
2025-02-17 16:50:16 +01:00
Wim Taymans
cfc8d414a9 module-rtp: fix SSRC warnings
Fix indentation and also suppress the SSRC warning for other formats
than audio.
2025-02-17 10:21:17 +01:00
Arun Raghavan
5e295815bf module-rtp-sap: Add a couple of SDP parsing validations 2025-02-15 22:42:46 -05:00
Arun Raghavan
25e58995f5 module-rtp-sap: Silently ignore other SSRCs if we know the receiver SSRC
If we know the receiver SSRC from the SAP, we can happily ignore packets
on other SSRCs.
2025-02-15 22:32:12 -05:00
Arun Raghavan
13e3918f81 module-rtp-sap: Publish sender SSRC if we have it
Can be handy on the receiver side.
2025-02-15 17:58:34 -05:00
Arun Raghavan
dbf0442c7e module-rtp-sap: Fix sending first session SDP
We don't initially have the SAP socket open, so we can't generate an SDP
(because we don't have the interface address). So in addition to the
regular flow, also trigger SDP creation after opening the SAP socket, so
we can have a valid SDP for the announcement.

The sending was broken in commit a44afd84. We delay the SAP fd openeing
for reasons explained in commit f2f204d6).
2025-02-15 17:58:34 -05:00
Wim Taymans
f8272c767f profiler: scale quantum with rate
When we have a forced or suggested rate, adjust the latency with the
new denominator.

Fixes #4555
2025-02-15 14:09:25 +01:00
Pauli Virtanen
75243b7b02 bluez5: set node.rate for output streams
As AG, set node.rate for output streams that originate from remote
source, so that graph switches rate as needed.  This follows what
pipewire-pulse etc. do.

The patch is by Wim.
2025-02-14 19:59:50 +02:00
Wim Taymans
1c9b5fd258 link: deprectate using port.id in link-factory
It is ambiguous when the port.id also matches a port object.id.
2025-02-14 11:19:54 +01:00
Wim Taymans
152acf69c2 link-factory: check that the port belongs to the node
When both node and port are given, check that the port belongs to the
node. If it doesn't, it could be that we found a Port using the
object.id but we should have used the port.id of the node.
2025-02-14 10:58:11 +01:00
Wim Taymans
cfddbb033a doc: clarify the port id
It might be confused with port.id to state explicitly that this is
actually the object.id of a port.
2025-02-13 21:11:06 +01:00
Sanchayan Maity
dbed1bdf3d bluez5: asha-codec-g722: Drop the dependency on FFmpeg
We use the G722 encoder from Android itself and drop
the dependency on FFmpeg/libav.
2025-02-13 19:55:18 +05:30
Wim Taymans
27e0338f24 pulse-server: clarify pulse.rules properties 2025-02-12 15:19:29 +01:00
Wim Taymans
d5f0c8a550 context: handle transport updates better
The transport update is set in the node properties. If one client tries
to start and another tries to stop we have two conflicting desired states
in the nodes.

Fix this by making the state update a one time property and remove it
from the sever and client properties after updating it. We then need to
keep the new state around and apply it once.

Keep the node driver state as it is unless there was a transport state
update.

Fixes #4543
2025-02-11 12:01:20 +01:00
Wim Taymans
98b6469b88 audioconvert: handle rate_scale in both directions
We need to take the direction of the conversion into account when
deciding if we should apply rate scaling.
2025-02-11 11:58:55 +01:00
Wim Taymans
03a006b22e jack: demote some info to debug 2025-02-11 11:58:22 +01:00
Piotr Drąg
7b34f82f73 Update Polish translation 2025-02-09 14:37:04 +00:00
Piotr Drąg
bf3615c5fc po: add a false positive to POTFILES.skip 2025-02-09 14:51:59 +01:00
Joakim Tjernlund
c374aaca5b 90-pipewire-alsa.rules: Check firewire before pci
Fixes #4528
2025-02-07 16:43:52 +01:00
George Kiagiadakis
48fb960274 bluez5: backend-native: fix erroneous goto
In this error condition, execution is supposed to return immediately
because rfcomm is no longer valid. However, the code was incorrectly
changed to jump to the done label, which would try to use rfcomm
again to process pending commands.
2025-02-07 13:14:59 +02:00
Frédéric Danis
62645214a7 bluez5: telephony: Postpone AT commands if one is already in progress
To be sure that the AG reply correspond to the command sent, this
postpone the new command if previous reply (OK, ERROR or +CME) has
not yet been received.
The postponed command is sent on reception of the reply.
2025-02-06 17:25:17 +01:00
Frédéric Danis
fc45aba032 bluez5: telephony: Add configuration to disable NR/EC
This allows to disable the Noise Reduction and Echo Cancellation
on the Audio Gateway.
2025-02-06 17:25:12 +01:00
Frédéric Danis
b7c00e2f24 bluez5: telephony: Add CMEE support 2025-02-06 17:24:42 +01:00
Wim Taymans
7e5cd195ac 1.3.82 2025-02-06 11:37:00 +01:00
Jonas Holmberg
c68b20e59b module-rt: Don't warn when rtkit is disabled
Change warning to info level for the message that is logged when regular
realtime isn't available and rtkit fallback is disabled in config.
2025-02-05 10:41:49 +01:00
Wim Taymans
4d502cb470 bluez: org.freedesktop.PipeWire -> org.pipewire
We have our own domain name.
2025-02-05 10:18:17 +01:00
George Kiagiadakis
b8e202f02e bluez5: telephony: add call transfer with user interaction capability
This allows implementing UI mechanisms to transfer the audio of a call
to the HF (pipewire) only when the user explicitly asks/allows it.

Normally, when a call is connected, the phone initiates a SCO connection
and the HF accepts it, transfering audio automatically. In order to
allow for user interaction, this patch enables the UI to set the RejectSCO
property to 'true' in order to automatically reject the SCO connection.
Later on, at the UI's discression, the audio may be reconnected by calling
the Activate() method, which sends AT+BCC to re-initialize the SCO channel.

A configuration file option is also added to configure the default value
of the RejectSCO property. By setting this to 'true' in the config file,
it is possible to implement rejecting the audio of a call that is already
active at the time the Bluetooth connection to the phone initializes.
2025-02-05 08:50:24 +00:00
George Kiagiadakis
7de0419ca3 bluez5: telephony: add Address property on the AudioGateway interface
This allows associating the AG with a remote device on higher level
software.
2025-02-05 08:50:24 +00:00
Frédéric Danis
a0356cf4ae bluez5: backend-native: Fix parsing of +CLCC event for PTS
PTS 8.7.3 Build 6 send +CLCC events without space after '+CLCC:'
Found with PTS test HFP/HF/ICA/BV-04-C
2025-02-05 08:50:24 +00:00
Frédéric Danis
99fa7efc2c bluez5: backend-native: Add eSCO S4 feature.
eSCO S4 feature is mandatory since HFP 1.7.
Found with PTS test HFP/HF/SLC/BV-03-C.
2025-02-05 08:50:24 +00:00