Wim Taymans
08f2284eea
bluez5: add device.string in properties
...
See #842
2021-03-18 12:44:09 +01:00
Huang-Huang Bao
d0636875ee
bluez5: fix memory leak on device battery path
2021-03-18 08:27:32 +00:00
Huang-Huang Bao
e9adb2844e
bluez5: clear obsolete objects also when bluetooth daemon appeared
...
See #906
2021-03-18 08:24:06 +00:00
Huang-Huang Bao
68677774fc
bluez5: fix reference to already freed spa_bt_device
...
Fixes #907
2021-03-18 12:09:30 +08:00
Björn Daase
5913eb098c
treewide: fix issues found by codespell
2021-03-16 19:11:25 +00:00
Huang-Huang Bao
75b4c80dc6
bluez5: add logic to fallback to previous behavior if connection info handling is not supportrd by session manager (i.e wireplumber).
2021-03-16 10:31:08 +00:00
Huang-Huang Bao
01df7671d5
bluez5: avoid log spamming on debug log level, use log level 'warn' on hsphfpd or ofono registering fail instead of 'error'
2021-03-16 10:31:08 +00:00
Huang-Huang Bao
374180e211
bluez5: pass per-device settings to codec handler, make 'bluez5.sbc-xq-support' a per-device setting
2021-03-16 10:31:08 +00:00
Huang-Huang Bao
af8272fe08
bluez5: create device handle before profile negotiation started so that profile handler can retrieve per-device settings
2021-03-16 10:31:08 +00:00
Pauli Virtanen
8f075619b2
bluez5: set volume for both channels when switching HFP -> A2DP
...
Retain mono volume level set with HFP, for A2DP, in case session manager
fails to restore it.
2021-03-15 23:24:40 +02:00
Pauli Virtanen
c7ad443e03
bluez5: update supported codec list when profiles changed
...
When A2DP is connected and new device profiles appear, update also
supported codec list.
Fixes missing codec profiles when A2DP is connected late.
2021-03-15 20:47:22 +02:00
Huang-Huang Bao
d6be84ddd0
bluez5: close sco socket if bluetooth daemon disappeared
...
Fixes pipewire/pipewire#853
2021-03-13 19:06:49 +08:00
Dmitry Sharshakov
e2ac16ccbd
fix: remove v-battery when device disconnects
2021-03-12 15:45:41 +00:00
Dmitry Sharshakov
a0ac3ac8dd
fix: cancel and free battery register pending call
2021-03-12 15:45:41 +00:00
Dmitry Sharshakov
5c9028a94d
bluez5-dbus: move battery provider functions, fix ghost batteries
2021-03-12 15:45:41 +00:00
Dmitry Sharshakov
48cc5915fb
chore: backend-native: remove unused define
2021-03-12 15:45:41 +00:00
Dmitry Sharshakov
2683c1ef5e
backend-native: report battery status to BlueZ
2021-03-12 15:45:41 +00:00
Dmitry Sharshakov
a1ed8aec68
chore: bluez5: move spa_bt_monitor to common header file
2021-03-12 15:45:41 +00:00
Dmitry Sharshakov
0078b3b73e
backend-native: get battery status via HFP
2021-03-12 15:45:41 +00:00
Thibault Saunier
485bae5eb0
meson: Use feature options everywhere it makes sense
2021-03-10 20:18:34 +00:00
Pauli Virtanen
98bedb3895
bluez5: don't set a2dp codec for source device initial profiles
...
Source devices don't have the a2dp codec profiles, so don't set a codec
profile as the initial one.
2021-03-10 21:32:01 +02:00
Wim Taymans
c0ab4b1b8d
bluez5: fix compiler warning
2021-03-09 12:25:20 +01:00
Pauli Virtanen
808b54bc19
bluez5: sco-io: fallback packet size when read size unknown should be even
...
Reported write MTU is odd for some adapters, which will misalign CVSD
frames, so round fallback value to even.
2021-03-09 08:03:21 +00:00
Pauli Virtanen
511bafb436
bluez5: release transports on profile change
...
SCO transports have timer-delayed release, but they need to be released
immediately when changing profiles to close connections before switching
to A2DP.
2021-03-08 23:42:08 +02:00
Pauli Virtanen
a99f3a90ef
bluez5: correct EnumRoute availability
...
Mark bluez5 routes always available in EnumRoute, because there's always
a device connected.
Fixes default-route resetting profiles back, when they are manually
changed.
2021-03-07 01:37:57 +02:00
Pauli Virtanen
e42261c6d2
bluez5: remove per-device codec filtering
...
This does not work as intended, because we no longer do a codec switch
on device connect. It should be done in a different way, but since it's
not used for anything right now, can as well remove it.
2021-03-06 15:19:14 +02:00
George Kiagiadakis
9168ec4335
backend-hsphfpd: fix compilation
2021-03-03 18:57:48 +00:00
Pauli Virtanen
4389e44903
bluez5: emit props change events only if values actually changed
...
This may avoid infinite loops if parameters are being set based on events
sent by parameter changes. It's also what alsa-acp devices do, so bluez5
should follow.
2021-03-02 23:46:27 +02:00
Pauli Virtanen
302282ef59
bluez5: set channel information for hfp/hsp transports
...
Fixes volume problems.
2021-03-02 22:20:44 +02:00
Huang-Huang Bao
97cc27600a
bluez5: add missing function defination
2021-03-02 14:08:14 +00:00
Frédéric Danis
0e2a153bd3
bluez5: Start only one backend at a time for HSP/HFP
...
This will prevent to run the different backends concurrently.
The native backend will only register to BlueZ if neither oFono nor
hsphfpd are running. If one of them starts, the native backend will be
unregistered and the corresponding backend will register to its daemon.
2021-03-02 09:43:16 +00:00
Wim Taymans
157d423246
bluez5: remove stray route param field
...
This info is also in the classes field.
2021-03-01 16:55:16 +01:00
Pauli Virtanen
6114ca7c4a
bluez5: fix queueing codec switches
...
Make queueing a codec switch work properly. When receiving the dbus
reply, it should move to latest one. Others should be discarded.
Previously, it instead hit an assert, if there were more than two
queued.
2021-02-24 21:14:25 +00:00
Pauli Virtanen
a5dc2493df
bluez5: route shouldn't list a2dp profiles when not connected
2021-02-19 21:16:27 +02:00
Frédéric Danis
7a5a944704
bluez5: backend-native: Check volume values
...
The value from +VGM/+VGS AT commands or events should be between 0 than 15.
2021-02-18 18:32:21 +00:00
Wim Taymans
930b411075
bluez5: set the right volumes on the node
2021-02-18 19:25:04 +01:00
Wim Taymans
8c5ca000ef
bluez5: volumes need to be distributed to all channels
...
Otherwise some channels might become silent.
See #741
2021-02-18 17:47:22 +01:00
Wim Taymans
63a3811aa7
fix some warnings
2021-02-18 12:42:06 +01:00
Pauli Virtanen
d75a79babc
bluez5: add delay adjustment property + fallback value for a2dp-sink
...
Not all devices report their A2DP delay. In those cases, use a fallback
value of 150ms by default.
Make the delay adjustable with a SPA_Prop, and expose it as a part of
the route. Implement the corresponding parts in media-session.
2021-02-18 11:33:45 +00:00
Pauli Virtanen
df1dbee687
bluez5: include a2dp codec profiles in route profiles
2021-02-18 11:33:45 +00:00
Frédéric Danis
bdbd0f17c6
bluez5: backend_native: Fix backend_native_new() error path
2021-02-17 14:03:06 +01:00
Frédéric Danis
01b6dbfca6
bluez5: backend_native: Add mSBC support to HFP HF
2021-02-17 10:19:39 +01:00
Frédéric Danis
7a96f3a945
bluez5: backend_native: Fix SCO deferred setup accept
...
In BT_DEFER_SETUP mode, when a connection is accepted, the listening
socket is unblocked but the effective connection setup happens only on
first receive, allowing to configure the accepted socket.
First read from the accepted socket is non-blocking and returns a zero
length buffer.
2021-02-16 18:30:11 +01:00
Wim Taymans
344eb2baa3
bluez5: handle info == NULL when parsing codecs
2021-02-16 17:58:56 +01:00
Frédéric Danis
23823867b0
bluez5: backend_native: Fix +BRSF parsing for HFP HF
2021-02-16 16:49:04 +00:00
Frédéric Danis
be7caf0e66
bluez5: backend_native: Fix default HFP codec
2021-02-16 16:49:04 +00:00
Frédéric Danis
0b2d3730b6
bluez5: Add HFP HF support
2021-02-15 14:46:18 +00:00
Pauli Virtanen
0dee15d0f6
bluez5: aac: set reasonable default bitrate
...
Set default bitrate to a reasonable value in caps, and handle unknown or
bogus bitrates from device.
2021-02-13 19:03:13 +00:00
Wim Taymans
2908e11a72
bluez5: add mSBC and CVSD codec name to properties
...
Fixes #666
2021-02-12 17:20:37 +01:00
Frédéric Danis
a14d6d15b3
bluez5: Use only one SCO listening socket in backend-native
...
Create SCO listening socket on backend creation for all incoming
connections instead of one per remote device.
2021-02-12 16:10:22 +00:00