Commit graph

9776 commits

Author SHA1 Message Date
Pauli Virtanen
7066aa7e15 bluez5: fix build_profile index handling
The codec profiles come at profile indices after the no-codec profiles.
Make the codec clearer by not using magic numbers here.
2022-10-12 07:26:00 +00:00
Pauli Virtanen
9846e0cb7a bluez5: in SelectProperties, parse QoS values and pass to get_qos
The codec may need to take into account endpoint preferred QoS values,
so parse this information and pass it to the codec's get_qos.

All the QoS struct values need to be set, as otherwise BlueZ may pass
uninitialized zero values over the air, which devices can reject.  This
does not apply to CIG/CIS ids, which are automatically allocated by
default.

Fixes connecting to nrf5340 devkit, which requires a valid TargetLatency
value.
2022-10-12 07:26:00 +00:00
Barnabás Pőcze
61453b91bd spa: bluez: dbus: emit added devices when adding new listener
Previously, when a new listener was registered,
it was not made aware of the already added devices.
2022-10-08 18:16:25 +02:00
Barnabás Pőcze
52af41850d spa: bluez: dbus: harmonize label indentation 2022-10-08 18:05:11 +02:00
Barnabás Pőcze
fd979a3cf7 spa: bluez: dbus: use tabs for indentation 2022-10-08 18:05:11 +02:00
Barnabás Pőcze
253c8b48fc spa: bluez: dbus: use spa_strstartswith() 2022-10-08 18:05:11 +02:00
Barnabás Pőcze
8ca5c0f15b spa: bluez: dbus: do not use NameHasOwner()
Commit 947ee152d3 ("bluez: check dbus service before enumerating objects")
introduced a check that would esure that GetManagedObjects()
is not called if the "org.bluez" name has no owner. This
was done to avoid auto-starting the bluez daemon.

However, this is not needed because it is possible to set on
a per-message basis whether or not the destination service
should be automatically started by the dbus daemon.
2022-10-08 17:59:41 +02:00
Barnabás Pőcze
1d3497b0cd spa: bluez: dbus: do not call GetManagedObjects() if there is a pending call 2022-10-08 17:59:41 +02:00
Barnabás Pőcze
bf18d948b3 spa: bluez: dbus: immediately unref pending call after retrieving reply 2022-10-08 17:59:41 +02:00
Barnabás Pőcze
58d9fbff88 spa: bluez: dbus: keep a reference to the GetManagedObjects() call 2022-10-08 17:59:41 +02:00
Barnabás Pőcze
008d836608 spa: bluez: dbus: do not call GetManagedObjects() again
If a reply to a previous GetManagedObjects() call have been
received, and there is no reason to call it again, do not do it.
2022-10-08 17:59:41 +02:00
Wim Taymans
9dd1c78f50 module-rtp: for multicast we need to add the TTL 2022-10-07 16:40:04 +02:00
Wim Taymans
c06f936a88 module-rtp: improve properties 2022-10-07 16:12:22 +02:00
Wim Taymans
37f57dc09f module-rtp: add some more properties 2022-10-07 15:57:12 +02:00
Wim Taymans
01058d9b4c audioconvert: avoids pops and clicks when activating resampler
When we were using the resampler and then bypass it when the configured
rate == 1.0, we create a pop because we don't process the queued data in
the resampler anymore.

Avoid this by keeping the resampler active as soon as the rate property
is set on the audioconvert. The resampler itself will use a more
efficient copy method in that case anyway and it is expected that the
rate will change again later when we need to reactivate the resampler.
2022-10-07 15:05:22 +02:00
Wim Taymans
0d7e20534f module-rtp: half buffer-time for node latency
Spend half of the allowed latency on buffering and the other half
on the node-latency.
2022-10-07 13:05:17 +02:00
Wim Taymans
b32093b896 module-rtp: receive packets in the RT thread 2022-10-07 13:04:46 +02:00
Wim Taymans
f87654eb17 module-rtp: use MTU to set the latency 2022-10-07 12:59:29 +02:00
Wim Taymans
7fd16b8a77 module-rtp: set higher priotity on sender socket 2022-10-07 12:59:29 +02:00
Wim Taymans
ecc53cfcdb module-rtp: handle non-multicast addresses
Handle errors when creating a session by destroying the session.
2022-10-07 10:33:24 +02:00
Wim Taymans
0397d7b2be alsa-udev: avoid meth with void pointers 2022-10-06 19:34:09 +02:00
Demi Marie Obenour
8e43c41ac1 Add more parentheses
This was missed in the earlier MR.
2022-10-06 12:12:35 -04:00
Demi Marie Obenour
899c0d3d78 Disable strict aliasing
PipeWire (and SPA, for that matter) violate it.
2022-10-06 12:12:35 -04:00
Demi Marie Obenour
e8f3450a58 Fix various compiler warnings
These caused build failures with -Werror.
2022-10-06 12:12:35 -04:00
Wim Taymans
68b30e36b4 module-rtp: improve debug messages 2022-10-06 17:29:05 +02:00
Erik Fröbrant
552bca8595 pcm_pipewire: optimize by updating existing stream
pw_stream_connect can take a very long time to finish connecting. This
process continues after snd_pcm_pipewire_prepare has released lock on
pw->main_loop and during this time the device returns EBUSY on write
attempts. This adds a significant latency to playback compared to pre-
pipewire configurations. This is a problem when using for example
Gstreamer alsasink with tight time synchronization options since
GstAudioBaseSink keeps track of internal time by counting processed
samples. Also worth noting is that alsasink calls prepare often,
for example on receiving a caps event.

