Commit graph

9604 commits

Author SHA1 Message Date
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
Frédéric Danis
20572a1789 bluez5: backend-native: Add AT+CLCC support
This allows the HFP HF to retrieve the list of calls with their index,
state and remote number (if available).

This commit shared the list of calls between modemmanager.c and
backend-native.c, and switches call state storage from ModemManager
states to CLCC states
2022-10-05 19:31:50 +00:00
Frédéric Danis
55075915ec bluez5: backend-native: Add AT+CLIP support
This allows to send the caller number of an incoming call with the RING
event.
2022-10-05 19:31:50 +00:00
Frédéric Danis
4a89a13bda bluez5: backend-native: Support of ATA and AT+CHUP
Allow to answer, reject or terminate a call.

Answering or rejecting a call can only be done on an incoming call.
Terminating a call can only be done on active, dialing or alerting call.
2022-10-05 19:31:50 +00:00
Frédéric Danis
e9b82252f7 bluez5: backend-native: Add AT+CMEE support
Returns extended error report instead of just "ERROR" messages when
extended report has been activated by AT+CMEE=1 command.
2022-10-05 19:31:50 +00:00
Frédéric Danis
43c4d95794 bluez5: backend-native: Link with ModemManager Call object
Update the +CIND call and callsetup indicators when Call object state
change.
2022-10-05 19:31:50 +00:00
Frédéric Danis
5b40ed62b4 bluez5: backend-native: Link with ModemManager Voice object
The Voice object lists the Call objects, which provides status of each call.

+CIND call indicator is set if at least one of the call is active.
+CIND callsetup indicator is set if one of the call is in ringing in or out
or dialing state.
2022-10-05 19:31:50 +00:00
Frédéric Danis
275d2bc603 bluez5: backend-native: Link with ModemManager Modem3GPP object
The Modem3GPP provides information about the network the modem is registered
to like the operator name and roaming status.
2022-10-05 19:31:50 +00:00
Frédéric Danis
13f0a0755e bluez5: backend-native: Link with ModemManager Modem object
The Modem object provides the own number (used by +CNUM), the network
service availability and signal strength (used for the +CIND).

+CIND indicators can be activated/deactivated using AT+BIA except for
call, callsetup and callheld indicators which should always reported.
All indicators are enabled on connection.
2022-10-05 19:31:50 +00:00
Frédéric Danis
d02a646366 ci: Add ModemManager-dev
This library is requested to build ModemManager support in bluez native
backend
2022-10-05 19:31:50 +00:00
Frédéric Danis
28533cb615 bluez5: backend-native: Add a ModemManager dependency
Some Linux phones doesn't use oFono but ModemManager to control the modem.
2022-10-05 19:31:50 +00:00
Sanchayan Maity
05a133f5b5 pw-link: Improve error message if ports are not found
In a scenario where pw-link is called without a session manager running,
the output port on a node will not exist. In such a case, we broke out
of the for loop with all_links_exist set to true and returning EEXIST.

The return of EEXIST gives a confusing error message. Fix this.
2022-10-05 18:08:32 +05:30
Wim Taymans
4574678424 conf: load module-x11-bell if available
Fixes !1375
2022-10-03 12:00:16 +02:00
Wim Taymans
750b4cdf7a filter-chain: increase tail size 2022-10-03 10:50:27 +02:00
Wim Taymans
0096836af0 filter-chain: guard against NULL convolver
The convolver can be NULL when the IR has 0 length.
2022-10-03 10:49:47 +02:00
Wim Taymans
16b7ab29c1 filtet-chain: set errno on errors 2022-10-03 10:49:32 +02:00
Wim Taymans
cc4a635b2f filter-chain: add some more debug 2022-10-03 10:22:50 +02:00
Wim Taymans
94a6426861 filter-chain: iterate the port correctly
Don't use the number of handles to iterate the output ports but the
number of output ports on the node.

Fixes #2737
2022-10-03 09:55:44 +02:00
Wim Taymans
94a857550b filter-chain: alloc port data per handle. 2022-10-03 09:44:32 +02:00
Wim Taymans
9b6e504c19 clean up some more array iterations 2022-10-03 09:20:42 +02:00
gogogogi
0b98614bea Update Croatian language and pipewire.pot 2022-10-02 21:01:41 +00:00
Wim Taymans
d22feab92a spa: add macro to simplify array iterations some more
uint32_t i;
	for (i = 0; i < SPA_N_ELEMENTS(some_array); i++)
		.. stuff with some_array[i].foo ...

   becomes:

	SPA_FOR_EACH_ELEMENT_VAR(some_array, p)
		.. stuff with p->foo ..
2022-09-30 16:24:26 +02:00
Wim Taymans
365ebcda9b spa: ensure macro args are evaluated only once
In ROUND_UP and ROUND_DOWN
Make some better versions of the ROUND_DOWN_N and ROUND_UP_N
macros.

Fixes #2724
2022-09-30 16:24:26 +02:00