With this change an existing pipewire stream will be updated rather than
destroyed and re-created when prepare is called.
2022-10-06 15:13:03 +00:00
Wim Taymans
4a41a03f5c module-rtp: fix L24 sample size 2022-10-06 16:16:49 +02:00
Wim Taymans
5b2df0b35c pulse-server: handle unknown format 2022-10-06 16:14:35 +02:00
Wim Taymans
dfb6206207 module-rtp: support more formats 2022-10-06 16:04:15 +02:00
Wim Taymans
da44be28cf doc: add rtp sink to docs 2022-10-06 13:28:09 +02:00
Wim Taymans
2edfea8b5b module-rtp: add pulse-server modules 2022-10-06 13:18:35 +02:00
Wim Taymans
be1159eb66 module-rtp: make sender work
Small cleanups
2022-10-06 11:41:01 +02:00
Wim Taymans
84c666db20 module-rtp: construct and send SAP 2022-10-05 21:42:36 +02:00
Wim Taymans
3e57570e9a module-rtp: add beginnings of rtp-sink 2022-10-05 21:42:36 +02:00
Wim Taymans
1b4ade211d module-rtp: improve debug 2022-10-05 21:42:36 +02:00
Wim Taymans
18ffb1600e module-rtp: add to docs 2022-10-05 21:42:36 +02:00
Wim Taymans
04cc036f94 module-rtp: add session timeout and bye
Handle recovery better.
2022-10-05 21:42:36 +02:00
Wim Taymans
afc3c12bea module-rtp: add rate control 2022-10-05 21:42:36 +02:00
Wim Taymans
6065c699bf module-rtp: add some properties 2022-10-05 21:42:36 +02:00
Wim Taymans
f20959d62f module-rtp: add receive to ringbuffer 2022-10-05 21:42:36 +02:00
Wim Taymans
6f1e96bb59 module-rtp: work on session setup 2022-10-05 21:42:36 +02:00
Wim Taymans
14194e137f module-rtp: parse some more SDP 2022-10-05 21:42:36 +02:00
Wim Taymans
38f908e758 rtp: add SAP parsing 2022-10-05 21:42:36 +02:00
Wim Taymans
d21fc6f378 Start of RTP module 2022-10-05 21:42:36 +02:00
Frédéric Danis
fd508d395b bluez5: backend-native: Add a property to select the modem to use
By default no modem is allowed.
Property "bluez5.hfphsp-backend-native-modem" can be 'none', 'any' or the
modem device string has found in 'Device' property of
org.freedesktop.ModemManager1.Modem interface, e.g. for PinePhone
"/sys/devices/platform/soc/1c1b000.usb/usb2/2-1".
2022-10-05 19:31:50 +00:00
Frédéric Danis
c4addb102b bluez5: backend-native: Only use first modem found
Some device may have multiple modems, we should only used one, the first
found and manage changes only for this one.
2022-10-05 19:31:50 +00:00
Frédéric Danis
47700a2214 bluez5: backend-native: Add battery level indicator support
This connect to the UPower service and update the +CIND battchg indicator
2022-10-05 19:31:50 +00:00
Frédéric Danis
a37aeac273 bluez5: backend-native: Add AT+VTS support
This allows to send a DTMF key on an active call.
2022-10-05 19:31:50 +00:00
Frédéric Danis
7c05574072 bluez5: backend-native: Add AT+CNUM support
This only support the first subscriber number.
2022-10-05 19:31:50 +00:00
Frédéric Danis
3566b0739b bluez5: backend-native: Add ATDdd...dd; support
This allows to dial a number.

Memory dialing (ATD>nnn...;) is not supported as it requests access to
the contact application.
2022-10-05 19:31:50 +00:00